How to define which MTA is used in Plesk and how to switch from QMail to Postfix and back

Created:

2016-11-16 12:48:48 UTC

Modified:

2017-08-08 13:09:02 UTC

3

Was this article helpful?


Have more questions?

Submit a request

How to define which MTA is used in Plesk and how to switch from QMail to Postfix and back

Applicable to:

  • Plesk for Linux
  • Plesk 12.0 for Windows

Symptoms

Two Message Transfer Agents (MTA) are supported by Plesk versions 9 and above, and they are QMail and Postfix. Only one of them is used by Plesk at a time.

The MTA currently used by Plesk is shown on the "Services Management" page at Home -> Services Management :

  • SMTP Server (Postfix)
  • SMTP Server (QMail)

It is also possible to check the MTA using the Plesk utility mailmng :

    # $PRODUCT_ROOT_D/admin/sbin/mailmng --features | grep SMTP_Server
$features['SMTP_Server'] = "Postfix";
$features['SMTP_Server_package'] = "postfix";
#

or

# $PRODUCT_ROOT_D/admin/sbin/mailmng --features | grep SMTP_Server
$features['SMTP_Server'] = "QMail";
$features['SMTP_Server_package'] = "psa-qmail";
#

Resolution

You can switch the MTA from QMail to Postfix and back using the autoinstaller script.

Run the script without parameters:

    # /usr/local/psa/admin/sbin/autoinstaller

Select the Plesk version marked with (currently installed) on the fourth page. Disable all other applications, such as SSO and Sitebuilder.

On the main components list for Plesk page, select the QMail or Postfix mailserver and click "Enter" to complete the installation.

Alternatively, you may run the following command to switch the MTA to Postfix:

    # /usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component postfix

Use the following command to switch to QMail:

    # /usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component qmail

Additional Information

The location of the directory where email messages are stored ($PLESK_MAILNAMES_D) and the mail format are not changed when the MTA is switched.

NOTE: Old mail messages remain unchanged and are available.

However, the mail queue is reconfigured while switching the MTA, and any messages in the queue are lost.

Before switching, it is recommended you wait until all queued mail is delivered and stop the SMTP service to stop receiving emails.

You can stop the SMTP service using the following command:

    # /usr/local/psa/admin/sbin/mailmng --stop-smtpd

To flush the queue, use the following commands:

QMail MTA:

    # kill -ALRM `pidof qmail-send`

Postfix MTA:

    # postqueue -f
Have more questions? Submit a request
Please sign in to leave a comment.