Re: [exim] Exim not always logging Message-ID

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Mike Brudenell
Date:  
À: Exim Users
Sujet: Re: [exim] Exim not always logging Message-ID
On 2 June 2016 at 07:23, Jasen Betts <jasen@???> wrote:

> the generated message_ids are easily computed:
>
>
> http://www.exim.org/exim-html-current/doc/html/spec_html/ch-message_processing.html#SECID226
>
> ${message_exim_id} holds the variable part.
>
> perhaps set a variable in he data ACL
>


Thanks, Jasen! I've actually got a workaround now (see below), although
it's not ideal.

My point is that a busy sysadmin shouldn't have to rely on intimate
knowledge of Exim's internal behaviour and oddities when trying tracing a
message from the logs.

For example, if I were to receive a complaint about an email and need to
trace it. The recipient or downstream postmaster has kindly supplied its
Message-Id knowing this is invaluable in uniquely identifying the message
in our logs.

Yet if the message arriving at my server was from a client (eg, one of our
many database-based systems) that doesn't generate a Message-Id header
themselves Exim will have generated one *and failed to log it*. This makes
locating the message in my logs difficult unless:

1. I happen to know the insider secret that if Exim has to generate a
Message-Id it doesn't bother to log it, and
2. Know that in such circumstances Exim uses its internal id prefixed
with "E" followed by "@" and its host name, then
3. Reverse this process to convert the Message-Id given to me back into
an Exim internal id and search for that instead.

That's hassle and assuming a lot of knowledge on behalf of the sysadmin and
doesn't provide a good experience for them.

*Workaround*
In my case I've now added the following to my acl_smtp_data ACL:

warn    logwrite = Message-Id header has id $h_Message-Id:



This means I now always get the Message-Id logged, albeit in most cases
duplicating the information in the "<=" log line for messages that arrive
with the header. So now I should be able to use exigrep to search for a
Message-Id value reliably.

Unfortunately it does mean I can't do grep's that rely on other information
on the "<=" line as well as the Message-Id, but generally I'm just
searching for the Message-Id value itself so that's not a great problem.

Anyway, I think I'm sorted for the moment…

Cheers,
Mike B-)

--
Systems Administrator & Change Manager
IT Services, University of York, Heslington, York YO10 5DD, UK
Tel: +44-(0)1904-323811

Web: www.york.ac.uk/it-services
Disclaimer: www.york.ac.uk/docs/disclaimer/email.htm