Re: Adding Custom Headers

Top Page
Delete this message
Reply to this message
Author: Chris Thompson
Date:  
To: Sheldon Hearn
CC: exim-users
Subject: Re: Adding Custom Headers
Sheldon Hearn writes
>
> How do I most effortlessly add a custom header "X-List: ${local_part}"
> in /usr/local/etc/exim/configure given the following director:
>
> lists:
> driver = forwardfile;
> file = /usr/local/etc/exim/lists/${local_part},
> no_check_local_user,
> forbid_pipe,
> forbid_file,
> errors_to = postmaster@???


That is, as they say, a good question. Another one would be how to remove
specified headers (e.g. "Return-Receipt-To", see another thread) in the same
context.

The current testing version of Exim has nice new generic *transport* options
add_headers and remove_headers to manipulate the headers passed to a specific
transport. The problem is that the "forwardfile" director doesn't work by
transporting, it works by routing (= directing, in this context). If a message
has two recipients

       wombat-fanciers@???
       ferret-worriers@???


with aaaa@??? on the first list and bbbb@??? on the second,
then the routing phase will end up scheduling a single SMTP call to cus.cam.ac.uk
with the two users in the recipient list: there is no scope for the headers to be
different. In fact, if cet1@??? is on both lists, he will recieve only
a single copy of the message.

I think Philip would say that this has got to the limit of what can really be done
by a forwardfile director, and that lists requiring more elaborate treatment should
generate a new message from the old one via a pipe transport.

Chris Thompson               Cambridge University Computing Service,
Email: cet1@???    New Museums Site, Cambridge CB2 3QG,
Phone: +44 1223 334715       United Kingdom.