限制用户发送邮件到某些域 1. 在文件“/opt/zimbra/conf/postfix_recipient_restrictions.cf”中输入,请确保它输入在文件的顶部。 ZCS 8.x版本则在文件: /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf 输入
vi /opt/zimbra/conf/postfix_recipient_restrictions.cf
check_sender_access hash:/opt/zimbra/postfix/conf/restricted_senders
2.在\"/opt/zimbra/conf/zmmta.cf\"输入以下内容
ZCS 8.x版本则在文件: /opt/zimbra/conf/zmconfigd.cf
vi /opt/zimbra/conf/zmmta.cf
找到标有”SECTION mta”,然后在下面输入以下两行
POSTCONF smtpd_restriction_classeslocal_only
POSTCONF local_onlyFILE postfix_check_recipient_access.cf
3. 创建文件\"/opt/zimbra/conf/postfix_check_recipient_access.cf\"
vi /opt/zimbra/conf/postfix_check_recipient_access.cf
check_recipient_access hash:/opt/zimbra/postfix/conf/local_domains, reject
4. 创建文件\"/opt/zimbra/postfix/conf/restricted_senders\"并列出所有要限制的用户。按照下面语法:
vi /opt/zimbra/postfix/conf/restricted_senders user@yourdomain.com local_only
5. 创建文件\"/opt/zimbra/postfix/conf/local_domains\"并并列出所有其中受限制的用户“restricted users”允许发送邮件的域。. 按照下面语法:
vi /opt/zimbra/postfix/conf/local_domains yourdomain.com OK otheralloweddomain.com OK
6. 运行下面的命令:
postmap /opt/zimbra/postfix/conf/restricted_senders postmap /opt/zimbra/postfix/conf/local_domains zmmtactl stop zmmtactl start
经过这些设置,所有在\"/opt/zimbra/postfix/conf/restricted_senders\"中列出的用户被限制只能发送邮件到\"/opt/zimbra/postfix/conf/local_domains\"中定义的域。其他用户完全没有限制地发送邮件。These settings will not survive Zimbra upgrades, please make sure that you backup of all these settings while performing upgrades.
重要的注意事项:如果您需要撤消该配置 删除被添加到zmmta.cf文件的两行。确保Postfix的设置smtpd_restriction_classes无关集。
postconf -e smtpd_restriction_classes=' ' zmmtactl reload
因篇幅问题不能全部显示,请点此查看更多更全内容