WalyBaly wrote:
> spamd -D
> debug: Score set 0 chosen.
> debug: Preloading modules with HOME=/tmp/spamd-18698-init
^^^^^^^^^^^^^^^^^^^^^^^^^^
> debug: ignore: test message to precompile patterns and load modules
> debug: using "/usr/share/spamassassin" for default rules dir
> debug: using "/etc/mail/spamassassin" for site rules dir
> debug: bayes: no dbs present, cannot scan:
> /tmp/spamd-18698-init/.spamassassin/bayes_toks
^^^^^^^^^^^^^^^^^^^^^^
> debug: Score set 1 chosen.
> debug: Initialising learner
> debug: bayes: no dbs present, cannot scan:
> /tmp/spamd-18698-init/.spamassassin/bayes_toks
^^^^^^^^^^^^^^^^^^^^^^
Er, quite aside from what you're trying to do, this just looks very
seriously WRONG. /tmp is NOT somewhere you want to keep persistent data
such as a global Bayes database...
> and my whole objective is to apply bayes learning to all my users in
> /var/spool/mail ??
For 2.63, you'll need directives something like this:
bayes_learn_to_journal 1
bayes_auto_expire 0
bayes_path /var/SpamAssassin/bayes
bayes_file_mode 0777
in a .cf file in /etc/mail/spamassassin. (I use local.cf.) Change the
path to suit yourself as to where you want the bayes_* files to end up.
Note that in the most "common/standard" systemwide setup (spamd run as
root, spamc called from each user's .procmailrc as that user), this
*MUST* be at least a group-writable directory, unless you also want to
disable autolearn. I have it setuid to the group that all mail users
are members of; early on I had permissions trouble that didn't go away
otherwise.
bayes_file_mode is set as it is so that autolearning can take place.
With bayes_auto_expire set to 0 (off), you'll also need a cron job to do
the expiry. I use this in /etc/crontab (watch for linewrap):
02 5 * * * root /usr/bin/sa-learn -p /root/.spamassassin/user_prefs
--rebuild --force-expire
Note that you may not require the " -p /root/.spamassassin/user_prefs "
part; I got odd behaviour when I left it off. Strangely enough, I have
no non-comment entries in that file...
Then to learn from all mailboxes in /var/spool/mail (a BAD idea IMO -
what about FNs that have slipped through any existing filtering?) run
"sa-learn --spam --mbox --no-rebuild /var/spool/mail/*". (I *think*
that should work; IIRC I've used something similar learning sets of
mboxes all together.)
-kgd
--
Get your mouse off of there! You don't know where that email has been!