[RndTbl] sendmail -t vs -f

Gilbert E. Detillieux gedetil at cs.umanitoba.ca
Wed Feb 11 11:22:08 CST 2004


According to John Lange:
> I'm not certain how much the sendmail differs from postfix but when I
> tried the below suggested in postfix it did not alter the Return-Path in
> the message header. -t allows you to extract recipients from the message
> headers but the Return-Path remained set to whichever user invoked the
> command.
> 
> In postfix you need the -f option as follows:
> 
> sendmail -t -f testing at taxpayer.com <<MAIL
> From: "Angry Taxpayer" <testing at taxpayer.com>
> To: "Dave" <bob at taxisbad.com>
> Reply-To: "Paul Martin" <paulm at canadianrulingparty.gc.ca>
> Subject: Tax cuts

That does seem to be the case with sendmail...  As the man page indicates...

       -fname Sets  the  name  of  the ``from'' person (i.e., the
              envelope sender of the  mail).   This  address  may
              also  be used in the From: header if that header is
              missing during initial  submission.   The  envelope
              sender  address is used as the recipient for deliv-
              ery status notifications and may also appear  in  a
              Return-Path:  header.   -f  should  only be used by
              ``trusted'' users (normally root, daemon, and  net-
              work)  or if the person you are trying to become is
              the same as the person you are.  Otherwise,  an  X-
              Authentication-Warning  header will be added to the
              message.
...
       -t     Read  message  for  recipients.  To:, Cc:, and Bcc:
              lines will be scanned for recipient addresses.  The
              Bcc: line will be deleted before transmission.

So, in short, if you want to change the envelope "from" address, you need to
use "-f".  If you want to pull the list of recipients from the message
headers, rather than explicitly list them on the command line, use "-t".

-- 
Gilbert E. Detillieux		E-mail:	<gedetil at cs.umanitoba.ca>
Dept. of Computer Science	Web:	http://www.cs.umanitoba.ca/~gedetil/
University of Manitoba		Phone:	(204)474-8161
Winnipeg, MB, CANADA  R3T 2N2	Fax:	(204)474-7609



More information about the Roundtable mailing list