procmail
[Top] [All Lists]

Re: cyberpromo got thru

1997-05-15 16:46:00
Bob Weissman wrote,

| Don't forget that procmail processes your .procmailrc sequentially.
| Just put your spam filter first.  I have a rather heavy-handed recipe
| which works well:
| 
|     # Anything with cyberpromo.com anywhere in the header other than
|     # the subject is spam.
|     :0
|     * \<cyberpromo\.com\>
|     * ! ^Subject: .*\<cyberpromo\.com\>
|     {
|           EXITCODE=77
|           :0:
|           spam
|     }

Unfortunately, Bob's recipe will pass any mail with "cyberpromo.com" in the
subject, even if it comes from cyberpromo.com.  Try this (and we'll count
lines, not strings, just in case "cyberpromo.com" occurs twice in the
subject: for example, a legitimate letter from a friend has a subject of "I'm
sick of cyberpromo.com!  Damn cyberpromo.com to hell!").

    :0
    * 1^1 ^.*\<cyberpromo\.com\>
    * -1^1 ^Subject:(.*\<)?cyberpromo.com\>
    {
     EXITCODE=77
     :0:
     spam
    }

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