Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!lll-winken!uunet!uunet!kyle From: kyle@uunet.uu.net (Kyle Jones) Newsgroups: comp.mail.sendmail Subject: Re: Envelope-To and Envelope-From in PROG mailer? Message-ID: <1991May23.204006.18112@uunet.uu.net> Date: 23 May 91 20:40:06 GMT References: <1991May23.195333.27759@iwarp.intel.com> Organization: UUNET Communications Services Lines: 30 merlyn@iwarp.intel.com (Randal L. Schwartz) writes: > I don't seem to see any way to get the Envelope-To and Envelope-From > in a PROG mail delivery agent in a stock sendmail with more-or-less > standard sendmail.cf's. I've checked the environment and the command > line arguments. (No, I don't have quick access to the sources.) > > (1) is there something I'm overlooking? > > (2) can I modify the sendmail.cf to stuff them into the environment or > passed as a command-line argument without breaking things? If so, > what are the standard names for the environment variables? (Or would > this be soooo local that it isn't really expected anywhere?) Using the environment strikes me as the way to go. With the Bourne shell it's pretty easy to pass the variables in, but getting the right values out of sendmail is another matter. I'd suggest changing A=sh -c $u to A=sh -c 'ENVELOPE_FROM=$g ENVELOPE_TO=??? $u' (untested) I write ??? because I don't know how you'll get the envelope recipient out of sendmail, assuming you want something other than the name of the program that's being run. The name of the program is in $u, of course.