freightcar wrote:
>> First, by "check in debug mode" do you mean running spamassassin -D?
>
> i was using spamassassin -dtD but as root user :-( and all bayes data
> were learnt as root user too.
>
> that was exactly my problem. debug as root while spamd was running as
> spamd. now I updated /etc/mail/spamassassin/local.cf with
> bayes_path /var/spool/spamassassin/bayes
> bayes_file_mode   0666
Ouch! Fix that.. It should be bayes_file_mode 0777 NOT 0666. (note: the
default is 0700 not 0600)

The mode can in some cases be used in the creation of directories, and
if you use 666 they will break.

Also, this isn't really a mode as much as a mask, and SA won't request
the "x" bit for the normal database files, so they'll end up 666 even
with a "mode" of 777.



> and re-learnt the bayes data (fortunatelly I have enough spam mails so
> I can do it easily)
>
> now i guess if i keep using root for sa-learn it will update the
> /var/spool/spamassassin/bayes db, while the spamd will be able use it
> too. am i right?

Well, it will update the bayes DB in /var/spool/spamassassin/. not
/var/spool/spamassassin/bayes/. Note that "bayes_path" is a path plus
partial filename, so the last bit is actually the start of the name of
the bayes database file.

Asside from that, Yes it will work. In fact, you can sa-learn as any
user. The only other thing to do is make sure thaat the
/var/spool/spamassassin/ directory is chmod 777, and make sure you DO
NOT create a directory named /var/spool/spamassassin/bayes/. (creating
this directory can break locking, as SA tries to do file-ops on
/var/spool/spamassassin/bayes*)





Reply via email to