Bayse problem?

Glenn Steen glenn.steen at gmail.com
Wed Oct 11 19:13:06 IST 2006


On 11/10/06, Rob Morin <rob at dido.ca> wrote:
> interesting...  :)
>
> postfix at peter:~$ sa-learn --dump magic
> bayes: cannot open bayes databases /opt/MailScanner/bayes/bayes_* R/O:
> tie failed: Permission denied
> bayes: cannot open bayes databases /opt/MailScanner/bayes/bayes_* R/O:
> tie failed: Permission denied
> ERROR: Bayes dump returned an error, please re-run with -D for more
> information
>
> after making postfix the owner

Good move;-)
The difference between
> 0.000          0          0          0  non-token data: nspam
> 0.000          0          0          0  non-token data: nham
and
> 0.000          0         10          0  non-token data: nspam
> 0.000          0          1          0  non-token data: nham

show that it already is accumulating information automatically. When
both reach 200 (or whatever the limit has been set to... if changed
from the defaults), It'll start scoring too. You will notice that this
affects a lot of rules:).

>
> So should bayes learn now? or do i need to check somethign else...
> thanks for the quick reply!
> :)
It already is:).

(snip)
> [3673] dbg: config: using "/var/spool/postfix/.spamassassin" for user
> state dir
> [3673] dbg: config: using "/var/spool/postfix/.spamassassin" for user
> state dir
Set this in MailScanner.conf (SpamAssassin User State Dir or similar
(not at work ATM:)), and/or in your local.cf (or mailscanner.cf) (I
suppose one could well do this... No docs at home and my broadband
imitating a 9600 modem... You look it up:-)

These are further indicators that it cannot write to the standard
~postfix/.spamassassin directory (I usually "cure" this by creating
this directory and chowning it to postfix:postfix ... along with
.pyzor and .razor directories)
> [3673] warn: config: cannot write to
> /var/spool/postfix/.spamassassin/user_prefs: Permission denied
> [3673] warn: config: failed to create default user preference file
> /var/spool/postfix/.spamassassin/user_prefs
> [3673] dbg: config: using "/var/spool/postfix/.spamassassin/user_prefs"
> for user prefs file
(snip)
> [3673] dbg: bayes: tie-ing to DB file R/O /opt/MailScanner/bayes/bayes_toks
> [3673] dbg: bayes: tie-ing to DB file R/O /opt/MailScanner/bayes/bayes_seen
> [3673] dbg: bayes: found bayes db version 3
> [3673] dbg: bayes: DB journal sync: last sync: 0
> [3673] dbg: bayes: not available for scanning, only 1 spam(s) in bayes
> DB < 200
> [3673] dbg: bayes: untie-ing
> [3673] dbg: bayes: untie-ing db_toks
> [3673] dbg: bayes: untie-ing db_seen

These, although "sinister looking" are actually a good indicator that
it'll eventually start using it:-)... So... Looking good;)
(snip)
> [3673] dbg: plugin: registering glue method for check_pyzor
> (Mail::SpamAssassin::Plugin::Pyzor=HASH(0x91ac8f8))
> [3673] dbg: pyzor: pyzor is available: /usr/bin/pyzor
> [3673] dbg: info: entering helper-app run mode
> [3673] dbg: pyzor: opening pipe: /usr/bin/pyzor  check <
> /tmp/.spamassassin3673vQHtjGtmp
> [3792] dbg: util: setuid: ruid=103 euid=103
> [3673] dbg: pyzor: [3792] finished:  exit=0x0100
> [3673] dbg: pyzor: got response: Traceback (most recent call last):\n
> File "/usr/bin/pyzor", line 12, in ?\n    pyzor.client.run()\n  File
> "/usr/lib/pyt
> hon2.3/site-packages/pyzor/client.py", line 973, in run\n
> ExecCall().run()\n  File
> "/usr/lib/python2.3/site-packages/pyzor/client.py", line 174, in ru
> n\n    os.mkdir(homedir)\nOSError: [Errno 13] Permission denied:
> '/var/spool/postfix/.pyzor'
> [3673] dbg: info: leaving helper-app run mode
> [3673] warn: pyzor: check failed: internal error

Yep, you need create ~postfix/.pyzor too... and make postfix own it.

> [3673] dbg: plugin: registering glue method for check_dcc
> (Mail::SpamAssassin::Plugin::DCC=HASH(0x91d18a0))
> [3673] dbg: dcc: dccifd is not available: no r/w dccifd socket found
> [3673] dbg: dcc: dccproc is available: /usr/local/bin/dccproc
> [3673] dbg: info: entering helper-app run mode
> [3673] dbg: dcc: opening pipe: /usr/local/bin/dccproc -H -R <
> /tmp/.spamassassin3673vQHtjGtmp
> [3796] dbg: util: setuid: ruid=103 euid=103
> [3673] dbg: dcc: killed stale helper [3796]
> [3673] dbg: dcc: [3796] terminated:  exit=0xf100
> [3673] dbg: info: leaving helper-app run mode
> [3673] dbg: dcc: check timed out after 5 seconds

Hm, somethings bad with dccproc too... Needs some TLC too, it seems:-).

If I get the VPN to actually accept my credentials, I'll look at that
later tonight.

-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list