<<< Date Index >>>     <<< Thread Index >>>

Re: Two beginner problems - formail and bogofilter



On Wednesday, November  2 at 10:49 AM, quoth Carthik Sharma:
$ formail -s procmail < Inbox

I let it run overnight, and then in the morning, I found that only a
few messages had been processed. Significantly, some messages were not
re-delivered correctly. Does this always take a long, long time, or is
there a problem with how I am doing it?

No idea - I don't use formail much (I don't trust it -- it ends up mangling messages more than I think it should).

But, it may be faster to first convert your Inbox to a Maildir, and then send them through procmail, like so (uses this perl script: http://www.qmail.org/mbox2maildir -- remember to make a copy of your inbox first, as the script is destructive):

   env MAIL=Inbox MAILDIR=Inbox.tmp/ mbox2maildir
   for msg in Inbox.tmp/new/* ; do
       procmail < $msg &
   done

Problem 2:
I have the following macro for unmarking a message as spam, marking it
as normal mail and re-filtering it:
macro   index   H       "<enter-command>unset
wait_key\n<pipe-entry>bogofilter -Sn -l\n<pipe-entry>formail -I
X-Bogosity|procmail\n<enter-command>set wait_key\n<delete-message>"
"Unmark as spam, mark as non-spam and refilter to correct mailbox"

The problem is that whenever I press H from some folder, it take about
1-2 minutes before I can use mutt again, since I have to wait for the
processing to complete before I can resume using Mutt. With about 100
message in my "unsure-bogofilter" folder that need to be marked as
"not-spam" this wait is unacceptable.
Is there something I can do to ensure that the re-processing occurs in
the background, so I can continue to use Mutt after using the "H"
macro?

Have you tried putting an ampersand in the command? Like so:

macro index H "<enter-command>unset wait_key<enter><pipe-entry>bogofilter -Sn -l &<enter><pipe-entry>formail -I X-Bogosity|procmail &<enter><enter-command>set wait_key<enter><delete-message>" "Unmark as spam, mark as non-spam and refilter to correct mailbox"

I tried unsuccessfully to tag all the messages and try to do an "H" on
tagged messages - what is the right way of invoking a macro on all
tagged messages?

By default? It's the ; key. You may also be interested in the auto_tag preference (set auto_tag).

Also, after 3 weeks, bogofilter still incorrectly marks spam as ham
and ham as "unsure". Is this normal?

No idea - I've never used bogofilter (I'm a spamassassin devotee). Just fyi, all bayesian databases rely more on the volume than the time. So if, in the course of 3 weeks, you've only gotten 4 spam messages (for example), it's probably not going to be very accurate.

This is one of the main problems with filters that are exclusively bayesian.

~Kyle
--
One of the world's greatest problems is the impossibilty of any person searching for the truth on any subject when they believe they already have it.
                                                         -- Dave Wilbur

Attachment: pgpk8SKFocKSd.pgp
Description: PGP signature