DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: TheBat! Filter for Russion/Chinese Spam  (Read 11,208 times)

Jibz

  • Cold Warrior
  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Participated in NANY Challenge Four Times
TheBat! Filter for Russion/Chinese Spam
« on: May 06, 2005, 02:49 PM »
I've had a bit of a problem recently with Russian spam, and thought I would share a simple filter I made for TheBat! v3 that seems to work ok:

Condition:
Recipient contains: <my_e-mail_address>
AND Subject match (?:[\x80-\xff]{3}.*?){3}
AND Subject does not match \w{4}

Actions:
- Mark the message as read
- Move to the folder \\<my_e-mail_address>\$JUNK$

The first regexp looks for three groups of 3 characters in the high ascii range -- this covers Russian and Chinese symbols. The second regexp makes sure a subject with some regular word in it does not get filtered, by looking for 4 consecutive normal characters.

Hope it's useful to somebody :Thmbsup:.
"A problem, properly stated, is a problem on it's way to being solved" -Buckminster Fuller
"Multithreading is just one damn thing after, before, or simultaneous with another" -Andrei Alexandrescu

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: TheBat! Filter for Russion/Chinese Spam
« Reply #1 on: May 06, 2005, 02:50 PM »
works great for me!! awesome.

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
Re: TheBat! Filter for Russion/Chinese Spam
« Reply #2 on: May 06, 2005, 09:12 PM »
Jibz, may i post your idea over at the email discussions forum.  www.emailaddresses.com/forum. ; Some there may find it useful.

Regards,

Jeff

Jibz

  • Cold Warrior
  • Developer
  • Joined in 2005
  • ***
  • Posts: 1,187
    • Programming School - Stage 1 Medal
    • Coding Snacks
    • Participated in NANY Challenge Four Times
Re: TheBat! Filter for Russion/Chinese Spam
« Reply #3 on: May 07, 2005, 08:28 AM »
Sure, feel free to do that :).

I'm sure there are more clever ways to do it, but this one seems to work ok on my problem. It lets a few of them through, but I figured better safe than sorry :up:.
"A problem, properly stated, is a problem on it's way to being solved" -Buckminster Fuller
"Multithreading is just one damn thing after, before, or simultaneous with another" -Andrei Alexandrescu

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: TheBat! Filter for Russion/Chinese Spam
« Reply #4 on: May 18, 2005, 08:19 AM »
jibz' filter wasnt working on some chinese for me, but i discovered something cool,
even though its not in the drop down list,
you can create a filter to look at the encoding language of the email, and thus catch email send in a specific character enocding.

create a filter, use header-field
and then type in the dropdown box: Content-Type

(you can see the content type of a message by doing view -> RFC-822 headers)

then choose contains, and specify the text in Content-Type you want to test for (see the headers to examine specific email content language types).
the email i was looking at said
Content-Type: text/plain;charset="GB2312"

that charset entry is specifying the encoding language
so i just used GB2312

and that gives me a filter that will catch all email sent to me in simplified chinese.

vrgrrl

  • Columnist
  • Joined in 2005
  • ***
  • Posts: 80
Re: TheBat! Filter for Russion/Chinese Spam
« Reply #5 on: July 08, 2005, 04:06 PM »
ah, cool! i've also been getting a lot of korean spam -- mouser's extra filter comment is working on that. nice tag team effort, mouser and jibz! fight the spam!

Original address: https://www.donationcoder.com/forum/index.php?topic=237.0