首页 > 其他 > 详细

postfix 指定用户限制指定域名收发

时间:2019-01-04 21:09:14      阅读:205      评论:0      收藏:0      [点我收藏+]

main.cf 配置示例:

smtpd_restriction_classes = local_in_only, local_out_only
local_in_only = check_recipient_access hash:/etc/postfix/local_domains, reject
local_out_only = check_sender_access hash:/etc/postfix/local_domains, reject

smtpd_recipient_restrictions =
        check_sender_access hash:/etc/postfix/local_senders,
        check_recipient_access hash:/etc/postfix/local_recipients,
        permit_accept_domain
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_non_fqdn_hostname,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unauth_destination,
        reject_unauth_pipelining,
        reject_invalid_hostname
      reject_rhsbl_sender,
      reject_unknown_sender_domain,

 编辑创建限制文件:

~etc/postfix/local_domains
# 限制可以接收的指定域
~etc/postfix/local_senders
# 限制指定用户发送到 指定的域
~/etc/postfix/local_recipients
# 限制 指定用户接收 指定域的邮件

 

postmap 加载生产 db 数据:

# postmap hash:/etc/postfix/local_domains
# postmap hash:/etc/postfix/local_recipients
# postmap hash:/etc/postfix/local_senders

 

重启 postfix

如此便能可以只接收 local_domains 指定的域下的邮件了

 

postfix 指定用户限制指定域名收发

原文:https://www.cnblogs.com/sharesdk/p/10222263.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!