Received headers play an important role when verifying the authenticity of email senders. In setups where xorlab Security Platform is not the border gateway and receives emails from other internal MTAs, the platform needs to know which Received headers it can trust (i.e., were added by your organization).
This configuration is required for XSP to be able to properly authenticate emails. It allows XSP to get the right sender IP address for SPF checks for inbound emails. It is also required for XSP to know which emails are legitimate (authentic) outbound emails if your email server does not DKIM sign outbound emails.
Configuration examplesIn case you are only looking for a few common configuration examples, please refer to the last section of this article.
Received header originating from a private IP (RFC1918) up until the first one originating from a public IP. This works fine in most setups but fails if your internal MTAs also use public IPs. In that case, you need to declare these MTAs as trusted.
Common symptoms of a wrong trusted MTA configuration are:
- Increased number of emails without authentication, inbound as well as outbound (SPF checks fail because the IP is taken from the
Receivedheader). - Outgoing emails are marked as incoming.
- Inaccurate spam scores.

Configuration
Trusted MTAs can be configured inactiveguard/core/active_guard.yml for normal emails as well as for reported emails. Open the Expert Editor in the Control Center and change the default profile under trustedMTAProfiles. By default, this profile is applied to all emails.
Here is an example of two trusted MTAs, one identified through the host name and one through an IP range:
ipCheckEnabled and reverseDNSCheckEnabled options can be used to verify that the received header is not forged. It is enough to specify only one of them. We recommend using bothipCheckEnabled and reverseDNSCheckEnabled (the default setting for an MTA). The header will be verified if either of these checks pass. This is useful for certain cases, such as when the connecting MTA does not use an EHLO domain that resolves directly to its IP address.
The following picture shows another example of received headers of an incoming email in an M365 setup with xorlab Security Platform. M365 is the border MTA, and the email is sent by a google.com server. The colorful boxes highlight the inputs used for the hostNamePattern and hostCidrBlock matching. Every received header that is matched by one of the trusted MTA entries is shown in blue.

Profiles
Thedefault profile is applied to all email types (incoming and outgoing as well as reported). To configure a different set of trusted MTAs for the reported emails:
- add a new profile to
trustedMTAProfiles(give the profile a unique name other thandefault) - configure the
reportedpipeline to use the new profile:
active_guard.yml.
Authentication whitelist
The trusted MTA configuration also allows you to mark emails as authentic when they pass through a certain trusted MTA. This can be a handy feature if normal authentication of certain senders is not possible. As a reminder, email authentication is important as xorlab Security Platform applies the trust/relationship model only to emails that are marked as authentic (i.e., that have an authenticatedheader from).
This can be implemented with the whitelistedDomains list attribute:
header from address (e.g., test@xorlab.com) that pass through the server 1.2.3.4 should be treated as authentic.
Note that whitelistedDomains expects regular expressions, therefore dots must be escaped. Another example would be: .*\.xorlab\.com, which only whitelists subdomains of xorlab.com.
The regular expression is matched against the header from domain of the email and it must match the complete domain. For example, the regex xorlab\.com would not match the domain test.xorlab.com.
External
The trusted MTA configuration can be enhanced using theexternal: true parameter in combination with the whitelistedDomains parameter. This setup is useful when you trust an external source to send emails on behalf of your domain, even if the external server is not mentioned in your SPF records. By applying this configuration, XSP will still mark the sender as authenticated, regardless of SPF or DMARC lookup failures.
google.com MTAs as authentic, without trusting the received header that the google.com MTA wrote itself:

Disabling SPF checks
There is a possibility to disable SPF checks for a specific trusted MTA by setting thespfCheckEnabled: false parameter. This will cause xorlab Security Platform to not do an SPF check for emails that were received through this specific MTA as a border MTA. However, note that we do not recommend to use this parameter due to the risk of increasing your attack surface. It is only used in rare cases.