mailbox classificataion [was: announce 0.10.1]

Boris 'pi' Piwinger 3.14 at logic.univie.ac.at
Thu Jan 23 19:52:00 CET 2003


David Relson <relson at osagesoftware.com> wrote:

>>It would be nice (more consistent) if -v would also work on
>>mboxes.
>
>"-v" is a printing option that is secondary to what bogofilter really does 
>which is (1) _register_ words in a wordlist so that (2) it can _classify_ 
>an email message using the wordlists.  bogofilter can both classify and 
>register and doesn't have to have the "-v" option.  I think what you're 
>asking for is to have bogofilter classify a mailbox of messages.

Right. This is indeed an unclear situation.

>Suppose we did allow "bogofilter < mailbox".  What would the output be?
>
>With no options, bogofilter classifies a message and provides an exitcode 
>of 0 or 1 as its classification.  I don't see an extension of this to a 
>mailbox.

This is right, but actually I don't see a situation where is
would be advisable to classify an mbox as a single mail.

>If you used "-v" and bogofilter could classify a mailbox, the output would 
>be a series of X-Bogosity lines like:
>
>X-Bogosity: Yes, tests=bogofilter, spamicity-0.95
>X-Bogosity: No, tests=bogofilter, spamicity-0.15
>X-Bogosity: No, tests=bogofilter, spamicity-0.03
>X-Bogosity: Yes, tests=bogofilter, spamicity-0.95

This is what I expected.

>A series of status lines with no other information is not too useful.

Talking about the exit code you are right.

>The last way to operate is to use "-p" with the mailbox.  Using 
>passthrough, each message header would have an X-Bogosity line added to 
>it.  

Sounds sound.

>Now you have an output that's an expanded mailbox.  You still need to 
>filter/separate the messages into appropriate files/folders, don't 
>you?  

Yes, but you may take this classified mbox wherever you like
before proceeding. But which sense would it make to treat it
as a single mail?

>So, why not use formail/procmail/milter to split the mailbox and give 
>bogofilter individual messages?

Of course, you can use formail -es, but we support -sSnN
with mboxes already. Strictly speaking this would not be
needed.

>Stated more briefly, the problem with classifying a whole mailbox is in 
>returning information about individual messages.  I lack a solution.  What 
>is yours?

I'm not sure everybody will like it: If you classify an mbox
(-p or no option) the result will be bogus. So we should
return either an error exit code or a special code which is
distinct from the codes for single mails.

pi




More information about the Bogofilter mailing list