[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] Generating a From: header if it is missing
Hi!
On Wed, 12 Nov 2014 02:16:54 -0500, grarpamp wrote:
> On Wed, Nov 12, 2014 at 1:20 AM, Martin Lambers <marlam@...23...>
> wrote:
> > Do you see problems with this approach? Are there alternative
> > suggestions?
>
> My only thought is that via some msmtp options it should be possible
> to send NULL or literally arbitrary data for any/all elements [1] of
> the transaction, even if for no other reason than testing the
> behavior of your [own] SMTP server. Such as how the server mangles
> the mail you give it.
I don't think I agree with this. Msmtp aims for compatibility with the
sendmail interface, to be usable from applications. If you want to test
your SMTP server or alter SMTP sessions in arbitrary ways, you probably
need a lower-level tool like telnet, netcat, or gnutls-cli.
> Ex: Some servers will fill in an empty body From with either your
> envelope From, or its notion of your account From they have in say
> LDAP, yet if you supply a body From in the message, it will not make
> either such replacement. Some other servers will replace your body
> From with envelope or account From.
Sendmail, postfix, exim, ssmtp all add From: and Date: headers when
called locally with the /usr/sbin/sendmail interface that msmtp wants
to be compatible with.
I have not yet encountered an SMTP server that expects mail to not have
a From: header so that it can add its own.
In my opinion, not adding From and Date headers if they were missing
was simply a bug which is now fixed. I cannot see a real situation
where adding these must be prevented (usually they are already set
anyway).
> Note rfc2822 was obsoleted for 5322, the current set for SMTP is
> below.
Thanks for these pointers! It does not look like much has changed. Or
is there something significantly new that msmtp needs to take into
account?
Martin