A cPanel forwarder sends sales@example.com on to a personal Gmail address, and some messages never arrive. Exim, the mail server cPanel uses, accepted and relayed them, but the destination refused them or filed them as spam for failing DMARC. DMARC is the policy a sending domain publishes to say what receivers should do with mail that fails authentication. Forwarding changes which server delivers the message, and that is enough to fail the SPF half of the check. Turn on SRS (Sender Rewriting Scheme) in WHM so the forwarded copy passes SPF again, then check DKIM, because DKIM is what decides the DMARC result for forwarded mail.
Why forwarding fails the check
DMARC looks at the domain in the visible From: header. A message passes when at least one of two things is true for that same domain:
- SPF passes and is aligned. SPF checks the envelope sender, the hidden bounce address a receiver later records as
Return-Path. The sending IP must be authorised by that address’s domain, and that domain must match theFrom:domain. - DKIM passes and is aligned. DKIM is a signature the sending server adds over the body and selected headers. The signing domain (
d=in the signature) must match theFrom:domain.
“Match” means the same organisational domain by default, so mail.partner.com matches partner.com. A domain can ask for an exact match instead.
When your server forwards a message, your IP delivers it. The original sender’s SPF record does not list your IP, so SPF fails. The DKIM signature travels with the message and stays valid as long as nothing changes the signed content. The current DMARC specification says the same thing about relayed mail: it will most likely fail SPF unless the relay rewrites the envelope sender, and DKIM signatures generally stay valid.
So a forwarded message from a correctly signed sender still passes DMARC through DKIM. It fails when the sender relies on SPF alone, or when something on the way changed the message.
Find out which check failed
Open a forwarded message at the destination (look in spam too) and show the original headers. In Gmail, that is Show original. Read the Authentication-Results header.
Example output for a forwarded message that still passes, with SRS off:
Authentication-Results: mx.google.com;
dkim=pass header.i=@partner.com header.s=s2026 header.b=Qm4tZp1x;
spf=softfail smtp.mailfrom=sender@partner.com;
dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=partner.com
Example output for one that fails, with SRS on and a broken signature:
Authentication-Results: mx.google.com;
dkim=neutral (body hash did not verify) header.i=@partner.com header.s=s2026 header.b=Lr8wNc3d;
spf=pass smtp.mailfrom="SRS0=x7Kq=4T=partner.com=sender@forwarder.example.com";
dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=partner.com
Use this table to read your own header. “Aligned” compares against the From: domain.
| What you see | SPF | DKIM | DMARC |
|---|---|---|---|
| SRS off, signature intact | fails | passes, aligned | pass |
| SRS off, no signature or broken signature | fails | fails | fail |
| SRS on, signature intact | passes, not aligned | passes, aligned | pass |
| SRS on, no signature or broken signature | passes, not aligned | fails | fail |
If the destination rejected the message outright, there is no header to read. Look for the refusal in Exim’s main log on the cPanel server instead:
grep 'user@gmail.com' /var/log/exim_mainlog
A line containing ** is a failed delivery, and the receiver’s reason follows it. Gmail’s refusal for this case reads as follows (example output):
550 5.7.26 Unauthenticated email from partner.com is not accepted due to domain's DMARC policy.
Turn on SRS in WHM
SRS replaces the envelope sender of a forwarded message with an address on the forwarding server. The receiver then runs SPF against your domain, which does list your IP. The original sender is encoded inside the new address, so bounces can still find their way back.
- Open the setting. Go to WHM » Home » Service Configuration » Exim Configuration Manager, stay on the Basic Editor, and open the Mail tab.
- Enable it. Set Enable Sender Rewriting Scheme (SRS) Support to On. It is Off by default.
- Save the configuration. This setting applies cPanel’s default SRS configuration. A custom SRS setup needs the Advanced Editor, and most servers do not need one.
Prove SRS is working
Send a message from an outside account to the forwarded address, then open the original headers at the destination. With SRS active, the return path starts with SRS0= and ends at a domain your server handles.
Example output:
Return-Path: <SRS0=x7Kq=4T=partner.com=sender@forwarder.example.com>
spf=pass should now name the domain after the @ in that address. If SPF fails for it, that domain’s SPF record does not list the IP your server sends from, so correct the record. If Return-Path still shows the sender’s plain address, SRS is not active for that message.
You will also see these long SRS0= addresses in the Exim log and the mail queue from now on. They are the original senders in encoded form, and the server decodes a bounce sent to one so it can go back to the real sender.
What SRS does not fix
SRS makes SPF pass for your domain. Your domain is still different from the From: domain, so SPF stays unaligned and cannot produce a DMARC pass on its own. For a sender under p=reject or p=quarantine, the forwarded copy needs an intact, aligned DKIM signature.
- Keep the message unchanged in transit. Subject tags added by a spam filter, appended footers, and scanners that re-encode the body all invalidate the signature. If a filter on your server does this to forwarded mail, turn that feature off for it.
- A sender with no aligned DKIM signature cannot be rescued. Nothing on the forwarding server can add a valid signature for someone else’s domain. That sender has to sign their mail.
- ARC is optional and experimental. ARC (Authenticated Received Chain, RFC 8617) lets a forwarder record the authentication results it saw and sign that record. The receiver chooses whether to trust it. WHM offers EXPERIMENTAL: Enable ARC signing for outgoing mail on the same Mail tab, off by default. It requires Allow DKIM verification for incoming messages to be On, plus DKIM and SPF enabled in WHM » Home » DNS Functions » Enable DKIM/SPF Globally. cPanel does not promise better delivery from it. See ARC sealing for forwarded mail before relying on it.
When a forwarder is the wrong tool
If a user must receive mail from senders under strict DMARC, and some of those senders do not sign with DKIM, forwarding will keep losing those messages. Give that user a real mailbox on the server and have them read it directly, in webmail or a mail client.
Review the list in cPanel » Email » Forwarders from time to time and remove forwarders that point to addresses nobody reads any more. Each one still generates bounces. For setup, local copies and loops, see creating and managing email forwarders in cPanel.
Official references: cPanel’s Exim Configuration Manager Basic Editor documentation and the DMARC specification, RFC 9989.
If this is the kind of work you’d rather never own again, it’s the daily job of Managed Cloud Ops — book an infrastructure review.