1.编辑/etc/postfix/main.cf,添加如下内容:
smtpd_restriction_classes = local_only
local_only = check_recipient_access hash:/etc/postfix/local_domains, reject
同时在已存在的 smtpd_recipient_restrictions = 的下一行添加(一定要在下一行):
check_sender_access hash:/etc/postfix/local_senders,
2.在/etc/postfix下新建local_senders,内容为:
test.com local_only
3.在/etc/postfix下新建local_domains,内容为:
163.com OK
4.为local_senders、local_domains两个文件建立hash:
postmap hash:/etc/postfix/local_senders
postmap hash:/etc/postfix/local_domains
OK,当test.com的用户向163.com外部发送邮件时,会马上得到如下提示:
服务器返回如下信息: SMTP rcpt error: 5.7.1 : Sender address rejected: Access denied
阅读(4189) | 评论(0) | 转发(0) |