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...

What WebMail programs do you use?

We currently use all three of these: Horde Round Cube Here is the details for each one to...

Horde issue, error communicating with the server.

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

How to revert back to the original Roundcube interface.

You can follow below steps to revert back the Roundcube changes. In the left sidebar, click...