Articles in this section

How to activate or deactivate the mail service for a domain or the entire Plesk server?

Plesk for Windows kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux
  • Plesk for Windows

Question

  • How to enable or disable the mail service for a Plesk domain?
  • How to start or stop the mail service for for multiple domains or server-wide?

Answer

Warning: When the mail service is switched off for a domain:
- It will not be possible to send or receive emails for that domain
- Webmail (webmail.example.com) will stop working for that domain
- It will not be possible to log in to the mail account using email clients (Microsoft Outlook, Mozilla Thunderbird, etc.) for that domain

Note: To manage the mail service and the email accounts in Plesk, you must first have an installed and active local mail server, which can be achieved by following the steps in one of the following articles (depending on the used OS):
Install or adjust local Plesk mail server on Linux
Install or adjust local Plesk mail server on Windows Server
 

After a local mail server is installed, mail service management can be achieved via the steps below:

Click on a section to expand

Managing mail service via Plesk GUI

For a Domain:

Note: If previously the mail service has been disabled by a Plesk administrator, a Plesk customer will not be able to enable the mail service back.

1. Go to Domains > example.com > Mail Settings

2. Switch the setting Activate mail service on this domain to one of these options:

  • Disabled for incoming mail - this domain can only send mail, and only using Sendmail.
  • Not configured - Plesk will not provide any mail services on this domain. This will permanently remove the domain’s mailboxes with all received and sent emails.

3. Apply the changes

For a Subscription:

1. Go to Subscriptions > example.com > Mail tab > Mail Setting tab.

2. Select required domains using a checkbox and click Activate/Deactivate Services.
Screenshot_2019-01-25_example_com_-_Plesk_Onyx_17_8_11.png

3. In the pop-up window, select a required action in the drop-down menu and click OK.

 

For all Subscriptions under a Service Plan:

Note: New settings will not be applied to existing subscriptions, if:

- A subscriptions is locked from syncing with its service plan.
- The Ability to change mail settings permission is enabled in service plan permissions settings (Service Plans > Example Plan > Permissions tab > Click Show more available permissions to reveal).

1. Go to to Service Plans > Plan Name > Mail tab.

2. Switch the setting Activate mail service on this domain to one of these options:

  • Disabled for incoming mail - this domain can only send mail, and only using Sendmail.
  • Not configured - Plesk will not provide any mail services on this domain. This will permanently remove the domain’s mailboxes with all received and sent emails.

Note: The option Not configured will not be applied to existing domains. Disabled for incoming mail will be selected for existing domains instead.

3. Press Update & Sync

Server-wide:

Note: This option does not actually switch off the Plesk-managed mail server, but only removes some UI elements from the Customer Panel. These elements will be hidden from hosting service customers and their users. The following items are removed:

- The Mail section.
- Users section > user_name > Change Settings > Create an email address under your account option.
To disable the mail service for all domains, see the command-line instructions.

1. Go to Tools & Settings > Mail Server Settings.Screenshot_2019-01-25_Tools_Settings_-_Plesk_Onyx_17_8_11.png

2. Check or uncheck the option Enable mail management functions in Plesk and press OK.Screenshot_2019-01-25_Plesk_Onyx_17_8_11.png

Managing mail service via a command-line interface

For a Domain:

# plesk bin subscription -u example.com -mail_service <option>

where <option> can be one of the following:

  • true - set the mail service for a domain to Enabled
  • false - set the mail service for a domain to Not Configured
  • disabled - set the mail service for a domain to Disabled for incoming mail

For all Subscriptions under a Service Plan:

Note: Subscriptions will not be synced, if:

- A subscriptions is locked from syncing with its service plan.
- The Ability to change mail settings permission is enabled at Service Plans > Example Plan > Permissions tab (Click Show more available permissions to reveal).

# plesk bin service_plan -u "Default Domain" -mail <option>

where <option> can be one of the following:

  •  
    • true - set the mail service for a service plan to Enabled
    • false - set the mail service for a service plan to Not Configured
    • disabled - set the mail service for a service plan to Disabled for incoming mail

Server-wide:

  •  
    • For Linux

      Run the command below to disable the mail service for all domains:

      # for i in $(plesk bin site -l); do plesk bin site -u $i -mail_service <option>; done

      where <option> can be one of the following:

      • true - set the mail service for all domains to Enabled
      • false - set the mail service for all domains to Not Configured
      • disabled - set the mail service for all domains to Disabled for incoming mail
    • For Windows Server
      • Start Windows PowerShell as an Administrator.
      • Run the command below to disable the mail service for all domains:

        PS &plesk bin site -l | % { if ($_) { plesk bin site -u $_ -mail_service <option> } }

        where <option> can be one of the following:

        • true - set the mail service for all domains to Enabled
        • false - set the mail service for all domains to Not Configured
        • disabled - set the mail service for all domains to Disabled for incoming mail

 

 

Was this article helpful?

Comments

1 comment
Date Votes
  • does not tell how to use use for sending email

    0

Please sign in to leave a comment.