Friday, January 9, 2015

Postfix Error - 'Recipient address rejected: Access denied'

am trying to setup postfix server referring to http://www.krizna.com/centos/setup-mail-server-in-centos-6/

but during the telnet test getting error as

mail from:jamir
250 2.1.0 Ok
rcpt to jamir
501 5.5.4 Syntax: RCPT TO:<address>
rcpt to: jamir
554 5.7.1 <vikas>: Recipient address rejected: Access denied
rcpt to:jamir.kadu@gmail.com
554 5.7.1 <jamir.kadu@gmail.com>: Recipient address rejected: Access denied


I am able to send mail using command  /bin/mail -s "testing from `hostname`" jamir.kadu@gmail.com.

postconf  -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, hash:/var/spool/postfix/plesk/
aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = exchange.com
myhostname = imap.exchange.com
mynetworks = 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.8.4/README_FILES
sample_directory = /usr/share/doc/postfix-2.8.4/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = cyrus
smtpd_sender_restrictions = permit
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
 
_____________________________________________________________________________________

Have you tried the below comments mentioned in the same URL ?
For anyone getting Relay access denied you need to change the SMTP setting in Squirrel mail to login with IMAP user name and password (option B)

No comments:

Post a Comment