Hi, Outlook under some circumstances leaves out the email address from the "To" header, and now OpenSMTPD wants to insert the local domain.
I tried troubleshooting smtpd, but couldn't find anything even with verbose (-vvv), but found "-T smtp" switch somewhere on the Internet and it gave me the following, abbreviated for clarity. smtpd -d -vvv -T smtp: .. smtp: 0x82363000: <<< MAIL FROM: <[email protected]> smtp: 0x82363000: <<< RCPT TO: <[email protected]> .. smtp: 0x76f19000: <<< DATA smtp: 0x76f19000: >>> 354 Enter mail, end with "." on a line by itself .. <<< [MSG] From: "Person AAAA" <[email protected]> <<< [MSG] To: "Person BBBB" .. So smtpd is receiving the email without invalid "To" header, however upon receiving the email at another mail server for personB the "To" header has been mangled: "Person BBBB"@domainA.org After some further searching I found this article: https://poolp.org/0xa86e/Some-OpenSMTPD-overview,-part-3 The article mentions: "Then came another complaint: some hackers were receiving mails from some other hackers ... but the mail had a From header with the local domain instead of the sender domain." My issue seems to be a reverse case of what the article mentions. Looking at the source in smtp_session.c, "From", "To", "Cc" headers are all replaced with versions where _LOCAL_ domain is appended, if the email came from a local mail client I would expect that appending the local domain to the "To" and "Cc" fields would be the wrong course of action. PS. Regarding the quote from the article, I didn't fully understand why the "From" header would ever incorrectly have the local domain.. I mean, if OpenSMTPD prior to the fix mentioned in the article did not mangle the DATA section, then how could the "From" header which is in the DATA section accidentally have the local domain appended? PPS. Is there a reason the default smtpd in OpenBSD 5.8 is OpenSMTPD 5.4.4? That seems to be from Dec 2014..
