postfix设置黑名单

postfix设置黑名单

 

更改 /etc/postfix/main.cf:
 

Code:
smtpd_sender_restrictions = hash:/etc/postfix/access

然后保存退出,创建/etc/postfix/access

Code:
xxx.com     REJECT
yyy.com     REJECT
zzz.com     REJECT

上面xxx.com. yyy.com zzz.com替换成你真正要禁止域名,然后设置权限: 644,接着执行下面的命令
 

Code:
postmap hash:/etc/mail/access

最后让postfix加载刚才的配置:

sudo service postfix reload

 

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

Leave a Reply

Your email address will not be published. Required fields are marked *