Arrigo Marchiori:
> Example 2: (error)
> 220 myhost ESMTP Postfix
> MAIL FROM:<two@localhost,users@localhost>
> 501 5.1.7 Bad sender address syntax
This IS NOT source routing. That looks like @domain,@domain:user@domain,
and your MAIL FROM command does not.
RFC 5321:
Reverse-path = Path / "<>"
Path = "<" [ A-d-l ":" ] Mailbox ">"
A-d-l = At-domain *( "," At-domain )
At-domain = "@" Domain
If you can't educate the people who produce this garbage, you can fix
it with smtpd_command_filter.
/etc/postfix/main.cf:
smtpd_command_filter = pcre:/etc/postfix/command_filter
/etc/postfix/command_filter:
/^(MAIL FROM:\s*<\S+@\S+),\S+@\S+(>.*)$/ $1$2
This requires Postfix 2.7 or later.
Wietse