-------- Original-Nachricht --------
> Datum: Thu, 17 Dec 2009 16:08:53 +0100
> Von: "list.ama...@antworte.me" <list.ama...@antworte.me>
> An: Alexander Wirt <formo...@debian.org>
> CC: Steve <steeeeev...@gmx.net>, amavis-user@lists.sourceforge.net
> Betreff: Re: [AMaViS-user] dspam integration in amavis

> OK. I now installed the current dspam packages from
>    http://packages.kirya.net/packages.php?dist=lenny
> 
> and when I run dspam --version I get:
> 
>   dspam --version (see below).
> 
> What next? Currently my dspam mysql-tables exist but they are
> empty, and when running in debug mode i got the former error.
> 
1) What tables do you have in MySQL for DSPAM?
2) Could you post your dspam.conf file?


Let's first create the default preferences that are valid for ALL users:
dspam_admin change preference default "dailyQuarantineSummary" "off"
dspam_admin change preference default "enableBNR" "on"
dspam_admin change preference default "enableWhitelist" "on"
dspam_admin change preference default "fallbackDomain" "off"
dspam_admin change preference default "ignoreGroups" "off"
dspam_admin change preference default "ignoreRBLLookups" "off"
dspam_admin change preference default "makeCorpus" "on"
dspam_admin change preference default "optIn" "off"
dspam_admin change preference default "optOut" "on"
dspam_admin change preference default "optOutClamAV" "on"
dspam_admin change preference default "processorBias" "on"
dspam_admin change preference default "showFactors" "off"
dspam_admin change preference default "signatureLocation" "headers"
dspam_admin change preference default "spamAction" "tag"
dspam_admin change preference default "spamSubject" "[SPAM]"
dspam_admin change preference default "statisticalSedation" "6"
dspam_admin change preference default "storeFragments" "off"
dspam_admin change preference default "tagNonspam" "off"
dspam_admin change preference default "tagSpam" "off"
dspam_admin change preference default "trainingMode" "TOE"
dspam_admin change preference default "trainPristine" "off"
dspam_admin change preference default "whitelistThreshold" "10"


Now go on and create a new user in DSPAM for the Amavisd-New daemon. For that 
you should add a new user in the dspam_virtual_uids DSPAM table.
INSERT INTO `dspam_virtual_uids` (`uid`, `username`) VALUES
(1, 'amavis');


After that you should optIn that user (since in the default setup we have 
advised DSPAM to run in optIn mode (every one needs to OPTIN in order to have 
DSPAM filtering)):
dspam_admin change preference default "optIn" "on"
dspam_admin change preference default "optOut" "off"


Now allow amavisd-new to use DSPAM. Add/change in dspam.conf:
Trust amavis


While you are already in dspam.conf please change/add the following:
TrainingMode toe
Feature noise
Feature whitelist
Feature tb=5
Algorithm graham burton
Tokenizer osb
PValue bcr
ImprobabilityDrive on
Opt in
Broken case
Broken lineStripping
MaxMessageSize 4194304
ProcessorURLContext on
ProcessorBias on
StripRcptDomain off


I could list you a gazillion of other switches that you could change but for 
the beginning this should be enough. If you are interested in more options or 
another configuration of DSPAM then let me know.


Then go on and edit amavisd.conf and change/add inside @spam_scanners the 
following:@spam_scanners = (
  ['DSPAM',  'Amavis::SpamControl::ExtProg', $dspam,
    [ qw(--stdout --classify --deliver=innocent,spam
         --user), $daemon_user ],
    score_factor => 1,
  ],
);



That should be enough. Now restart amavisd-new and try sending a mail.

The above setup is not very optimal since it will start every time a full blown 
up DSPAM instance. If you are processing a lot of mails then using DSPAM in 
daemon mode would be way better. But I don't know your use scenario so I just 
took the most simple option.

I as well have not enabled quarantine and other such stuff for DSPAM.

I use DSPAM since ages but never have I integrated it inside Amavisd-New. I use 
it outside from Amavis. The reason for that is that I try to keep Amavisd-New 
as lean as possible. In the past my experience with Perl applications have been 
that they tend to use a lot of memory and just using DSPAM on it's own is for 
me faster and less resource intensive then wrapping it up in something like 
Amavisd-New.

On my setup I use Amavisd-New as the first content filter and then after that I 
use DSPAM (in client/server mode with LMTP) as another content filter and then 
I deliver back to my Postfix.

If I look on my setup then DSPAM does not at all use that much memory:
theia ~ # ps -ylC 
dspam,mysqld,amavisd,master,gmgr,tlsmgr,pickup,anvil,spawn,clamd --sort rss
S   UID   PID  PPID  C PRI  NI   RSS    SZ WCHAN  TTY      TIME CMD
S     0  6904     1  0 100   0  1140   873 -      ?    00:00:03 master
S   207 17744  6904  0 100   0  1516  1581 -      ?    00:00:00 pickup
S   207 17849  6904  0 100   0  1532  1580 -      ?    00:00:00 anvil
S   207  6921  6904  0 100   0  2960  2083 -      ?    00:00:00 tlsmgr
S     0  6958     1  0 100   0  3440 10394 -      ?    00:00:08 dspam
S   108 17889  2305  0 100   0 28152  9566 -      ?    00:00:00 amavisd
S   108 17989  2305  0 100   0 28152  9566 -      ?    00:00:00 amavisd
S   108  2305     1  0 100   0 28436  9334 -      ?    00:00:00 amavisd
S   105  2286     1  0  83   3 188376 53892 -     ?    00:02:15 clamd
S    60  6779     1  0 100   0 521308 278288 -    ?    00:05:00 mysqld
theia ~ #

