开源中文网

您的位置: 首页 > Postfix > 正文

postfix反垃圾邮件设置

来源: 网络整理  作者: 佚名

下面我利用postfix增加防止发件人身份伪造配置来实现反垃圾邮件防止方法,希望本文章对大家会有所帮助。
增加防止发件人身份伪造的配置:

# smtpd related config
smtpd_recipient_restrictions =
  permit_mynetworks,
  permit_sasl_authenticated,
#  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname

smtpd_sender_restrictions =
  permit_mynetworks,
  check_recipient_access hash:/etc/postfix/local_recipient,
  permit_sasl_authenticated,
  reject_sender_login_mismatch,
  reject_authenticated_sender_login_mismatch,
  reject_unauthenticated_sender_login_mismatch,
  reject_unknown_sender_domain
# SMTP AUTH config here
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

补充:
配置extmail不允许伪造不存在的本地邮件地址发邮件,不允许并仿冒他人邮件地址发送邮件
cd /etc/postfix/
cat >mysql_virtual_sender_maps.cf<<EOF
user = extmail
password = extmail
hosts = localhost
dbname = extmail
table = mailbox
select_field = username
where_field = username
additional_conditions = AND active = '1'
EOF
vim main.cf
smtpd_sender_login_maps =
        mysql:/etc/postfix/mysql_virtual_sender_maps.cf
smtpd_sender_restrictions =
        permit_mynetworks,
        reject_sender_login_mismatch,
        reject_authenticated_sender_login_mismatch,
        reject_unauthenticated_sender_login_mismatch
使配置生效
postfix reload

Tags:垃圾 邮件
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明