Hello,

I have read a lot of posts on the Internet but could not solve the Relay
Access denied problem.
Below are few details:
==
OS
*[root@server1 ~]# cat /etc/issue*
CentOS release 6.2 (Final)
Kernel \r on an \m
==
Postfix
[root@server1 ~]# postconf -a
cyrus
dovecot
[root@server1 ~]# postconf -m
btree
cidr
environ
hash
ldap
mysql
nis
pcre
proxy
regexp
static
unix


===
Telnet to Smtp,pop3 and imap
*[root@server1 ~]# telnet localhost smtp*
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix
^]
telnet> q
Connection closed.
*[root@server1 ~]# telnet localhost pop3*
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.
^]
telnet> q
Connection closed.
*[root@server1 ~]# telnet localhost imap*
Trying ::1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE
STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
^]
telnet> q
Connection closed.
=====

My *main.cf *file is as below:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = server1.example.com
mydomain = example.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $mydomain, $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks = 198.98.80.80/28, 127.0.0.0/8 # Assume my IP is 198.98.80.85
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/


debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail ;
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.6.6/samples
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
virtual_mailbox_domains = proxy:mysql:/etc/postfix/
mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:/etc/postfix/
mysql_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
mysql_virtual_mailbox_limit_maps.cf
virtual_minimum_uid = 501
virtual_uid_maps = static:501
virtual_gid_maps = static:12
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_helo_required             = yes
disable_vrfy_command            = yes
non_fqdn_reject_code            = 450
invalid_hostname_reject_code    = 450
maps_rbl_reject_code            = 450
smtpd_recipient_restrictions =
        permit_sasl_authenticated
        permit_mynetworks
        reject_unauth_destination
        reject_invalid_helo_hostname
        warn_if_reject reject_non_fqdn_helo_hostname
        warn_if_reject reject_unknown_helo_hostname
        warn_if_reject reject_unknown_client
        reject_non_fqdn_sender
        reject_non_fqdn_recipient
        reject_unknown_sender_domain
        reject_unknown_recipient_domain
        reject_rbl_client zen.spamhaus.org
        reject_rbl_client bl.spamcop.net
        reject_rbl_client dnsbl.sorbs.net=127.0.0.2
        reject_rbl_client dnsbl.sorbs.net=127.0.0.3
        reject_rbl_client dnsbl.sorbs.net=127.0.0.4
        reject_rbl_client dnsbl.sorbs.net=127.0.0.5
        reject_rbl_client dnsbl.sorbs.net=127.0.0.7
        reject_rbl_client dnsbl.sorbs.net=127.0.0.9
        reject_rbl_client dnsbl.sorbs.net=127.0.0.11
        reject_rbl_client dnsbl.sorbs.net=127.0.0.12
        warn_if_reject reject_rhsbl_sender dsn.rfc-ignorant.org
        warn_if_reject reject_rhsbl_sender abuse.rfc-ignorant.org
        warn_if_reject reject_rhsbl_sender whois.rfc-ignorant.org
        warn_if_reject reject_rhsbl_sender bogusmx.rfc-ignorant.org
        warn_if_reject reject_rhsbl_sender postmaster.rfc-ignorant.org
        permit
smtpd_data_restrictions =
        reject_unauth_pipelining,
        reject_multi_recipient_bounce,
        permit
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:12345
non_smtpd_milters = inet:localhost:12345
=================

I can send email to my domain but cannot send emails to other domain:
*[root@server1 ~]# telnet localhost smtp*
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 server1.example.com ESMTP Postfix
ehlo localhost
250-server1.example.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:x...@gmail.com
250 2.1.0 Ok
*rcpt to:x...@gmail.com*
*554 5.7.1 <x...@gmail.com>: Relay access denied*


The Error in mailog is :
May 27 06:23:58 server1 postfix/smtpd[27718]: connect from localhost[::1]
May 27 06:24:14 server1 postfix/smtpd[27718]: NOQUEUE: reject: RCPT from
localhost[::1]: 554 5.7.1 <x...@gmail.com>: Relay access denied; from=<
x...@gmail.com> to=<x...@gmail.com> proto=ESMTP helo=<localhost>
May 27 06:24:16 server1 postfix/smtpd[27718]: disconnect from localhost[::1]


==
Note:
Assume my domain is example.com and server hostname is
server1.example.comwith IP 198.98.80.85

Please help me get past this relay access error.
Let me know if I need to share any additional stats.

Regards
Sonny

Reply via email to