environment passed from sendmail?
Ian Zimmerman <[email protected]> Sat, 8 Aug 2015 23:47:30 -0700
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
(Posted a few days ago in comp.mail.sendmail, no reaction.) Hi. I haven't administered sendmail myself in a long time; ever since I adopted Debian as my preferred OS, I have used their default MTA, which was first smail, then exim; so excuse me if this question is nooby. But my mail does pass through a server running sendmail [call it S] on its way to me, and not being root on $S I can't quite dig in and investigate myself. I use procmail to forward my mail from $S to my personal server. I believe this is enabled with the feature_local_procmail configuration macro (not sure of spelling). In any case, I don't have a .forward file, only a .procmailrc. Now I'd like to do some tricky things with procmail and it would help to have some info from the MTA (example: the envelope sender and recipient, and the sendmail local id of the message). Is there a way for sendmail to pass these items to procmail in the environment, and if so is it on by default on the sendmail side? [1] I can't test that just by invoking env or printenv from procmail, because procmail discards almost all of the environment unless it's started with the -p flag, and I think the way sendmail invokes procmail on $S is without -p. If it turns out that sendmail does pass such environment items but procmail discards them, would it help to bypass the direct procmail delivery and use a .forward file instead, with the line |/usr/bin/procmail -p /home/me/.hidden_procmailrc IOW, would sendmail still pass the env items to a pipe delivery running from within a .forward? Thanks for any ideas. [1] Exim, for example, passes the SENDER, RECIPIENT, and MESSAGE_ID environment variables to any pipe delivery, either those invoked from .forward files or configured directly in exim. -- Please *no* private copies of mailing list or newsgroup messages. Rule 420: All persons more than eight miles high to leave the court.