Azazia Software Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

Postfix/Sendmail Errors: NOQUEUE: reject: RCPT .... Relay access denied DSN: Service unavailable

Add comment
Views: 534
Votes: 0
Comments: 0
Posted: 03 Aug, 2010
by: Patridge B.
Updated: 03 Aug, 2010
by: Patridge B.
If you are noticing the following in your error logs:

Aug  3 09:30:05 usindgso01d postfix/smtpd[20439]: [ID 197553 mail.info] connect from localhost[127.0.0.1]
Aug  3 09:30:05 usindgso01d postfix/smtpd[20439]: [ID 197553 mail.info] NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 554 5.7.1 <ben.patridge@hds.com>: Relay access denied; from=<apache@usindgso01d.corp.hds.com> to=<ben.patridge@hds.com> proto=ESMTP helo=<usindgso01d.corp.hds.com>
Aug  3 09:30:05 usindgso01d sendmail[20438]: [ID 801593 mail.info] o73GU57Z020438: to=ben.patridge@hds.com, ctladdr=apache (10791/70001), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30594, relay=[127.0.0.1] [127.0.0.1], dsn=5.7.1, stat=Service unavailable
Aug  3 09:30:06 usindgso01d sendmail[20438]: [ID 801593 mail.info] o73GU57Z020438: o73GU57a020438: DSN: Service unavailable


In essence the server you are sending email from is not authorized as a relay agent, therefore you are receiving the Relay access denied error. The DHS Service unavailable message is because the DNS server is perhaps is not allowed or recognized on the submnet that the one the postfix server is on.

As in my above example, the server usindgso01d.corp.hds.com has an IP Address of
10.74.12.154  per the /etc/hosts entry:

10.74.12.154    usindgso01d.corp.hds.com        usindgso01d     loghost usindgso01d.hds.com

The DNS Server is on the 10.74.12.x subnet, and the mail relay server "mail.hds.com"

bash-3.00# nslookup mail.hds.com
Server:         10.74.12.6
Address:        10.74.12.6#53

mail.hds.com    canonical name = mail.gtm.hds.com.
Name:   mail.gtm.hds.com
Address: 10.74.12.180

bash-3.00# nslookup
> servers
Server:         10.74.12.6
Address:        10.74.12.6#53

Therefore the mynetworks entry in the postfix main.cf should include the 10.74.12.X subnet AND the localhost address; reading:

mynetworks= 10.74.12.0/28 127.0.0.0/8

Lastly you want to add the following entry to the end of your postfix.main:

smtpd_recipient_restrictions = permit_mynetworks
        reject_non_fqdn_hostname ,
        reject_non_fqdn_sender ,
        reject_non_fqdn_recipient ,
        reject_unknown_sender_domain ,
        reject_unknown_recipient_domain ,
        reject_unauth_destination


Now do an /etc/init.d/postfix reload and then try a test email. doing a tail -f /var/log/maillog will hopefully show it was sent successfully.




Others in this Category
document VI editor Backup (VIB) Utility
document E:Lists directory /var/lib/apt/lists/partial is missing.
document Regular Expression to Escape all Illegal (non alphanumeric) Characters Except a space
document Quick One liners to test a string whether or not it is an Integer, Alphanumeric, or Character
document Using Awk to display a directory listing on files with spaces until the end of line
document UNIX Command Line way to convert HEX ascii codes to Text
document Restoring the cursors last position in the VI (VIM) editor
document Display path, user name, and host name next to the cursor in the .bashrc or .bash_profile
document Little script to make process searching easier
document Create an SFTP account that will restrict the user only to their destination home directory so they cannot change directory (cd) or view any other files outside of that directory.
document Recompile apache2 to support LDAP on Solaris 10
document SVN Solaris 10: ld: fatal: Symbol referencing errors. No output written to .libs/svn
document SVN Solaris 10: ld.so.1: svnversion: fatal: libssl.so.0.9.8: open failed: No such file or directory
document Solaris 10: commit failed: svn: Couldn't perform atomic initialization
document Creating a UNIX sparse file on an Isilon system



RSS