-p works... mostly

Trevor Smith trevor at haligonian.com
Wed Aug 4 22:40:29 CEST 2004


I have a filter in KMail that uses bogofilter's -p option. KMail filters allow 
me to "pipe through" a program (in my case, 'bogofilter -p -e'). The docs say 
that if the program produces output to stdout, the entire email (including 
headers) is replaced by that output. Great.

So I filter every incoming email, sending it through bogofilter, replacing 
that email with the output of bogofilter -p -e and that gets me the original 
email plus a header line that says 'X-Bogosity: ...'

Then I have a filter that checks that bogosity header line, sorting email 
accordingly.

This works... most of the time. SOME times, no X-Bogosity header line gets 
inserted into the email. I'm at a loss how to figure out why. It might be 
KMail's filters not working (buy why on only some messages? I'm filtering on 
any mail with an @ symbol in the "To:" header line and the emails that are 
getting missed DO have an @ symbol in their To: headers). Or maybe it's 
bogofilter?

Does anyone know of a case where bogofilter -p would NOT insert an X-Bogosity 
header line in its output?

It may be only happening with ham emails, but I can't be sure yet...




More information about the Bogofilter mailing list