Menambahkan Trusted Domain di Zimbra

ada kalanya domain domain.co.id atau gmail.com masuk junk atau dianggap spam. nah untuk mengantisipasi agar tidak dianggap spam adalah memasukkan daftar domain ke dalam antispam rule didalam file /opt/zimbra/conf/salocal.cf.in. Jangan lupa backup terlebuh dahulu sebelum merubah file konfig, dan tambahkan white list berikut:

#trusted domain.co.id
def_whitelist_from_rcvd *@domain.co.id domain.co.id
def_whitelist_from_rcvd *@gmail.com gmail.com

config akhir salocal.cf.in

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# rewrite_header Subject *****SPAM*****
# report_safe 1
# trusted_networks 212.17.35.
# lock_method flock

header DSPAM_SPAM X-DSPAM-Result =~ /^Spam$/
describe DSPAM_SPAM DSPAM claims it is spam
score DSPAM_SPAM 1.5

header DSPAM_HAM X-DSPAM-Result =~ /^Innocent$/
describe DSPAM_HAM DSPAM claims it is ham
score DSPAM_HAM -0.5

%%uncomment VAR:zimbraMtaMyNetworks%%trusted_networks %%zimbraMtaMyNetworks%%
%%uncomment VAR:zimbraMtaAntiSpamLockMethod%%lock_method %%zimbraMtaAntiSpamLockMethod%%

# accept email from zimbra support and forumns
def_whitelist_from_rcvd noreply@zimbra.com zimbra.com
def_whitelist_from_rcvd support@zimbra.com zimbra.com

#trusted domain.co.id
def_whitelist_from_rcvd *@domain.co.id domain.co.id
def_whitelist_from_rcvd *@gmail.com gmail.com

rewrite_header Subject *SPAM* _STARS(*)_
bayes_auto_learn 1
bayes_min_spam_num 60
bayes_min_ham_num 60


%%uncomment LOCAL:antispam_mysql_enabled%%bayes_store_module              Mail::SpamAssassin::BayesStore::MySQL
%%uncomment LOCAL:antispam_mysql_enabled%%bayes_sql_dsn                   DBI:mysql:zimbra_antispam:host=@@antispam_mysql_host@@:port=@@antispam_mysql_port@@
%%uncomment LOCAL:antispam_mysql_enabled%%bayes_sql_username              @@antispam_mysql_user@@
%%uncomment LOCAL:antispam_mysql_enabled%%bayes_sql_password              @@antispam_mysql_password@@

clear_headers
add_header spam Flag _YESNOCAPS_
add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_
add_header all Level _STARS(*)_
add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_

lalu restart :

# zmmtactl restart
# zmamavisdctl restart

jika sudah, saatnya sekarang mencoba apakah antispam nya sudah berjalan atau belum. maka kita harus mengirim dengan cara spamming`

caranya, telnet ke mail server lain:

[user@host ~]$ telnet localhost 25

lalu akan muncul reply:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 htserv1.unixtel.co ESMTP Sendmail 8.14.4/8.14.4; Thu, 27 Feb 2014 10:09:51 +0700

ketik:

helo local.domain.com

lalu akan muncul reply:

250 htserv1.unixtel.co Hello localhost.localdomain [127.0.0.1], pleased to meet you

ketik command berikut untuk email pengirim:

mail from: CIA@gmail.com

lalu akan muncul reply:

250 2.1.0 CIA@gmail.com... Sender ok

ketik command berikut untuk email tujuan:

rcpt to: dian.prasetya@domain.co.id

lalu akan muncul reply:

250 2.1.5 dian.prasetya@domain.co.id... Recipient ok

untuk mengirim subject dan isi email ketik DATA

DATA

lalu akan muncul reply:

354 Enter mail, end with "." on a line by itself

ketik Subject: blablabla untuk mengirim subject lalu enter dan akhiri tanda . (titik) untuk mengakhiri isi / body email... lalu terakhir tekan enter

Subject: test aja
you are under arrest.
.

lalu akan muncul reply: 250 2.0.0 s1R39pgF018074 Message accepted for delivery

ketik quit untuk keluar dari telnet..

lalu cek inbox email corporate dan bisa kita lihat di header email bahwa email gmail.com tidak dianggap spam (lihat bagian cetak tebal) padahal kita sudah melakukan spamming (big grin)(smile)

Return-Path: CIA@gmail.com
Received: from mail2.domain.co.id (LHLO mail2.domain.co.id) (192.168.2.2) by
 mail2.domain.co.id with LMTP; Thu, 27 Feb 2014 10:11:19 +0700 (WIT)
Received: from localhost (localhost [127.0.0.1])
    by mail2.domain.co.id (Postfix) with ESMTP id A5D244788D4
    for <dian.prasetya@domain.co.id>; Thu, 27 Feb 2014 10:11:19 +0700 (WIT)
X-Virus-Scanned: amavisd-new at mail2.domain.co.id
X-Spam-Flag: NO
X-Spam-Score: 3.516
X-Spam-Level: ***
X-Spam-Status: No, score=3.516 tagged_above=-10 required=6.6
    tests=[BAYES_50=0.8, DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,
    MISSING_HEADERS=1.021, NML_ADSP_CUSTOM_MED=0.9, RDNS_NONE=0.793]
    autolearn=no
Received: from mail2.domain.co.id ([127.0.0.1])
    by localhost (mail2.domain.co.id [127.0.0.1]) (amavisd-new, port 10024)
    with ESMTP id aVRG7-NA-brs for <dian.prasetya@domain.co.id>;
    Thu, 27 Feb 2014 10:11:08 +0700 (WIT)
Received: from htserv1.unixtel.me (unknown [192.73.235.136])
    by mail2.domain.co.id (Postfix) with ESMTPS id 2A1A84788C0
    for <dian.prasetya@domain.co.id>; Thu, 27 Feb 2014 10:11:00 +0700 (WIT)
Received: from local.domain.com (localhost.localdomain [127.0.0.1])
    by htserv1.unixtel.me (8.14.4/8.14.4) with SMTP id s1R39pgF018074
    for dian.prasetya@domain.co.id; Thu, 27 Feb 2014 10:11:08 +0700
Date: Thu, 27 Feb 2014 10:09:51 +0700
From: CIA@gmail.com
Message-Id: <201402270311.s1R39pgF018074@htserv1.unixtel.me>
Subject: test aja

you are under arrest.

ref: zimbra wiki