[spambayes-dev] followup: Windows implementation using Command line (forSpamBayes)

Rob McEwen webmaster at turnaprofit.com
Tue Jul 13 18:09:47 CEST 2004


Followup: Windows implementation using Command line (forSpamBayes)

Wow. Thanks Kenny. I'm going to try this. However, while I am a rather
accomplished vb.net and Javascript programmer, Perl/Python looks like
"greek" to me. Therefore, any additional help or suggestions are also
appreciated.

Regarding the "windows service" question, the stuff in the sb_bnserver
script may do the trick. Most importantly, I just don't want the performance
to be adversely impacted by the loading/unloading of the app for EVERY
SINGLE message. Also, at the same time, another concern I have is that, if
this single program stays in memory for this purpose, wouldn't I also need
to make sure that this program is multi-threaded for possible concurrent
operations... AND that THIS program "gets the call" (singleton model?)

...or are these things already taken care of?

Thanks,

Rob McEwen
PowerView Systems
rob at PowerViewSystems.com
(478) 475-9032
 

-----Original Message-----
From: Kenny Pitt [mailto:kennypitt at hotmail.com] 
Sent: Tuesday, July 13, 2004 11:45 AM
To: webmaster at powerviewsystems.com; spambayes-dev at python.org
Subject: RE: [spambayes-dev] Windows implementation using Command line
(forSpamBayes)

Rob McEwen wrote:
> Is there an implementation for SpamBayes for Windows as a Command
> line Utility? 
> 
> For example, some anti-virus programs (like McAfee VirusScan, F-Prot
> Antivirus for DOS, Grisoft AVG, etc.) can be invoked in a separate
> process, fed the path to the text file of the message to be process,
> return an "exit code" based on the results of scanning that message
> file. (or, possibly, add the appropriate header to the message).
> Also, training could be done by occasionally passing this command
> line tool a known-good "ham" folder and/or a known-bad "spam" folder.
> 
> Couldn't this same concept could be applied to spambayes?

Take a look at the sb_filter.py script.  We don't build it as a Windows
executable so you'll have to install Python and run from source to get it,
but I see no reason why it wouldn't work on Windows.

> Finally, could this be done as a windows service so that the program
> doesn't have to initialize and die with each individual request? 

You might be able to use the sb_bnfilter.py and sb_bnserver.py scripts,
which I believe are intended to do something similar to this.  Currently
sb_bnserver appears to run as a background process, not a Windows service,
but you could probably turn it into a service with a little Python hacking
based on the pop3proxy_service.py script.

-- 
Kenny Pitt




More information about the spambayes-dev mailing list