An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to

July 30, 2008

Bypass Gmail's Spam Filter

If you wanted a way to bypass Gmail's spam filter, now it's possible. Just create a filter that describes the cases when Gmail should not flag the incoming messages as spam and then check "Never send it to spam". To bypass the filter for all the messages flagged as spam, type label:spam in the "Has the words" input box.

I intended to use the new option for my secondary Gmail accounts that automatically forward messages to my main account, but it doesn't seem to work. Until now, the spam messages were not forwarded and I didn't receive many important messages that were mistakenly flagged as spam. Since I can't bypass the spam filter and forward the messages to a different account, another idea would be to use Gmail's mail fetcher for my main account and download the messages from the secondary accounts.

There's one situation that doesn't require to set up a filter: if the messages from certain senders are constantly flagged as spam and they shouldn't be, just add them to your contacts list.

{ via Blogoscoped Forum }


  1. I have a better idea.
    type *@* in the "From" input box.
    Then check "Never send it to spam"
    Please let me know if it works for you.

    I also have primary and secondary gmails connected by "imap"

  2. It's enough to use label:spam in the filter. There are two kinds of incoming messages:

    (1) those that are flagged as spam
    (2) those that aren't flagged as spam

    The filter only applies to the first category, since it's not necessary for the second one.

    What I don't understand is why you can't set up a filter that forwards messages marked as spam to a different account.

  3. I get this message when trying to use your filter.

    "Warning: Filter searches containing "label:", "in:", or "is:" criteria are not recommended, as these criteria will never match incoming mail.

    Do you still wish to continue to the next step?"

    Why you forward if you can POP/IMAP?

  4. I think, what using is:spam or in:spam operators for spam filtering is better, than label:spam.

    1. I used label:spam and now get NO mail in the spam box. How do I UNDO that and make it is or in spam? Occasionally some regular emails go to spam or have in the past.

  5. @avkuzmin:
    It's the same thing. In Gmail, every view is actually a label, so you can search for

    Gmail's warning should be ignored because messages are marked as spam before running the filter.

  6. Just a heads up. I happen to see this new feature in Google Reader.

  7. spam letters do not passthru main forward rule :(

  8. I've been using gmail on my home computer for a couple of years and it has been very spam-free without any intervention on my part. Just got a new laptop and I'm seeing quite a bit of spam coming thru. Using POP, same account, btw.

    I'm away from home so I cannot compare on a one-to-one basis. When I look at the spam box on the html gmail I see it is indeed catching some spam but I'd say only about half.

    Is there some setting I am overlooking or has something changed?


  9. @Stev
    Thanks for the tip. I think it will work.

    Forwarding happens a lot quicker than Google's POP (checks about once every 40-60 minutes).

    I've got two domain accounts forwarding email to my personal account. With this new trick, I don't have to log into three accounts to look for a missing email.

  10. Thanks for the heads up!

    I use the google to create disposable email addresses which I then set rules to sort/handle appropriately. (eg-

    I am surprised how few people use this feature!

    Also, there is a GMail poweruser group over on LinkedIn;


  11. Have you gotten Gmail to forward all spam to another Gmail account? Would be great if it would actually work.

    1) I tried setting up the rule Forward is:spam to Unfortunately none of my spam is forwarded.

    2) Setting up "Never send it to spam" for all message including real spam is too scary, I am afraid of messing up my spam algorith forever by telling it none of my message are spam.

    3) Setting up POP importing in the other account is no option because that only happens about once an hour.

    Still having to check two accounts regularly if I don't want to miss false positve spam. :-(

  12. PS: One more disadvantage of using "Never send it to spam" for real spam is that it would result in overfloating my account with spam.

    I would like to simply forward all spam and still keep the original mail account nicely spam free.

  13. Just trying to see my post; was moved to this notepad instead . . , ?? Newbie here :)
    Re-typing what I wanted posted:
    All of this is great reading but; I have to "Select All"; "Delete Forever" in my Spam box at least five (5) times on each visit to my Gmail. I have asked Gmail to increase the limit from the current forty (40) "Select All" to at least two hundred (200). Your comments will be greatly appreciated ladies & gentlemen.
    Pap Thank you all :)

  14. There's a very visible link that says "Delete all spam messages now". Click on that link to DELETE ALL SPAM MESSAGES.

    For any other Gmail view, after clicking on "Select all", you'll see a message like:
    "All 50 conversations on this page are selected. *Select all 274 conversations in All Mail*". Click on that link to select all the messages and apply an action like "mark as read" or "delete".

  15. If you want to save your spam, can't you follow the steps here to force it to not label it as spam, then add a label like SpamArchive, then Archive it?

  16. After testing it some more I've found no way of forwarding the spam. Apparently, new mail is sifted through the spam algorithm *before* any filters can be applied to it. It's a problem for me because I have to log out of the main account and log in and out and in and out of three accounts just to see what good emails the spam machine ate. Maybe it's time to go back to Thunderbird.

  17. After reading the OP and all the comments here I'm still confused whether this technique works or not?!

    If I want ALL email (i.e. including spam) to be forwarded from one gmail account to another can I just add a global forward and also add a "Matches: label:spam
    Do this: Never send it to Spam" filter?

    Does that work or not? Will all spam eventually be correctly spam filtered in the final target gmail account?

  18. Ok, to answer my own question, I've been running with the above filter to forward ALL mail to my other gmail account and it does seem to work just fine. Spam gets forwarded but correctly intercepted on the target account. So I wonder why the OP here says "it doesn't seem to work"? It works just fine. I think google should add a note about this issue (and the label filter solution) to the official help page at .

  19. But all your spam also goes to the Inbox of the original account right? So that one will be quite messy after a while.

  20. No Ken, why do you think any spam would go to the original spam folder? The filter on that account says "never send to spam". So no spam goes there, it all goes to the second account and gets filtered as spam there. I've checked the original and target accounts and everything seems to work fine.

  21. So the spam is forwarded but not kept in the Inbox of the original account? That's because you set your global forwarding so it won't keep copies of any emails, right? If you keep copies of forwarded emails in the orginal account, I would think Spam will overflow the Inbox.

  22. Sorry Ken but yes, as the OP here was describing, this is a solution for people who keep secondary gmail accounts which they don't actually use. So I have set my gmail option to forward and delete. Now, with this label filter trick, I don't run the risk of occasional valid emails being caught in that account's spam filter. The spam and inbox remain empty. Only the trash fills on that account and that will be purged by gmail automatically. Spam mail is still correctly spam filtered on the target account.

    By the way, I can't find mention of this issue and solution anywhere else on the web. I perceive that this solution has only relatively recently been available on gmail.

  23. OK, sounds like an acceptable solution. Only problem is that you can't use the "keep Gmail's copy in the Inbox" feature.

    Hopefully one day Gmail will add real support for multiple email addresses under one interface. The biggest problem I have right now is that sending as a different email address results in the email being sent as "on behalf of". Often spam filters don't let these emails through.

  24. PS. The "never send to spam" feature hasn't been available for very long yet. That might be one reason why this solutions isn't described in other places yet.

  25. No Ken, I think the feature is even more recent than that. The OP here talks about the "never send to spam" feature but says it does not work for forwarding all email. Even as recently as 21-Sep-2008, Jay Armstrong says above that it does not work for forwarding spam.

    I've noticed a few very recent posts on the gmail help forums about new mail forwarding behaviour so I suspect that gmail have changed something re spam/forward ordering just recently. It seems a nice (intended?) feature of this change is that we can now use the "label:spam->never send to spam" trick to forward ALL email correctly to other acccounts.

  26. Thank you guys! It now works and it is indeed a quite recent change.


  27. My office blocked gmail. and proxy avoiding, mirroring also blocked. can i break it?

  28. For those of you looking to forward your spam to a different account, it is not quite as easy as the original example above. The reason is that google does NOT allow you to forward mail with the "spam" label. The solution is to implement two ordered filters. Since the only way to order gmail filters is by the order you create/edit them (the most recently added/updated filter is executed first), we need to create the 2nd filter that will execute first.

    Filter to enter first (that will get executed 2nd):
    1.) Enter "is:spam" into the "Has the words" textbox and click next.
    2.) Then check the box to "Apply the label", and create a new label called something like "SPAM-MAIL".
    3.) Finally, check the box that says "Never send it to spam" and save the filter

    filter to enter second (that will get executed first):
    1.) Enter "label:SPAM-MAIL" (or whatever label you applied in the filter entered above) into the "Has the words" textbox and click next.
    2.) Check the "Forward it to" check box, and specify the account you wish to hold your spam.
    3.) Optional. Since you are forwarding this spam email to another account, there is a good chance you will not want to eep it in this gmail account. If this is true, check the "Delete it" checkbox.

    The downside to this method is that you lose the ability to automatically "train" you gmail spam filter.

  29. I'm away from home so I cannot compare on a one-to-one basis. When I look at the spam box on the html gmail I see it is indeed catching some spam but I'd say only about half.

  30. My solution is as follows, and no I don't think this was possible a year ago:

    - Disable the global forwarder (save, refresh, yadda yadda)
    - Create a new filter
    - Filter From = "@" (every email has @ in it, right?)
    - Check "Forward it to:"
    - Check "Delete it" (it'll stay in Trash for 30 days)
    - Check "Never send it to Spam"

    I can't say what havoc this may wreak on my baysian filter, but so far it's working great. All mail (including spam) is forwarded from my "dummy" Gmail account to my "real" Gmail account (where it is correctly sorted into good mail vs. spam).

  31. Great, thanks for sharing this!

  32. Solution is simple.. I just don`t understand why google confuse people with that warning as described in my article about forwarding spam

  33. Nice reminders, but this did not worked for me, I have tried it a couple of times since I read this blog? Any possible reason why it did not?

  34. Karl's solution is working for me.

  35. This Works Ok.

  36. Karl's "@" solution works, mostly. Except when a sender doesn't specify a From: address. A better solution: use the "Doesn't have" field and put this string in there: X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

    This string is a standard EICAR antivirus test string, which Gmail rejects prior to delivery (before all filters). Therefore, using this with the "Doesn't have" search operator will match _all_ mail you can possibly receive at Gmail.

    1. Just thought I'd post to tell you that this method still works perfectly, thank you so much :)

    2. A filter on this antivirus test string BROKE on Feb 25th, 2013. No warning, just didn't get my mail for a month until I noticed. Be careful. Confirmed with one other user that this string stopped working in February. Did anyone else use this antivirus test string filter, and did it stop working?

  37. Dustin, why would an email not have a From: address? I wonder if I have ever seen such an email.

  38. Dustin's take on Karl's approach *seems* to work for me.

    I did a few tests, with innocuous emails, and emails ladel with classic spam keywords. The innocous emails went through fine, and the dodgy ones were forwarded correctly, but then caught by the target account's spam filter (as intended).

    I guess the real test will be how it works "in real life", but so far so good...