How to Setup Email Send Limits for cPanel Accounts

WHM allows you to specify the maximum number of emails that a particular domain can send per hour. This allows you to limit spam and better regulate bandwidth that the domains on your server use.

Set the default limit for all domains

To set the email limit for your domains, enter a value for the Max hourly emails per domain setting in WHM’s Tweak Settings interface. (Home >> Server Configuration >> Tweak Settings)

This value is the default threshold for all of the domains that are on your sever, except for domains for which you manually set a different threshold.

Limit email for an account’s domains
Limit email for an account’s domains

To limit the number of emails per hour that an account’s domains can send, perform the following steps:

Navigate to WHM’s Modify an Account interface (Main >> Account Functions >> Modify an Account).

Specify a value for the Hourly Email by Domain Relayed configuration setting.

Click Save.


This option sets the email limit for all of the subdomains, addon domains, and parked domains that are added to a cPanel account. When you enter a new limit with the Modify an Account feature, the system only applies the new value to the main domain and any domains that do not have individually-defined values.

Set thresholds for an individual domain
Limit email for an account’s domains


If you wish for a particular domain to have a different threshold from the primary domain, you can also configure thresholds separately for each domain. Just note that this is not something we do on a shared account but it is good to know how it works.Right?

To set the threshold for the Max hourly emails per domain setting for an individual domain, perform the following steps via the command line as the root user:

With a text editor, open the /var/cpanel/users/$account file.

vi /var/cpanel/users/$accountt


$account represents the username that owns the domain for which you wish to set the Max hourly emails per domain setting.

Add the MAX_EMAIL_PER_HOUR- line to the /var/cpanel/users/$account file.

Specify the number of email messages that you wish to allow the domain to send per hour. Separate the domain and maximum number of messages with an equal sign (=), as in the following example:

Note: represents the domain for which you wish to set the Max hourly emails per domain setting.

Save the changes to the /var/cpanel/users/$account file.

Run the /usr/local/cpanel/scripts/updateuserdomains script.


This script constructs the individual threshold files that Exim uses to determine whether the account has reached its maximum email threshold.

The threshold for resembles the following example:


The system assigns the value of the MAX_EMAIL_PER_HOUR in /etc/email_send_limits setting to a domain without a particular entry in the /var/cpanel/users/$account file if it exists. If it does not exist, the system assigns the default entry on the Tweak Settings interface to a domain.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.