When mxHERO processes a message, it changes the content and becomes another server in the delivery path. This page explains how to keep SPF, DKIM and DMARC passing so that processed mail isn't marked as spam or rejected. Set this up before you route production mail through mxHERO.
Before you begin
- Access to your DNS for every domain you route through mxHERO.
- Your routing design. Which steps you need depends on whether mxHERO delivers outbound mail directly or relays it back through your mail platform. See Routing architectures.
- Microsoft 365 only: Exchange administrator rights for the ARC step.
What changes when mxHERO is in the path
- SPF checks the IP address that delivers a message. When mxHERO delivers your outbound mail straight to recipients, the mail comes from mxHERO's IP addresses, so your SPF record must include mxHERO.
- DKIM signatures cover the message content. When a rule replaces attachments or the body, the original signature no longer matches. Messages need a new signature from mxHERO or from your mail platform.
-
ARC records the SPF, DKIM and DMARC results a message had when it reached mxHERO. mxHERO adds an ARC seal (
d=mxhero.com) to every message it delivers, so the next server can trust those original results. - DMARC passes when SPF or DKIM passes and matches the domain in the From address. The steps below keep at least one of them passing in each direction.
| Step | Needed when |
|---|---|
| Add mxHERO to your SPF record | Always. Required whenever mxHERO delivers mail directly to recipients' servers. |
| Set up DKIM signing in the dashboard | mxHERO delivers outbound mail directly (no Relay Server back through your platform) |
| Trust mxHERO as an ARC sealer | Microsoft 365 receives mail from mxHERO (inbound loopback, border, or outbound loopback) |
Add mxHERO to your SPF record
Find the existing SPF record for your domain. It is a TXT record at the domain itself that starts with
v=spf1.-
Add
include:_spf.mxhero.combefore the final~allor-all. Keep your existing entries. Examples:; Microsoft 365 example.com. TXT "v=spf1 include:spf.protection.outlook.com include:_spf.mxhero.com ~all" ; Google Workspace example.com. TXT "v=spf1 include:_spf.google.com include:_spf.mxhero.com ~all" ; Other mail platforms: add the include to your existing record example.com. TXT "v=spf1 <your existing entries> include:_spf.mxhero.com ~all" Save the record. Repeat for every domain and alias you route through mxHERO.
Important: A domain must have only one SPF record. Merge the include into your existing record instead of adding a second
v=spf1record. Note the underscore:include:mxhero.comwithout_spf.does not work.
Check SPF in the dashboard
- Open Settings › Organization and domains, then the Domains tab.
- Find the SPF status for your domain. SPF is set means a record with
include:_spf.mxhero.comwas found. The link icon next to the status opens help on setting up SPF. - If you just changed DNS, check again later. DNS changes can take time to propagate.
Set up DKIM signing
mxHERO can sign mail from your domain with its own DKIM key, which you publish in your DNS. Do this if mxHERO delivers outbound mail directly to recipients. If mxHERO relays outbound mail back through Google Workspace (smtp-relay.gmail.com), Google signs it on final delivery.
Open Settings › Organization and domains, then the DKIM tab.
Click Setup DKIM....
-
Select the domain or alias, then click Continue.
mxHERO creates a key pair and shows the DNS record to create.
-
In your DNS, create a TXT record with the name and value shown:
mxhero._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=<public key from the dashboard>"The selector is
mxherofor a domain's first key. Later keys usemxhero-plus four random characters, so a new key never overwrites the record of the key in use. -
Wait for the record to propagate, then click Verify.
mxHERO starts signing mail from that domain only after verification succeeds.
Repeat for each domain and alias that sends mail through mxHERO.
Rotate or remove a DKIM key
- Rotate: set up a new key for the domain, publish its record, and verify it. When the new key is verified, mxHERO deletes the old key and signs with the new one. You can then delete the old DNS record.
- Remove: delete the key on the DKIM tab. If the key was verified, signing stops immediately.
Only one unverified key can exist per domain at a time. Verify or delete it before you set up another.
Trust mxHERO as an ARC sealer
Microsoft 365
Tell Microsoft 365 to trust ARC seals from mxHERO, so that it uses each message's original authentication results instead of failing it for coming from mxHERO's IP addresses. The Office 365 Configuration Service does this for you. To do it yourself:
- In the Microsoft Defender portal, open Email & collaboration › Policies & rules › Threat policies, then the email authentication settings, or go directly to
https://security.microsoft.com/authentication?viewid=ARC. - On the ARC tab, add
mxhero.comas a trusted ARC sealer, and save.
Or use Exchange Online PowerShell:
# Check existing trusted sealers first
Get-ArcConfig | Select-Object Identity, ArcTrustedSealers
# Add mxhero.com; include any sealers you already trust, separated by commas
Set-ArcConfig -Identity Default -ArcTrustedSealers "mxhero.com"Warning:
Set-ArcConfigreplaces the whole list. If you already trust other sealers, include them, for example"mxhero.com,example-gateway.com".
Also add mxHERO's IP addresses to your connection filter allow list. ARC reputation builds over time, and the allow list protects delivery from the first day. See Network endpoints and IP addresses.
Google Workspace
No ARC setting is needed. Gmail evaluates ARC seals from intermediaries automatically. Add mxHERO's IP addresses to the Inbound gateway setting, as described in Google Workspace configuration.
How this affects DMARC
| Direction | What keeps DMARC passing |
|---|---|
| Inbound (external senders to your users) | Your platform trusts mxHERO: the ARC sealer setting and IP allow list in Microsoft 365, or the inbound gateway setting in Google Workspace. mxHERO doesn't change the sender's own SPF or DKIM records. |
| Outbound, delivered directly by mxHERO | SPF passes through include:_spf.mxhero.com, and DKIM passes with the key you set up in the dashboard. |
| Outbound loopback (relayed back through your platform) | Your platform's own SPF and DKIM apply to the final delivery. Microsoft 365 also needs the ARC sealer setting. |
If your domain has a strict DMARC policy (p=quarantine or p=reject), route a pilot group first, and check the authentication results on test messages before you widen the scope.
Verify
Send test messages in each direction and open the full headers of the delivered messages.
- An
ARC-Sealheader withd=mxhero.comshows that mxHERO processed the message. - In Microsoft 365, the
Authentication-Resultsheader should showcompauth=pass.reason=130means Microsoft accepted the result through the trusted ARC sealer. - On outbound mail received by an external mailbox (for example a personal Gmail account),
spf=pass,dkim=passanddmarc=passshould appear in the authentication results.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
compauth=fail reason=001 on inbound mail in Microsoft 365 |
Microsoft 365 isn't honoring the ARC seal | Check that Get-ArcConfig lists mxhero.com, and that the mxHERO connector and connection filter list all mxHERO IP addresses. |
External recipients report spf=fail
|
SPF record missing the mxHERO include, or a second SPF record was added | Merge include:_spf.mxhero.com into the single SPF record. |
External recipients report dkim=fail on processed mail |
The message was changed and isn't re-signed | Set up DKIM in the dashboard, or relay outbound mail back through your platform so it signs the message. |
| Verify fails for a DKIM record | The record hasn't propagated, or the name or value is wrong | Check that the record name includes the selector shown, such as mxhero._domainkey. Some DNS providers split long values into several strings; that is accepted. |
| Messages land in spam with the routing change | IP allow lists missing or outdated | See Spam and authentication issues. |
Comments
0 comments
Please sign in to leave a comment.