Hey all,

 I tried following this guide to install postifx on a centos machine. My
CentOS version is 7 but the guide is for 6. I doubt that makes a difference
however.

Everything went ok, up to a point. I can telnet into the server and send
mail to virual mailbox recipients. They arrive at their destination and I
can read the messages no problem.

However when I try to send mail off to another address, like a gmail
address, I get a relay access denied error!

[root@web1:/etc/postfix] #telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 web1.jokefire.com ESMTP Postfix
HELO web1.jokefire.com
250 web1.jokefire.com
MAIL FROM: <bluethu...@web1.jokefire.com>
250 2.1.0 Ok
RCPT TO: <bluethu...@gmail.com>
*554 5.7.1 <bluethu...@gmail.com <bluethu...@gmail.com>>: Relay access
denied*

And I'm seeing this in the mail logs:

Apr  5 12:23:08 web1 postfix/smtpd[32140]: NOQUEUE: reject: RCPT from
centos-7-x64[127.0.0.1]: 554 5.7.1 <bluethu...@gmail.com>: Relay access
denied; from=<bluethu...@web1.jokefire.com> to=<bluethu...@gmail.com>
proto=SMTP helo=<web1.jokefire.com>

I'm hoping if I show you my postfix config you can help me pinpoint the
source of the problem.

Here's my master config:

[root@web1:/etc/postfix] #grep -v '#' main.cf|sed '/^\s*$/d'
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = web1.jokefire.com
myorigin = localhost
append_dot_mydomain = no
inet_interfaces = localhost
inet_protocols = all
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_minimum_uid = 5000
virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_limit = 0
virtual_alias_maps = mysql:/etc/postfix/virtual_alias_maps.sql
virtual_mailbox_domains = mysql:/etc/postfix/virtual_domains_maps.sql
virtual_mailbox_maps = mysql:/etc/postfix/virtual_mailbox_maps.sql
smtpd_sender_login_maps = mysql:/etc/postfix/smtpd_sender_login_maps.sql
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/pki/tls/certs/mail.crt
smtpd_tls_cert_file = /etc/pki/tls/private/mail.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database =
btree:$data_directory/smtp_tls_session_cache
smtpd_recipient_restrictions =
   reject_non_fqdn_recipient,
   reject_sender_login_mismatch,
   permit_sasl_authenticated,
   reject_rbl_client zen.spamhaus.org,
   reject_rhsbl_helo dbl.spamhaus.org,
   reject_rhsbl_sender dbl.spamhaus.org,
   reject_unauth_destination
local_recipient_maps =
unknown_local_recipient_reject_code = 550
relay_domains = $mydomain
relayhost =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
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.postfix
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.10.1/examples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES

Here's my master config:

[root@web1:/etc/postfix] #grep -v '#' master.cf|sed '/^\s*$/d'
smtp      inet  n       -       n       -       -       smtpd
submission inet n       -       n       -       -       smtpd
smtps     inet  n       -       n       -       -       smtpd
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache

Does anyone have any thoughts on how I can correct this problem? The mail
server needs to send more than it does to receive.

Thanks!
Tim



-- 
GPG me!!

gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B

Reply via email to