I would like to add a header to outgoing forwarded messages (treated
with SRS, so return path changes). Like this:

X-Forwarded-For: localpart@mydomain

The trouble I see is with header ordering. This header should be in
the front.  Before the Received headers added by this exim. But the
add_header feature for transports (and routers) can only append
headers to the tail, not prepend at the front. And OTOH while the ACL
add_header feature can prepend, clearly it is too early at ACL time to
decide if I'm forwarding :-(

Right now I do it with a kludge: a transport filter is called with an
argument (actually an environment variable) which is nonempty and set
to localpart@mydomain iff forwarding is taking place. Then it knows
what to do.

But I feel transport filters are clunky. And despite the handwaving in
the doc, I can't see how to set a transport filter conditionally
because of the separate expansion on its argv. Is there a cleaner way?

-- 
Ian

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to