Filter Spam by Language in Gmail

By | 2009/05/13

DISCLAIMER: This post is not at all Ubuntu-specific, but it is Ubuntu-applicable. This tip will actually work on any platform as it is Gmail specific, and I know many of you are big Gmail fans.

I have had my Gmail account since the time of the earliest invites, and my email address is splattered all over the web these days. From site registrations to mailing lists, from stupid forward chains I got pulled into to.. well, you get the idea. The result of this is that I get A LOT of Spam in my Gmail account. Now, to Gmail’s credit, the vast majority of it gets deleted or put into my Spam folder automagically. I’m talking ~1000 emails into my Spam/Trash folder within a 24hr period. It’s ridiculous!

Recently I have been getting more and more Spam directly into my Inbox, so much in fact that I have all but abandoned my Gmail account for a new, personally hosted IMAP server. I had decided that, pending a solution to this rampant Spam, I would have to use something else. Well today I think I found that solution.

I was mentioning on Identi.ca that I wish Gmail had a language-based filtering option. Well, it turns out that they do, and that makes filtering foreign-language Spam a breeze!

Here are the steps I took toward creating a Russian-language filter:

  1. Click “Create Filter” located at the top of your Inbox
  2. In the “Has the words:” field, enter: lang:Russian
  3. Select “Delete it” within the Action List, and (if you have existing Russian Spam) select: “Apply Filter to Conversations below”
  4. Click “Create Filter”

I have only tested this briefly, but so far it has worked to filter out and clean up existing Russian (lang:Russian) and Chinese (lang:Chinese) Spam. I’m sure other languages work just as well.

I would suggest, before you “Apply Filter to Conversations below”, that you take a look at the matches. If you are on mailing lists, or have correspondence with international developers or community members, it could match their emails as well. Just be careful you don’t accidentally filter out emails you want!

If you have any other tips regarding Gmail Spam filtering please share them in the comments.

5 thoughts on “Filter Spam by Language in Gmail

  1. andy o

    You may very well already be aware of this, but you can append a '+' and some text to your account name and messages will be sent to your account as usual. For example [email protected]. This can easily be set up as a filter and will also easily enable you to find out who sold/passed on your address for spamming.

  2. Christer Edwards Post author

    Yeah, I have used that quite a bit when I'm submitting a web form. I notice that many sites don't validate the email properly if there is a '+' though, so I have to revert to the real address. It should just be legal to simply tar and feather and mame convicted Spammers. Maybe they'd stop, under fear of death.

  3. Guest

    Thanks! I'm getting most of my spam emails in Russian language. Even though Gmail filters atleast 90% of them, this still helps a lot!

  4. ovidiu

    you are a life saver. I get tons of russian spam which gets filtered but there is so much of it that I can’t even have a look into my spam folder to search for wrongly sorted mails …

  5. EJ

    Excellent – I’ve been looking for an answer to that one for quite some time. Setting it up today….
    Thanks!

Comments are closed.