Changes to Message Direction Detection
Barracuda is updating how Barracuda Email Protection (IEP) determines whether a message originated from inside or outside your organization. Accurate message direction is important because the impersonation-protection capabilities in IEP use message origin when evaluating potential impersonation and social-engineering threats.
Most customers are not expected to be affected. The configuration described in this article can occur when inbound internet mail is routed through an on-premises Exchange server and a Frontend Transport receive connector is configured as externally secured.
Determine whether your environment is impacted
Review the full message headers from either a recent impersonation detection in IEP or any message in a Microsoft 365 mailbox that was sent from an external source. Your environment requires configuration changes if an externally originated message contains both of the following headers:
X-MS-Exchange-Organization-AuthAs: InternalX-MS-Exchange-Organization-AuthMechanism: 10
Together, these values indicate that Exchange is identifying the external message as internally authenticated.
Update inbound mail flow for pre-delivery protection
The following mail-flow recommendation applies to customers using Barracuda Email Gateway Defense for pre-delivery protection, where the domain’s MX records point to Barracuda. For these deployments, Barracuda recommends delivering inbound internet email from Barracuda directly to Microsoft 365:
For pre-delivery deployments, Barracuda recommends delivering inbound internet email directly from Barracuda to Microsoft 365. Because IEP analyzes messages in Microsoft 365 through the Microsoft 365 API, there is no requirement for messages destined for Microsoft 365 mailboxes to pass through on-premises Exchange. Delivering those messages directly to Microsoft 365 ensures the appropriate authentication headers are applied and avoids the header condition described in this article.
Customers using pre-delivery protection should follow the Barracuda Microsoft 365 deployment guide and configure the Barracuda-to-Microsoft 365 delivery path as a Microsoft 365 deployment rather than using the Barracuda hybrid-routing configuration. Microsoft 365 continues to handle routing between Microsoft 365 and on-premises Exchange through the existing Microsoft hybrid connectors. Confirm that the required Microsoft hybrid connectors remain correctly configured before changing the inbound route. At a minimum, complete the following configuration changes:
In Microsoft 365, confirm that an inbound partner connector is configured and scoped to the Barracuda IP address ranges.
Enable Enhanced Filtering for Connectors for the Barracuda inbound connection.
In Barracuda Email Gateway Defense, update the destination mail server so that inbound mail for Microsoft 365 recipients is delivered to the Microsoft 365 hostname instead of the on-premises Exchange server.
Important: Complete these changes in an order that preserves mail delivery, and verify the Microsoft hybrid connectors before directing Barracuda delivery to Microsoft 365.
Barracuda also recommends reviewing and correcting the Exchange receive connector configuration as a best practice. Once inbound internet mail is routed directly from Barracuda to Microsoft 365, the connector configuration is no longer in the normal delivery path for Microsoft 365 mailboxes. However, if an external message unexpectedly traverses the on-premises Exchange server and is then delivered to Microsoft 365, the corrected connector configuration helps ensure that Exchange does not identify the message as internal.
As a best practice, review every Frontend Transport receive connector on each Exchange server that can process inbound internet mail, not only the default connector. Confirm that no connector capable of receiving external traffic has Externally secured enabled.
Open the Exchange Admin Center.
Go to Mail flow > Receive connectors.
Review every Frontend Transport receive connector on each Exchange server that processes inbound internet mail. Do not stop after checking the default connector.
Open each connector and select Security. Confirm that Externally secured (for example, with IPsec) is not selected on any connector that could receive inbound internet mail.
Select Scoping and review the remote IP address ranges. Confirm that each range includes only the systems the connector is intended to trust.
Correct any overly broad or unexpected IP address ranges that could cause inbound internet mail to match a trusted connector.
If the default connector does not have Externally secured enabled, continue checking the other Frontend Transport receive connectors. A connector intended for internal device relay may have Externally secured enabled but be scoped too broadly or include an unexpected IP address. In that case, inbound internet mail can match the wrong connector and be identified as internal.
Restart the Exchange transport services
If you change the receive connector configuration, restart the Exchange transport services on the affected Exchange server. Run PowerShell as an administrator on the Exchange server.
First, list the matching transport services:
Get-Service ms*ex*tr*
Review the returned services, and then restart the identified transport services:
Get-Service ms*ex*tr* | Restart-Service
Restarting transport services temporarily interrupts mail processing on that Exchange server. Perform this step in accordance with your organization’s change and availability procedures.
Validate the updated mail flow
After routing inbound internet mail through Barracuda directly to Microsoft 365, validate the new delivery path:
Send a new message from an external email account through the updated mail flow.
Review the delivered message headers in Microsoft 365.
Confirm that the external message is no longer stamped with both
AuthAs: InternalandAuthMechanism:10.
Important: Once mail is routed from Barracuda directly to Microsoft 365, this validation confirms that the recommended delivery path is producing the expected authentication headers. Because the validated message no longer passes through the on-premises Exchange server, the result does not validate the receive connector configuration. Barracuda still recommends correcting the connector as a best practice so that any external message that unexpectedly traverses Exchange is identified correctly if it is later delivered to Microsoft 365.
What happens if the configuration is not corrected?
When the upcoming message-direction update is applied, external messages that Exchange incorrectly identifies as internal may not receive the intended impersonation-protection coverage in IEP. Routing pre-delivery mail directly from Barracuda to Microsoft 365 addresses the normal delivery path. Correcting the Exchange receive connector remains a recommended best practice for any external message that unexpectedly traverses Exchange before reaching Microsoft 365.
Need assistance?
If you need help confirming whether your environment is affected, contact Barracuda Support. Include the complete headers from a recent externally originated message, along with a description of how inbound internet mail flows through your Exchange Hybrid environment.