How to do Bayes

Billy A. Pumphrey bpumphrey at WOODMACLAW.COM
Fri May 14 20:55:38 IST 2004


I do however have the entries in there:
	
auto_whitelist_path        /var/spool/spamassassin/auto-whitelist
auto_whitelist_file_mode   0600
bayes_path                 /var/spool/spamassassin/bayes
bayes_file_mode            0600
use_bayes 1
dns_available yes

After looking at the line below given to me and correcting the syntax I
changed:
spamassassin -C /opt/MailScanner/etc/spam.assassin.prefs.conf --lint -
D
        TO:
Spamassassin -C /etc/MailScanner/spam.assassin.prefs.conf --lint -D

I got this:
debug: using "/etc/MailScanner/spam.assassin.prefs.conf" for default
rules debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin" for user state dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
/var/spool/spamassassin/bayes_toks
/var/spool/spamassassin/bayes_seen
debug: bayes: found bayes db version 2
debug: bayes: Not available for scanning, only 102 spam(s) in Bayes DB <
200

So another step further..

What must I do next please?? :)



-----Original Message-----
From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
Behalf Of Martin Hepworth
Sent: Friday, May 14, 2004 9:23 AM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: How to do Bayes

Billy

you need to make sure the the user MS runs as has write access to the
bayes files.

I note from the output below you've not forced the bayes directory in
spam.assassion.pref.conf. I'd suggest you do this so the learning etc
uses the same global bayes files.


--
Martin Hepworth
Snr Systems Administrator
Solid State Logic
Tel: +44 (0)1865 842300


