We've got a very weird issue going on here.
Take this example email (raw form, sanitized):
To: [email protected]
From: Thomas Ward via TestList <[email protected]>
Subject: Test Message
Date: Wed, 4 Aug 2021 19:44:49 -0400
MIME-Version: 1.0
Content-Type: multipart/alternative;
boundary="------------EFA1B8DAB3C4E625DD16F705"
Content-Language: en-US
Sender: [email protected]
Reply-To: Thomas Ward <teward@NOPE>
CC: Thomas Ward <teward@NOPE>
Message-ID: <162812069430.22940.8470019517074758016@listserv-server>
List-Id: TestList <[email protected]>
List-Post: <mailto:[email protected]>
--------------EFA1B8DAB3C4E625DD16F705
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
Test
--------------EFA1B8DAB3C4E625DD16F705
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Test<br>
</p>
</body>
</html>
--------------EFA1B8DAB3C4E625DD16F705--
This is being sent via straight SMTP to a Send Connector at MS365 configured to receive and relay mail from our on-prem mail server to MS365 for retransmission to the Internet.
Except... while the email retransmits to the destination external recipients... it actually only sends the To, From, Subject, etc. but completely ignores the actual content of the message. This was replicated with direct submission of a MIMEText() test email in Python as well.
The same email, however, when directly submitted to the external mail servers where I'm receiving this (where @NOPE
would be my actual domain and server), transmits and relays fine, with all content. The same thing happens as well when we transmit via an on-prem Postfix relay which goes through a Sophos appliance, which then goes directly to the recipient server.
So, it seems that routing any mail via Exchange Online in this way with an on-prem system sending mail via MS365 outright fails to function. Regardless of the message submitted.
Has anyone else got any kind of on-prem mail system(s) or solutions here which need to route via MS365, and simply is unable to without Microsoft eating the message in its entirety?
The above email was sent to the Test List from external, routed through to an on-prem Exchange server (Exchange Hybrid setup due to on-prem listservs), modified for DMARC compliance, and then retransmitted to two external addresses as a new message, same issue at recipient ends. Also same issue for internal MS365 (in-organization) recipients.
Again, delivery works fine via on-prem Postfix stuff, but not when relayed via MS365 (which clearly ACCEPTED the emails and retransmitted everything EXCEPT the actual message).