Integrate SpamBayes into a Win32 application2
Hi, I want to integrate SpamBayes into a Win32 application and I would like to ask your help for it. I read about something similar on the internet and there the sb_bnfilter has been suggested as a solution. I downloaded the sources from CVS and I tried to compile the C version of the sb_bnfilter but it isn't possible because it has several Unix specific C commands, which doesn't exists under Win32. But before I continue to work with sb_bnfilter I would like to get some more inormation about SpamBayes. Here are my questions, please answer them: 1, first at all what are the main modules of the SpamBayes? In the sources I see several files, but I am sure only a few is related to the main functionality and the rest is UI or for other things. 2, what is the architecture of the app? it is a client-server application, meaning a server daemon is running in the background and one or more clients are connecting to it to request mail scanning services? Or it is a stand-alone application, which is loaded in memory every time when a mail is scanned then is unloaded when it finish? 3, what storage is used to save the training informations and where is it located? 4, what is the minimum required source files to have Spambayes working? Here I mean working without UI and use it in command line, by sb_filter. PS: I apologize posting this message for second time but the first one has been sent by mistake in HTML format. Thanks, Vilmos
I want to integrate SpamBayes into a Win32 application and I would like to ask your help for it. I read about something similar on the internet and there the sb_bnfilter has been suggested as a solution. I downloaded the sources from CVS and I tried to compile the C version of the sb_bnfilter but it isn't possible because it has several Unix specific C commands, which doesn't exists under Win32.
I'm not familiar with sb_bnfilter, but I'm fairly sure it is a 'helper wrapper' for spambayes - it is not necessary for the core spambayes functions, but used to make life simpler for certain users. You should read the source to see exactly what it does.
But before I continue to work with sb_bnfilter I would like to get some more inormation about SpamBayes. Here are my questions, please answer them: 1, first at all what are the main modules of the SpamBayes? In the sources I see several files, but I am sure only a few is related to the main functionality and the rest is UI or for other things.
The UI and message database are fairly key features - but the core of spambayes itself is really the spambayes\tokenizer.py
2, what is the architecture of the app? it is a client-server application, meaning a server daemon is running in the background and one or more clients are connecting to it to request mail scanning services? Or it is a stand-alone application, which is loaded in memory every time when a mail is scanned then is unloaded when it finish?
Please check out the docs. There are a few ways it operates - one is by using a "proxy", which is a long-running process that your mail client connects to instead of the real mail server. Another is integrated into outlook, so that also is a long-running process. There are also scripts to perform various operations from the command-line, and they tend to perform what was requested and then terminate.
3, what storage is used to save the training informations and where is it located?
There are a few formats supported - spambayes\storage.py has the implementation.
4, what is the minimum required source files to have Spambayes working? Here I mean working without UI and use it in command line, by sb_filter.
I don't believe anyone knows the answer to that. Everyone here is concerned with making spambayes work as a whole. There has been no attempt to reduce it down to the minimum possible. To look at it another way, what you see today *is* the minimum possible to support all current and supported uses of spambayes. Other apps with different requirements and different feature sets may well have a smaller set possible. I hope this helps, Mark
participants (2)
-
Mark Hammond -
Vilmos Schnedarek