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

Top Page
Delete this message
Reply to this message
Author: W B Hacker
Date:  
To: exim users
CC: SeattleServer.com
Subject: Re: [exim] Adding a per-recipient message header
SeattleServer.com wrote:
> So I've got a big problem, and from what I'm able to gather of Exim's design
> decisions, there's no easy way around it.
>
> Without going into excessive detail, I generate a unique identifier for every
> pass of the RCPT ACL, and stick it into $acl_m4. I record a bunch of stats
> into a database based on this number so that I can look up details of what
> exactly happened later.
>
> 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
>
> This isn't very useful because I do a lot of stuff differently based on who
> the recipient is and what settings they have - I need each identifier in the
> ONE copy of the message it pertains to.
>
> This seems related:
> http://www.exim.org/mail-archives/exim-users/Week-of-Mon-20040112/msg00128.html
>
> Somebody mentioned using a router to add per-recipient headers, but I don't
> see how this would work as acl_m4 is set at rcpt acl time.
>
> Suggestions?
>
> (Please CC me on any responses - I seem to be having some issues getting list
> posts...)
>
> Cheers,


I happen to be starting testing in a related area, will probably have more info
in a few days.

*Meanwhile* .. how about 'AND' ing in the Message_ID (in the acl) PLUS the
$tod_<something> (at router/transport time) so as to arrive at a custom-flag
with unique-identifier.

Not sure if that is 'early' enough, but perhaps it could be made to work for
whatever you are attempting if you used a two-stage router/transport coupled
with 'unseen', wherein the first stage set the $tod_<something>, and the second
effected the 'special' delivery.

One might then also strip these flag headers and replace them with something
more human-readable as a final step. Such as whatever the original intent was -
but no longer 'multiples' of same.

HTH,


Bill