Re: [Exim] headers_add not working

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: David Saez
CC: exim-users
Subject: Re: [Exim] headers_add not working
On Fri, 7 Nov 2003, David Saez wrote:

> Here I send the debug output plus the resulting message without the
> headers being added. Router is named virtual_aliases router and headers to
> add is X-Forward, which is correctly expanded but not added to the
> resulting message (resulting message also included)


What you didn't tell me was that an "unseen" router is involved in this.
The debug output tells me that *three* deliveries are actually done for
this message:

1. Using the virtual_delivery transport.

2. Using the spam_transport transport for david@???. This one gets
the added header.

3. Another delivery using spam_transport.

An "unseen" router causes a clone of the current address to be created,
and passed on for continued routing. This affects added headers. The
code contains this comment:

/* As it has turned out, we haven't set headers_add or headers_remove for the
* clone. Thinking about it, it isn't entirely clear whether they should be
* copied from the original parent, like errors_address, or taken from the
* unseen router, like address_data and the flags. Until somebody brings this
* up, I propose to leave the code as it is.
*/

In other words, any headers_add or headers_remove options that are
encounted before the cloning operation happens are applied to the
"unseen" delivery, and not to deliveries that result from subsequent
routing.

That comment still reflects what I think. I am not at all sure what
features are actually needed here.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.