Office 365 / EOP: All emails Quarantined
Recently I was working on my EOP environment and our emails started going to the spam quarantine. I could not find fix over the internet so thought of sharing how I fixed it.
Office 365 – Only for EOP working as anti-spam backbone.
Edge Transport – Exchange 2010
Hub Transport – Exchange 2010/2013
All email to all recipient domain are going to quarantine in EOP.
We did the message tracking and found the below screen which shows messaging got quarantine.
Now we checked the quarantine message header to the see the value of the attribute “X-MS-Exchange-Organization-Rules-Execution-History”
X-MS-Exchange-Organization-Rules-Execution-History attribute shows what are the rules applied on this email.
Now we review the rule which had no problem. This is a basic transport rule which is blocking any outside mail senders from doing the relay and sending it to quarantine.
Now we were concerned to know why will this internal message is being considered external. After discussing this with Microsoft we identified that we need to retain the header in order to consider inside the Organization message.
Resolution: This is a 2 step resolution and both steps should be followed.
- In Office 365: Go to the inbound connector in the Exchange admin center à Mailflow à Connectors of office 365 and go to the properties. Check the checkbox “Retain service headers on transmission” and click save.
2. In On Premises: Create a new remote domain in the organization configuration with the name of recipient or we can edit * remote domain and run the below command from the Exchange management shell.
Set-RemoteDomain –Name NamePropertyOfRemoteDomain –TrustedMailOutboundEnabled $True
TrustedMailOutboundEnabled will keep the header intact and this parameter specifies whether the remote domain is considered a trusted domain. Microsoft recommends that we set this parameter to $true for cross-premises deployment scenarios. By default this will be false.
Now we tested the mail flow and mail started delivering to the remove domain.
Conclusion: We need to intact the header to let the EOP understand this email is inside the organization email or outside the organization.
The header will retain the following attribute value to internal which is required to be considered the email as inside the organization.
Microsoft Solution Architect | Exchange Server