procmail
[Top] [All Lists]

Re: conditional sort

1998-11-20 12:58:07
1998-11-20-09:56:36 Michael Johnson:
I have a mailing list I belong to and I want all mail sent to a given
folder EXCEPT mail from a specific person.

Exactly as stated, how about:

        :0
        * ^X-Loop: mailing-list
        * !^From: specific-person
        given-folder/

Whether you use X-Loop: or Sender: or whatever to recognize the list will
obviously depend on how the list's software sets up its headers. Likewise
whether you use From: or some other header to find the specific person.

Of course, if you want email for the mailing list from that specific person to
be handled in some other special way, e.g. tossed in the bit bucket, you might
want to do instead

        :0
        * ^X-Loop: mailing-list
        {
                :0
                ^From: specific-person
                /dev/null

                :0
                given-folder/
        }

Of course when I do a sternlight filter, I want to toss all mail from that
specific person whether it's to one list or another; in that case you want

        :0
        * ^From: specific-person
        /dev/null

        :0
        * ^X-Loop: mailing-list
        given-folder/

BTW, I don't use locks, since I use Maildirs exclusively; if you aren't using
Maildir you probably should start recipes with ":0:" rather than ":0".

-Bennett

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