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>
Mon, 1 Sep 2014 21:21:03 +0000 (14:21 -0700)
commit8ebbb4589e05e1da753853fb011b0b7bf91d6871
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 (reportedly OpenSMTPD).  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

Signed-off-by: W. Trevor King <wking@tremily.us>
rss2email/email.py