Skip to content

POP3 leave-on-server settings causing cPanel quota explosions

How POP3 clients with "leave mail on server" can fill a cPanel mailbox quota over months without the user noticing, and how to migrate them to IMAP without losing local mail.

A user calls saying they can’t receive mail. The mailbox is at 100% quota. They use Outlook, “have been for years,” and they don’t understand because they delete every message after reading. The culprit is the POP3 client setting “leave a copy on the server” — silently enabled by default in several mail clients — that downloads mail to the client and keeps it on the server forever. Over a few years, that’s tens of thousands of messages no one knew about.

What’s happening

POP3 was designed to download mail and remove it from the server. Clients added “leave on server” as a feature so users could check mail from multiple devices, and then it became the default in some clients (especially Outlook installs through certain wizards). The user reads and deletes locally, the server copy stays. The mailbox grows linearly with mail volume, and the user is unaware because their client only shows the local view.

How to verify

Identify the largest mailboxes on the server:

du -sh /home/*/mail/*/* 2>/dev/null | sort -h | tail

For a specific user, check if POP3 access patterns dominate:

grep "pop3-login" /var/log/maillog | awk '{print $NF}' | sort -u | head
doveadm quota get -u user@example.com

If the quota is near full and POP3 is the dominant access protocol, you have your answer.

The fix

  1. Confirm with the user that they actually want all that mail kept. Often they don’t — they thought it was being cleaned up. If they don’t need it, archive the maildir locally and clear the server.
  2. For users who legitimately need multi-device access, migrate from POP3 to IMAP. IMAP keeps mail on the server and synchronizes state across devices, but the user must understand that “delete” means actually delete from the server. The migration path is to set up IMAP alongside POP3, let them confirm the configuration works on every device, then disable POP3 in the client.
  3. Don’t just delete server mail without warning. The user has been treating it as the master copy; deleting it loses anything they didn’t download to a working device. Move it to a Server-Archive IMAP folder first.
  4. For users staying on POP3, change the client setting to “leave on server for N days” (typical: 7 to 30) so the server cleans up automatically.
  5. Set up monitoring for mailboxes approaching quota — doveadm quota get -A reports for all users — so the next case shows up at 80% rather than at 100% with a user blocked from receiving.

For environments where the mailbox base is mixed POP3 and IMAP and quota issues are recurring, Stack Harbor handles the audit and migration as part of WHM server management.