Exim can participate on both sides of an email exchange, but enabling one authentication feature does not configure the others. An outbound signature, an inbound verification result and permission to relay are separate decisions. Build a map of those decisions before editing the production configuration.
[ Platform guides ]
Exim email authentication: map signing, policy checks and relay responsibilities
Separate Exim outbound signing from inbound authentication policy and relay authorisation.
By the EmailAuth research team · 3 min read
[ Key points ]
- Map signing, inbound verification and relay permission separately.
- Bind signing identities to authorized applications or senders.
- Test deliberate no-sign configurations as well as actual signing errors.
On this page
Establish the actual Exim build and route
Capture the installed version, package source, active configuration and the SMTP transport used for outbound mail. Distribution packages can split configuration across files or generate it from templates. Make changes in that supported configuration layer, not merely in a generated output that the next update will replace. Compare the installed build with its matching Exim specification.
The current Exim documentation places outbound DKIM signing in the SMTP transport and inbound DKIM processing in an ACL. It does not provide an automatic inbound rejection policy merely because signatures are verified. SPF, SRS and DMARC also have their own build and configuration dependencies. Inventory those dependencies before interpreting an absent result as a DNS error.
Configure an authorised signing identity
References: RFC 6376 §3.6.2, RFC 8301 §3.
Identify which authenticated users or applications may send for each domain. Maintain an explicit mapping from authorised sender context to signing domain and key. Do not derive unrestricted signing authority solely from a user-supplied From header. A valid signature on an unauthorised customer domain is an authorisation failure, not an authentication success.
In the appropriate SMTP transport, the relevant signing settings include dkim_domain, dkim_selector and dkim_private_key. Obtain their syntax and expansion rules from your installed-version manual. Generate and protect a suitable key, publish its public record at the chosen selector under _domainkey, and verify public DNS before enabling the signing path. Never put a private key into DNS or a diagnostic ticket.
Exim's dkim_strict option controls whether a signing failure defers a message or permits unsigned delivery. Choose this deliberately with the service owner: fail-closed signing may queue essential mail, while unsigned fallback may fail recipient DMARC checks. Test the selected outcome safely with a controlled missing-key scenario outside production. Strict mode is not a universal must-sign switch: the manual says an empty expanded domain or selector, or a private-key value of 0, false or empty, deliberately skips signing without an error even when dkim_strict is set. Test those no-sign paths separately from an actual signing failure.
Keep inbound policy and relay controls distinct
References: RFC 8601 §5.
Decide which sources are untrusted Internet peers, authenticated submissions and explicitly permitted relays. Preserve relay restrictions when introducing authentication checks. An SPF pass for some domain does not grant permission to use your server as a relay. Similarly, a failed DKIM signature alone does not establish that every message should be rejected; assess the complete authentication and local-policy context.
For inbound evaluation, document where trusted Authentication-Results are created and which upstream results are trusted. Prevent a sender-provided header from being mistaken for your own verification. If DMARC is implemented, verify that its inputs refer to the same message and receiving boundary.
Verify outcomes rather than settings
References: RFC 9989 §4.4.
Illustrative test: an authorised application sends From billing@example.org through the outbound SMTP transport. The receiver reports a passing signature with d=example.org and the configured selector. That is an aligned DKIM path. A second application without permission to use example.org must not acquire that domain's signing authority. These are proposed test cases, not observations from a running Exim server.
Retain tests for normal signing, key unavailability, unauthorised domain requests and any downstream content changes. Record queue effects and receiver results. After release, monitor signing failures, queue growth and authentication failures by route. Keep old public selectors long enough for legitimate in-flight signed mail, using actual queue lifetime and operational evidence to determine retirement. Restore the prior transport configuration if the rollout breaks delivery, without disabling relay controls.
[ Takeaway ]
Test deliberate no-sign configurations as well as actual signing errors.
[ By role ]
What this means for you
Choose your role for practical next steps.
IT / Mail Admin
Keep operational evidence
Map transport, ACL and relay settings before editing. Retain the installed-version configuration and test queue behaviour on signing failures.
Next steps
- Map transport, ACL and relay settings before editing.
- Retain the installed-version configuration and test queue behaviour on signing failures.
- Test an unauthorised signing-domain request.
CISO / SecOps
Review the trust boundary
Review tenant or application boundaries around key selection. Protect private keys and distinguish received authentication evidence from untrusted headers.
Next steps
- Review tenant or application boundaries around key selection.
- Protect private keys and distinguish received authentication evidence from untrusted headers.
- Audit who can select each private key.
Founder / Non-technical
Own the business decision
Assign an owner to both delivery continuity and domain signing authority. A technically valid signature can still represent an unauthorised sender.
Next steps
- Assign an owner to both delivery continuity and domain signing authority.
- A technically valid signature can still represent an unauthorised sender.
- Decide the signing-failure availability tradeoff.
[ FAQs ]
Frequently asked questions
Does inbound DKIM verification configure outbound signing?
No. They operate in different parts of Exim. Check the outbound SMTP transport and inbound ACL separately.
Which signing options matter first?
Review dkim_domain, dkim_selector and dkim_private_key in the installed-version specification, then decide the dkim_strict failure behaviour.
Can I sign whatever domain appears in From?
Not safely without authorisation. Bind permitted domains to authenticated senders or trusted application routes.
Is a passing SPF result relay permission?
No. Relay authorisation is a separate access-control decision and must remain restricted.
What does dkim_strict change?
For an actual signing failure, an expanded value of 1 or true defers; otherwise Exim sends unsigned. Deliberately empty domain/selector or a 0, false or empty key disables signing without a strict-mode error, so test those paths separately.
Should I copy the manual’s old signature example?
No. Historical examples may show old algorithms. Choose current supported algorithms and keys using the applicable specification and your installed build.
What evidence proves the route works?
A controlled received message with a trusted passing aligned result, plus tests of signing failure and unauthorised sender handling.
When can an old selector be removed?
After confirming that no active signer or legitimate queued message needs it. Use queue and message-lifetime evidence, not an arbitrary immediate deletion.
[ Sources ]
Sources
- Exim: DKIM, SPF, SRS and DMARC
Sections §1.1 Signing outgoing messages · §1.2 Verifying DKIM signatures
- RFC 6376: DKIM
Sections §3.5 The DKIM-Signature Header Field · §3.6 Key Management
- RFC 7208: SPF
Sections §4.5 Selecting Records · §4.6 Record Evaluation
- RFC 9989: DMARC
Sections §4.4 Identifier Alignment Explained · §5 DMARC Policy
- RFC 8301 DKIM cryptographic update
Sections §3
- RFC 8601
Sections §5
[ Glossary ]
Glossary
- SMTP transport
- The Exim transport responsible for outbound SMTP delivery and its configured signing options.
- dkim_strict
- Exim option controlling actual signing-error handling; intentional no-sign expansions remain separate.
- Evidence boundary
- The scope of what the cited documentation or a particular test can establish.
Enterprise provenance
Why top financial institutions and governments retired their email security dashboards.
Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.
EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard, with human-in-the-loop auditability.
SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption