Plesk SendMail Reject “You are not allowed to use sendmail utility.”

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

Plesk Tools & Settings menu showing Mail options
  • 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.

Plesk Service Plans individual mail settings screen

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 command to get the contents of the maillog file like so:

sudo head -400 /var/log/maillog

“sudo” is “Super User 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.

FINAL FIX!

I fixA 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

Further notes

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
Ian is Technical Lead for Iress, a global financial software leader. He is passionate about front end web development, enjoys coding in JavaScript & TypeScript and has the goal to make the web more accessible for those that are impaired visually or otherwise.

Did you appreciate this content? Did you find a typo? Do you have any tips that worked for you? Please leave a comment.

Click to share

Leave a Reply