You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dermot Paikkos <de...@sciencephoto.com> on 2005/10/03 12:26:44 UTC

Bayes path trouble

Hi,

SpamAssassin version 3.1.0 running on Perl version 5.8.0
With Exim 4.43

I upgraded my SA to 3.1 recently and am having trouble with the 
bayes_path. My local.cf had the full path to my bayes as 
/usr/exim/.spamassassin. I had received a couple of warnings about 
this when I ran lint so changed the path to /usr/exim/spamassassin. 
Lint accepted this even though I hadn't got round to moving the 
directory. As I tested SA I notices in the logs:

error: mkdir /.spamassassin: Permission denied at 
/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1467
error: locker: safe_lock: cannot create tmp lockfile /.spamassassin
...snip

So I created the directory path /usr/exim/spamassassin and copied 
the files into it, ran lint and got 
warn: config: SpamAssassin failed to parse line, 
"/usr/exim/spamassassin" is not valid for "bayes_path". 

Is it not possible to give a full path for bayes?

I have read somewhere that the best value for the bayes_path is 
~/.spamassassin. I am not sure how this would translate on my 
system. Is this $HOME/.spamassassin? 

Thanx.
Dp.


Re: Bayes path trouble

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
Dermot Paikkos wrote:
> Hi,
> 
> SpamAssassin version 3.1.0 running on Perl version 5.8.0
> With Exim 4.43
> 
> I upgraded my SA to 3.1 recently and am having trouble with the 
> bayes_path. My local.cf had the full path to my bayes as 
> /usr/exim/.spamassassin. I had received a couple of warnings about 
> this when I ran lint so changed the path to /usr/exim/spamassassin. 
> Lint accepted this even though I hadn't got round to moving the 
> directory. As I tested SA I notices in the logs:

Yeah it can't create the file because the same named directory already 
exists.


> error: mkdir /.spamassassin: Permission denied at 
> /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin.pm line 1467
> error: locker: safe_lock: cannot create tmp lockfile /.spamassassin
> ...snip
> 
> So I created the directory path /usr/exim/spamassassin and copied 
> the files into it, ran lint and got 
> warn: config: SpamAssassin failed to parse line, 
> "/usr/exim/spamassassin" is not valid for "bayes_path". 
> 
> Is it not possible to give a full path for bayes?

Full path AND filename stub is required.


> I have read somewhere that the best value for the bayes_path is 
> ~/.spamassassin. I am not sure how this would translate on my 
> system. Is this $HOME/.spamassassin? 

 From the ultra-secretive (Mail::SpamAssassin::Conf) man page:

bayes_path /path/filename     (default: ~/.spamassassin/bayes)

        This is the directory and filename for Bayes databases.  Several
        databases will be created, with this as the base directory and
        filename, with "_toks", "_seen", etc. appended to the base.  The
        default setting results in files called "~/.spamassas-
        sin/bayes_seen", "~/.spamassassin/bayes_toks", etc.


So you'd want to use:

bayes_path	$HOME/.spamassassin/bayes

..which is probably the same as the default ~/.spamassassin/bayes


Daryl