procmail
[Top] [All Lists]

Re: Filter

2002-01-07 17:51:09
Thanks your for the Robert. I wll be fine-tuning my .procmailrc as the day
goes by and I hope to learn as many tricks and recipes as possible from
this list.

--Moonshi

On 7 Jan 2002, Robert Dege wrote:


1 more question while we are at it... if I need to run the "procmailrc"
rules against my existing folders, how do I do it?

I'm not sure if it can be done (easily at least).  It might involve
re-sending the mail, or some sendmail command line syntax.  IOW, I don't
know.

## SPAM
:0:
* .*whoever.net
| $FORMAIL -A"X-Sorted: Bulk >> /dev/null

## SORT mails
:0:
* .*list1.com
| $FORMAIL -A"X-Sorted: Bulk >> $MAILDIR/list1

:0:
* .*list2.com
| $FORMAIL -A"X-Sorted: Bulk >> $MAILDIR/list2

:0:
* .*anyone.com
| $FORMAIL -A"X-Sorted: Bulk >> $MAILDIR/anyone

You seem to be using formail where formail is not really needed.
Instead of | into formail, you can just specify the folder location.
Plus, you also need better regex for comparison.  ie:

:0
* ^Subject:.*junk
$MAILDIR/anyone




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

<Prev in Thread] Current Thread [Next in Thread>