Categories: How To

How to Blacklist and Whitelist Email or Domain in Zimbra 8

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

How to Whitelist

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

How to Blacklist

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
ferisetyawanmyid

Recent Posts

Best SSH Clients for Linux: Top Tools for Secure Remote Connections

If you manage Linux servers regularly, you know how important SSH (Secure Shell) is. Whether…

6 days ago

🐧 Best Linux Distributions for Beginners and Daily Use (2025 Edition)

If you’re new to Linux or thinking about switching from Windows or macOS, this guide…

1 week ago

Essential SRE Tools That Run on Linux

Introduction Site Reliability Engineering (SRE) has become a critical discipline in modern IT operations. The…

4 weeks ago

Best Free CRM Websites for Businesses in 2025

Updated: August 17, 2025 A practical guide to the best free CRM (Customer Relationship Management)…

1 month ago

Free Website Hosting Control Panel for Linux

If you run a VPS or dedicated server with Linux, you probably know that managing…

2 months ago

How to Find Out Who Rebooted Your Ubuntu Server (Step-by-Step Guide)

Short summary: Use built-in Linux tools (`who`, `last`, `journalctl`, `/var/log/auth.log`) and optional audit logs to…

2 months ago

This website uses cookies.