• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Sites do not send emails

Andriy_Martynyuk

New Pleskian
Started after last update 12.0.18 Update #44 (on CloudLinux):
I can send mail wia created mailboxes, but sites can not send mail, contact forms say "Failed to send your message."
maillog file also do not indicate sending any messages from domains.
Wordpress restore password claims:
"The e-mail could not be sent.
Possible reason: your host may have disabled the mail() function."
php.ini is default:
safe_mode = Off
disable_functions = is empty
Please point where to dig.
 
Last edited:
Run

# php -i | grep sendmail

and check that you have

Path to sendmail => /usr/sbin/sendmail -t -i

Check the following set of symbolic links and make sure that none of them lead to a non-existing location. For example on my test Plesk 12:

[root@ppu12-0 ~]# ll /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Apr 30 05:24 /usr/sbin/sendmail -> /etc/alternatives/mta
[root@ppu12-0 ~]# ll /etc/alternatives/mta
lrwxrwxrwx 1 root root 43 Apr 30 05:24 /etc/alternatives/mta -> /usr/lib/plesk-9.0/postfix-sendmail-wrapper
[root@ppu12-0 ~]# ll /usr/lib/plesk-9.0/postfix-sendmail-wrapper
-r-sr-xr-x 1 root root 52480 Apr 30 05:24 /usr/lib/plesk-9.0/postfix-sendmail-wrapper
 
We have cagefs installed, this is the output under user's shell:

bash-4.1# php -i | grep sendmail
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
Path to sendmail => /usr/sbin/sendmail -t -i
bash-4.1# ls -la /usr/sbin/sendmail
-r-xr-xr-x 1 root root 363 Apr 24 04:18 /usr/sbin/sendmail

under root account:
# ll /usr/sbin/sendmail
lrwxrwxrwx 1 root root 21 Feb 27 03:17 /usr/sbin/sendmail -> /etc/alternatives/mta
# ll /etc/alternatives/mta
lrwxrwxrwx 1 root root 45 Feb 27 03:17 /etc/alternatives/mta -> /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ll /usr/lib/plesk-9.0/postfix-sendmail-wrapper
ls: cannot access /usr/lib/plesk-9.0/postfix-sendmail-wrapper: No such file or directory

Same configuration on the second server runs perfectly.
 
lrwxrwxrwx 1 root root 45 Feb 27 03:17 /etc/alternatives/mta -> /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ll /usr/lib/plesk-9.0/postfix-sendmail-wrapper
ls: cannot access /usr/lib/plesk-9.0/postfix-sendmail-wrapper: No such file or directory

You have symlink to /usr/lib64/plesk-9.0/postfix-sendmail-wrapper but not to /usr/lib/plesk-9.0/postfix-sendmail-wrapper
Therefore check that /usr/lib64/plesk-9.0/postfix-sendmail-wrapper exists.
 
# ls -la /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
-r-sr-xr-x 1 root root 65040 Apr 24 04:18 /usr/lib64/plesk-9.0/postfix-sendmail-wrapper
# ls -la /usr/lib/plesk-9.0/postfix-sendmail-wrapper
ls: cannot access /usr/lib/plesk-9.0/postfix-sendmail-wrapper: No such file or directory

sending mail under root with sendmail -t -i works.
 
Please mark as resolved. The issue about not sending mail from domains was - old versions of LVE anf CageFS are incompatible with latest plesk update, updating them caused all sites in Cagefs to throw error 500 with log string:
"SecureLVE jail error Invalid regexps: no match for path to base home directory".
It was fixed by changing cagefs.base.home.dirs regexp to the real sites folder location. Enabling cagefs back removed one of the files it shouldn't:
"Removed file /var/cagefs/81/xxx/etc/php.d/soap.ini"
So be carefull to place necesssary files back.
For now everything works.
 
Back
Top