Reject fake email dari certain domain

reject email spoofing dari @abc.co.id atau pun domain yg terdaftar di mail server zimbra. caranya: tambahkan :

check_sender_access hash:/opt/zimbra/conf/domainrestrict

ke dalam file "opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf" .

hasil akhir file "/opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf":

zimbra@mail:~$ cat /opt/zimbra/conf/zmconfigd/smtpd_sender_restrictions.cf
%%contains VAR:zimbraServiceEnabled antivirus^ check_sender_access regexp:/opt/zimbra/postfix/conf/tag_as_originating.re%%
%%contains VAR:zimbraServiceEnabled antivirus^ permit_mynetworks%%
%%contains VAR:zimbraServiceEnabled antivirus^ permit_sasl_authenticated%%
%%contains VAR:zimbraServiceEnabled antivirus^ permit_tls_clientcerts%%
check_sender_access hash:/opt/zimbra/conf/domainrestrict
%%contains VAR:zimbraServiceEnabled antivirus^ check_sender_access regexp:/opt/zimbra/postfix/conf/tag_as_foreign.re%%
zimbra@mail:~$

create file "/opt/zimbra/conf/domainrestrict"

abc.co.id       REJECT
abc.com             REJECT

lalu generate hash:

postmap  /opt/zimbra/conf/domainrestrict

restart mta:

zmmtactl restart

testing:

reject