On 9/9/2009 5:58 AM, ram wrote:
Hi,
I have a very basic ( and old) postfix installation and I want to accept
mails only after smtpauth
The rule works fine except when the recipient belongs to $myhostname
==== postconf -n ======
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = /usr/share/doc/postfix-2.3.4-documentation/html
mail_owner = postfix
mailbox_transport = lmtp:unix:/var/imap/socket/lmtp
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = mumbai.nstest.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.4-documentation/readme
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_sasl_authenticated,reject
This is the proper smtpd_recipient_restrictions setting for
the requested behavior. No SMTP mail will be accepted without
successful AUTH.
smtpd_sasl_auth_enable = yes
unknown_local_recipient_reject_code = 550
=========================
* On successful smtp-auth all mails are accepted ( working As
required )
* On failed smtpauth mails to u...@$myhostname still gets accepted
===========
220 mumbai.nstest.com ESMTP Postfix
EHLO netcore.co.in
250-mumbai.nstest.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH LOGIN
334 VXNlcm5hbWU6
djF2MQ==
334 UGFzc3dvcmQ6
cXdlcmFzMWRm
535 5.7.0 Error: authentication failed: authentication failure
MAIL FROM:<r...@netcore.co.in>
250 2.1.0 Ok
RCPT TO:<postmas...@mumbai.nstest.com>
250 2.1.5 Ok
DATA
354 End data with<CR><LF>.<CR><LF>
.
250 2.0.0 Ok: queued as 32E07147D31
QUIT
221 2.0.0 Bye
==================
How do I prevent this ???
... but it didn't work as expected. Either the main.cf you
are editing isn't the one that's really active (multiple
postfix instances), or you have overrides in your master.cf.
-- Noel Jones