procmail
[Top] [All Lists]

Re: Regenerating the "From " header?

2001-06-11 15:57:34
John Conover wrote,

| When procmail is used to filter-and-forward from a shell account in a
| machine using sendmail(1), the "From " header is replaced with the
| shell account user name and domain name.

That's as it should be.  If the message bounces downstream of there, the NDN
should be returned to the point where the message was redirected, not to the
original sender (who didn't write to and probably never heard of the down-
stream destination).  Moreover, the person handling the account that did the
forwarding, the one person who can take care of things (by stopping the for-
warding or directing it to a working address) and needs to know if something
is going wrong, doesn't find out.  Therefore the envelope sender on the for-
warding leg should be the forwarder, not the originator.

| Using formail -R to save the "From " record, and reconstruct it
| doesn't work, (the reconstructed "From " record is placed in the
| middle of the headers.)

How exactly did you use formail -R?  -R is for renaming fields, not for
saving them (whatever exactly you may have meant by that term).

| Any suggestions?

Yes.  If what you're trying to do is get the original From_ address back onto
the message for the next trip, don't do it.  It's a bad idea.

However, if you'd simply like to preserve the information from the incoming
From_ line so that the reader at the forwarding destination can see it,
formail -R works very well.  Just give it a new name that ends in a colon so
that it will become a normal header line; for example,

 :0fwh
 | formail -zR 'From ' X-Envelope-From_:

I have done that regularly with no problems.

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>