procmail
[Top] [All Lists]

Re: envelope address delivering mail via smtp

2008-11-30 10:49:06
At 21:50 2008-11-29 +0100, Klaus Johannes Rusch wrote:
This is almost enough: i need to delivery the mail using, as envelope
sender, the *original envelope sender*.

With sendmail, you can specify the envelope sender using the -f switch, for example /usr/lib/sendmail -f $sender

Note that the pipe delivery action in procmail invokes the program defined in $SENDMAIL, so you can actually do:

:0
* conditions
| -f $sender recipient(s)


It is important to note that unless the sending account (the UID which mail is being processed for, and thus the UID which is invoking sendmail) is part of the TRUSTED class in sendmail, it'll tack a warning about the use of the -f parm INTO THE SENT MESSAGE HEADERS.

If you're forwarding to yourself someplace else and don't care about the extra header, no biggie. If you administer the machine where mail is being forwarded in this fashion, just ensure that account is part of the trusted class in the sendmail configuration (though that also gains access to viewing the full mailqueue and other things). Or, do the forwarding from the global procmailrc while the privileges are still elevated...

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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