Friday 14 March 2014

Define MTA is used in Parallels Plesk Panel and how to switch from QMail to Postfix and back

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


The MTA that is currently used by Parallels Plesk Panel 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 Parallels Plesk Panel 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 that you wait until all queued mail is delivered and stop the SMTP service to stop receiving emails.


Using the following command, you may stop the SMTP service:


 ~# /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

 


No comments:

Post a Comment