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

    cPanel/WHM Email Disk Quota Exceeded? Fix 552 Mailbox Full Errors

    Priya

    Content Writer & Researcher

    Last Updated: 29 June 2026
    🖥️

    Stop Losing Emails to Quota Errors on Your cPanel Server

    CloudHouse's managed cPanel server team monitors mailbox quota, Dovecot health, and disk usage 24/7 — so your clients never miss an email. Get proactive quota management before the next bounce.

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

    When email stops arriving and senders start getting bounce messages like 552 5.2.2 Mailbox Full or Disk quota exceeded, the clock is ticking. Every new email that bounces is a missed communication — and on shared hosting servers managed with cPanel and WHM, this is one of the most common support tickets. This guide walks you through every layer of the problem: from the maildirsize corruption that causes false quota readings to the WHM disk allocation settings that cap the entire cPanel account.

    Understanding the 552 5.2.2 Error Code

    The SMTP error code 552 5.2.2 means the destination mailbox has exceeded its storage quota. The sending mail server receives this response and returns a non-delivery report (NDR) to the original sender. The email is not delivered and will not be retried unless the recipient frees space.

    On cPanel servers, the 552 error can have three distinct root causes, each requiring a different fix:

    • Email account quota exceeded — the individual mailbox (e.g., john@example.com) is at or over its configured limit
    • cPanel account disk quota exceeded — the hosting account's total disk allocation is full, affecting all mailboxes under it
    • Corrupted maildirsize file — the quota tracking file is stale or corrupted, making Dovecot report incorrect usage and reject email unnecessarily

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step 1: Diagnose the Actual Cause via WHM

    Before making any changes, determine which layer is causing the problem. Log in to WHM as root.

    1Check the cPanel account's disk usage

    Navigate to Account Information → List Accounts and look at the Disk column for the affected account. If the usage equals the limit (e.g., 5000 MB / 5000 MB), the entire cPanel account is out of space and no email can be received.

    2Check the individual email account quota

    Navigate to Email → Email Disk Usage in cPanel (not WHM) for the affected user. This shows each mailbox and its current usage vs. its configured quota.

    3Verify via SSH

    Connect to the server over SSH as root and run the quota check for the specific user:

    repquota -ua /home | grep username

    Also check the raw disk space available:

    df -h /home
    1Find the maildirsize file via SSH

    The file is in the user's mail directory. For the account john@example.com on cPanel user exampleuser:

    ls -lh /home/exampleuser/mail/example.com/john/maildirsize
    2Check its contents
    cat /home/exampleuser/mail/example.com/john/maildirsize

    The first line is the quota definition (e.g., 1073741824S = 1 GB). Subsequent lines are incremental usage counts that Dovecot sums up. If the sum is wrong compared to actual disk usage, the file is stale.

    3Delete the file to force a rebuild
    rm -f /home/exampleuser/mail/example.com/john/maildirsize

    Dovecot will automatically recalculate and recreate this file on the next connection or inbox activity. This is safe — no email is deleted or lost.

    4Rebuild all maildirsize files for a user at once

    If multiple mailboxes are affected, run the cPanel quota recalculation script:

    /scripts/generate_maildirsize --confirm --all

    Or for a specific account:

    /scripts/generate_maildirsize --confirm --user=exampleuser
    5Verify via cPanel File Manager

    If you prefer a GUI approach: log in to cPanel → File Manager → navigate to mail/example.com/john/ → find and delete the maildirsize file. Show hidden files if needed (Settings → Show Hidden Files).

    1Via cPanel

    Log in to cPanel → Email Accounts → find the affected address → click Manage → scroll to Storage → update the Allotted Storage Space value → click Update Email Settings.

    You can also set it to Unlimited if the hosting plan allows it, but this is not recommended on shared servers as a single account can fill the entire disk.

    2Via SSH (WHM API)

    For bulk operations or automation, use the cPanel API or WHM's command line:

    uapi --user=exampleuser Email edit_pop_quota   email=john@example.com   quota=2048

    The quota value is in megabytes. Set to 0 for unlimited.

    1Quick quota change in WHM

    Log in to WHM → Account Information → List Accounts → find the account → click the pencil/edit icon next to the account → change the Disk Space Quota → save.

    2Change quota via WHM command line
    whmapi1 modifyacct user=exampleuser QUOTA=10240

    The quota is in megabytes.

    3Set quota to unlimited for a VPS or dedicated server

    For servers where you control the hardware, setting quotas to unlimited is acceptable. However, always monitor with df -h and set up disk usage alerts.

    1Clear large emails via Webmail (Roundcube/Horde)

    Log in to Webmail → sort by size → delete the largest emails → empty Trash and Spam folders. Roundcube: Settings → Display → Sort by Size.

    2Force-delete messages via SSH when the account can't even log in
    # Check actual disk usage of the mailbox
    du -sh /home/exampleuser/mail/example.com/john/
    
    # List large files in the mailbox
    find /home/exampleuser/mail/example.com/john/ -type f -size +1M -exec ls -lh {} \; | sort -k5 -rh | head -20
    3Purge the Trash and Junk folders via command line
    rm -rf /home/exampleuser/mail/example.com/john/.Trash/cur/*
    rm -rf /home/exampleuser/mail/example.com/john/.Spam/cur/*

    After deleting files manually, always delete or regenerate the maildirsize file so Dovecot recalculates usage correctly.

    1Configure cPanel disk usage notifications

    In WHM → Server Configuration → Tweak Settings → search for "quota" → enable Send disk space usage notifications to cPanel users and set the threshold percentage (e.g., 85%).

    2Set per-account quota warnings in WHM

    WHM → Account Information → Quota Modification → configure notification thresholds per account.

    3Monitor via cron

    Add a cron job to alert when any account exceeds 90% disk usage:

    */30 * * * * /scripts/quota_warn --threshold=90 2>/dev/null
    4Use CloudHouse's managed server monitoring

    For hosting environments where disk and quota management must be proactive, consider a managed server management service that monitors cPanel account quotas, Exim queue length, and Dovecot health 24/7.

    Step 7: Restart Dovecot After Quota Changes

    After making quota changes or deleting maildirsize files on a busy server, restart Dovecot to apply changes immediately:

    # Check Dovecot status
    /scripts/restartsrv_dovecot
    
    # Or via systemd
    systemctl restart dovecot

    Then verify email delivery is restored:

    # Send a test message via Exim
    echo "Test body" | exim -v -f sender@example.com recipient@example.com

    FAQs

    Conclusion

    The 552 5.2.2 mailbox full error in cPanel/WHM almost always comes down to one of three problems: a corrupted maildirsize file, a mailbox quota that's genuinely too low, or an entire cPanel account that's run out of disk space. Work through each layer — delete and regenerate maildirsize, adjust quota via cPanel Email Accounts or WHM, and set up disk usage alerts so the problem doesn't silently recur. For environments where quota incidents happen repeatedly, a managed cPanel server service with proactive disk monitoring is the most reliable long-term solution.

    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 552 5.2.2 error can appear even when actual disk space is available if the maildirsize file is corrupted or out of sync. Dovecot reads this file to determine quota usage, and if the calculated total is wrong, it will reject new mail. Delete the maildirsize file in the affected mailbox directory via SSH or cPanel File Manager — Dovecot will automatically rebuild it on next access.

    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 552 Mailbox Full Errors?

    When email quota errors hit, every bounce means a missed client message. CloudHouse Technologies manages cPanel and WHM servers with proactive disk and quota monitoring — we catch quota issues before your users do. Talk to our server team today.

    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