This document outlines some of the best practices that you can follow to avoid email abuse on your cPanel & WHM server.
If you increase the minimum password strength for your users' mail accounts, you can decrease the chance that a hacker will correctly guess their passwords.
To define minimum password strength for all of your users' authenticated features, use WHM's Password Strength Configuration interface (WHM >> Home >> Security Center >> Password Strength Configuration).
We recommend that you set the default minimum password strength to at least
cPHulk provides protection for your server against brute force attacks (a hacking method that uses an automated system to guess passwords). If you enable cPHulk, you can decrease the chance that a hacker can use a brute force attack to gain access to your server's mail accounts.
To enable this feature, navigate to WHM's cPHulk Brute Force Protection interface (WHM >> Home >> Security Center >> cPHulk Brute Force Protection) and click Off to toggle the feature's status.
If you enable the SMTP Restrictions feature, spammers cannot directly interact with remote mail servers or work around mail security settings.
mailmansystem user, and the
sendmailbinary, which helps to prevent direct access to the socket.
To enable this feature, navigate to WHM's SMTP Restrictions interface (WHM >> Home >> Security Center >> SMTP Restrictions) and click Enable.
The following settings in the Mail section of WHM's Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings) can help to prevent email abuse:
If you set the Max hourly emails per domain option to
Use the The percentage of email messages (above the account’s hourly maximum) to queue and retry for delivery setting to specify a "soft limit." For example, if you set the The percentage of email messages (above the account’s hourly maximum) to queue and retry for delivery value to
The system only enforces email send limits on remote email deliveries.
To prevent email abuse, we recommend that you specify a value that is not Unlimited.
Use WHM's Edit a Package interface (WHM >> Home >> Packages >> Edit a Package) or WHM's Modify an Account interface (WHM >> Home >> Account Functions >> Modify an Account) to specify values for an individual package or an individual account.
To enable this setting from the command line, you must perform the following steps to manually edit the
From the command line, open the
/var/cpanel/users/username file, where
username represents the desired account username.
In this file, add the
MAX_EMAIL_PER_HOUR key and specify the value for the selected username:
To prevent email abuse, we recommend that you select On.
Do not enable suEXEC with ModRuid2. suEXEC is not compatible with this module.
If you configure PHP and suEXEC, ModRuid2, or suPHP, you can improve server security. This configuration allows you to know which users run which processes system-wide.
POSIX.1ecapabilities in order to provide some performance enhancements over Apache's default configuration.
Any local cPanel user can use the
127.0.0.1 IP address to send mail without authentication. This can make it difficult for system administrators to determine which cPanel account sent the mail, especially when a malicious user spoofs an email address to disguise the origin of the email.
To require cPanel & WHM to put the actual sender in the header, enable the Experimental: Rewrite From: header to match actual sender option in WHM's Exim Configuration Manager interface (WHM >> Home >> Exim Service Configuration >> Exim Configuration Manager).
After you enable this feature, you will see output that is similar to the following in the
2014-04-23 08:09:52 1Wcwvu-0000On-Sb From: header (rewritten was: [email@example.com], actual sender is not the same system user) original=[firstname.lastname@example.org] actual_sender=[email@example.com]
actual_sender portion of the log entry shows that
spammer is the cPanel account that sent the email. This information allows the system administrator to take action against the account to prevent additional spam.