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

    cPanel/WHM Exim Mail Queue Full? Complete Fix Guide (2026)

    Priya

    Content Writer & Researcher

    Last Updated: 29 June 2026
    cPanel/WHM Exim Mail Queue Full? Complete Fix Guide (2026)
    🖥️

    Is Your cPanel Server Drowning in a Backed-Up Mail Queue?

    CloudHouse Technologies manages Exim queue crises, spam injection cleanups, and email deliverability for shared hosting servers around the clock. Get your mail flowing again within the hour.

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

    Your cPanel server's Exim mail queue fills up, and suddenly nobody's email is going out. Thousands of deferred messages pile up, your server's IP reputation takes a hit, and your clients start calling. This guide walks you through diagnosing the root cause, safely clearing the queue, and hardening Exim to prevent it from happening again.

    Step 1: Check the Current Queue Size

    Before touching anything, quantify the problem. Log in to your server via SSH as root and run:

    exim -bpc

    This returns a single number — the total messages currently sitting in the queue. A healthy server running a modest shared hosting environment typically stays under 100. Anything over 1,000 needs immediate attention.

    For a full breakdown with sender, recipient, and age of each message:

    exim -bp | head -100

    You can also check via WHM: go to Email > Mail Queue Manager to view, search, and delete messages from a GUI.

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 2: Identify the Account Flooding the Queue

    A bloated queue almost always traces back to one compromised account or script sending bulk mail. Find it before you clear anything, or the queue will fill right back up.

    1Find top senders by message count:
    exim -bp | awk '{print $4}' | sort | uniq -c | sort -rn | head -20
    2Find the script or PHP file responsible:
    grep "cwd=" /var/log/exim_mainlog | awk -F'cwd=' '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -rn | head -20

    The cwd= field shows the working directory of the process that injected the mail — this almost always points directly to the compromised WordPress plugin, contact form, or PHP script.

    3Suspend the account immediately in WHM under Account Functions > Modify an Account until you've cleaned the malware.

    Step 3: Remove Frozen Messages

    Frozen messages are emails Exim has given up on after repeated delivery failures. They sit in the queue consuming disk space and memory but never delivering. Remove them first.

    1. Count frozen messages:

    exim -bp | grep frozen | wc -l
    2Delete all frozen messages:
    exim -bp | grep frozen | awk {'print $3'} | xargs exim -Mrm

    Or use the faster one-liner that handles large queues without hitting shell argument limits:

    exiqgrep -z -i | xargs exim -Mrm
    1Enable Max Defer settings in WHM: Go to WHM > Exim Configuration Manager > Basic Editor. Set Max Defers Per Hour to a reasonable limit (e.g., 500) and enable Max Defers Per Hour Percentage to auto-suspend accounts that exceed it.

    2. Enable BoxTrapper and SpamAssassin globally for all accounts under WHM > Email > Exim Configuration Manager.

    3. Set up email authentication records: Use WHM's Email Deliverability tool to verify SPF, DKIM, and DMARC are correctly configured for every domain. Missing or broken records cause remote servers to bounce mail back into the queue.

    4. Schedule regular queue monitoring:

    # Add to root's crontab — alerts if queue exceeds 500
    */15 * * * * count=$(exim -bpc); if [ "$count" -gt 500 ]; then echo "Exim queue at $count" | mail -s "ALERT: Exim queue spike" admin@yourdomain.com; fi

    5. Install CSF/LFD (ConfigServer Security & Firewall) — it includes email-specific rate limiting that auto-suspends accounts blasting outbound mail beyond configurable thresholds.

    Step 8: Verify Exim Service Health After Cleanup

    # Check Exim is running
    systemctl status exim
    
    # Restart Exim if needed
    systemctl restart exim
    
    # Check Exim logs for errors
    tail -f /var/log/exim_mainlog

    After a cleanup, watch the mainlog for a few minutes to confirm legitimate mail is flowing and no new spam injection is occurring. If the queue spikes again within hours, the compromised script is still active — revisit Step 2 and audit the account's file modification timestamps:

    find /home/username/public_html -mtime -7 -name "*.php" | head -30

    WHM GUI Alternative

    If you prefer not to use the command line, WHM provides a Mail Queue Manager at Email > Mail Queue Manager. You can search by sender, recipient, or message ID, and delete individual messages or batches. However, the GUI is impractical when the queue holds tens of thousands of messages — SSH commands are orders of magnitude faster at that scale.

    FAQs

    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

    The queue is being replenished faster than Exim can clear it. This almost always means a compromised PHP script or WordPress plugin is still injecting mail. Check the Exim mainlog's cwd= field and find/remove the malicious script before clearing the queue again. Suspending the affected cPanel account temporarily stops the flood immediately.

    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...

    Struggling With a Flooded Exim Queue?

    A bloated mail queue can blacklist your entire server's IP and cost you clients. CloudHouse Technologies specialises in cPanel/WHM server management — we diagnose the source, clean the queue, and harden Exim so it doesn't happen again. Reach out before your IP reputation is gone.

    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