How to disable Mail Service for all domains?

Created:

2016-11-16 12:51:57 UTC

Modified:

2017-08-16 17:32:55 UTC

3

Was this article helpful?


Have more questions?

Submit a request

How to disable Mail Service for all domains?

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

How to disable mail service for all domains on a server?

Answer

Mail service may be disabled right in Plesk UI. Go to Tools & Settings > Services Management , find there the mail server title and turn it off. But note that mail service will be started again after reboot.

To disable mail functions completely, it is necessary:

  1. On Linux:

    Uninstall mail server (QMail, Postfix) from your OS. The simple way is to use Plesk autoinstaller at Tools & Settings > Updates & Upgrades > Add or Remove components

  2. On Windows:

    In Windows Plesk Panel there is no opportunity to select mail server. Follow Tools & Settings > Mail Server Settings > Install, use 'another mail server' and select 'None' .

Alternatively:

1. Create a list of domains:

# mysql -uadmin -p`cat /etc/psa/.psa.shadow ` psa -N -e" select name from domains;" > domains.txt

2. Disable the mail service for the domains from the list:

# while read i; do  /usr/local/psa/bin/domain -u $i -mail_service false; done < domains.txt
Have more questions? Submit a request
Please sign in to leave a comment.