Re: [exim] Problem with lost mails

Pàgina inicial
Delete this message
Reply to this message
Autor: Nigel Metheringham
Data:  
A: exim-users
Assumpte: Re: [exim] Problem with lost mails
On Wed, 2005-07-27 at 16:51 +0100, Mark wrote:
> On Wed, 2005-07-27 at 17:18 +0200, Israel Cardenas wrote:
> > We are logging too much information about the mails, but we would need to
> > log a link between Exim ID (1DxKEI-0005kw-Oi) and the file in Maildir folder
> > (1122477012.H593009P8914.server.domain.com).
>
> Are you dropping the files directly into the maildir from exim? Handing
> off to another process to do the actual delivery? It might be possible
> to get exim to log the filename it wrote to if the former, and if it's
> not possible with the vanilla code then it will be possible to hack the
> code to make it log.


[Disclaimer: I wrote the original maildir stuff, but thats many many
years ago, and things have changed substantially since then and probably
been rewritten a few times]

The maildir file name will be computed by the Exim final delivery
process[1]. This will normally run as a subprocess of the main process
because it will run as a different user ID to the main process (Exim was
changed around version 4.0 to never use seteuid but always use setuid
which is a non-reversable process, so having changed UID it cannot
regain its old privaleges). The logging will therefore be done by the
parent process, which will not have easy access to the information about
the final maildir file name.

So this may well be tricker than it at first appears.

    Nigel.


[1] This is required because if there is a file name collision you need
to generate a new file name, so you cannot generate a filename until you
are at a point where you can try writing to this file.

-- 
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]