Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    cPanel Email Routing Misconfigured? Fix Forwarders, SPF, DKIM & Exim Queue (2026 Guide)

    Priya

    Content Writer & Researcher

    Last Updated: 12 August 2026
    cPanel Email Routing Misconfigured? Fix Forwarders, SPF, DKIM & Exim Queue (2026 Guide)
    🖥️

    cPanel Email Routing Broken? We'll Fix It Today

    Our server management team configures cPanel email routing, SPF, DKIM, DMARC, and SRS forwarding correctly on the first pass. Get your email delivering reliably within hours.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    What Is cPanel Email Routing and Why Does It Break?

    cPanel Email Routing is the server-level setting that tells Exim (the mail transfer agent behind every cPanel server) where to deliver incoming mail for your domain. The setting lives under cPanel > Email > Email Routing and offers four modes: Automatically Detect Configuration, Local Mail Exchanger, Backup Mail Exchanger, and Remote Mail Exchanger.

    When this is misconfigured — or when email forwarders interact badly with modern authentication standards — your messages silently vanish, bounce, or land in spam. Since Google and Yahoo enforced strict DMARC/DKIM/SPF requirements in 2024 and tightened them further in 2025–2026, email routing and forwarding failures have become one of the top support tickets on cPanel servers worldwide.

    This guide covers the full diagnostic and fix path: from checking routing mode to repairing SPF/DKIM alignment, fixing the Exim queue, and making forwarders reliable again.

    Step 1: Check Your Current Email Routing Mode

    Log in to cPanel and navigate to Email > Email Routing. You will see the current setting for each domain. The correct setting depends on where your MX records point:

    • Local Mail Exchanger — Use this when your MX records point to this server. All mail is delivered locally.
    • Remote Mail Exchanger — Use this when your MX records point to an external provider (Google Workspace, Microsoft 365, Zoho). If set incorrectly to Local, the server tries to deliver locally and the message is lost.
    • Backup Mail Exchanger — Use only when this server is a secondary MX fallback.
    • Automatically Detect Configuration — Checks DNS and sets mode dynamically. Can misfire if DNS propagation is incomplete.

    Verifying Your MX Records

    Before changing the routing mode, confirm where your MX records actually point:

    dig MX yourdomain.com +short

    If the output shows mail.yourdomain.com resolving to this server's IP, use Local Mail Exchanger. If it shows Google or Microsoft endpoints, use Remote Mail Exchanger.

    You can also check from WHM shell:

    host -t MX yourdomain.com
    # or
    nslookup -type=MX yourdomain.com 8.8.8.8

    Step 2: Diagnose Email Forwarder Failures

    Forwarders in cPanel work by having Exim relay a copy of the incoming message to a new destination. Since 2024, this breaks silently against Gmail, Outlook, and Yahoo because of how forwarding interacts with SPF and DMARC.

    Why Forwarding Fails in 2026

    When your server forwards a message from sender@external-domain.com to user@gmail.com, Gmail sees:

    • From: sender@external-domain.com (unchanged)
    • Sending server: your cPanel server's IP
    • SPF check: FAIL — your server is not in external-domain.com's SPF record
    • DMARC policy: If external-domain.com has p=reject, Gmail drops the message entirely

    The solution is SRS (Sender Rewriting Scheme), which rewrites the Return-Path so SPF passes, plus configuring ARC sealing.

    Check Exim Mail Logs for Rejection Clues

    # Live log tail
    tail -f /var/log/exim_mainlog
    
    # Search for a specific address
    grep "user@yourdomain.com" /var/log/exim_mainlog | tail -50
    
    # Find DMARC rejections
    grep -i "dmarc" /var/log/exim_mainlog | tail -20
    
    # Find SPF failures
    grep -i "spf" /var/log/exim_mainlog | tail -20

    Common rejection strings to watch for:

    • 550 5.7.1 SPF check failed
    • 550 5.7.26 This mail is unauthenticated
    • DMARC policy of ... disallows spoofing
    • 550-5.7.1 Email rejected per DMARC policy

    Step 3: Enable SRS for Forwarders in WHM

    SRS (Sender Rewriting Scheme) is the industry-standard fix for SPF failures caused by forwarding. In WHM 110+, it is built in.

    # Check current SRS setting in Exim config
    grep -i "srs" /etc/exim.conf.local

    To enable SRS via WHM:

    1. Log in to WHM as root
    2. Navigate to Service Configuration > Exim Configuration Manager
    3. Click the Advanced Editor tab
    4. Search for srs
    5. Set SRS Type to forward (recommended) or reverse
    6. Set a strong SRS Secret (random string, at least 32 characters)
    7. Click Save — Exim restarts automatically

    After enabling SRS, forwarded messages will have a rewritten Return-Path like SRS0=hash=date=originaldomain=user@yourdomain.com. This passes SPF for your domain.

    Step 4: Verify and Fix SPF, DKIM, and DMARC Records

    Even with SRS enabled, your own domain's outgoing mail needs correct authentication records or recipients will reject it.

    Check SPF Record

    dig TXT yourdomain.com +short | grep spf

    A correct cPanel server SPF record looks like:

    v=spf1 +a +mx +ip4:YOUR.SERVER.IP ~all

    If your server IP is missing or the record uses -all (hard fail) instead of ~all (soft fail), update it. In WHM, SPF records can be auto-generated via DNS Functions > Edit DNS Zone.

    Verify DKIM Is Signing Outbound Mail

    # Check if DKIM key exists for a domain
    ls /etc/domainkeys/yourdomain.com/
    
    # Test DKIM signing (send a test email and check headers)
    echo "Test DKIM signing" | mail -s "DKIM Test" test@mail-tester.com
    
    # Verify the DKIM DNS record
    dig TXT default._domainkey.yourdomain.com +short

    If DKIM is missing, regenerate it in cPanel: Email > Email Deliverability and click Repair next to DKIM.

    Add a DMARC Record

    If you do not have a DMARC record, add a DNS TXT record for _dmarc.yourdomain.com:

    v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@yourdomain.com; pct=100; adkim=r; aspf=r

    Start with p=quarantine rather than p=reject until you confirm all your legitimate sending sources pass authentication.

    Step 5: Fix the Exim Mail Queue

    After fixing authentication issues, stuck messages in the Exim queue need to be flushed or retried.

    # View queue size
    exim -bpc
    
    # List queued messages
    exim -bp | head -40
    
    # Retry all deferred messages immediately
    exim -qff
    
    # Delete a specific message by ID
    exim -Mrm MESSAGE_ID
    
    # Flush all messages older than 7 days (bounced/undeliverable)
    exiqgrep -o 604800 -i | xargs exim -Mrm

    In WHM, you can also use Email > Mail Queue Manager for a GUI view of stuck messages.

    Step 6: Fix Email Routing for Google Workspace / Microsoft 365

    A very common mistake: the server is set to Local Mail Exchanger but the domain's MX records point to Google or Microsoft. All incoming mail gets delivered locally (and lost) instead of going to the external provider.

    # WHM root shell: list email routing for all domains
    whmapi1 listmaildomainstatus | python3 -c "import sys,json; d=json.load(sys.stdin); [print(r.get('domain','?'), r.get('status','?')) for r in d.get('data',{}).get('domains',[])]"

    Fix via WHM API or cPanel GUI: change routing to Remote Mail Exchanger for any domain whose MX points externally.

    You can also fix in bulk via WHM CLI:

    # Set a domain to remote mail exchanger
    whmapi1 setmaildomainstatus domain=yourdomain.com status=remote

    Step 7: Configure Email Filters to Prevent Loops

    Email forwarding loops occur when Domain A forwards to Domain B, which forwards back to Domain A, or when a forwarder points to an address on the same server that also has a forwarder.

    # Check for routing loops
    grep "too many hops" /var/log/exim_mainlog | tail -20
    grep "loop detected" /var/log/exim_mainlog | tail -20

    Exim's default hop limit is 25. If you see hop-limit errors, trace the forwarder chain:

    # List all forwarders for a domain
    cat /etc/valiases/yourdomain.com

    Delete any circular forwarder entries and restart Exim:

    service exim restart
    # or
    /scripts/restartsrv_exim

    Step 8: Use the Email Deliverability Wizard

    WHM 96+ includes an Email Deliverability tool that automatically diagnoses and repairs SPF, DKIM, and PTR records for all hosted domains. It is the fastest single fix for new servers or after an IP change.

    1. In WHM, navigate to Email > Email Deliverability
    2. Click Repair All to fix every domain at once, or repair domains individually
    3. Verify all checks show green: SPF ✓, DKIM ✓, PTR/rDNS ✓
    # CLI equivalent — repair DKIM for all domains
    /scripts/fixeverything
    # or target one domain
    /scripts/fixmailman yourdomain.com

    Common Error Messages and Fixes

    Error: "550 5.1.1 The email account that you tried to reach does not exist"

    This means Exim accepted the message but the local mailbox does not exist. Check /etc/localdomains — if your domain is listed there but routing is set to Remote, remove the domain from localdomains:

    grep yourdomain.com /etc/localdomains
    # If present and routing should be remote:
    sed -i '/yourdomain.com/d' /etc/localdomains

    Error: "Deferred: Connection timed out" or Port 25 Blocked

    Many cloud providers (AWS, GCP, Linode, Vultr) block outbound port 25 by default. Test with:

    telnet gmail-smtp-in.l.google.com 25

    If it hangs, request port 25 unblocking from your provider, or configure a smarthost relay in WHM: Service Configuration > Exim Configuration Manager > Routers > Send All Mail via a SmartHost.

    Error: "550 Unauthenticated senders not allowed"

    This is an outbound rejection from Gmail or Outlook. Your DMARC policy on the sender domain is too strict, or your DKIM key has rotated without updating DNS. Regenerate DKIM and verify the DNS TXT record matches the key in /etc/domainkeys/.

    Post-Fix Verification Checklist

    After applying fixes, validate end-to-end delivery:

    1. Send a test message to mail-tester.com — aim for 10/10
    2. Check MX Toolbox Blacklist (mxtoolbox.com) — your server IP should be clean
    3. Verify SPF alignment: dig TXT yourdomain.com +short
    4. Verify DKIM selector: dig TXT default._domainkey.yourdomain.com +short
    5. Test a forwarder by sending to the forwarded address and confirming delivery
    6. Check Exim queue is draining: exim -bpc should decrease over time

    Conclusion

    cPanel email routing and forwarder failures are almost always caused by a mismatch between routing mode and MX records, missing SRS configuration, or SPF/DKIM/DMARC misalignment. The good news is that WHM's built-in Email Deliverability wizard fixes most issues automatically — and enabling SRS in the Exim Configuration Manager handles forwarding authentication in minutes. If you want email routing configured correctly from day one — with SPF, DKIM, DMARC, and SRS all aligned — the team at CloudHouse server management handles cPanel/WHM email configuration as part of our standard server management service.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    Gmail rejects forwarded messages when SPF fails — your cPanel server is not listed in the original sender's SPF record. Enable SRS (Sender Rewriting Scheme) in WHM's Exim Configuration Manager to rewrite the Return-Path so SPF passes for your domain.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Need Help With cPanel Email?

    From forwarder failures to DMARC rejections, our cPanel experts diagnose and fix email delivery issues fast. We cover Exim configuration, SRS, SPF/DKIM alignment, and queue management — all included in our server management plans.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top