Mailbox quota exceeded – How cPanel manages mailbox quotas?

This applies to cPanel Web Hosting account and configuration of this is done by System Administrator with root privilege.

When you have an email account with certain amount of disk space quota, and it goes full, you have the option to either keep the mails in the queue or return them to the sender. The problem with keeping the emails in the queue for over quota email accounts is that it will clutter the queue of server with large number of emails. And most importantly neither the sender of the email nor recipient will know there is a problem with mailbox quota and it has exceeded.

To reject emails on over quota at the time sender’s remote server is delivering email to your hosting account is the best option as this will instantly inform the sender the mailbox is full. The sender can then either contact recipient via other means or try again later.

This is configured in WHM’s Mailserver Configuration by setting the value of Disk Quota Delivery Failure Response to Reject the message permanently.

With this configuration set, when the email account is over quota, new emails are not accepted by the server for that mailbox and it gives this error that you can see in /var/log/exim_mainlog:

2013-10-24 07:17:45 1VZ4sD-0000ab-11 ** R=virtual_user_maildir_overquota: Mailbox quota exceeded

Important Note: In cPanel interface when you look up the disk space usage of email accounts, they get instantly updated with emails coming in or being deleted. This process is handled by the incoming and outgoing mail servers (exim, dovecot etc.). However for the purpose of checking disk space when receiving emails, cPanel re-calculates the disk usage every four hours and then uses that cached value for the next four hours. If it had to check each and every mailbox each second it is trying to deliver mail, the server would not be able to handle it. And it would also not allow temporary quota issues to be resolved where clients download emails regularly to make room. Therefore there is a small window when emails will be received for over quota accounts even with this configuration of rejecting emails for users over quota. Those emails are held in queue and on the next try they are delivered.