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.

If so, are you SURE this is going to use the same bayes db as calling
spamc?

Important points to check before answering the second question:

-Are you in fact running this as the same user that invokes spamc? Note
this is NOT always the same as the recipient. It's often "mail" "root"
"nobody" "amavis" or a similar daemon user. Try manually passing the
message to spamc and compare the results.

-Messages run through spamc/spamd will NEVER use root for a bayes DB,
but the spamassassin command will. spamc/spamd will use "nobody" if
called as root. (and "nobody" should NOT have a writable home directory,
thus should have no bayes database, unless someone foolishly made a
writeable homedir for nobody.)

-spamd might be started with the -u parameter, which forces a specific
user, regardless of who calls spamc. To get the same effect you'd need
to run "spamassassin" while SU'ed to that user.

 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
 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?

 tHanks!


Reply via email to