Billy A. Pumphrey wrote:
> No I did not use:
> spamassassin -C /opt/MailScanner/etc/spam.assassin.prefs.conf --lint
-D
>
> Here is what it outputted (part of it) when I ran it:
>
> debug: using "/etc/mail/spamassassin" for site rules dir
> debug: using "/root/.spamassassin" for user state dir
> debug: using "/root/.spamassassin/user_prefs" for user prefs file
> debug: using "/root/.spamassassin" for user state dir
> debug: bayes: 465 tie-ing to DB file R/O
/root/.spamassassin/bayes_toks
> debug: bayes: 465 tie-ing to DB file R/O
/root/.spamassassin/bayes_seen
> debug: bayes: found bayes db version 2
> debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB <
> 200
> debug: bayes: 465 untie-ing
> debug: bayes: 465 untie-ing db_toks
> debug: bayes: 465 untie-ing db_seen
> debug: Score set 1 chosen.
> debug: Initialising learner
> debug: using "/root/.spamassassin" for user state dir
> debug: bayes: 465 tie-ing to DB file R/O
/root/.spamassassin/bayes_toks
> debug: bayes: 465 tie-ing to DB file R/O
/root/.spamassassin/bayes_seen
> debug: bayes: found bayes db version 2
> debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB <
> 200
> debug: bayes: 465 untie-ing
> debug: bayes: 465 untie-ing db_toks
> debug: bayes: 465 untie-ing db_seen
> debug: running header regexp tests; score so far=0
> debug: running body-text per-line regexp tests; score so far=0
> debug: running raw-body-text per-line regexp tests; score so far=0
> debug: running uri tests; score so far=0
> debug: uri tests: Done uriRE
> debug: running full-text regexp tests; score so far=0
> debug: running meta tests; score so far=0
> debug: is spam? score=0 required=5 tests=
>
>
> Using the -C with the learn option, I couldn't figure that out.  I
tried
> different things but I just don't know the syntax.
>
> If there are any sources that I missed that covers this please let me
> know, however I did do some archive searching and I just can't find
> anything that explains this well enough for me :(
>
> Thank you
> -----Original Message-----
> From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
> Behalf Of Martin Hepworth
> Sent: Friday, May 14, 2004 3:19 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: How to do Bayes
>
> Billy
>
> did you use.
>
> spamassassin -C /opt/MailScanner/etc/spam.assassin.prefs.conf --lint
-D
>
>
>
> to make sure it picks up the bayes paths etc etc and also the -C when
> using the learn option....
>
>
>
> --
> Martin Hepworth
> Snr Systems Administrator
> Solid State Logic
> Tel: +44 (0)1865 842300
>
>
> Billy A. Pumphrey wrote:
>
>>One step further....
>>
>>I installed DB_files...ran a few things that I now forget.
>
> Spamassassin
>
>>--learn is what I think I did.  Here is what I have now.
>>
>>debug: Final PATH set to:
>>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/loca
>>l/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/sbin:/usr/sbin:/usr/bin
>>debug: ignore: using a test message to lint rules
>>debug: using "/usr/share/spamassassin" for default rules dir
>>debug: using "/etc/mail/spamassassin" for site rules dir
>>debug: using "/root/.spamassassin" for user state dir
>>debug: using "/root/.spamassassin/user_prefs" for user prefs file
>>debug: using "/root/.spamassassin" for user state dir
>>debug: bayes: 8191 tie-ing to DB file R/O
>
> /root/.spamassassin/bayes_toks
>
>>debug: bayes: 8191 tie-ing to DB file R/O
>
> /root/.spamassassin/bayes_seen
>
>>debug: bayes: found bayes db version 2
>>debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB <
>>200
>>debug: bayes: 8191 untie-ing
>>debug: bayes: 8191 untie-ing db_toks
>>debug: bayes: 8191 untie-ing db_seen
>>debug: Score set 1 chosen.
>>debug: Initialising learner
>>debug: using "/root/.spamassassin" for user state dir
>>debug: bayes: 8191 tie-ing to DB file R/O
>
> /root/.spamassassin/bayes_toks
>
>>debug: bayes: 8191 tie-ing to DB file R/O
>
> /root/.spamassassin/bayes_seen
>
>>debug: bayes: found bayes db version 2
>>debug: bayes: Not available for scanning, only 0 spam(s) in Bayes DB <
>>200
>>debug: bayes: 8191 untie-ing
>>debug: bayes: 8191 untie-ing db_toks
>>debug: bayes: 8191 untie-ing db_seen
>>debug: is Net::DNS::Resolver available? yes
>>debug: trying (3) amazon.com...
>>debug: looking up MX for 'amazon.com'
>>debug: MX for 'amazon.com' exists? 1
>>debug: MX lookup of amazon.com succeeded => Dns available (set
>>dns_available to
>>hardcode)
>>debug: is DNS available? 1
>>debug: all '*From' addrs: ignore at compiling.spamassassin.taint.org
>>debug: running header regexp tests; score so far=0
>>debug: running body-text per-line regexp tests; score so far=1.27
>>debug: Razor2 is not available
>>debug: running raw-body-text per-line regexp tests; score so far=1.27
>>debug: running uri tests; score so far=1.27
>>debug: uri tests: Done uriRE
>>debug: running full-text regexp tests; score so far=1.27
>>debug: Razor2 is not available
>>debug: Current PATH is:
>>/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/
>>sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin:/sbin:/usr/sbin:/usr/bin
>>debug: Pyzor is not available: pyzor not found
>>debug: DCCifd is not available: no r/w dccifd socket found.
>>debug: DCC is not available: no executable dccproc found.
>>debug: all '*To' addrs:
>>debug: RBL: success for 1 of 1 queries
>>debug: running meta tests; score so far=1.27
>>debug: is spam? score=1.27 required=5 tests=DATE_MISSING,NO_REAL_NAME
>>
>>I found this in the archive but I couldn't get that to work.  I had
>>already put the entries in spam.assassin.prefs.conf where I told bayes
>>to use /var/spool/spamassassin/bayes.
>>
>>
>
>
http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0403&L=mailscanner&D=0&H=
>
>>0&I=-1&O=T&T=0&P=290236
>>
>>I created the spamassassin directory manually and there is nothing in
>>there???
>>
>>Any ideas are greatly appreciated.  Thank you
>>-----Original Message-----
>>From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
>>Behalf Of Michele Neylon :: Blacknight Solutions
>>Sent: Thursday, May 13, 2004 9:41 AM
>>To: MAILSCANNER at JISCMAIL.AC.UK
>>Subject: Re: How to do Bayes
>>
>>Install the perl modules (latest versions) and the problems should be
>>solved.
>>
>>Mr Michele Neylon
>>Blacknight Internet Solutions Ltd
>>http://www.blacknight.ie/
>>Tel. +353 59 9137101
>>
>>
>>
>>
>>>-----Original Message-----
>>>From: MailScanner mailing list
>>>[mailto:MAILSCANNER at JISCMAIL.AC.UK] On Behalf Of Billy A. Pumphrey
>>>Sent: 13 May 2004 15:36
>>>To: MAILSCANNER at JISCMAIL.AC.UK
>>>Subject: [MAILSCANNER] How to do Bayes
>>>
>>>I am trying to get bayes running, this is my first time so I
>>>don't know exactly what I am doing.  I have tried the
>>>following things and I don't know what to do next.  Any help
>>>is appreciated because I just don't want to dig in and break
>>>something.
>>>
>>>- I have looked in the manual and not been successful
>>>- http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/98.html
>>>- http://www.mailscanner.biz/maq/#whatisbayes
>>>- http://www.sng.ecs.soton.ac.uk/mailscanner/serve/cache/103.html
>>>(results                below for this one)
>>>
>>>COMMAND: spamassassin -D --lint
>>>RETURNS:
>>>debug: bayes: DB_File module not installed, cannot use Bayes
>>>
>>>My first guess is to install the DB_File module.  I have found that
>>>here:
>>>http://www.cpan.org/modules/by-module/DB_File/
>>>Its almost obvious that I need to install this, do I and what
>>>version should I use?
>>>
>>>COMMAND: check_bayes_db
>>>RETURNS:
>>>[root at MailScanner tools]# perl check_bayes_db check_bayes_db
>>>is deprecated.  Please use 'sa-learn --dump'!
>>>saUse of uninitialized value in numeric lt (<) at
>>>/usr/lib/perl5/site_perl/5.8.0
>>>/Mail/SpamAssassin/BayesStore.pm line 1284.
>>>0.000          0          0          0  non-token data: bayes
>>>db version
>>>0.000          0          0          0  non-token data: nspam
>>>0.000          0          0          0  non-token data: nham
>>>0.000          0          0          0  non-token data: ntokens
>>>0.000          0          0          0  non-token data: oldest atime
>>>0.000          0          0          0  non-token data: current
>>>scan-count
>>>0.000          0          0          0  non-token data: last expiry
>>>atime
>>>
>>>COMMAND: sa-learn --dump
>>>RETURNS:
>>>Use of uninitialized value in numeric lt (<) at
>>>/usr/lib/perl5/site_perl/5.8.0/M
>>>ail/SpamAssassin/BayesStore.pm line 1284.
>>>0.000          0          0          0  non-token data: bayes
>>>db version
>>>0.000          0          0          0  non-token data: nspam
>>>0.000          0          0          0  non-token data: nham
>>>0.000          0          0          0  non-token data: ntokens
>>>0.000          0          0          0  non-token data: oldest atime
>>>0.000          0          0          0  non-token data: current
>>>scan-count
>>>0.000          0          0          0  non-token data: last expiry
>>>atime
>>>
>>>-------------------------- MailScanner list ----------------------
>>>To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
>>>Before posting, please see the Most Asked Questions at
>>>http://www.mailscanner.biz/maq/     and the archives at
>>>http://www.jiscmail.ac.uk/lists/mailscanner.html
>>>
>>
>>
>>-------------------------- MailScanner list ----------------------
>>To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
>>Before posting, please see the Most Asked Questions at
>>http://www.mailscanner.biz/maq/     and the archives at
>>http://www.jiscmail.ac.uk/lists/mailscanner.html
>>
>>-------------------------- MailScanner list ----------------------
>>To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
>>Before posting, please see the Most Asked Questions at
>>http://www.mailscanner.biz/maq/     and the archives at
>>http://www.jiscmail.ac.uk/lists/mailscanner.html
>
>
> **********************************************************************
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote confirms that this email message has been swept
> for the presence of computer viruses and is believed to be clean.
>
> **********************************************************************
>
> -------------------------- MailScanner list ----------------------
> To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
> Before posting, please see the Most Asked Questions at
> http://www.mailscanner.biz/maq/     and the archives at
> http://www.jiscmail.ac.uk/lists/mailscanner.html
>
> -------------------------- MailScanner list ----------------------
> To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
> Before posting, please see the Most Asked Questions at
> http://www.mailscanner.biz/maq/     and the archives at
> http://www.jiscmail.ac.uk/lists/mailscanner.html

**********************************************************************

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.

**********************************************************************

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html




More information about the MailScanner mailing list