SMTP Restrictions is a security feature in WHM that limits which users and processes can connect to remote SMTP servers. When enabled, only the mail transport agent (MTA), Mailman mailing list software, and the root user can send mail directly to external servers. This prevents users and scripts from bypassing your server's mail server to send unsolicited bulk email (spam).
How to Disable SMTP Restrictions
Step 1: Log in to WHM as the root user.
Step 2: Navigate to Home » Security Center.
Step 3: Click on SMTP Restrictions (described as "allow only the MTA, mailman, and root to connect to remote SMTP servers").
Step 4: Click Disable.
The system will immediately update the SMTP access rules on your server.
Important Notes
- Disabling SMTP Restrictions is generally not recommended. It opens your server to potential abuse by spammers who may use scripts to bypass your mail server.
- Only disable this if you have a specific requirement, such as a third-party application that needs to connect directly to an external SMTP server.
- If you disable this, consider implementing alternative spam prevention measures such as SPF, DKIM, and DMARC.
- When enabled, legitimate mail is still sent normally through your server's Exim mail server — SMTP Restrictions only blocks direct outbound SMTP connections from user accounts.
How to Re-Enable SMTP Restrictions
If you previously disabled this feature and want to re-enable it, follow the same steps above but click Enable in Step 4 instead of Disable.
Troubleshooting
- Applications cannot send email after enabling SMTP Restrictions? Ensure your applications are sending mail through your server's local mail server (localhost) rather than connecting directly to external SMTP servers like Gmail or SendGrid.
- Need to configure SMTP connection limits? Use the Exim Configuration Manager under WHM » Service Configuration » Exim Configuration Manager to adjust the
smtp_accept_maxsetting.
For more information, see the official cPanel SMTP Restrictions documentation.