[craig at crdic.ath.cx: Bug#166418: bogofilter: Piped mode (-p -e) doesn't work with -S or -s]

David Relson relson at osagesoftware.com
Sat Oct 26 06:25:55 CEST 2002


At 11:55 PM 10/25/02, Clint Adams wrote:

>----- Forwarded message from Craig Dickson <craig at crdic.ath.cx> -----
>
>The command "bogofilter -u -p -e" correctly processes a message, updates
>bogofilter's database, and pipes the message, with an X-Bogosity header
>added, to stdout. Logically, one might expect "bogofilter -S -p -e" or
>"bogofilter -s -p -e" to behave similarly, differing only in that the
>message would be assumed to be spam. However, the pipe options (-p -e)
>seem to be completely ignored when -s or -S is given; nothing appears on
>stdout at all; the message is lost. Either this should work as expected,
>or it should be documented that -p -e only works with -u.

Craig,

Those assumptions do seem reasonable.  However that is not how bogofilter 
works.

When bogofilter is registering words, i.e. when using '-s', '-n', '-S', and 
'-N' bogofilter can process multiple messages, for example a whole mailbox, 
and does not print the messages.  When registering words, flags '-p', '-e', 
and '-u' are not relevant and should not be used.

When bogofilter is run normally it classifies the message as spam or as 
non-spam. Flags '-p', '-e', and '-u' affect what it does with the message 
_after_ the message is classified.  Since flags '-s', '-n', '-S', and '-N' 
put bogofilter into registration mode, they should not be used when 
classifying, for example when using '-p', '-e', and '-u'

To summarize, flags '-s', '-n', '-S', and '-N' are for registration 
modes.  Flags '-p', '-e', and '-u' are all for classification mode.  The 
two sets of flags are separate and distinct.  They should not be used 
together and code will be added to prevent their being used together.  This 
behavior _does_ need to be documented.

Thanks for pointing this out.

David





More information about the Bogofilter mailing list