Disabling the Mail Service in cPanel

Question 1: How can I disable the mail service of a domain on a cPanel/WHM server?

To stop only the mail service without stopping the website, follow these steps:

  • Connect to the server as root via SSH.

  • /etc/localdomains Open this file and remove the domain whose mail service you want to disable.

  • /etc/remotedomains Open this file and add the same domain to it.

This stops mail processing for that domain on your server, while the website keeps running.

 

Question 2: What are the benefits of this?

  • For sites that have moved their mail service to another company, it prevents unnecessary mail traffic on your server.

  • It prevents email accounts with weak passwords from being abused by malware.

  • It keeps your server IP address off spam blacklists.

 

Question 3: Do I need to restart any service afterwards?

No, /etc/localdomains and /etc/remotedomains changes take effect immediately; you do not need to restart Exim or any other service.

 

Question 4: What else can I do to make the server more secure?

  • Enable the SMTP Restrictions feature in WHM.

  • Use a firewall (for example CSF) to open the outgoing SMTP ports only to trusted IPs.

  • Strengthen mail authentication by correctly configuring SPF, DKIM ve DMARC records in DNS.

 

  • 0 Users Found This Useful
  • cPanel Mail Servisini Devre Dışı Bırakma
Was this answer helpful?

Related Articles

🧭 Steps to Check DNS Settings in cPanel

  Log In to cPanel It is usually reached at yourdomain.com/cpanel or yourdomain.com:2083 ....

🛠️ Steps to Create a Subdomain in cPanel

  Log In to cPanel You usually log in at www.yoursite.com/cpanel or www.yoursite.com:2082 ....

🛠️ Changing the Outgoing Mail IP via WHM

  Log In to WHM It is usually reached at yourserverip:2087 . You must log in with the root...

🌐 Steps to Add a New Domain in cPanel

  Log In to cPanel It is usually reached at yourdomain.com/cpanel or yourdomain.com:2083 ....

📧 Creating an Email Account in cPanel

Log In to cPanel It is usually reached at yourdomain.com/cpanel or yourdomain.com:2083 ....