Have you received this error? plesk sendmail[#####]: handlers_stderr: DATA REPLY:554:5.7.0 The message could not be sent. You are not allowed to use sendmail utility.#012REJECT
If you have installed/uninstalled the mail services in a hope that you can get the SendMail utility working for WordPress/PHP or you don’t see any mail in the queue and you can’t see anything wrong… check this!
Check 1: You’ve enabled the “Allow users and scripts to use Sendmail” in the Plesk console
- From the console, navigate to “Tools and Settings” > “Mail Server Settings”
- Enable the “Switch on limitations on outgoing email messages” and “Allow users and scripts to use Sendmail” features.
Idea: While on this screen, I also set the outgoing mail mode to “Send from the specified IP addresses” and selected the server IP. I assumed this will help with impersonating the domains I’m sending email from if the webdomain IP matches the email sending server IP.
Check 2: Plesk service plan allows Sendmail
Plesk service plans can also have the Sendmail option disabled, navigate to “Service Plans” > Choose a plan from the list > “Mail” tab and confirm that “Default service-wide settings (Sendmail is allowed)” is selected, or specify for this specific plan.
Review you log files
This is the most complicated bit and hard for someone new to linux/centos. You need to SSH into your box. If you haven’t done that before, or have forgotten how, here is a guide from Plesk.
One logged in, use the head or tail commands to get the contents of the maillog file like so:
sudo head -400 /var/log/maillog
“sudo” is “Superuser do”, you need higher privileges to access the mail logs. “head” gets the first lines of a file, in this case, the parameter “-400” indicates the first 400. “/var/log/maillog” specifies the location of the file we want to read.
The tail command watches the file and updates the console as it is updated, so to exit you will need to press <ctrl> + “C” keys together:
sudo tail -f /var/log/maillog
I fix tip from talk.plesk.com. Login to your SSH console and execute:
sudo /usr/local/psa/admin/sbin/mailmng-outgoing --add-to-whitelist --sysuser=USERNAME
Don’t use the “Check Email” WordPress plugin. It sends an empty body and does not include the email address you specify due to a bug. It will cost you a lot of time, try another plugin!
Posted by: Ian Brown
Did you appreciate this content? Did you find a typo? Do you have any tips that worked for you? Please leave a comment.