And I am really afraid if I would integrate DSPAM in Amavisd-New then the 
memory usage would be more and for me I don't see any substantial benefit in 
using DSPAM inside Amavisd-New. I have nothing that the integration in 
Amavisd-New is offering me that I can not do directly in DSPAM. Or is any one 
here using DSPAM in Amavisd-New that can come up with something that one can do 
with DSPAM in Amavisd-New that I can't do directly in DSPAM?


> Thanks for your reply in advance.
> 
No problem.


> Thomas.
> 
Steve

> ##
> 
> DSPAM Anti-Spam Suite 3.9.0-BETA4 (agent/library)
> 
> Copyright (c) 2002-2009 DSPAM Project
> http://dspam.sourceforge.net.
> 
> DSPAM may be copied only under the terms of the GNU General Public
> License,
> a copy of which can be found with the DSPAM distribution kit.
> 
> Configuration parameters:  '--build' 'i486-linux-gnu'  
> '--host=i486-linux-gnu' '--prefix=/usr'  
> '--disable-dependency-tracking' '--includedir=/usr/include'  
> '--mandir=/usr/share/man' '--infodir=/usr/share/info'  
> '--enable-split-configuration' '--enable-static'  
> '--enable-external-lookup' '--with-logdir=/var/log/dspam/'  
> '--localstatedir=/var' '--libexecdir=/usr/lib/dspam' '--srcdir=./'  
> '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/dspam'  
> '--enable-domain-scale' '--enable-signature-headers'  
> '--with-delivery-agent=/usr/bin/procmail' '--enable-daemon'  
> '--with-mysql-includes=/usr/include/mysql'  
> '--with-pgsql-includes=/usr/include/postgresql'  
> '--with-storage-driver=mysql_drv,pgsql_drv,sqlite3_drv,hash_drv'  
> '--enable-debug' '--enable-virtual-users'  
> '--enable-preferences-extension' '--enable-clamav'  
> 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-g  
> -O2 -O2' 'LDFLAGS=' 'CPPFLAGS=' 'CXXFLAGS=-g -O2' 'FFLAGS=-g -O2'
> 
> 
> 
> Zitat von Alexander Wirt <formo...@debian.org>:
> 
> > Steve schrieb am Donnerstag, den 17. Dezember 2009:
> >
> > Hi,
> >
> > *snip*
> >
> >> > When I change the 01-debian config to
> >> >
> >> > $dspam='dspam --debug';
> >> >
> >> > then following error raises when processing an email: (Datei nicht
> >> > gefunden means File or Directory not found).
> >> >
> >> > Dec 17 08:27:23 mail0 amavis[31418]: (31398-01) (!)run_command: child
> >> > process [31418]: run_command: failed to exec /usr/bin/dspam --debug
> >> > --stdout --deliver=spam,innocent --mode=tum --tokenizer=chained,noise
> >> > --enable-signature-headers --user amavis: Datei oder Verzeichnis
> nicht
> >> > gefunden at /usr/sbin/amavisd-new line 2919, <GEN34> line 40.
> >> >
> >> That "Datei oder Verzeichnis nicht gefunden" is probably because  
> >> DSPAM can not find the file it should check. How is the mail passed  
> >> to DSPAM? Over a pipe? Or somehow differently?
> >>
> >> btw: I am the lead developer behind DSPAM and while I know that  
> >> Debian is using ancient versions (3.6.8 patched with some Debian  
> >> stuff) I can tell you right now that there is no run time option  
> >> "--tokenizer" nor is there any "--enable-signature-headers". Is  
> >> that something that the Debian guys have added to DSPAM?
> > And I'm the amavis debian maintainer :).
> >
> > I don't added such a thing to amavisd-new, but having a look into the
> > official amavisd-new release notes they read like that:
> >
> >     ['DSPAM',  'Amavis::SpamControl::ExtProg', $dspam,
> >       [ qw(--stdout --classify --deliver=innocent,spam
> >            --mode=tum --tokenizer=chained,noise
> >            --user), $daemon_user ],
> >       # use option --feature instead of --tokenizer with dspam < 3.8.0
> >       mail_body_size_limit => 64000, score_factor => 1,
> >     ],
> >   );
> >
> > I guess thats wrong then.
> >
> > Alex
> > --
> > Alexander Wirt, formo...@formorer.de
> > CC99 2DDD D39E 75B0 B0AA  B25C D35B BC99 BC7D 020A
> >
> >
> ------------------------------------------------------------------------------
> > This SF.Net email is sponsored by the Verizon Developer Community
> > Take advantage of Verizon's best-in-class app development support
> > A streamlined, 14 day to market process makes app distribution fast and
> easy
> > Join now and get one step closer to millions of Verizon customers
> > http://p.sf.net/sfu/verizon-dev2dev
> > _______________________________________________
> > AMaViS-user mailing list
> > AMaViS-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/amavis-user
> >  AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
> >  AMaViS-HowTos:http://www.amavis.org/howto/
> >
> 
> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to