How to Blacklist and Whitelist Email or Domain in Zimbra 8, in the previous article discussed How to Block Email or Domain in MTA Zimbra 8. In this method, we will discuss blocking email or domain in amavis with a spam score system.
In Amavis, the detection system determines whether an email is spam by assigning it a score. If this score exceeds the set value, then the email is considered spam. Usually, the email goes into the junk/spam folder on the web client. If this score is below the set value limit, then the email is considered clean.
Usually, in the default Zimbra the score value that is considered spam email exceeds 6.6. The score can be checked on the Original email, on the Zimbra web client it is in the menu Action > Show Original. Here’s how it looks
X-Virus-Scanned: amavisd-new at saad.web.id
X-Spam-Flag: NO
X-Spam-Score: 2.288
X-Spam-Level: **
X-Spam-Status: No, score=2.288 required=6.6 tests=[BAYES_20=-0.001,
BODY_SINGLE_WORD=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
DKIM_VALID_AU=-0.1, DMARC_PASS_NONE=-0.6, HTML_MESSAGE=0.001,
HTML_MIME_NO_HTML_TAG=0.377, MIME_HTML_ONLY=0.723,
MISSING_MIMEOLE=1.899, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
T_RP_MATCHES_RCVD=-0.01] autolearn=no autolearn_force=no
Before blacklisting and whitelisting, first backup the amavisd.conf.in file with the following command:
cp /opt/zimbra/conf/amavisd.conf.in /opt/zimbra/conf/amavisd.conf.in.backup
1. Enter the email or domain line you want to whitelist in the file amavisd.conf.in
su - zimbra
vi /opt/zimbra/conf/amavisd.conf.in
Example
{ # a hash-type lookup table (associative array)
'noreply@saad.web.id' => -10.0,
'saad.web.id' => -10.0,
'nobody@cert.org' => -3.0,
'cert-advisory@us-cert.gov' => -3.0,
'owner-alert@iss.net' => -3.0,
'slashdot@slashdot.org' => -3.0,
2. Restart amavis
zmamavisdctl restart
1. Enter the email or domain line you want to blacklist in the file amavisd.conf.in
su - zimbra
vi /opt/zimbra/conf/amavisd.conf.in
Example
{ # a hash-type lookup table (associative array)
'noreply@saad.web.id' => 10.0,
'saad.web.id' => 10.0,
'nobody@cert.org' => -3.0,
'cert-advisory@us-cert.gov' => -3.0,
'owner-alert@iss.net' => -3.0,
'slashdot@slashdot.org' => -3.0,
2. Restart amavis
zmamavisdctl restart
If you run a VPS or dedicated server with Linux, you probably know that managing…
Short summary: Use built-in Linux tools (`who`, `last`, `journalctl`, `/var/log/auth.log`) and optional audit logs to…
Whether you're a new Linux user or a beginner sysadmin, mastering the terminal is a…
Choosing the right Content Management System (CMS) is key when you're building a blog, portfolio,…
Securing your Linux server is a critical task for every sysadmin. One of the simplest…
As a Linux system administrator, understanding what happens on your network is crucial. One of…
This website uses cookies.