procmail
[Top] [All Lists]

Re: Sorting into two mailboxes problem

2003-12-12 08:06:28
Mike Loiterman wrote:


This is my current procmailrc recipe and it works fine:

MAILDIR=/home/mike/mailsort/

:0c
{
        :0
        * ^X-Spam-Flag:.*\<YES\>
        spam

        :0
        nonspam
}

The problem is that it acts on *everyone's* email.  I'd like to
change it so that it only acts on my mail.  For various reasons this
must all go into a procmailrc file rather then in a .procmailrc file.

I'm skeptical about those reasons, but for academic purposes I'll accept their validity for the rest of thise post.

 :0c # do you really want copies and not originals in there?
 * LOGNAME ?? ^^mike^^
 {
   :0 # use :0: if the destination is an mbox
   * ^X-Spam-Flag:.*\<yes\>
   spam

   :0E # same comment about a second colon
   nonspam

   # comment the next line out if you take the `c' flag off
   HOST # kill clone in case of fall-through
 }

Hmm. Here's a way to handle that last part without needing to make two edits:

 OPID=$$

 :0c # do you really want copies and not originals in there?
 * LOGNAME ?? ^^mike^^
 {
   :0 # use :0: if the destination is an mbox
   * ^X-Spam-Flag:.*\<yes\>
   spam

   :0E # same comment about a second colon
   nonspam

   # kill clone in case of fall-through,
   # but be positive it's a clone!
   :0
   * $ ! OPID ?? ^^($$)^^
   { HOST }
 }


_______________________________________________
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>