I run sa-learn as root all the time, though I don't use spamd, rather I use amavisd-new. In my local.cf I do have:


bayes_path /usr/local/amavis/.spamassassin/bayes bayes_file_mode 0770

Guess that should really be 0660. I'm not sure I've ever done a --rebuild manually, if it has done it automatically the files are still owned by the amavisd user. My first guess would be that some script is doing something manually to the database (copying it perhaps without -a?).

Ryan Moore
----------
Perigee.net Corporation
704-849-8355 (sales)
704-849-8017 (tech)
www.perigee.net

David B Funk wrote:
On Fri, 21 Nov 2003, Gorm Jensen wrote:


I run sa-learn as root using SA 2.55 and 2.6 on two redhat systems.
Both systems run spamd and call spamc from procmail with -u user1 (or
user2).  Because there are only two users, each system has a common
bayes database with file access permitted to both users.

Occasionally, I have discovered that the ownership of one of the bayes
files has been changed from spamd.spamd to root.root.  This change
renders my bayes database unreachable because I run spamd as user
"spamd".

I can't find a workaround in the docs.  Is there one, or do I have to
change the ownership somehow?


Revisiting your message, you say: "I run sa-learn as root"
So you may be doing it to yourself.

When you run sa-learn it rebuilds the database as part of its operation
unless you add the option "--no-rebuild". Sometimes when rebuilding
the database it creates a new bayes_toks file rather than just updating
the existing one. If that happens when you (root) are running it, the
new file is owned by root.

So I see a few possible workarounds:
1) always run sa-learn as "spamd" not root
2) always give sa-learn the --no-rebuild option and let spamd do the
   rebuild
3) always check the bayes file ownership after a sa-learn run.

Dave


--


Ryan Moore
----------
Perigee.net Corporation
704-849-8355 (sales)
704-849-8017 (tech)
www.perigee.net



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to