Postfix+Cyrus-SASL+MySQL只投递经过验证的邮件要如何设置?

12/3/2006来源:Qmail人气:6682

就算它是要投到本地域的邮件或来自本地局域网的邮件都要通过验证,否则就不让过。main.cf 这一段要如何修改呢?

mynetworks_style = host


mynetworks = 168.100.189.0/28, 127.0.0.0/8 //定义你的服务器ip

#====================SASL=====================
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_clients = noanonymous
broken_sasl_auth_clients = yes
smtpd_delay_reject = yes
smtpd_recipient_restrictions = permit_sasl_authenticated
reject_rbl_client opm.blitzed.org
reject_rbl_client list.dsbl.org
reject_rbl_client bl.spamcop.net
reject_rbl_client sbl-xbl.spamhaus.org
reject_rbl_client cbl.anti-spam.org.cn
reject_rbl_client cdl.anti-spam.org.cn
reject_rbl_client cblplus.anti-spam.org.cn
reject_invalid_hostname
reject_unknown_sender_domain
reject_non_fqdn_sender
reject_non_fqdn_recipient
reject_unknown_recipient_domain
reject_unauth_pipelining
reject_unauth_destination
permit_mynetworks
check_recipient_maps
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_helo_restrictions = reject_invalid_hostname
smtpd_sender_restrictions = permit_sasl_authenticated
reject_non_fqdn_sender
reject_unknown_sender_domain
reject_sender_login_mismatch
smtpd_sasl_authenticated_header = yes
smtpd_helo_required = yes