We've successfully migrated from an ancient Microsoft Exchange to dovecot+postfix and everything works fine except from one particular case:
When users of Outlook 2016 hit reply on an old mail from someone within the company ([email protected]) they get a delivery error from Outlook and sometimes I notice that Outlook doesn't even make a connection to the SMTP server and other times it makes one and gets an error (see below). If they hit forward and type the same address ([email protected]) manually everything is OK.
The non-delivery-notification email that comes back is in the lines of (translation from Greek):
We couldn't reach one or more recipients...
'Company S.A. John Smith' at 22/10/2018 1:03 pm
Server error: '501 5.1.3 Bad recipient address syntax'"
and postfix has this line in the logs:
postfix/smtps/smtpd[3905]: warning: Illegal address syntax from xxx.yyy.local[192.168.0.153] in RCPT command: <Company S.A. John Smith>
Users that have Thunderbird have no problem at all. Both Outlook and Thunderbird are using the same connection settings for the server (secure IMAP and SMTP)
Any ideas on what goes wrong here would be highly appreciated.
The malformed addresses come from outlook's name cache (the .nk2 file). You have to remove all the entries of the .nk2 file that correspond to exchange addresses.
In my case I used a free editor by Nirsoft to edit the file. I clicked the Address column header to sort by Address Type and I selected all the entries showing
EX
instead ofSMTP
. Then I hit delete and save.Thanks to everybody for the helpful comments and joeqwerty in particular for the very informative link that guided me to the right direction.
The destination address in the log entry is
Company S.A. John Smith
. Postfix is right when it complains about that as spaces in email addresses require quoting and the address must have a@
character followed by the domain.The relevant standards to look at are RFC 5321:
and RFC 5322:
The only exception to the requirement for
@
and domain in the recipient address is that the reserved addresspostmaster
can be used without domain to send an email to the administrator of the relevant mail server.Even if Postfix had relaxed its parsing enough to not complain about the two syntax errors I guess you probably haven't configured Postfix to know how to deliver an email to
Company S.A. John Smith
.The next question then is why Outlook produce such an incorrect
RCPT
command in the first place. To understand you need to look at the email being responded to on the client side to see what theFrom
andReply-To
headers in the mail look like.