Skip to content

Forwarded mail to Gmail bounces with 550 5.7.26 unauthenticated

A cPanel forwarder to Gmail or Google Workspace bounces with 550 5.7.26 because the forwarded message fails authentication. Here is why forwarding breaks SPF and how to fix it.

A cPanel forwarder that quietly worked for years can start bouncing with 550 5.7.26 This mail has been blocked because the sender is unauthenticated the moment Gmail tightens its rules. The forwarder is doing exactly what it always did — relaying the original message to a Gmail address — but plain forwarding rewrites the delivery path without re-authenticating the mail, so Google now sees a message that fails SPF and (if there were any edits) DKIM, arriving from your server on behalf of the original sender. The fix is to stop forwarding “as the original sender” and either rewrite the envelope or sign on the way out.

What’s happening

When info@example.com forwards to a @gmail.com address, your Exim takes a message that arrived from, say, a bank’s server and re-sends it to Google. The message body and From: header still say the bank, but it is now being delivered by your IP. Google checks authentication: SPF is evaluated against the envelope sender (the bank’s domain) versus the connecting IP (your server) — that fails, because your server is not in the bank’s SPF record. If your forwarder also altered the message in any way, the original DKIM signature breaks too. With both broken and no alignment, the message is unauthenticated, and Google — especially for bulk senders under its 2024 sender requirements — rejects with 550 5.7.26.

cPanel mitigates this with SRS (Sender Rewriting Scheme), which rewrites the envelope sender to your domain so SPF passes against your record on the forward hop. If SRS is disabled, or the forwarder predates it, the envelope still carries the original sender and SPF fails. The cleaner long-term answer for forwarded mail is to preserve the original authentication results with ARC, but for stopping the bounce, SRS plus your own valid SPF/DKIM is what Gmail wants to see on the connection from your server.

How to verify

Confirm the bounce is an authentication rejection and not a different 550.

# Pull the forwarder's outbound attempt and Google's response
exigrep 'gmail.com' /var/log/exim_mainlog | grep -i '5.7.26\|unauthenticat' | tail -20

# The forwarder definition itself
grep 'gmail.com' /etc/valiases/example.com

Check whether SRS is enabled on this server — this is the decisive setting:

# SRS toggle in the global Exim config
grep -i 'srs' /etc/exim.conf.localopts
grep -i 'srs_config\|srs =' /etc/exim.conf | head

# Newer cPanel exposes it as a setting
whmapi1 get_tweaksetting key=srs 2>/dev/null

Verify your domain can authenticate at all (so that once SRS rewrites the envelope to your domain, SPF passes):

# Your SPF must authorize this server's sending IP
dig +short TXT example.com | grep -i spf
# DKIM selector cPanel publishes (default selector)
dig +short TXT default._domainkey.example.com

Inspect a bounced message’s authentication results if you have the NDR — Google states the failing check:

# In the bounce body, look for:
#   spf=fail (or softfail) ... dkim=fail ... dmarc=fail
# That triplet confirms the unauthenticated-forward problem.

The fix

  1. Enable SRS in WHM — the primary fix. In WHM » Service Configuration » Exim Configuration Manager » Basic Editor, find Sender Rewriting Scheme (SRS) and turn it on (or enable it via the tweak setting). SRS rewrites the envelope sender to a SRS0=...@example.com address so SPF is checked against your domain on the forward hop, which passes. Restart Exim after enabling.

  2. Make sure your own SPF and DKIM are valid — SRS only helps if your domain authenticates. Use cPanel » Email » Email Deliverability to confirm SPF includes this server’s IP and DKIM is published and correct. If Email Deliverability shows problems, fix them there first; SRS rewriting to a domain that itself fails SPF gains nothing.

  3. Prefer forwarding to a mailbox you control plus IMAP, not a third-party forward — where possible, deliver to a local cPanel mailbox and have the user collect it, instead of forwarding the message onward to Gmail. Mail that lands locally is never re-sent, so it never fails the forward-hop authentication.

  4. Use ARC for forwarded mail when alignment must survive — if you must forward and want the original authentication results preserved, ARC sealing lets Google trust your server’s assertion that the mail authenticated when you received it. This is the stronger fix for newsletters and bulk senders that Gmail scrutinizes hardest.

  5. Stop forwarding bulk or marketing mail to Gmail — Google’s 5.7.26 is strictest for bulk senders. If a forwarder is relaying newsletters that the user could instead subscribe to directly at their Gmail address, remove the forwarder; you cannot reliably make another company’s bulk mail authenticate from your IP.

  6. Replace forwarders that alter the message — a forwarder combined with a footer-adding filter or list software breaks the original DKIM. Remove the modification, or sign the outgoing message with your DKIM so at least one aligned signature is present.

After enabling SRS, trigger a forward and check exigrep 'gmail.com' /var/log/exim_mainlog for a 2.0.0 OK acceptance instead of 5.7.26. Forwarding to Gmail is workable, but only once your server stops sending other people’s mail as if it owned it. Stack Harbor configures SRS, SPF, and DKIM for forwarded mail under managed cPanel operations — start a conversation.