[exim] Add headers to cloned messages

Inizio della pagina
Delete this message
Reply to this message
Autore: Peter Thomassen
Data:  
To: exim-users
Oggetto: [exim] Add headers to cloned messages
Hi,

every now and then since serveral weeks, I'm trying to solve the
following problem with my mail archive.

Let's look at my router for outgoing mail. I'm archiving it using the
following router:

archive_out:
debug_print = "R: archive_out for $authenticated_id"
driver = manualroute
condition = ${lookup {$authenticated_id} partial-lsearch{CONFDIR/archive} {true}{false}}
route_data = ${lookup {$authenticated_id} partial-lsearch{CONFDIR/archive} {$value}}
headers_add = X-Archive-Out: $authenticated_id
headers_remove = X-Archive-Recipients:
transport = remote_smtp
unseen

CONFDIR/archive contains a relation between mail users and the archive
machine, p.ex. "peter: archive.local".

The X-Archive-Recipientes header is to contain all recipients, including
Bcc recipients. Therefore, I use the following line in the SMTP DATA
ACL:

accept    condition = ${lookup {$authenticated_id} partial-lsearch{/etc/exim4/archive} {true}{false}}
    endpass
    add_header = X-Archive-Recipients: $recipients


Because of the headers_remove line in the router, neither the original
message that is sent to the recipient nor the clone that goes to the
archive contains this header. But if the headers_remove line is not
included, the header is also present in the message sent to the
recipient, uncovering the Bcc recipients.

How can I achive that only the archive clone gets this header?

Thanks for your help.
Peter