[spambayes-dev] Setting up a new account

Sjoerd Mullender sjoerd at acm.org
Mon Oct 6 03:57:12 EDT 2003


Meyer, Tony wrote:
>>It seems to me the ideal situation would be: if given the correct
> 
> flag, 
> 
>>start a web server.  If, in addition, given the -b flag, 
>>start a browser. I don't think you want to loose the 
>>possibility of running a one off training session without starting a
>>web server.
> 
> 
> This is what current cvs does now:
>   * If you give it "-c", it classifies.
>   * If you give it "-t", it trains.
>   * If you give it "-b", it starts the web server and opens a browser
> window.
>   * If you give it "-h", it shows the help.
>   * If you give it nothing, it starts the web server.
> 
> Only the 'c' and 't' switches can be used together, the rest are
> mutually exclusive.
> 
> Does this seem reasonable?  It does nicely match sb_server, which makes
> for a more consistent feel to spambayes.  I wonder whether if the 'l'
> switch is given, it should also start the web server, since otherwise
> you have to stop it to change any configuration.  Since I don't actually
> use imapfilter myself, I don't know whether this matters or not.

This sounds reasonable.
Starting a server when the -l flag is given also sounds reasonable, 
although I can imagine you might not want to start one for security 
reasons (since there is no authentication, just IP address-based security).

What I think is more important than having a server start when given the 
-l flag is proper locking and synching of the database (closing and 
reopening it) by the filter.  If you have that, you can start multiple 
imapfilter processes, each with different flags to do different things 
and you don't have to worry about the database getting corrupt.

I have added some locking to my version of imapfilter so that I can do 
just this.  I haven't checked it in since it is a fairly significant 
change of the way things work (not so much in the amount of code 
changed), plus it is not complete yet (there are probably still places 
where the program exits without closing and unlocking the database).

-- 
Sjoerd Mullender <sjoerd at acm.org>




More information about the spambayes-dev mailing list