1. smtp认证
1.1 修改mynetworks
登录zimbra后台-->全局配置-->MTA-->信任网络-->127.0.0.0/8
-->服务器配置-->MTA-->信任网络-->重置为全局配置
1.2 修改postfix配置
nano /opt/zimbra/conf/zmmta.cf
修改smtpd_client_restrictions permit_sasl_authenticated, permit_mynetworks, reject_unauth_pipelining, reject
2. smtp认证与mail from绑定
说明:配置目的:用户发送邮件必须通过smtp认证,认证通过后,用户发送邮件时的发件人必须和通过认证的用户相一致,才能发送邮件,防止伪造发件人发送邮件
2.1 修改postfix配置
nano /opt/zimbra/conf/zmmta.cf
修改smtpd_sender_restrictions = permit_mynetworks,reject_sender_login_mismatch,reject_authenticated_sender_login_mismatch,reject_unauthenticated_sender_login_mismatch
2.2 修改postfix配置2
su zimbra
postconf -e "smtpd_sender_login_maps=hash:/data/zimbra/sender"
2.3 创建/data/zimbra/sender的hash文件
2.3.1 创建目录/data/zimbra/并修改权限
# mkdir -p /data/zimbra/
# chmod 777 -R /data/zimbra/
2.3.2 创建文件sender
# nano /data/zimbra/sender
内容:
user1@example.com user1
user2@example.com user2
...
2.3.3 创建/data/zimbra/sender的hash文件sender.db
# /opt/zimbra/postfix/sbin/postmap /data/zimbra/sender