Whitelist and Blacklist domain in zimbra

In this tutorial we will look , how we can blacklist and whitelist email id and domain using file /opt/zimbra/conf/amavisd.conf.in

Note: We need to score the domain and email id rate. Scoring Positive is Blacklist and Negative score is Whitelist .
Positive Score = Blacklist
Negative Score=Whitelist

Whitelist domain using file /opt/zimbra/conf/amavisd.conf.in 
Login with zimbra user
#su - zimbra
$vim /opt/zimbra/conf/amavisd.conf.in

{ # a hash-type lookup table (associative array)
     'example.com'                        => -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,

or, For Email id whitelist

{ # a hash-type lookup table (associative array)
     'emailid@example.com'                        => -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,

Restart Amavis Service
$zmamavisdctl restart

Blacklist Domain and email id using file /opt/zimbra/conf/amavisd.conf.in 
$vim /opt/zimbra/conf/amavisd.conf.in
{ # a hash-type lookup table (associative array)
     'example.com'                        => 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,

or For Email id Blacklist

{ # a hash-type lookup table (associative array)
     'emailid@example.com'                        => 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,

Restart Amavis Service
$zmamavisdctl restart

Now send a testing mail from blacklisted email id and check.

Check log file
$tail -f /var/log/zimbra.log
Mar 26 23:32:51 mail postfix/qmgr[20635]: 28C65AC206E2: from=, size=4214, nrcpt=1 (queue active)
Mar 26 23:32:51 mail amavis[18157]: (18157-01) nnBCMtyI9p7F FWD from -> , BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 28C65AC206E2
Mar 26 23:32:51 mail amavis[18157]: (18157-01) Passed SPAMMY {RelayedTaggedInbound}, [209.85.213.46]:34457 [209.85.213.46] -> , Queue-ID: 594FAAC206AC, Message-ID: , mail_id: nnBCMtyI9p7F, Hits: 7.531, size: 3220, queued_as: 28C65AC206E2, dkim_sd=20120113:gmail.com, 3241 ms

Note: As we now received blacklisted email id in Junk Folder.