Re: [exim] Adding a per-recipient message header

Góra strony
Delete this message
Reply to this message
Autor: Graeme Fowler
Data:  
Dla: exim users
Temat: Re: [exim] Adding a per-recipient message header
On Sat, 2006-10-14 at 02:17 -0700, SeattleServer.com wrote:
<snip>
> Towards the end of the ACL, before any rejection or accepting takes place, I
> have the following:
>
>         warn    add_header      = :at_start_rfc:X-SeattleServer-ID: 
> ${acl_c6}-${acl_m6}-${acl_m4}

>
> Well, if I then send a message two two recipients, instead of having one
> unique line per actual copy of the message, both messages contain the
> following in the headers:
>
> X-SeattleServer-ID: 380105-22910-24043
> X-SeattleServer-ID: 380105-22910-24042


You could, in theory, in the RCPT ACL change your add_header clause to
add the recipient being dealt with at that stage such that you get:

warn    add_header      = :at_start_rfc:X-SeattleServer-ID:\ 
                           {acl_c6}-${acl_m6}-${acl_m4}-\
                           $local_part@$domain


Then in your final delivery transport you could make the appropriate
comparison against the $local_part & $domain, remove that header, and
add a new one based on a regex match of the removed header, and remove
all the other original headers you added.

It's an idea brought on by being bored with putting plasterboard up so
it probably won't work, but it's worth a try!

Graeme