How to completely disable email on a cPanel server.

There is two main processes that 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 PHPFPM, 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
  • 37 Users Found This Useful
Was this answer helpful?

Related Articles

Do you have reverse DNS for my email?

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

How does SpamAssassin work?

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

How to set up Gmail for my domain?

Log into your cPanel Click edit MX record Update your existing MX records to point to...

How to add an E-mail in Cpanel

Here is a short video on how to add an E-mail in cPanel. The video assumes you are already logged...

How to set up an E-mail auto responder in cPanel

Here is a quick video on adding an E-mail auto responder in CPanel. The tutorial assumes you are...