specification of wordlist directory

David Relson relson at osagesoftware.com
Fri Dec 27 15:58:00 CET 2002


At 12:36 PM 12/27/02, Matthias Andree wrote:

>David Relson writes:
>>Matthias,
>>I've been thinking about directory names and here's what I remember:
>>1. If BOGOFILTER_DIR is defined, remember its value.
>>2. If not defined, check for HOME and remember its value.
>>3. When parsing the command line, "-d directory" can supercede any prior 
>>value.
>>So, neither environment variable is required and bogofilter shouldn't 
>>complain if neither is defined.  Bogofilter _should_ complain if there's 
>>no directory specified when it's time to open the wordlists.
>>Lastly, I've now made it possible to specify the directory name in the 
>>config file.  I'm thinking that config file takes precedence over 
>>environment variable and that command line takes precedence over config file.
>
>I'd think that the ordering goes (from weakest to strongest):
>1. configuration file
>2. environment $HOME
>3. environment $BOGOFILTER_DIR
>4. command line

When only one directory is wanted (allowed), the task is simple, i.e. given 
an ordering, take the strongest.  Whether environment or configuration 
should be stronger depends on the environment.  Some admins might want the 
cfg/env/cmd order you give.  Others might want cfg (as specified by the 
admin in /etc/bogofilter.cf) to override env settings.

For multiple wordlists, when all of config, HOME, BOGO, and command line 
are specified do we use all the wordlists found?

When updating wordlists, which directory gets the changes?

Like a kid with a hammer who wants to use it for all jobs requiring tools, 
I'm inclined to suggest config file options to control directory ordering 
and naming of update directory.  I also know I'm sometimes inclined to 
create too many options.  How do all you other bogofilter users want this 
handled?

>>Assuming that the above is right, we need to change the code to make it 
>>work in this manner.
>>There's an additional, older idea still around.  Bogofilter has code to 
>>work with a list of wordlists, i.e. more than just the two normally used.
>>At one time, using multiple "-d directory" switches on the command line 
>>would add pairs of good/spam wordlists for use in calculating a word's 
>>spamicity score.  We could allow multiple config file lines to name 
>>directories.  Doing this would allow an admin to configure a system 
>>wordlist plus allowing users to have their own wordlists.  Do we want to 
>>disable this or to fully enable it?
>
>Anticipating side-wide deployment with user-specific configuration, we 
>should consider enabling it.

I took a look at the code last night.  Some work is needed as multiple 
directories are not being properly added to the list of wordlists.

>--
>Matthias Andree
>
>---------------------------------------------------------------------
>FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html
>To unsubscribe, e-mail: bogofilter-dev-unsubscribe at aotto.com
>For summary digest subscription: bogofilter-dev-digest-subscribe at aotto.com
>For more commands, e-mail: bogofilter-dev-help at aotto.com





More information about the bogofilter-dev mailing list