How To Improvement Sender Must Login/Enforcing a Match Between From Address and sasl username On Zimbra 8.5

If using Zimbra 8.5, you can following this instruction

su - zimbra
zmprov mcf zimbraMtaSmtpdSenderLoginMaps proxy:ldap:/opt/zimbra/conf/ldap-slm.cf +zimbraMtaSmtpdSenderRestrictions reject_authenticated_sender_login_mismatch

Above configuration will not accept the user to relay emails using a different email address from user to authenticate with smtp
open file /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf and add reject_sender_login_mismatch after permit_mynetworks
permit_mynetworks, reject_sender_login_mismatch
Above configuration will not accept if user not use authentication/password. After a minute, zmconfigd will update the postfix configuration automatically and apply the new rules. The following is example test use telnet after improve configuration sender must login/anti fake mail
ahmad:~ # telnet mail.myemailserver.net 25
Trying 103.xxx.xxx.xxx
Connected to mail.myemailserver.net.
Escape character is '^]'.
220 mail.myemailserver.net ESMTP Postfix
ehlo mail
250-mail.myemailserver.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:admin@myemailserver.net
250 2.1.0 Ok
rcpt to:admin@myemailserver.net
553 5.7.1 <admin@myemailserver.net> Sender address rejected: not logged in
The test above rejected with message not logged in.

Nhận xét

Bài đăng phổ biến