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
以上方法供客户参详,如需要更多技术支持和帮助,欢迎和我司客户服务部沟通,电话:021-51028603转208,209,278,288等分机或400-602-8603也可发邮件至service@corp-email.com