{"id":700,"date":"2010-04-04T22:37:57","date_gmt":"2010-04-04T15:37:57","guid":{"rendered":"http:\/\/adityo.blog.binusian.org\/?p=700"},"modified":"2010-04-04T22:40:52","modified_gmt":"2010-04-04T15:40:52","slug":"how-to-enable-dspam-on-zimbra-5-0-18","status":"publish","type":"post","link":"https:\/\/adityo.blog.binusian.org\/?p=700","title":{"rendered":"How to enable Dspam on zimbra 5.0.18"},"content":{"rendered":"<p>Quote from <a href=\"http:\/\/blog.verwilst.be\/2008\/12\/11\/improving-spam-filtering-on-zimbra-5x-with-dspam\/\">http:\/\/blog.verwilst.be\/2008\/12\/11\/improving-spam-filtering-on-zimbra-5x-with-dspam\/<\/a><\/p>\n<p>By default, Zimbra isn\u2019t very good in the spam-handling dept. You  just keep on flagging messages as Junk, in the hopes that Zimbra is  getting wiser on every occasion. Not really though..<\/p>\n<p>Under the hood, Zimbra is relying on SpamAssassin to weed out the  pharma mails. This heuristics-based method is pretty 90\u2019s IMO, and while  it still catches a lot of spam, rules have to be added\/update on a  regular basis in order to stay ahead of \u2013 or at least on par with \u2013 our  good friends the spammers.<\/p>\n<p>Enter DSpam. Dspam has a statistical approach to spam filtering.  DSpam only knows that something is spam after you repeatedly show  examples of it ( in Zimbra terms, mark it as junk ). After a while,  dspam knows which words ( and combinations ) are mostly present in your  spam and ham mails. Based on that knowledge, it will make educated  guesses on what you consider spam and what you don\u2019t. This means that  dspam automatically keeps track of the latest trends in spam, as long as  you follow up once in a while. Apart from that, dspam is written in C,  and is insanely fast, especially in comparison with bloaty old  Spamassassin.<\/p>\n<p>One downside of Dspam however is that the project is pretty much  euh.. dead or asleep, whatever you prefer. It sure has its share of  quirks, especially on larger environments. But it does the job nicely  for most people. Zimbra disabled dspam quite some time ago because of  stability issues, so your mileage may vary.<\/p>\n<p>Okay now i want to enable DSPAM on my zimbra5.0.18, you can checked your zimbra version by doing this as zimbra user<\/p>\n<p>#su zimbra<\/p>\n<p>$ zmcontrol -v<\/p>\n<p>Release 5.0.18_GA_3011.UBUNTU8 UBUNTU8 FOSS edition<\/p>\n<p>Now we need to go to amavisd.conf.in directory first<\/p>\n<p>$ cd \/opt\/zimbra\/conf\/<\/p>\n<p>You will see the dspam config by doing this<\/p>\n<p>$ more amavisd.conf.in | grep dspam<br \/>\n%%uncomment LOCAL:amavis_dspam_enabled%%$dspam = &#8216;\/opt\/zimbra\/dspam\/bin\/dspam&#8217;;<\/p>\n<p>you can see the dspam was commented<\/p>\n<p>$ more amavisd.conf | grep dspam<br \/>\n#$dspam = &#8216;\/opt\/zimbra\/dspam\/bin\/dspam&#8217;;<\/p>\n<p>Now you need to enable DSPAM using command<strong> zmlocalconfig -e amavis_dspam_enabled=TRUE<\/strong><\/p>\n<p>$ zmlocalconfig -e amavis_dspam_enabled=TRUE<\/p>\n<p>then restart the amavid<\/p>\n<p>$ zmamavisdctl restart<br \/>\nStopping amavisd&#8230; done.<br \/>\nStarting amavisd&#8230;done.<\/p>\n<p>checked the different on the amavisd.conf, you will see it was uncommented<\/p>\n<p>$ more amavisd.conf.in | grep dspam<br \/>\n%%uncomment LOCAL:amavis_dspam_enabled%%$dspam = &#8216;\/opt\/zimbra\/dspam\/bin\/dspam&#8217;;<\/p>\n<p>$ more amavisd.conf | grep dspam<br \/>\n$dspam = &#8216;\/opt\/zimbra\/dspam\/bin\/dspam&#8217;;<\/p>\n<p>Now as root change the ownershipof the dspam directory on \/opt\/zimbra\/dspam-3.8.0\/<\/p>\n<p># chown -R zimbra.zimbra \/opt\/zimbra\/dspam-3.8.0\/<\/p>\n<p>Then as zimbra use zmtrainsa to train your dspam, here is the example<\/p>\n<p># su zimbra<br \/>\n$ zmtrainsa<br \/>\n20100404222633 Starting spam\/ham extraction from system accounts.<br \/>\n[] INFO: Total messages processed: 25<br \/>\n[] INFO: Total messages processed: 1<br \/>\n20100404222639 Finished extracting spam\/ham from system accounts.<br \/>\n20100404222639 Starting spamassassin training.<br \/>\nnetset: cannot include 127.0.0.0\/8 as it has already been included<br \/>\nLearned tokens from 0 message(s) (25 message(s) examined)<br \/>\nnetset: cannot include 127.0.0.0\/8 as it has already been included<br \/>\nLearned tokens from 0 message(s) (1 message(s) examined)<br \/>\nnetset: cannot include 127.0.0.0\/8 as it has already been included<br \/>\n20100404222645 Finished spamassassin training.<br \/>\n20100404222645 Starting dspam training<br \/>\nTaking Snapshot&#8230;<br \/>\nzimbra\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TP:\u00a0\u00a0\u00a0\u00a0 0 TN:\u00a0\u00a0\u00a0\u00a0 0 FP:\u00a0\u00a0\u00a0\u00a0 0 FN:\u00a0\u00a0\u00a0\u00a0 0 SC:\u00a0\u00a0\u00a0\u00a0 0 NC:\u00a0\u00a0\u00a0\u00a0 0<br \/>\nTraining \/tmp\/ham.fc15146 \/ \/tmp\/spam.cR15145 corpora&#8230;<br \/>\n[test: nonspam] 127c96e3c4b-0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-4\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: Friendster Reminder &#8211; dEAthstrike&#8217;s Birthday is Today &#8211; Ma\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rch 26<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-10\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: Thedy, Charlena3783 is waiting for you!<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-3\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: iPad testers wanted!<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-18\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: Friendster Reminder &#8211; livhiea&#8217;s Birthday is Today &#8211; March\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 27<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: JobsDB Job Alert &#8211; 3 new job(s) of &#8220;Job Alert&#8221;<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-21\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: Internal Audit Staff &#8211; Job Alert from JobStreet.com<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: FAIL (Innocent)<br \/>\n[fn] Subject: Beautiful_Maggie is checking you out!<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-23\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-7\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-17\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-14\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-20\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-9\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-11\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-12\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-19\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-24\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-22\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-2\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-13\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-6\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-15\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-5\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-8\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\n[test: spam\u00a0\u00a0 ] 127c96e303c-16\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 result: PASS<br \/>\nTRAINING COMPLETE<\/p>\n<p>Training Snapshot:<br \/>\nzimbra\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TP:\u00a0\u00a0\u00a0 18 TN:\u00a0\u00a0\u00a0\u00a0 1 FP:\u00a0\u00a0\u00a0\u00a0 0 FN:\u00a0\u00a0\u00a0\u00a0 7 SC:\u00a0\u00a0\u00a0\u00a0 0 NC:\u00a0\u00a0\u00a0\u00a0 0<br \/>\nSHR:\u00a0\u00a0 72.00%\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HSR:\u00a0\u00a0\u00a0 0.00%\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 OCA:\u00a0\u00a0 73.08%<\/p>\n<p>Overall Statistics:<br \/>\nzimbra\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 TP:\u00a0\u00a0\u00a0 18 TN:\u00a0\u00a0\u00a0\u00a0 1 FP:\u00a0\u00a0\u00a0\u00a0 0 FN:\u00a0\u00a0\u00a0\u00a0 7 SC:\u00a0\u00a0\u00a0\u00a0 0 NC:\u00a0\u00a0\u00a0\u00a0 0<br \/>\nSHR:\u00a0\u00a0 72.00%\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HSR:\u00a0\u00a0\u00a0 0.00%\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 OCA:\u00a0\u00a0 73.08%<br \/>\ndspam_clean starting<br \/>\nPROCESSING USER: zimbra<br \/>\nProcessing sigs; age: 14<br \/>\nProcessing probabilities; age: 0<br \/>\nProcessing unused; any: 90 quota: 30 nospam: 15 onehit: 15<br \/>\n20100404222646 Finished dspam training<\/p>\n<p>And last thing Dspam will show on your mail header such as this<\/p>\n<p>Return-Path: test@gmail.com<br \/>\nReceived: from mail.zimbra.org.zimbra.org (LHLO mail.zimbra.org)<br \/>\n(202.58.181.138) by mail.zimbra.org with LMTP; Sun, 4 Apr 2010 22:39:09<br \/>\n+0700 (WIT)<br \/>\nReceived: from localhost (localhost [127.0.0.1])<br \/>\nby mail.zimbra.org (Postfix) with ESMTP id 91D8AD5057B<br \/>\nfor &lt;testing@zimbra.org&gt;; Sun,\u00a0 4 Apr 2010 22:39:09 +0700 (WIT)<br \/>\n<strong>X-DSPAM-Result: Innocent<br \/>\nX-DSPAM-Confidence: 0.7654<br \/>\nX-DSPAM-Probability: 0.0000<br \/>\nX-DSPAM-Signature: 4bb8b297249781969636528<br \/>\nX-DSPAM-Factors: 27,<\/strong><br \/>\nX-Virus-Scanned: amavisd-new at zimbra.org<br \/>\nX-Spam-Flag: NO<br \/>\nX-Spam-Score: 1.14<br \/>\nX-Spam-Level: *<br \/>\nX-Spam-Status: No, score=1.14 tagged_above=-10 required=6.6 tests=[AWL=0.420,<br \/>\nBAYES_00=-2.599, DNS_FROM_OPENWHOIS=1.13, DSPAM_HAM=-1,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quote from http:\/\/blog.verwilst.be\/2008\/12\/11\/improving-spam-filtering-on-zimbra-5x-with-dspam\/ By default, Zimbra isn\u2019t very good in the spam-handling dept. You just keep on flagging messages as Junk, in the hopes that Zimbra is getting wiser on every occasion. Not really though.. Under the hood, Zimbra is relying on SpamAssassin to weed out the pharma mails. This heuristics-based method is pretty 90\u2019s [&hellip;]<\/p>\n","protected":false},"author":386,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[495],"tags":[6102],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-zimbra","tag-how-to-enable-dspam-on-zimbra-5-0-18"],"_links":{"self":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/users\/386"}],"replies":[{"embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=700"}],"version-history":[{"count":6,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions"}],"predecessor-version":[{"id":704,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=\/wp\/v2\/posts\/700\/revisions\/704"}],"wp:attachment":[{"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adityo.blog.binusian.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}