I've got an odd issue where an on-premise sendmail relaying to our Office 365 cloud serves is seeing rejections. The sendmail log at LogLevel 9 and higher records a
dsn=5.1.8, stat=User unknown
When I engaged MS Support, they respond that this is not an Exchange error and the problem is on the Sendmail side.
An obfuscated full log from Sendmail is
Dec 7 12:05:55 canit3 sendmail[25817]: uB7I5o3g025814: to=<
us...@tenant.mail.onmicrosoft.com>, delay=00:00:05, xdelay=00:00:05, mailer=esmtp, pri=160891, relay=tenant-mail-onm...
ction.outlook.com. [216.32.180.170], dsn=5.1.8, stat=User unknown
I've used openssl to do a STARTTLS SMTP test and I know that the complete MS response, after the RCPT TO: <
us...@tenant.mail.onmicrosoft.com> command is:
550 5.1.8 Access denied, bad outbound sender
But, MS refuses to take that as definitive and want me to "engage sendmail support" to get the SMTP conversation during these failures.
I tried setting LogLevel=12, which is supposed to log all SMTP conversations. However, all of these are received from an internal mail server by Senmdail and then forwarded to Microsoft. When I try LogLevel 12 and even LogLevel 98, I get the SMTP conversation between Sendmail and my internal server (when sendmail acts at the receving SMTP server.) but I do not get the SMTP conversation when Sendmail acts as the sending SMTP server.
I've even played with custom logging using SRcpt_ok and variations, but all only seem to apply when Sendmail is the recipient server.
Is there any way to get Sendmail to log the SMTP conversation when it is the sending server?
Sendmail is stock from a CentOS 6 install, so it is not the latest--though, I will change that if it will make a difference. Version is sendmail.x86_64 8.14.4-9.el6_8.1.