关于配置postfix反垃圾策略
最近公司的垃圾邮件比较多(exchage2010)而且受到攻击,领导决定使用postfix作为转发机制。通过NAT作映射。我在服务器端使用了postfix+sasl+policyd+mailscanner+spamassassin ,postfix进行反垃圾策略,sasl进行用户认证,policyd进行用户配合管理,mailscanner和spam也进行反垃圾策略。各项配置文件配置很顺利, 服务也都成功开启,但是有几个问题,增加策略后,邮件无法对外发送和收信,不知道哪块环节出了问题,也希望大家能帮忙给看一下,下面附上各个配置文件。请大家帮忙。
postfix:
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = postfix
mydomain = 456.com
myorigin = /etc/mailname
inet_interfaces = all
mydestination = mail.123.cn, mail.456.com, mail.789.com.cn
unknown_local_recipient_reject_code = 550
mynetworks = *.*.*.*/24 \\避免不必要的麻烦。。这里稍加修改了。
relay_domains = 123.cn, 456.com, 789.com.cn \\ 避免不必要的麻烦。。这里稍加修改了。
relay_recipient_maps = hash:/etc/postfix/relay_recipients
mail_spool_directory = /var/spool/mail
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
html_directory = /usr/share/doc/postfix/html
transport_maps = hash:/etc/postfix/transport
queue_run_delay = 60
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions =
check_policy_service inet:127.0.0.1:10031
permit_mynetworks
permit_sasl_authenticated
reject_unauth_destination
reject_non_fqdn_hostname
reject_non_fqdn_sender
reject_non_fqdn_recipient
reject_invalid_hostname
reject_unknown_sender_domain
# reject_rbl_client rabl.nuclearelephant.com \\ 加上后不能向外网发送邮件和收外网信件
# reject_rbl_client cbl.abuseat.org \\加上后不能向外网发送邮件和收外网信件
# reject_rbl_client bl.spamcop.net \\加上后不能向外网发送邮件和收外网信件
reject_unknown_recipient_domain
permit
smtpd_client_restrictions =
permit_sasl_authenticated
smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
transport:
123.cn relay:
456.com relay:
789.com.cn relay:
relay_recipients
@123.cn any_value
@456.com any_value
@789.com.cn any_value
smtpd.conf
pwcheck_method: saslauthd
header_checks
/^Received:/ HOLD
MailScanner.conf
Run As User = postfix
Run As Group = postfix
Incoming Queue Dir = /var/spool/postfix/hold
Outgoing Queue Dir = /var/spool/postfix/incoming
MTA = postfix
Required SpamAssassin Score = 6
High SpamAssassin Score = 10
Spam Actions = deliver header "X-Spam-Status: Yes"
High Scoring Spam Actions = delete forward ***@***.***
更改了default下的spamassassin 的ENABLED=1 和mailscanner的run_mailscanner=1两个服务正常启动下载了Chinese_rules.cf放到了/usr/share/spamassassin下
注: MailScanner.conf更改了以上几条,其他没有进行改动
测试:
1. 启动postfix,policyd,sasl,测试结果:
reject_rbl_client rabl.nuclearelephant.com
reject_rbl_client cbl.abuseat.org
reject_rbl_client bl.spamcop.net
添加以上三条 无法发送到外网邮箱,也无法接收外网信。。注释以上三条,可以发送, 三个网站中,公司使用的邮箱没有进入黑名单
2.启动postfix,policyd,sasl,mailscanner,spamassassin ,无法发送到外网邮箱,也无法接收外网信,查看mail.log日志无法显示出外网发件人邮箱和外网收件人邮箱。
请问我还需更改哪里的配置 还是本身配置有问题,请求帮助 多谢
页:
[1]