最近公司员工的邮箱总是收到twoomail.com的邀请邮件,邮箱服务器还没有添加过黑名单呢,就拿它开刀吧.
在主配置文件中添加如下配置
#vi /etc/postfix/main.cf #black list smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access
添加黑名单文件:
#touch /etc/postfix/sender_access #vi /etc/postfix/sender_access twoomail.com REJECT //special domain abc@qq.com REJECT //special user
然后就是把黑名单文件hash成postfix支持的文件
# postmap hash:/etc/postfix/sender_access
重新加载postfix
#/etc/init.d/postfix reload
工作完成!