How to completely disable email on a cPanel server.

Two main processes run email on a cPanel server.

  1. EXIM - Used for email clients, pop3, and imap.
  2. PHP - Used for website forms mostly.

To disable exim server-wide, you just need to go to the services section in your WHM, and un-click: exim, imap, mailman, pop3, and spam assassin.

To disable PHP mail server-wide when using PHP-FPM, you have to go into the root of the server and do this: 

Add /var/cpanel/ApachePHPFPM directory if it does not already exist.
Create the /system_pool_defaults.yaml file.

In the new /system_pool_defaults.yaml add this code: 

php_admin_value_disable_functions: exec,mail,passthru,shell_exec,system

  • cpanel server, disable email, remove all email, stop all email
  • 370 Users Found This Useful
Was this answer helpful?

Related Articles

Can I use third party email services with Web Host Pro?

Email can be a real pain when free services like Hotmail and Outlook decide to block you or...

Do you have reverse DNS for my email?

Yes! All web hosting and reseller accounts have reverse DNS already added to each account. VPS...

Horde issue, error communicating with the server.

The Horde webmail client can have issues communicating with the server. The error is something...

How does SpamAssassin work?

SpamAssassin is the leading open-source spam protection software used with Linux. It's included...

How do I add E-mail filters in CPanel?

Here's a quick video on how to add E-mail filters in cPanel. The tutorial assumes you are already...