How to Blacklist and Whitelist Email or Domain in Zimbra 8

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)
  '[email protected]'                    => -10.0,
  'saad.web.id'                            => -10.0,
  '[email protected]'                        => -3.0,
  '[email protected]'              => -3.0,
  '[email protected]'                    => -3.0,
  '[email protected]'                  => -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)
  '[email protected]'                    => 10.0,
  'saad.web.id'                            => 10.0,
  '[email protected]'                        => -3.0,
  '[email protected]'              => -3.0,
  '[email protected]'                    => -3.0,
  '[email protected]'                  => -3.0,

2. Restart amavis

zmamavisdctl restart

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *