Re: [Exim] Question about $message_id vs $MESSAGE_ID under e…

Pàgina inicial
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
A: Brian Nelson
CC: exim-users
Assumpte: Re: [Exim] Question about $message_id vs $MESSAGE_ID under exim filters
On Thu, 6 Feb 2003, Brian Nelson wrote:

> The problem is that the $message_id within the filter does not agree with the
> environment variable $MESSAGE_ID passed to the pipe. They are the same, except
> the ENV var has an 'E' prepended to it.
>
> ie
> $message_id = 18gvwl-0006uM-00 (filter)
> $MESSAGE_ID = E18gvwl-0006uM-00 (pipe)
>
> Can someone tell me why this is happening, and if it's supposed to do that? I
> can easily code around it, but it seemed wonky to me. The other env vars all
> appear OK.


The code deliberately gives the "external" message id for MESSAGE_ID
(the value that gets used if Exim constructs a Message-ID: header line).

I do not know why this should be; it is possible that it goes right back
to compatibility with smail. There is nothing in any of the ChangeLog
files about this, and the code is the same right back to release 1.62.

It seems to me to be wrong, and I think I will declare this to be a bug.
(I suspect nobody has ever wanted to use it before.)

The fix is to change line 542 of transports/pipe.c (Exim 4.12), which
reads:

envp[envcount++] = string_sprintf("MESSAGE_ID=%s", message_id_external);

Just get rid of "_external".


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.