This is a discussion on Re: [AMaViS-user] spamassassin bayes learning within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Aktor, > Hi, > > I've got this architecture.. > postfix ->> amavisd-new -> postfix -> maildrop -&...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Aktor,
> Hi, > > I've got this architecture.. > postfix ->> amavisd-new -> postfix -> maildrop -> sa-learn -> mailbox > | | > V V > clamav spamassassin > > With local.cf and amavisd.conf default files values > > If I use that arquitecture and I got and spam the following happens > > General file: > > AsteriX root # sa-learn --dump magic --dbpath > /var/lib/amavis/.spamassassin/ > 0.000 0 3 0 non-token data: bayes db version > 0.000 0 49 0 non-token data: nspam > ^^ > 0.000 0 5243 0 non-token data: nham > 0.000 0 164847 0 non-token data: ntokens > 0.000 0 1106523114 0 non-token data: oldest atime > 0.000 0 1111140245 0 non-token data: newest atime > 0.000 0 1106526477 0 non-token data: last journal sync atime > 0.000 0 1111123833 0 non-token data: last expiry atime > 0.000 0 0 0 non-token data: last expire atime delta > 0.000 0 0 0 non-token data: last expire reduction count > > Per user file: > > aktor@AsteriX aktor $ sa-learn --dump magic > 0.000 0 3 0 non-token data: bayes db version > 0.000 0 572 0 non-token data: nspam > ^^^ > 0.000 0 1996 0 non-token data: nham > 0.000 0 203323 0 non-token data: ntokens > 0.000 0 1086896787 0 non-token data: oldest atime > 0.000 0 1111127201 0 non-token data: newest atime > 0.000 0 0 0 non-token data: last journal sync atime > 0.000 0 1111102285 0 non-token data: last expiry atime > 0.000 0 29436939 0 non-token data: last expire atime delta > 0.000 0 0 0 non-token data: last expire reduction count > > > If I start amavisd-new daemon I got the following: > > AsteriX root # amavisd-new debug-sa > [..] > debug: bayes: 20621 tie-ing to DB file R/O > /var/lib/amavis/.spamassassin/bayes_toks > debug: bayes: 20621 tie-ing to > DB file R/O /var/lib/amavis/.spamassassin/bayes_seen > debug: bayes: found bayes db version 3 > debug: bayes: Not available for scanning, only 49 spam(s) in Bayes DB < > 200 ^^ > debug: bayes: 20621 untie-ing > debug: bayes: 20621 untie-ing db_toks > debug: bayes: 20621 untie-ing db_seen > debug: Score set 0 chosen. > > And the mail is tagged as: > >>>> > X-Virus-Scanned: por AMAVIS + CLAMAV en aktornet.ath.cx > X-Spam-Status: Yes, hits=9.0 tagged_above=0.0 required=4.0 > tests=DATE_IN_FUTURE_03_06, FORGED_HOTMAIL_RCVD2, HTML_70_80, > HTML_MESSAGE, HTML_MIME_NO_HTML_TAG, INFO_TLD, LONGWORDS, > LOTS_OF_STUFF, MIME_HEADER_CTYPE_ONLY, MIME_HTML_ONLY > X-Spam-Level: ******** > X-Spam-Flag: YES > <<< > > No BAYES_XX tag > > ---- **** ---- > > But... if I start 'spamd' daemon and use spamc client to test the mail > it switches the user so I get the following results: > >>>> > X-Spam-Flag: YES > X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on AsteriX > X-Spam-Level: ************************** > X-Spam-Status: Yes, score=26.1 required=5.0 tests=BAYES_99, > DATE_IN_FUTURE_03_06,DNS_FROM_RFC_POST,FORGED_HOTM AIL_RCVD2, > > HTML_FONT_BIG,HTML_FONT_FACE_CAPS,HTML_MESSAGE,HTM L_MIME_NO_HTML_TAG, > LONGWORDS,MIME_HEADER_CTYPE_ONLY,MIME_HTML_ONLY, > RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DSBL,RCVD_IN_NJABL_ PROXY, > RCVD_IN_SORBS_HTTP,RCVD_IN_SORBS_WEB,RCVD_IN_XBL,U RIBL_OB_SURBL, > URIBL_SC_SURBL,URIBL_WS_SURBL autolearn=unavailable version=3.0.2 > <<< > > Because it uses per user bayes_* files... > > debug: lock: 20926 created > /home/aktor/.spamassassin/bayes.lock.AsteriX.20926 > debug: lock: 20926 trying to get lock on /home/aktor/.spamassassin/bayes > with 0 retries > debug: lock: 20926 link to /home/aktor/.spamassassin/bayes.lock: link ok > debug: > bayes: 20926 tie-ing to DB file R/W /home/aktor/.spamassassin/bayes_toks > debug: bayes: 20926 tie-ing to DB file R/W > /home/aktor/.spamassassin/bayes_seen > debug: bayes: found bayes db version 3 > debug: bf4c273193a655e812f3dbbfedcbfefcb6224671@sa_genera ted: > already learnt correctly, not learning twice > debug: bayes: 20926 untie-ing > debug: bayes: 20926 untie-ing db_toks > debug: bayes: 20926 untie-ing db_seen > debug: bayes: files locked, now unlocking lock > debug: unlock: 20926 unlink /home/aktor/.spamassassin/bayes.lock > debug: is spam? score=26.121 required=5 > > > Is there any way to make amavisd-new use per user files instead of > general file /var/lib/amavis/.spamassassin/bayes_* ?? > > If it's not, which solution do suggest? first: it's not possible to use per user sa settings or bayes settings. SA is called by the user that amavisd runs as. Because of the different score here's an explanation: http://www.ijs.si/software/amavisd/#faq-spam (SpamAssassin returns different score....) If you need per user settings you can disable sapm checking in amavisd and let spamd/spamc handle it or you can use spamassassin directly with maildrop. This is an example which is used in some howtos: if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin --prefspath=$HOME/$DEFAULT/.spamassassin/user_prefs" } } Every user must then have his own prefs file but so it were possible to use different settings. -- Best Regards Daniel Luttermann ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|