Symptoms
-
Unable to send emails with PHP scripts in Plesk with the following error in the log file
/var/log/plesk-php*-fpm/error.log
:# egrep -Ri sendmail /var/log/plesk-php*-fpm/error.log
WARNING: [pool example.com] child 29450 said into stderr: "sh: /usr/sbin/sendmail: No such file or directory" -
Plesk notifications, like an activation email, are not sent and the following error is shown in the log file
/var/log/plesk/panel.log
file:ERR [panel] Unable to send mail: Unknown error
ERR [panel] Failed to send activation link due to: Unable to send mail: Unknown error -
Tools and Settings > Mail Server Settings shows that the installed mail server is Qmail
Cause
Sendmail symlinks to the Plesk Qmail wrapper are missing or invalid
Resolution
-
Connect to the server via SSH
-
Unlink symlinks:
# unlink /etc/alternatives/mta
# unlink /usr/sbin/sendmail -
Create correct symlinks:
# ln -s /etc/alternatives/mta /usr/sbin/sendmail
# ln -s /usr/lib64/plesk-9.0/qmail-sendmail-wrapper /etc/alternatives/mta