RE: [Exim] headers remove for bounce mails?

Página Inicial
Delete this message
Reply to this message
Autor: Eli
Data:  
Para: 'Daniel Tiefnig', exim-users
Assunto: RE: [Exim] headers remove for bounce mails?
I don't think you can do this via routers or transports. It *might* work
via a system filter, but I am not sure.

The reason that it doesn't remove the header in the bounce is because if you
read very carefully how routers work with adding/removing headers (basically
anything that modifies the message at routing time), each router is given a
copy of the *original* message as it were when it entered the routers
section. So, your router that removes that header only removes the header
if it accepts the message. If the router rejects the message and control is
passed to the next router, any modifications that were made by that first
router are discarded - the subsequent routers have no knowledge of previous
modifications by other routers (even if a router silently accepts the
message with unseen).

So, when your bounce happens - it's happening probably because none of your
routers accepted the message, and so exim bounces it, however it bounces it
with the original message.

I'm not sure if this is something that may be useful or not - when I first
tried to add/remove headers, I did it in the routers section and quickly
found out that it didn't do what I expected - nor was there a router which
allowed me to modify a message but pass that modified copy to the other
routers (sort of like if there were a new router driver that accepted the
message, let you modify it, and then pass control on to the next router, but
sent the newly modified message rather than having the next router use the
original).

I think the reasoning for this is that after the ACL stage, right before
routing stages, the message is saved to disk, so to save on disk I/O and
maybe memory, no changes are done to the file/message on disk once it's
accepted. I wonder though that if there really would be any sort of memory
saving over just keeping the message (or maybe at least the headers section
and whatever part of the message body is set to be saved in variables and
whatnot) and modifying it in memory, and when a router accepts it and passes
it to a transport or whatever, the new changes could be synced to disk.

It would be nice to be able to remove headers in the ACL stage too (so that
if you have headers being added by a warn message, you could remove any
traces of headers before you add your own to make sure that only one copy of
the header is in the message), but I don't think that will happen any time
soon?

Eli.

-----Original Message-----
From: exim-users-admin@??? [mailto:exim-users-admin@exim.org] On Behalf
Of Daniel Tiefnig
Sent: Thursday, January 08, 2004 8:38 AM
To: exim-users@???
Subject: [Exim] headers remove for bounce mails?


Hi there,

I've a dnslookup router that does

headers_remove = X-Inode-Mail-Header

which works quite well, but if a message can not be delivered, the
bounce Mail quotes all headers of the original mail, including the
X-Inode-Mail-Header thingy. This matches with what is said at
"headers_add" in the routers section in the manual, but is not how I'd
like it to be.

Is there a way to remove headerlines from the quoted headers in the
bounce Mail? (I.e. not let them get there at all, I'd say.) I can't see
one, besides parsing the body of the bounce mail, or adding a mail proxy
in the first pass, which both is not what I'm going to do, though.


TIA,
daniel

--

## List details at http://www.exim.org/mailman/listinfo/exim-users Exim
details at http://www.exim.org/ ##

---
[This E-mail scanned for viruses]


---
[This E-mail scanned for viruses]