Autor: Michael Boelen Data: Dla: exim-users Temat: [exim] Adding headers for mail tap
Dear list,
I'm working on a small `project` where the addition of headers is involved
(requested for future mail tapping).
Because "tapping" of mail needs to be possible, incoming mail should be
splitted into 2 different "messages":
- original message, which should be delivered to the maildir-box
- copy of original with extra headers
This splitting is not the problem, by using 2 different routers (+unseen
keyword). This allows me also to put "headers_add" to the responsable
transports. However, I need to add the "MAIL FROM" command and the "RCPT TO"
commands (from the mail conversation) to the headers. If there are more
"RCPT TO" commands given, they should be all added on a seperate line to the
headers.
Example:
X-SMTP-src-IPv4:1.2.3.4
X-SMTP-dst-IPv4:5.6.7.8
X-SMTP-MAIL-FROM:from.myself@???
X-SMTP-RCPT-TO:foo@???
X-SMTP-RCPT-TO:foo2@???
X-SMTP-end:
<normal headers + body + mime>
(last header is meant to mark the end of the headers)
Back to my question: how do I "catch" the MAIL FROM/RCPT TO-commands, add
them to the headers AND beside the "static" ones (X-SMTP-src-IPv4,
X-SMTP-dst-IPv4, X-SMTP-end)? Is it possible directly from without Exim or
do I have to work with outside help (script)?
I'm pretty experienced within Exim, but this one seems to be more tricky
than I thought. Thanks for possibly answers!