procmail
[Top] [All Lists]

Re: Delivered-To: [adding it]

1999-06-15 21:13:57
On 15 June 1999, Harry Putnam <reader(_at_)newsguy(_dot_)com> wrote:

Looking through the formail man page, it isn't coming home to me how
to add a "Delivered-To: " header.  All I want is to add an easily
identifed header to mail that is being forwarded from one machine to
another.

So that mail sent to :

reader(_at_)place1
reader(_at_)place2
reader(_at_)place3

Can be forwarded from those machines with a header added to make them
easily filterable when they arrive at:
reader(_at_)newsguy(_dot_)com

Most of the time this is accomplished by filtering on the "To: "
header, but in those cases where the "To " address, for one reason
or another is not present, then it becomes a project to filter them.
Much easier to just add a header at the forwarding end.
[...]

    Basically, you want to filter messages by the envelope recipients.
This can't be done, period.  Procmail is a delivery agent, not a MTA, so
it doesn't have access to envelope recipients.  By the time the message
gets to procmail the envelope recipients are already lost.

    Even without it, messing with "Delivered-To:" and / or relying on
its contents is a bad idea.  Some MTAs out there (QMail and Postfix come
to mind) use that header for detecting mail loops, and they might add
such headers for messages in transit.

    Regards,

    Liviu Daia

-- 
Dr. Liviu Daia               e-mail:   Liviu(_dot_)Daia(_at_)imar(_dot_)ro
Institute of Mathematics     web page: http://www.imar.ro/~daia
of the Romanian Academy      PGP key:  http://www.imar.ro/~daia/daia.asc