[nSLUG] Re: Sendmail configuration
mspencer at tallships.ca
Fri Mar 21 03:14:43 ADT 2008
"Jon Watson" <me at jonwatson.ca> wrote:
> I've actually been down this road once before and I was unable to
> find a switch for sendmail that allowed me to specify a from
> address. Seems like a glaring omission...
Would that be -f?
Maybe I'm out of my depth here, but: sendmail is an MTA so it has to
have a To: available somewhere. But the From: header is, from the
point of view of the MTA, just part of the body of the message. No?
OTOH, when it opens a connection on port 25 to hand off a message, it
has to have (or invent) a (possibly null) argument for the MAIL FROM:
Notice that the forward-path and reverse-path appear in the SMTP
commands and replies, but not necessarily in the message. That
is, there is no need for these paths and especially this syntax
to appear in the "To:" , "From:", "CC:", etc. fields of the
message header. (RFC 821)
RFC 2476 distinguishes between MTAs and Message Submission Agents:
SMTP was defined as a message *transfer* protocol, that is, a
means to route (if needed) and deliver finished (complete)
messages. Message Transfer Agents (MTAs) are not supposed to
alter the message text, except to add 'Received', 'Return-Path',
and other header fields as required by [SMTP-MTA].
However, SMTP is now also widely used as a message *submission*
protocol, that is, a means for message user agents (MUAs) to
introduce new messages into the MTA routing network. The
process which accepts message submissions from MUAs is termed a
Message Submission Agent (MSA).
but as far as I know, sendmail doesn't have any means if filling in a
missing From: in a message from an MUA that doesn't submit one with
I guess I don't know what sendmail does if there's no -fname and no
From: header in the message body and thus nothing valid for the RCPT
TO: command's argument.
I assume (although I don't know how to monitor the transaction) that
my MUA (Emacs) calls sendmail as a MSA with -f and the valid address
that I've put in my .emacs file (rather than
mds at bogus.nodomain.nowhere as I'm known to localhost.) A "Tmds" entry
in sendmail.cf allows this to work without the addition of an
Michael Spencer Nova Scotia, Canada .~.
mspencer at tallships.ca /( )\
More information about the nSLUG