How To Restrict SASL Login/Access

# Open smtpd_sender_restrictions.cf

su - zimbra
vi /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf

Add check_sasl_access lmdb:/opt/zimbra/conf/sasl_access above permit_sasl_authenticated. Please see example below

permit_mynetworks
check_sasl_access lmdb:/opt/zimbra/conf/sasl_access
permit_sasl_authenticated

# Save and create sasl_access

vi /opt/zimbra/conf/sasl_access

please fill it as follows

user1 REJECT Sorry, you cannot use SMTP for now
user1@imanudin.net REJECT Sorry, you cannot use SMTP for now

Note : You can change REJECT with HOLD or DISCARD. If using REJECT, all email from that user will be rejected and user getting error “Sorry, you cannot use SMTP for now”

# Save and postmap

postmap /opt/zimbra/conf/sasl_access

Below is an example when users getting restricted SASL access

saslauthd[31326]: auth_zimbra: user1@example.net auth OK
mail postfix/smtps/smtpd[11549]: NOQUEUE: filter: RCPT from subs30-116-206-xx-xx.three.co.id[116.206.xx.xx]: <user1@example.net>: Sender address triggers FILTER smtp-amavis:[127.0.0.1]:10026; from=<user1@example.net> to=<user1@example.net> proto=ESMTP helo=
mail postfix/smtps/smtpd[11549]: NOQUEUE: reject: RCPT from subs30-116-206-xx-xx.three.

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"