procmail
[Top] [All Lists]

Re: Rerun procmail filters on maildir folder.

2002-07-24 23:10:42
On Wed, Jul 24, 2002 at 11:16:03AM -0500, Philip Guenther wrote:

As with David's version, the '*' is expanded before procmail is first
invoked so you don't need to worry about infinite loops with this.


But I will end up with multiple copies of the same msg, no?
This snippet takes care of that.
Thanks a lot to both of you.

_____________________________
#!/bin/sh
MAILDIR=$1
TEMPDIR=$(mktemp -d)
PROCMAILRC=~/.procmail/procmailrc.m2

mv $MAILDIR/cur/* $TEMPDIR
mv $MAILDIR/new/* $TEMPDIR
for file in $(find $TEMPDIR); do
  procmail  $PROCMAILRC < $file
done
rm -fr $TEMPDIR
_____________________________



-- 
Alex Polite
http://plusseven.com/gpg/
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail