使用Postfix拒绝某个邮件地址

 # vim /etc/postfix/access  文件

在access文件最后增加:(格式一定要这样写)

 user@domain.tld       REJECT      (单个邮件地址过滤)

 ***.***.***.***      REJECT     (IP地址过滤)

   .domain.tld               REJECT       (整个域过滤)

保存退出!

再运行:(生成数据文件,一定要运行;否则不会生效)
# postmap hash:/etc/postfix/access


对应/etc/postfix/main.cf文件内:
smtpd_client_restrictions =
     check_sender_access hash:/etc/postfix/access

重启postfix (让规则生效)

 # postfix reload   或者  postfix stop 再postfix start