option precedence [was: bogofilter (-o) & bogoutil (-c) bugs]
David Relson
relson at osagesoftware.com
Mon Feb 17 20:22:01 CET 2003
At 02:08 PM 2/17/03, youwrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>On Mon, Feb 17, 2003 at 12:25:17PM -0500, David Relson wrote:
> > Since bogofilter doesn't track whether values come from the
> > command line or from the config file, it uses the last value it
> > sees. Thus if spam_cutoff is specified in bogo.cf, "bogofilter
> > -c bogo.cf -o .44 -qv" will give different results than
> > "bogofilter -o .44 -c bogo.cf -qv". When the code was written,
> > I couldn't think of a good way (read "simple, clean, and
> > elegant") to code a precedence like you suggest. Have you any
> > ideas on coding it?
>
>yes. Just read the config file first, then the command line
>options. If the command line options exist, they will
>automatically override the config file options.
That's easy, except it leaves out the "-c configfile" and "-C" (no config
file) options. I suppose one could make two passes over the command
line. It wouldn't be difficult. Neither would it be clean or elegant.
David
More information about the Bogofilter
mailing list