NOQUEUE: reject: Relay access denied
Everything about the server is working properly except that I am unable to send email to external addresses from my mail client (Mac Mail). When I try to send a message to an external address, I get the following error from postfix:
> NOQUEUE: reject: RCPT from comcast.net[174.51.xxx.xx]: 554 5.7.1 <
(Note I redacted the from ip address)
I have it configured to use dovecot as the authentication mechanism. In the dovecot logs I get:
> Oct 23 16:44:31 auth: Debug: client in: AUTH 2 PLAIN service=smtp nologin lip=50.116.xx.xx rip=174.51.xxx.xx secured resp=
Oct 23 16:44:31 auth: Debug: client out: OK 2 user=
user@mydomain.com
So it seems like dovecot is approving the username and password but postfix is still treating it like it has been rejected. Does anyone have an idea of what is going on or a way I can debug this further?
Thanks!
6 Replies
I was able to fix my problem by changing the postfix main.cf configuration to read:
smtpd_relay_restrictions =
permit_mynetworks
permit_sasl_authenticated
defer_unauth_destination
instead of using smtpd_recipient_resrictions
It turns out that after postfix 2.10.0, smtpd_relay_restrictions
should be used instead of smtpd_recipient_restrictions
. (smtpd_recipient_restrictions
should now only be used for spam restrictions).
For more info:
I would recommend verifying that your new configuration does not allow others to relay mail through your machine. The tester I used to use
My postfix version in 2.9.6, like in the tutorial I followed :
1. if I change "smtpddestinationrestrictions" to "smtpdrelayrestrictions" I get errors when I restart Postfix:
service postfix restart
- Stopping Postfix Mail Transport Agent postfix /usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
[ OK ]
- Starting Postfix Mail Transport Agent postfix postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: smtpdrelayrestrictions=permitsaslauthenticated,permitmynetworks,rejectunauth_destination
[ OK ]
2. The problem is: I can receive mail in my mail client from gmail, yahoo or hotmail, I can send mail from command line ( and my gmail email test address receives mail from
The /var/log/mail.log output is:
Apr 2 17:43:56 mail postfix/smtpd[5013]: warning: hostname xx-xxx-xx-xxx.ispdomain.tld does not resolve to address xx.xxx.xx.xxx: Name or service not known
Apr 2 17:43:56 mail postfix/smtpd[5013]: connect from unknown[xx.xxx.xx.xxx]
Apr 2 17:43:56 mail postfix/smtpd[5013]: NOQUEUE: reject: RCPT from unknown[xx.xxx.xx.xxx]: 554 5.7.1 <
Any ideea on why it does not send email to externet mail servers via mail client???
2. Probably because of #1, the permitsaslauthenticated option isn't being applied. You need that to relay authenticated mail through Postfix.
Go back to using smtpdrecipientrestrictions and see if it works.
smtpdrecipientrestrictions = permitsaslauthenticated, permitmynetworks, rejectunauth_destination
needless to say it does not work, furthermore i found out the my mail.domain.com has been listed in a blacklist ( LISTED ivmSIP24 188.119.150.233 was listed Detail 2100 94 Ignore ) i don't know why, i haven't even succeded in setting it to work.