Re: [exim] add_header question

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: W B Hacker
Data:  
Para: exim users
Assunto: Re: [exim] add_header question
Marc Perkel wrote:
>
> Graeme Fowler wrote:
>> On Fri, 2008-06-06 at 12:46 +0100, Chris Edwards wrote:
>>
>>> What _doesn't_ work is writing a header in the DATA acl itself, prior to
>>> the call to SA. The doesn't seem to be seen by SA.
>>>
>> This is expected behaviour, as documented here:
>>
>> http://www.exim.org/exim-html-current/doc/html/spec_html/ch40.html#SECTaddheadacl
>>
>> "The add_header modifier is permitted in the MAIL, RCPT, PREDATA, DATA,
>> MIME, and non-SMTP ACLs (in other words, those that are concerned with
>> receiving a message). The message must ultimately be accepted for
>> add_header to have any significant effect."
>>
>> and
>>
>> "Header lines are not visible in string expansions until they are added
>> to the message. It follows that header lines defined in the MAIL, RCPT,
>> and predata ACLs are not visible until the DATA ACL and MIME ACLs are
>> run. Similarly, header lines that are added by the DATA or MIME ACLs are
>> not visible in those ACLs. Because of this restriction, you cannot use
>> header lines as a way of passing data between (for example) the MAIL and
>> RCPT ACLs."
>>
>> ...being the most relevant parts for Chris. And probably for Marc, too.
>>
>> Graeme
>>
>>
>
> OK - in fact I did test it and it wasn't working. And that was the
> reason I left the message. To see if I was doing something wrong or if
> there was a bug.
>
> Might I suggest that headers should be added to the message being passed
> to spamassassin (although they don't have to be added to the message
> itself until later) because it is useful for exim to be able to
> communicate with SA in that way.
>


AFAIK there has long existed more than one method of passing parameters
to SA - or causing it to read them from a recipient or domain specific file.

Hardly a 'bug', nor even a needful feature - if headers don't happen to
be one of those at the paticular stage you want them to be.

The general challenge with headers vs acl_m's, hostlists, lsearch's,
SQL-SELECTs et al, is that you then have to insure that your headers are
world-unique, AND/OR pre-strip any lookalikes that might have crawled in
the door with the existing headers. Not always a trivial - or even
consequence-free task

You can gain greater certainty with less effort by other means.

Bill