[Spambayes] Win32 Command Line

Tony Meyer tameyer at ihug.co.nz
Thu Oct 14 06:27:57 CEST 2004

> C:\sb\scripts>c:\python23\python.exe sb_filter.py -g -d 
> "c:\sb\scripts\hammie.db" < 2004-october.txt
> The file "hammie.db" is the db file from Outlook, copied and 
> renamed.  It's currently about 5mb, give or take.  I expected 
> that the file would grow in size as a result of running the 
> above command.  Sadly it does not.  I am receiving no error 
> at all, and am seeing the contents of the txt file dump back 
> out to stdout, which I think is good.

Yes, that's the correct output.  It may not grow in size, though, because
the tokens from that message might already be in the database, so it doesn't
actually need any more room.  Either check to see if the modified date has
changed, or run
  c:\python23\python.exe sb_server.py -o
Storage:persistent_storage_file:c:\sb\scripts\hammie.db -o

This should print out some information including the number of ham & spam
trained.  Check that they have changed.

(I tried this with my Outlook db, which is also about 5Mb, and the size
didn't change, but the date & sb_server report did).

> Then, I tried the following:
> C:\sb\scripts>c:\python23\python.exe sb_filter.py -f -d 
> "c:\sb\scripts\hammie.db" < ham1.mai
> ham1.mai is a file containing a single email known to be not 
> spam.  I see the output back in the screen, which is good.  
> But, the output exactly matches the input, with the exception 
> that some lines are now wrapped. Should there be 
> modifications to the file as it's pushed back to stdout?

Are you positive that it's exactly the same?  This works for me, and I get
the various SpamBayes headers added.  By default, I think the only one
you'll get is "X-Spambayes-Classification: {class}".  Are you sure you
didn't miss it?

=Tony Meyer

More information about the Spambayes mailing list