> I tested the following commands.  In all cases, the mail arrives, but
> the header reads "From: [EMAIL PROTECTED]".  Nowhere does the
> comment "Comment" appear.
> 
>   echo message body | msmtp --auto-from=off [EMAIL PROTECTED] -f [EMAIL 
> PROTECTED]
>   echo message body | msmtp --auto-from=off [EMAIL PROTECTED] -f 'Comment 
> <[EMAIL PROTECTED]>'
>   echo message body | msmtp --auto-from=off [EMAIL PROTECTED] -f '[EMAIL 
> PROTECTED] (Comment)'
> 
> They generate the following logfile entries.
> 
>   Jun 21 03:00:12 host=mail.internode.on.net tls=off auth=off [EMAIL 
> PROTECTED] [EMAIL PROTECTED] mailsize=13 exitcode=EX_OK
>   Jun 21 03:00:14 host=mail.internode.on.net tls=off auth=off from=Comment 
> <[EMAIL PROTECTED]> [EMAIL PROTECTED] mailsize=13 exitcode=EX_OK
>   Jun 21 03:00:15 host=mail.internode.on.net tls=off auth=off [EMAIL 
> PROTECTED] (Comment) [EMAIL PROTECTED] mailsize=13 exitcode=EX_OK
> 
> Also find attached an mbox containing the three emails as they appear
> at the receiving end.  AFAICT, msmtp is stripping the comments, and
> IMO it shouldn't.

The -f option only sets the *envelope* from address, i.e. the address
that is sent in the MAIL FROM command. Therefore it should be a mail
address without additional information or comments.

The From: header is completely independet of that; you cannot set it with -f.

If a mail does not have a From: header, most MTAs will generate one
using the envelope from address and the name of the user, but that is a
different thing. Msmtp never generates a From: header; if you want one,
you have to generate one yourself or let the MTA (that msmtp sends the
mail to) do it.

One could argue that msmtp should generate a From: header if it is
missing, using the envelope from address and possibly the information of
the -F option (if present), but I'm not sure if that is the right thing
to do. Maybe that's better left to the real MTA.

Martin



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to