- Plesk for Linux
PHP mail or Plesk notifications are not being sent via an external mail server.
Where to check why messages are not being sent via external mail server?
The notifications are sent in two stages:
1. Plesk ---> External Mail Server.
2. External Mail Server ---> mail recipient.
In case Plesk fails to send a notification to the external server, an event like the following appears in the log:
CONFIG_TEXT: Sep 15 03:27:58 plesk msmtp: host=203.0.113.2 tls=off auth=on email@example.com firstname.lastname@example.org email@example.com errormsg='cannot connect to 203.0.113.2, port 25: Connection refused' exitcode=EX_TEMPFAIL
In order to monitor events of notifications sending out failures from Plesk to the external server, l ogin to the Plesk server over SSH and grep
/var/log/maillog by "EX_TEMPFAIL" keyword:
# grep EX_TEMPFAIL /var/log/maillog
In case the external server fails to send a notification to the notification recipient, an event like the following appears in the log:
CONFIG_TEXT: Sep 15 03:25:23 root postfix/smtp: A109D24E40: firstname.lastname@example.org, relay=none, delay=30, delays=0.14/0.02/30/0, dsn=4.4.1, status=deferred (connect to example.org[203.0.113.3]:25: Connection refused)
To monitor events of notifications sending out failures from the external server to the notifications' recipient, login to the external server over SSH and check its mail log. For example, if the external mail server runs on Linux, grep
/var/log/maillog by "email@example.com" and "status=deferred":
# grep firstname.lastname@example.org /var/log/maillog | grep status=deferred
Note: don't forget to replace the email address with actual notifications recipient address. The external mail server should be online for the events be logged to /var/log/maillog