procmail
[Top] [All Lists]

Re: Filtering already saved messages

1998-05-18 07:34:22

On Mon, 18 May 1998, era eriksson wrote:

On Mon, 18 May 1998 08:24:18 -0400 (EDT), Matt Cortes
<link(_at_)alpha(_dot_)pulsar(_dot_)net> wrote:
 > On Mon, 18 May 1998, Heinz Diehl wrote:
 >> On Sun May 17, 1998 at 11:23:53PM -0400, Matt Cortes wrote:
 >> > Ok, maybe I babbled in that last message. heh.. Simply put, I'd
 >> > like to know how I can filter my already existing mailbox
 >> > through procmail. Is it as simple as "cat mbox | procmail"??
 >> Try `cat <mailfile> | formail -ds procmail
 > What's the difference between the script in the procmail man file (Just
 > found that one out) and the commandline you just gave me?  Does it process
 > any differently?

It wastes one process on the unnecessary cat(*), and doesn't do any of
the locking that the thing in the man page does. 
  You don't need locking if you have an old file with some messages in
it which you want to reprocess; you +really+ want the locking if the
file you want to process is an active inbox which might receive more
mail at any time. This is always the case when you're processing your
primary inbox file, which is what the cron example in the man page is
about.

Makes sense to me.  I've been killing the sendmail deamon when I process
my mbox anyway so that I can restore an exact copy from backup when I'm
done testing.  I'm kinda anal about my mailbox and don't even want to have
the unread flag removed from any of my mails until I'm good and ready
to have them too.

One question I'm wondering..  I've got some older backedup mail too that I
might want to reprocess back into my main mail.  Now that I have procmail
that makes it pretty damn easy but of course the older mail I have has
literally thousands of messages I already have in my main mail.  Is there
anyway I can create a filter that would look at my old mail..  compare it
to my main mail and copy over only messages I don't already have in there?
If procmail can't do it..  maybe you know of something that can?
If not..  what process would you take?  Maybe filter the old mail into
different catagories to make it easy for me to manually go into the
different old mailboxes and delete messages I know I don't want then
combine them for a final filter back into the main fold?


Also on another note..  If I eventually do decide to process some old mail
into my main mailboxes in the future..  Is there a way I can resort my
mboxes so that the messages are in order from time recieved (last message
being most recent)?  I don't want to have a bunch of old mail at the
bottom of my mbox.  And the client sorting it temporarly during reading
isn't good enough either.  I'd like to sort it so it stays sorted.

 
Thanks much,

-Matt