Mail filters: Was: Re: Prefs and window positions



On 2001.07.11 13:59 M . Thielker wrote:
> Karl O. Pinc wrote:
> > the issue isn't whether balsa or
> > procmail does mail filtering, the
> issue
> > is the interface, what the user
> > sees.  "If the user can't find it, it
> > isn't there."
> 
> Right! Also, procmail does many nifty
> things, but it cannot access IMAP
> folders on a remote server. So, if I
> wanted to have mail from a pop3 mailbox
> sorted into an IMAP folder, procmail
> won't do it. That's the original issue I
> had when I joined this list.

As long as you're working...  ;-)

I want a way to re-filter all the mesages in a mailbox, because I often
filter wrong, or add filters at a later date.  (Filters that deliver into
more than one mailbox could cause plenty duplication when re-filtering...)

FYI:

Now, this won't work for remote mailbox filtering, but I currently use
(pretty much straight out of the procmail man page):

--------------------------<snip here>-----------------------
#!/bin/bash
#
# Title: Filter a mbox mailbox
#
# Author: Karl O. Pinc
#
# License: GPL
#
# Date: Jun 22, 2001
#
# Syntax: refilter <mailboxpath>
#


# Exit if anything fails
set -e

BOX="$1"

DIR=$HOME/mail

cd $DIR

[ -f "$BOX" ] || {
                  echo $0: $BOX: not a file >&2
                  exit 1
                 }

# Not really necessary but...
[ ! -e .filtering ] || {
                        echo $0: .filtering: already exists >&2
                        exit 1
                       }

cat "$BOX" >> .filtering
cat /dev/null > "$BOX"
formail -s procmail < .filtering
rm .filtering
--------------------------<snip here>-----------------------

If I was using something other than mbox format I couldn't use formail to
feed procmail messages for re-delivery. 

Karl <kop@meme.com>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]