1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - 运维 - 正文

君子好学,自强不息!

Postfix限制邮箱收发规则

2022-11-05 | 运维 | 1818ip | 694°c
A+ A-

一、配置postfix

  vim /opt/postfix/conf/main.cf

  smtpd_restriction_classes=smtp_acl

  smtp_acl=check_sender_access hash:/etc/postfix/sender_list,reject

  smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_list, reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit

二、配置sender_list

  vim /etc/postfix/sender_list

  eric@domain.com OK

三、配置recipient_list

  vim /etc/postfix/recipient_list

  all@domain.com smtp_acl

四、转换sender_list与recipient_list

  postmap hash:/etc/postfix/sender_list

  postmap hash:/etc/postfix/recipient_list

五、重新读取postfix配置

  postfix reload

本文来源:1818IP

本文地址:https://www.1818ip.com/post/7253.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。