Applicable to:
- Plesk for Linux
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:CONFIG_TEXT: 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
The Plesk Qmail wrapper exists:
# ls -lha /usr/lib64/plesk-9.0/qmail-sendmail-wrapper
-rwsr-xr-x 1 root root 108K Apr 14 10:33 /usr/lib64/plesk-9.0/qmail-sendmail-wrapper
Cause
Sendmail symlinks to the Plesk Qmail wrapper are missing or invalid
- Sendmail does not point to the /etc/alternatives/mta
# ls -l /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Jan 29 13:35 /usr/sbin/sendmail
- Sendmail symlink does not exist
# ls -lha /usr/sbin/sendmail
ls: cannot access /usr/sbin/sendmail: No such file or directory
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
Comments
1 comment
Hi Renan Poss Moreira,
May I ask, how may I recreate the link when using Postfix?
Would it be:
Any service restart required? The CLI?
Please sign in to leave a comment.