On 4/11/2011 11:30 AM, Tolga wrote:
Hi,
I've been trying to follow
http://www.postfix.org/SASL_README.html and trying to get it
working, but I keep getting relay access denied. As far as I
know, SASL AUTH works (I've tested). Can you help me? Below is
my postconf -n output and relevant log.
postconf -n:
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man/man1/
myhostname = mail.bilgisayarciniz.org
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = vmail
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
You'll need something like
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination
unless you've put modifications in master.cf you didn't show us.
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql-aliases.cf
virtual_gid_maps = static:1001
virtual_mailbox_base = /srv/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-users.cf
virtual_minimum_uid = 1
virtual_uid_maps = static:1001
If your server passed the testing as outlined in
http://www.postfix.org/SASL_README.html#server_test, then AUTH
is likely working correctly. Make sure you test from the same
IP as the mail client (or some other external IP) to make sure
there isn't some firewall issue.
mail.log:
[snip]
Apr 11 16:25:39 216235 postfix/smtpd[24241]: connect from
unknown[193.255.135.1]
Apr 11 16:25:40 216235 postfix/smtpd[24241]: NOQUEUE: reject:
RCPT from unknown[193.255.135.1]: 554 5.7.1
<[email protected]>: Relay access denied;
from=<[email protected]> to=<[email protected]>
proto=ESMTP helo=<mtozses.sabanciuniv.edu>
Apr 11 16:25:42 216235 postfix/smtpd[24241]: disconnect from
unknown[193.255.135.1]
There is no indication here that the client tried to login.
Postfix logs show "sasl_username=..." on successful login, or
"authentication failed" on failure. If neither is shown, then
the client didn't attempt AUTH.
-- Noel Jones