You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Tom Allison <to...@tacocat.net> on 2007/01/21 16:21:58 UTC

bayes 101

I just did an install of spampd on my debian box and am working my way through 
the different configurations...

First, I found that /var/cache/spampd/awl had the wrong permissions so I changed 
that and I stopped getting errors.  Interestingly, I have AWL disabled.  But I 
guess it likes to check anyways.  That seems reasonable.

Second, I enabled bayes with bayes_auto_learn also enabled.  Nothing else just 
yet.  I'm not into the per-user stuff or anything like that (won't work with 
spampd anyways).

But I'm not seeing anything in the system logs to indicate that anything 
bayes-ish is going on.  I can't yet check the actual message because I'm still 
running it between dummy stubs (postfix smtp-source and smtp-sink).

But I haven't anything in /var/cache/spampd/bayes which is what my bayes_path is 
set to.

I realize I can't get anything working until I get to a couple hundred emails, 
but I should see the database file in this directory, right?

Re: bayes 101

Posted by Gary V <mr...@hotmail.com>.
>OK, I removed the bayes directory such that /var/cache/spampd is a 
>directory but there is nothing 'bayes' in that directory (no file, no dir)
>
>cd /var/cache/spampd
>rm -rf bayes
>
>/etc/spampd.conf:
>     bayes_path /var/cache/spampd/bayes
>
>restart and ....
>
>[6651] dbg: bayes: no dbs present, cannot tie DB R/O: 
>/var/cache/spampd/bayes_toks
>
>Looks like I'm either missing permissions or it doesn't want to create this 
>file.
>Permissions are set to:
>/var/cache/spampd# ls -la
>total 20
>drwxrwxr-x  2 spampd spampd  4096 2007-01-21 11:36 .
>drwxr-xr-x 16 root   root    4096 2007-01-21 10:01 ..
>-rw-------  1 spampd spampd 12288 2007-01-21 10:27 awl
>
>and the /var/cache/spampd directory has:
>drwxrwxr-x  2 spampd   spampd   4096 2007-01-21 11:36 spampd
>
>
>>From what I get out of Mail::SpamAssassin::Conf
>the bayes_path setting for this configuration is correct.
>but I'm not seeing the _toks, _seen files getting generated.
>
>grr..

as the user in question, try 'sa-learn --sync'

Gary V

_________________________________________________________________
Laugh, share and connect with Windows Live Messenger 
http://clk.atdmt.com/MSN/go/msnnkwme0020000001msn/direct/01/?href=http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=hmtagline


Re: bayes 101

Posted by Tom Allison <to...@tacocat.net>.
Matt Kettler wrote:
> Tom Allison wrote:
>> Tom Allison wrote:
>>> I just did an install of spampd on my debian box and am working my
>>> way through the different configurations...
>>>
>>> First, I found that /var/cache/spampd/awl had the wrong permissions
>>> so I changed that and I stopped getting errors.  Interestingly, I
>>> have AWL disabled.  But I guess it likes to check anyways.  That
>>> seems reasonable.
>>>
>> [5411] info: config: SpamAssassin failed to parse line,
>> "/var/cache/spampd/bayes" is not valid for "bayes_path", skipping:
>> bayes_path /var/cache/spampd/bayes
>>
>>
>> debug helped.  But what does it mean?
>>
> Is there a directory named /var/cache/spampd/bayes/? If so, remove it,
> or change your bayes_path to /var/cache/spampd/bayes/bayes
> 
> bayes_path, despite it's name, is NOT a path. It's a path AND partial
> filename.
> 
> !DSPAM:45b38a7c119741622578420!
> 
> 

OK, I removed the bayes directory such that /var/cache/spampd is a directory but 
there is nothing 'bayes' in that directory (no file, no dir)

cd /var/cache/spampd
rm -rf bayes

/etc/spampd.conf:
     bayes_path /var/cache/spampd/bayes

restart and ....

[6651] dbg: bayes: no dbs present, cannot tie DB R/O: /var/cache/spampd/bayes_toks

Looks like I'm either missing permissions or it doesn't want to create this file.
Permissions are set to:
/var/cache/spampd# ls -la
total 20
drwxrwxr-x  2 spampd spampd  4096 2007-01-21 11:36 .
drwxr-xr-x 16 root   root    4096 2007-01-21 10:01 ..
-rw-------  1 spampd spampd 12288 2007-01-21 10:27 awl

and the /var/cache/spampd directory has:
drwxrwxr-x  2 spampd   spampd   4096 2007-01-21 11:36 spampd


 From what I get out of Mail::SpamAssassin::Conf
the bayes_path setting for this configuration is correct.
but I'm not seeing the _toks, _seen files getting generated.

grr..

Re: bayes 101

Posted by Magnus Holmgren <ho...@lysator.liu.se>.
On Sunday 21 January 2007 16:44, Matt Kettler wrote:
> Tom Allison wrote:
> > [5411] info: config: SpamAssassin failed to parse line,
> > "/var/cache/spampd/bayes" is not valid for "bayes_path", skipping:
> > bayes_path /var/cache/spampd/bayes
> >
> > debug helped.  But what does it mean?
>
> Is there a directory named /var/cache/spampd/bayes/? If so, remove it,
> or change your bayes_path to /var/cache/spampd/bayes/bayes

Should that really be a problem? The bayes module should be able to 
use /var/cache/spampd/bayes_* despite the directory /var/cache/spampd/bayes 
being there.

Would it be a bad idea to change the code such that bayes_path can optionally 
name a directory? Either by including a trailing slash or by there actually 
being a directory with the name in question. In these cases the files would 
simply be called toks, seen, and journal, without a prefix.

-- 
Magnus Holmgren        holmgren@lysator.liu.se
                       (No Cc of list mail needed, thanks)

  "Exim is better at being younger, whereas sendmail is better for 
   Scrabble (50 point bonus for clearing your rack)" -- Dave Evans

Re: bayes 101

Posted by Matt Kettler <mk...@verizon.net>.
Tom Allison wrote:
> Tom Allison wrote:
>> I just did an install of spampd on my debian box and am working my
>> way through the different configurations...
>>
>> First, I found that /var/cache/spampd/awl had the wrong permissions
>> so I changed that and I stopped getting errors.  Interestingly, I
>> have AWL disabled.  But I guess it likes to check anyways.  That
>> seems reasonable.
>>
>
> [5411] info: config: SpamAssassin failed to parse line,
> "/var/cache/spampd/bayes" is not valid for "bayes_path", skipping:
> bayes_path /var/cache/spampd/bayes
>
>
> debug helped.  But what does it mean?
>
Is there a directory named /var/cache/spampd/bayes/? If so, remove it,
or change your bayes_path to /var/cache/spampd/bayes/bayes

bayes_path, despite it's name, is NOT a path. It's a path AND partial
filename.

Re: bayes 101

Posted by Tom Allison <to...@tacocat.net>.
Tom Allison wrote:
> I just did an install of spampd on my debian box and am working my way 
> through the different configurations...
> 
> First, I found that /var/cache/spampd/awl had the wrong permissions so I 
> changed that and I stopped getting errors.  Interestingly, I have AWL 
> disabled.  But I guess it likes to check anyways.  That seems reasonable.
> 

[5411] info: config: SpamAssassin failed to parse line, 
"/var/cache/spampd/bayes" is not valid for "bayes_path", skipping: bayes_path 
/var/cache/spampd/bayes


debug helped.  But what does it mean?