Re: [EXIM] Headers add/remove

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: John Horne
Dátum:  
Címzett: Philip Hazel
CC: exim-users
Tárgy: Re: [EXIM] Headers add/remove
On 03-Aug-98 at 14:29:22 Philip Hazel wrote:
> On Mon, 3 Aug 1998, John Horne wrote:
>
>> I had something similar in the system filter to:
>>
>>    headers remove Reply-to
>>    headers remove From

>>
>>    headers add "From: ${lookup {${substr_4:${local_part:$h_To:}}} lsearch
>>                          {replies} {$value}
>>                          {postmaster@???}}\\n"
>>    headers remove To
>>    freeze

>
>> However, the file lookup fails. If I remove the 'headers remove To' line
>> then it works. Am I missing something here or isn't the script being
>> executed sequentially?
>
> That seems very strange. Are you sure that was what happened? It worked
> for me with and without the 'headers remove To' line.
>

Sorry, the problem was all mine. To ensure that the message is 'genuine' there
is a check on the message being sent from the postmaster and addressed to a
specific list name (hence the substr_4) around the 'headers' statements. I
thought the check was on the header From: address, but it is on the envelope
from. Hence the code *was* being executed twice in some cases - when the
'headers remove To:' was removed - and once otherwise.

Many thanks to Philip for pointing this out, albeit by making me think about
what was happening!, and for pointing out the 'first_delivery' function is
system filters.

Apologies for the hassle,

John.

-----------------------------------------------------------------------------
John Horne                                     E-mail: J.Horne@???
Academic and Information Services              Phone :  +44 (0) 1752 - 233911
University of Plymouth, UK                     Fax   :  +44 (0) 1752 - 233919



--
*** Exim information can be found at http://www.exim.org/ ***