Unable to send an email: 554 5.7.1 Relay Access Denied


2016-11-16 12:55:11 UTC


2017-04-24 11:05:11 UTC


Was this article helpful?

Have more questions?

Submit a request

Unable to send an email: 554 5.7.1 Relay Access Denied

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux
  • Plesk 12.5 for Windows


Unable to send an email to existing mailboxes within a specific domain on the server:

Relay access denied

The user who sent the email receives the following notification:

Sorry, we were unable to deliver your message to the following address.

/usr/local/psa/var/log/maillog contains:

postfix/smtpd[1235]: NOQUEUE: reject: RCPT from mail-wi0-f177.google.com: 554 5.7.1 <info@domain.com>: Relay access denied; from=<test@gmail.com> to=<info@domain.tld> proto=ESMTP helo=<mail-wi0-f177.google.com>

The Postfix database does not contain entries about this domain:

postmap -s /var/spool/postfix/plesk/virtual | grep domain.tld


Some mail accounts do not have passwords set, or Postfix is misconfigured


Solution 1

Run the mchk utility to check for possible problems:

/usr/local/psa/admin/sbin/mchk  --with-spam

Checking for: mailsrv_conf_init... ok
Checking for: mail_handlers_init... ok
Checking for: mailsrv_entities_dump... ok
Checking for: mail_admin_aliases... ok
Checking for: mail_auth_dump... fail
Checking for: mailman_lists_dump... ok
Checking for: mail_kav8_restore... ok
Checking for: mail_responder_restore... ok
Checking for: vhostidmng... ok
Checking for: mail_postfix_transport_restore... ok
Checking for: mail_spam_restore... ok
Checking for: mail_grey_restore... ok
Checking for: mail_mailbox_restore... ok
Checking for: mail_spf_restore... ok
Checking for: mail_dk_restore... ok
Checking for: mail_drweb_restore... ok
Errors occured in mail restore procedure
Some utilities have exited with errors:

Make sure that no mail accounts have empty passwords:

# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin psa
mysql> select displayName,password from accounts join mail on mail.account_id = accounts.id JOIN domains ON mail.dom_id = domains.id where type="sym" and password not like "$AES%";

| displayName | password |
| domain1.tld | |
| domain2.tld | |
| domain3.tld | |

In the Plesk interface, reset the password for all the accounts you have found with empty passwords. This will fix the problem with mail_auth_dump. Then, run the mchk utility again.

Solution 2

Make sure that all records are present for domains according to article [(KB #124410] Domain or mail account creation error: mailmng-outgoing failed

Disable and enable mail service for affected domains.

Solution 3

If the above solution does not help, reinstall Postfix:

Download Postfix from the Plesk repository (select your own operating system and architecture): wget http://autoinstall.plesk.com/PSA_11.5.30/dist-rpm-CentOS-6-x86_64/opt/maildrivers/ rpm -Uvh postfix-2.8.14-13040119.x86_64.rpm

and reinstall all microupdates .

Solution 4

Add missed entries directly in the Postfix database:

The following files need to be edited: virtual_domains.db, virtual.db and vmailbox.db (found in /var/spool/postfix/plesk/)

To edit these files without altering your current setup, retrieve the original information stored in them by issuing:

/usr/sbin/postmap -s filename > filename

(write the filename without the .db extension and add the full path before postmap)

/usr/sbin/postmap -s virtual_domains > /root/virtual_domains
/usr/sbin/postmap -s virtual > /root/virtual
/usr/sbin/postmap -s vmailbox > /root/vmailbox

Read and edit the information in the files created in step 2 (virtual_domains, virtual and vmailbox without any extensions).

Reconvert the text files into *.db files by issuing:

/usr/sbin/postmap hash:filename (still no extension)
/usr/sbin/postmap hash:/root/virtual_domains
/usr/sbin/postmap hash:/root/virtual
/usr/sbin/postmap hash:/root/vmailbox

Reload the Postfix configuration:

/usr/sbin/postfix reload

Have more questions? Submit a request
Please sign in to leave a comment.