Making your Spam mail box easier to check for Ham...

Jonathan Hunt jonathan at xlcus.com
Fri Jun 27 21:49:39 CEST 2003


Hi folks,

I was thinking about how I could make checking my Spam mail box for Ham
a little quicker today, and thought it would be nice if I could see
the Spam scores for the messages without having to read each one.

My first thought was that I'd have get the score added to the
message subject, but I couldn't think of a way to do it easily.
Instead, I noticed that Mutt (the mailer I use to check my spam)
can be configured to display a general purpose mail header
called X-Label.

Using the following sed filter...

  sed
'/^X-Bogosity:.*spamicity=[0-9.]*/G;s/\(^X-Bogosity:.*spamicity=\([0-9.]*\).
*\)\(\n\)/X-Label: \2\3\1/'


...you can generate an extra header for the score that looks
something like this...

  X-Label: 0.987600


I use this in my .procmailrc file like this...

# Call bogofilter
:0fw
| bogofilter -u -e -p -o 0.49999 | sed
'/^X-Bogosity:.*spamicity=[0-9.]*/G;s/\(^X-Bogosity:.*spamicity=\([0-9.]*\).
*\)\(\n\)/X-Label: \2\3\1/'


You can then put a line similar to the following in your .muttrc file
(It's the %-4.4y bit that does the business) to display the score in
the message index...

  set index_format="%4C %Z %{%b %d} %-15.15L (%4l|%-4.4y) %s"


This produces an index that likes something like this...

   1   T Jun 27 Laverne Hanna   ( 146|1.00) harce movtise
   2     Jun 27 NetAlert        (  58|1.00) start making money on your t
   3   + Jun 27 Stewart Washing (  26|0.99) I need some help..
   4     Jun 27 Ivory P. Donahu (  26|1.00) Love of your life!
   5   T Jun 27 Emory Hager     (  26|1.00) I need some help..
   6     Jun 27 Carol           ( 102|0.99) Bed Pillows: Starting at 4.9
   7     Jun 28 Merle Jones     (  49|1.00) Viagra, Phentermine, Xenical
   8     Jun 27 Jack J. Griffin (   9|1.00) Fwd: your computer
   9     Jun 27 Joseph M. Kelly (   9|1.00) Re: Wanna hear a story?
  10     Jun 28 Roosevelt Hickm (  41|1.00) Re: Prescription Medications


I've found it very useful.  It speeds up my "Spam folder Ham scan" no end.
I hope others might find it useful too.

Perhaps something similar could be included into Bogofilter in a future
version?  Perhaps an option to add the score to the subject, or a user
defined header like X-Label?

Cheers,

--
Jonathan Hunt
http://sytes.org/






More information about the Bogofilter mailing list