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

10 Essential Linux Commands Every SysAdmin Should Know

As a Linux System Administrator, mastering the command line is key to efficiently managing servers,…

3 weeks ago

🚀 How to Install WireGuard with Docker on Ubuntu 24.04 (wg-easy Dashboard)

Introduction WireGuard is a fast, lightweight, and modern VPN protocol designed for simplicity and performance.If…

1 month ago

How To Install Certbot on Ubuntu 24.04: Set Up Let’s Encrypt for Apache and Nginx

Securing your website with HTTPS is essential for privacy, SEO ranking, and user trust. Let’s…

1 month ago

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…

2 months 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…

2 months ago

Essential SRE Tools That Run on Linux

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

2 months ago

This website uses cookies.