You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by brian <br...@geocel.com> on 2004/11/17 20:20:41 UTC
Configuring bayes lock file locations?
After upgrading to 3.0.1 I've been having problems with bayes. This may be
a question for the mimedefang guys, but I'll start here.
I have upgraded the databases, and its now reading correctly, as I get
bayes scoring now. However autoupdates are failing because of lock files...
In my config I have:
bayes_path /var/spool/MIMEDefang
Maillog is reporting:
Nov 17 12:54:02 lithium mimedefang-multiplexor[35151]: Slave 0 stderr:
bayes: lock: 35570 cannot create tmp lockfile
/var/spool/MIMEDefang.lock.host.domain.com.35570 for
/var/spool/MIMEDefang.lock: Permission denied
This seems to me a spamassassin error message. It appears that I need to
be able to configure where the lock file is written. /var/spool is not an
option since its not a very good idea to loosen permissions here for
obvious security reasons (not to mention mimedefang will tell you to sod
off until you fix it).
There's been some other weirdness with it looking for databases in
/var/spool/MIMEDefang/ ... using MIMEDefang_seen and MIMEDefang_toks
(instead of bayes_seen and bayes_toks)... but then going looking for
/var/spool/MIMEDefang_journal.
Anyway, if someone knows if its possible to configure where the lockfile is
written in spamassassin, that would be much appreciated.
brian.
Re: Configuring bayes lock file locations?
Posted by Jim Maul <jm...@elih.org>.
brian wrote:
> After upgrading to 3.0.1 I've been having problems with bayes. This may
> be a question for the mimedefang guys, but I'll start here.
>
> I have upgraded the databases, and its now reading correctly, as I get
> bayes scoring now. However autoupdates are failing because of lock
> files...
>
> In my config I have:
> bayes_path /var/spool/MIMEDefang
>
> Maillog is reporting:
> Nov 17 12:54:02 lithium mimedefang-multiplexor[35151]: Slave 0 stderr:
> bayes: lock: 35570 cannot create tmp lockfile
> /var/spool/MIMEDefang.lock.host.domain.com.35570 for
> /var/spool/MIMEDefang.lock: Permission denied
>
> This seems to me a spamassassin error message. It appears that I need
> to be able to configure where the lock file is written. /var/spool is
> not an option since its not a very good idea to loosen permissions here
> for obvious security reasons (not to mention mimedefang will tell you to
> sod off until you fix it).
>
> There's been some other weirdness with it looking for databases in
> /var/spool/MIMEDefang/ ... using MIMEDefang_seen and MIMEDefang_toks
> (instead of bayes_seen and bayes_toks)... but then going looking for
> /var/spool/MIMEDefang_journal.
>
The behavior your seeing is correct for the settings you are using.
Remember, bayes_path is not really a path, but a path + beginning of the
bayes files. Therefore, /var/spool/MIMEDefang as a bayes path will
leave you with files called /var/spool/MIMEDefang_toks, _journal, etc.
If you meant to actually have all files stored in a
/var/spool/MIMEDefang/ directory, then you will need to set bayes path
to /var/spool/MIMEDefang/bayes so that it will prepend all files in the
/var/spool/MIMEDefang directory with "bayes_"
Hope this helps.
-Jim
Im not sure if this is already an FAQ or not, but it definitely should
be. With the misnomer "Bayes path" and the number of people asking
about this, it could save some time.
Re: Configuring bayes lock file locations?
Posted by alan premselaar <al...@12inch.com>.
brian wrote:
> After upgrading to 3.0.1 I've been having problems with bayes. This may
> be a question for the mimedefang guys, but I'll start here.
>
> I have upgraded the databases, and its now reading correctly, as I get
> bayes scoring now. However autoupdates are failing because of lock
> files...
>
> In my config I have:
> bayes_path /var/spool/MIMEDefang
>
> Maillog is reporting:
> Nov 17 12:54:02 lithium mimedefang-multiplexor[35151]: Slave 0 stderr:
> bayes: lock: 35570 cannot create tmp lockfile
> /var/spool/MIMEDefang.lock.host.domain.com.35570 for
> /var/spool/MIMEDefang.lock: Permission denied
>
> This seems to me a spamassassin error message. It appears that I need
> to be able to configure where the lock file is written. /var/spool is
> not an option since its not a very good idea to loosen permissions here
> for obvious security reasons (not to mention mimedefang will tell you to
> sod off until you fix it).
>
Brian,
This has been discussed on the MIMEDefang list in the past. It
appears to be a timing issue between MIMEDefang and the SA locking
mechanisms. adding 'bayes_learn_to_journal 1' to your sa-mimedefang.cf
file should resolve your problems. (at least it resolved the problem for me)
hope this helps.
alan