Hello list, I am using Postfix 2.10.3 as home e-mail gateway: messages are delivered by fetchmail and passed to Postfix via SMTP on the same host.
Today I received an e-mail that had two addresses in the From: field. Postfix consistently rejected it. I went to see the transcript of the SMTP session, and could track the problem down to the following: Example 1: (works correctly) 220 myhost ESMTP Postfix MAIL FROM:<user@localhost> 250 2.1.0 Ok QUIT 221 2.0.0 Bye Example 2: (error) 220 myhost ESMTP Postfix MAIL FROM:<two@localhost,users@localhost> 501 5.1.7 Bad sender address syntax QUIT 221 2.0.0 Bye The syslog message that Example 2 generates is: > > postfix/smtpd[4029]: warning: Illegal address syntax from > > localhost[127.0.0.1] in MAIL command: <two@localhost,users@localhost> Before reporting this to the e-mail sender, I went to check the RFC's and... now I am not sure where the reason is. This is why I am writing here. RFC 2821 chapter 3.3, page 16 says: > The first step in the procedure is the MAIL command. > > MAIL FROM:<reverse-path> [SP <mail-parameters> ] <CRLF> [...] > Historically, the <reverse-path> can contain more than just a > mailbox, however, contemporary systems SHOULD NOT use source > routing (see appendix C). And appendix C says that: [...] > The use of source routes is deprecated; while servers MUST be > prepared to receive and handle them as discussed in section 3.3 and > F.2, clients SHOULD NOT transmit them and this section was included > only to provide context. [...] >From the above, I understand that the e-mail is poorly formatted, but also that Postfix should have accepted it nevertheless! Relevant output of postfinger: > > --System Parameters-- > > mail_version = 2.10.3 > > hostname = myhost > > uname = Linux myhost 3.14.16-gentoo #2 SMP Mon Nov 10 11:37:24 CET 2014 > > i686 Intel(R) Atom(TM) CPU N2600 @ 1.60GHz GenuineIntel GNU/Linux [...] > > --main.cf non-default parameters-- > > mailbox_size_limit = 0 > > mail_spool_directory = /var/spool/mail > > manpage_directory = /usr/share/man > > message_size_limit = 0 > > mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, > > $myhostname.$mydomain > > mydomain = xxx > > myhostname = myhost > > relayhost = [127.0.0.1]:11125 > > sender_canonical_maps = hash:/etc/postfix/sender_canonical > > smtp_sasl_auth_enable = yes > > smtp_sasl_password_maps = hash:/etc/postfix/saslpass > > smtp_sasl_security_options = > > smtp_tls_security_level = may The file /etc/postfix/sender_canonical is used to map bare and @localhost user names to compliant e-mail address. What is your opinion on this? Please let me know if I can provide any more information. Thank you in advance, -- rigo http://rigo.altervista.org