You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jeff Morton <io...@gmail.com> on 2007/01/31 18:03:00 UTC

Learning bayes with spamc

I've set up spamassassin so that the bayes files are owned by 'nobody'
and are centrally located, and spamc is used to report spam or ham to
train the filter.  I have no problem training the filter by piping a
single file at a time into spamc.

The local.cf file contains:

bayes_path /etc/mail/spamassassin/bayes/bayes
bayes_file_mode 0700

Unfortunately, with this setup I have no way of using sa-learn to
train the filter, even using sudo to call sa-learn as nobody is a
problem because then I need to make sure user nobody can get to the
files being trained with.

Is there a way, then, to cause spamc to learn from an entire folder
without writing a bash for loop to pipe the files in one at a time?
If I do

  cat * | spamc -L spam

then I get

  Message successfully un/learned

Which doesn't tell me how many messages were un/learned so I'm not
sure that I can pass it a chunk of files that way.

Linux FC6
SpamAssassin Client version 3.1.7

Re: Learning bayes with spamc

Posted by Theo Van Dinter <fe...@apache.org>.
On Wed, Jan 31, 2007 at 12:03:00PM -0500, Jeff Morton wrote:
> Is there a way, then, to cause spamc to learn from an entire folder
> without writing a bash for loop to pipe the files in one at a time?

No.  spamc only knows how to deal with single messages.  If you want mbox,
mbx, or dir handling, you have to do it externally.

-- 
Randomly Selected Tagline:
I'll just sit back and smirk smugly now...