email: Split sender into both sendmail's -F and -f
authorW. Trevor King <wking@tremily.us>
Thu, 17 Jul 2014 20:04:10 +0000 (13:04 -0700)
committerW. Trevor King <wking@tremily.us>
Thu, 17 Jul 2014 20:04:10 +0000 (13:04 -0700)
commitd62baca1c5b1f9eb0078bc623f4fc8e2f26084e0
tree50e9917adfc77c623b9ca32be5c6f8ed96336d2d
parentbe376a6f0607e9fa490d6c456eebf033405186ae
email: Split sender into both sendmail's -F and -f

Use -F for the name and -f for the address, instead of passing the
composite "name <address>" to -f.  Only the address is used in the
SMTP envelope [1,2], so most mailers will probably ignore -F.  For
example, Postfix only uses it when there is no 'From' header in the
message itself [3].

The old behavior broke some sendmail implementation that assumed the
whole -f argument was an address.  I haven't noticed one of these
sendmail implementions myself, but they'll create envelope senders
like:

  MAIL FROM:<"foobar <abc>" <foo@bar>>

when we only want:

  MAIL FROM:<foo@bar>

[1]: http://tools.ietf.org/html/rfc2821#section-3.3
[2]: http://tools.ietf.org/html/rfc2821#section-4.1.1.2
[3]: http://www.postfix.org/sendmail.1.html
rss2email/email.py