procmail
[Top] [All Lists]

Re: Chinese-spam filter

2000-02-11 11:03:04
Updated version:
---

# WSP contains a space and a tab:
WSP="[     ]"
NWSP="[^     ]"
CNSPAM    # unset CNSPAM

:0
* $ ! ^Subject:$WSP*\[spam[0-9]*]
{
  # block "Received: 202.90-109.*.*"
  :0
  * $ ^Received:$WSP*.*202\.(10|9)[0-9]\.[0-9]+\.[0-9]
  { CNSPAM=spam1 }

  :0 E
  {
    :0BD
    * -1^1 .
    *  2^1 =[0-9A-F][0-9A-F]
    * 20^1 [ -þ]
    * 20^1 =[A-F][0-9A-F]
    { CNSPAM=spam2 }
  }

  :0         # if CNSPAM is set
  * CNSPAM ?? .
  {
    SUBJT    # unset SUBJectTail

    :0       # if subject has a non-blank character, set SUBJT
    * $ ^Subject:$WSP*\/$NWSP.*
    { SUBJT = " $MATCH" }
             # make Subject-header, even if there was none
    :0 fh w
    | $FORMAIL -I"Subject: [$CNSPAM]$SUBJT"
  }
}

---
Ruud


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