Scope and prerequisites
This guide covers an administered Zimbra Collaboration MTA, not an unrelated hosted mailbox branded Zimbra. Confirm the installed version, outbound relays and who controls the MTA and DNS before changing signing. The first-party wiki documents domain-level DKIM, including alias domains.
Configure the documented route
- Step 1. On the MTA, inspect the domain's existing configuration before creating keys. Protect diagnostic output:
zmdkimkeyutil -qcan disclose the private key. - Step 2. For a domain without DKIM, the documented generation command is
/opt/zimbra/libexec/zmdkimkeyutil -a -d example.com, run in the appropriate Zimbra administration context. Replace the example domain with the approved domain. - Step 3. Publish only the generated public DNS record at the generated selector under
_domainkey. Verify the TXT answer at authoritative DNS. - Step 4. Use the version-appropriate
opendkim-testkeylocation to check the key pair, then test an outbound message. - Step 5. For rotation, the documented update option is
-u. Retain the previous public record long enough for previously signed messages to verify. Do not treat-r, which removes signing data, as a rotation command.
Product-specific risks
Prepare a maintenance window because key generation and DNS publication do not become visible everywhere simultaneously. If an outbound relay rewrites a signed body, a locally valid key can still yield a failed received signature. Place the test after the entire outbound route, including disclaimers and security gateways. For a hosted deployment without MTA access, give the hosting operator the test requirements rather than attempting shell commands on a workstation. Never attach key-query output to a support ticket without removing secrets.
Prove the route at the receiving end
Use an approved external mailbox and save the complete raw message with its timestamp and message identifier. No live tenant test is claimed in this guide. The following is an acceptance worksheet to complete during implementation, not a record of observed results.
- Evidence field: Visible From; What to record: Actual address and domain; Acceptance question: Is this the intended sender identity?
- Evidence field: Envelope; What to record: Return-Path and receiver-reported SPF domain; Acceptance question: Which domain did SPF actually authenticate?
- Evidence field: SPF; What to record: Trusted receiver result and evaluated identity; Acceptance question: Did it pass, and does that identity align?
- Evidence field: DKIM; What to record: Every d= domain, s= selector and receiver result; Acceptance question: Does at least one passing signature align?
- Evidence field: DMARC; What to record: Receiver result and applicable policy; Acceptance question: Does an aligned passing path exist?
- Evidence field: Route; What to record: Product, account and message type; Acceptance question: Did the test use the production path?
DMARC needs at least one aligned, passing SPF or DKIM path. A passing signature from an unrelated service domain is not enough. Strict alignment requires exact domain equality; relaxed alignment uses the applicable organizational-domain relationship. Check the domain's actual alignment settings before declaring success. A subdomain is not an automatic strict match. SPF uses the SMTP identity, not the display name or Reply-To. Consult the alignment glossary when recording the decision.
Use Authentication-Results from the receiving system you trust, not a header supplied by an arbitrary sender. Capture all signatures rather than stopping at the first failure. For forwarded mail, compare a direct test with a forwarded copy: forwarding may change SPF evaluation or alter signed content. Do not diagnose those effects by adding the forwarder's address to your provider authorization.
Diagnose failures without widening access
Compare authoritative DNS with the exact configured record names first, then check recursive visibility and service validation. A wrong name, truncated key or conflicting CNAME is not fixed by waiting for caches. Keep only one SPF policy at an owner and check the ten DNS-lookup-term limit across evaluated includes and redirects before merging another sender. DKIM selectors belong to individual signing configurations; do not overwrite another application's record to force a validation result.
If authentication passes but delivery is poor, inspect the recipient response, reputation, content and sending permissions separately. DMARC pass does not promise acceptance or inbox placement. If neither path aligns, stop expansion and correct the actual sender configuration. Do not weaken the whole domain's DMARC policy to hide a single product failure.
Handover and recovery
Save the approved DNS diff, public lookup results, service status and redacted received-message worksheet with a named owner. Keep credentials and private keys out of tickets. On failure, pause the affected sending job or use a previously tested route under the service owner's control. Restore only the changed records that belong to this integration; keep public keys needed by in-flight messages. Retest after rollback, key rotation, domain migration or a change in outbound relay. Close the change only when the product owner and mail administrator can explain the observed identity chain.
Confirm the provider boundary
The wiki identifies different test-tool locations for ZCS 8.6 and earlier versus 8.7 and later, and says 8.7.x generates 2048-bit keys. Confirm the installed version rather than copying an old sample key. For a long TXT value, use multiple character strings within one resource record, not competing public-key records. The wiki warns about 8-bit conversion and mailing-list/PGP interactions; test those applicable routes without casually changing encoding or restarting services. Revocation with an empty p= invalidates that key and is not ordinary overlap rotation.
Work through a fictional diagnostic case
Fictional written case only: ZM-01 assumes local key testing succeeds for shop.example, but a downstream gateway adds a footer and the received message from help@shop.example reports a body-hash failure for d=shop.example. SPF and other signatures are unknown. The MTA and gateway owners must establish the final signing order and test after all modifications; a local test does not contradict the received failure. No full DMARC verdict or repaired delivery is asserted. No tenant, DNS, server command or message was exercised for this case.
Separate a passing message from enforcement readiness
RFC 9989 Section 7.4 requires valid DKIM for a domain publishing p=reject and cautions about indirect-mail interoperability. A single aligned SPF result does not by itself justify a reject-policy rollout. Review all legitimate routes and policy ownership separately from this provider setup.