I had mentioned in an earlier post that I was mildly frustrated by the “new spam messages” counter in Gmail, mostly because I mistook it for the “new inbox messages” counter in my peripheral vision. Before my hard drive crash, I used a Firefox plug-in called Greasemonkey to hide the counter. This solution turned out to be inelegant when I realized that at work, at school, and on any computer other than my own I would still be visually assaulted by that silly counter. I decided then and there that there must be a better way.
Fortunately for me, there was. I had previously tried to go about using the remarkably versatile Gmail filters to mark all spam messages as read, but lacked an adequate description of what messages to mark. A closer look into Gmail search semantics revealed that I could use the keywords “in:spam” to refer to the all messages in my spam folder. Knowing this, I set up the following filters:
- Has the words: in:spam
- Doesn’t have: my name, my school, my work, etc.
- Do this: Mark as read
This filter simple and efficiently hides all new spam messages, while still alerting me when potential non-spam messages have been blocked. If you’re as fussy as I am when it comes to Gmail, I hope that this little trick comes in handy.
November 17th, 2007 at 2:39 pm
I have been looking for something like this for a while.
November 17th, 2007 at 2:52 pm
Works great, but be aware that the “Mark as read” option is only available with the newer Gmail interface, which at the moment is still locking up my Firefox on Windows.
November 17th, 2007 at 2:53 pm
Thanks for the heads up, man!
November 17th, 2007 at 3:34 pm
I delete it. In my trip to putting my address everywhere, I end up with various spam (viagra? porn?). I just set it to delete all that crap.
Nice tip, by the way.
November 17th, 2007 at 4:05 pm
The CustomizeGoogle FireFox extension also can hide the spam counter. It works most of the time, but fails occasionally.
I now use your “in:spam” filter as a backup measure, just in case.
Thanks for the great tip.
November 17th, 2007 at 4:09 pm
Awesome! I just created my filter and it works beautifully!
What a fantastic idea – thanks for sharing that with all of us.
November 17th, 2007 at 4:26 pm
Yeah the spam count is so annoying that I always use Thunderbird now instead of the website.
I requested a way to just delete spam rather than constantly remind me of it years ago, but google never fixed this:
http://groups.google.com/group/Gmail-Past-discussions/browse_frm/thread/48961df36eec7062/db37faed8fee6002
So thanks for the tip. Now that gmail supports IMAP though, I never need to use the website.
November 17th, 2007 at 4:37 pm
@Everyone:
Thank you! I’m glad you found it useful.
@Doug Holton:
I’ve set up my Gmail with Thunderbird at home as well, with the MinimizeToTrayand MinimizeToTrayEnhancer
add-ons to let it run in the background. However, I usually just use this to give me an offline copy of my e-mail, as well as notify me when new mail arrives. For day to day use I find the Gmail interface is much nicer to work with than Thunderbird, but that’s just personal preference. Thanks for the comment!
November 17th, 2007 at 6:35 pm
should it work if I ‘skip inbox’ and archive it? will it still mark it as read if archived? (see what anonymous said above). I am using opera with gmail IMAP and there are currently issues due to a clash in their similar fucntionality, this causes duplicated mail among other things, but most annoying was the spam getting into opera’s ‘unread’ accesspoint. I have had no new spam messages to test whether or not it works yet! great manipulation of gmail though, thanks for sharing.
November 17th, 2007 at 6:50 pm
@Ian:
I did a bit of reading around the Opera + Gmail problem, what a frustrating bug. I’d be curious to know what happened if you used the same filter, but chose “Delete it” instead of marking them as read.
As for choosing “Skip inbox”, I’m really not sure how that would work. My best guess would be either:
a) Spam messages never reach the inbox, so the filter has no effect.
b) The spam messages would be archived with all other mail, which would be bad!
If you do test it, please let me know the results.
November 18th, 2007 at 4:13 am
i was going to try this with my domain mail hosted at gmail (google apps) but “mark as read” is not an option! it is there in my old @gmail.com mailboxes however but i don’t use them anymore.
November 18th, 2007 at 11:04 am
@Matthew:
A short test with my old GMail-account shows that “Skip the Inbox (archive message)” makes the spam messages available in the “All Mail” folder… Not what you’d want!
I’ll wait until “Mark message as read” is rolled out to GAFYD-accounts.
November 18th, 2007 at 3:36 pm
@Martijn Coppoolse:
Thanks for letting me know.
November 18th, 2007 at 5:44 pm
You also need to have the Language set to English (US) to get “Mark as read”
November 19th, 2007 at 7:28 pm
Nice tip!
Here’s a way to add this filter using Gmail’s new for permalinks support. Just change “my name” to your name and tell the fliter to “Mark as read”. ;)
November 19th, 2007 at 8:28 pm
@Anonymous:
Gmail certainly has some strange idiosyncrasies…
@Marsh:
Thanks for the tip!
November 19th, 2007 at 10:31 pm
thanks man! i’ve been looking for a way to note folder location in a filter!
i use apple mail with gmail imap, and ever time i get a new e-mail the mail counter will list it both in the inbox and the “all mail” (archive) folder–and it will continue to be listed in all mail, even after i’ve marked the inbox version as “read.”
i tried to setup a filter through apple mail but couldn’t find a way to specify folder location; now, however, after reading your tip i am golden!
glad to see other people out there are as OCD as i am about their…everything.
February 7th, 2008 at 3:31 am
I’ve emailed google numerous times about this, it really bugs me. I was so excited when I saw this (especially because of how it’s done, very nice).
BUT, I don’t have the option to “mark as read”. I have set me language to english US as instructed above, no help. I have a normal @gmail.com address from when gmail was fairly new. I’m pretty sure I have the latest gmail (I believe I saw it upgrade a while back). Can a force an update?
February 7th, 2008 at 5:19 am
I did some googling about your problem phalkon, no luck so far.
One option might be to set your language to “english US” and leave for a day or two. Perhaps when the gmail servers update, they’ll see your language and upgrade your account? I’m just guessing here, but it might be worth a shot.
You could also try asking Google groups specifically about the missing “mark as read” problem.
February 7th, 2008 at 11:07 pm
Thanks for looking around. I have always had my language set to English US AFAIK.
I happened to log in at work today (different computer), and I found out that I could do the “mark as read” option. When I got home, I looked at my filters, and it’s blank for the “do” function of that filter. So I think I’ll have to play with clearing my cookies/cache. I leave gmail up in a tab in maxthon that has been open for over a year (maxthon saves your session).
February 7th, 2008 at 11:14 pm
Looks like you’ve found the problem!
February 9th, 2008 at 9:28 am
You, sir, are a genius!
February 10th, 2008 at 4:23 pm
This is beautiful! I’ve enjoyed the monkeyscript for a long time, but this is indeed a more elegant solution. Thankyou!
February 17th, 2008 at 12:57 am
Aha! I figured out why some people have the old version, and some have the new.
If you use IE6, you have to use the old version.
If you use IE7 or firefox, you get the new version.
I refuse to use IE7, and I like using maxthon (which is based off of IE), so I guess I’m stuck using the old gmail.
The nice thing is, if you set it up in the new gmail, it still works if you’re on a computer that uses the old interface. So if you don’t like IE7, find somebody that has it, set the filter, and you’re good.
February 19th, 2008 at 7:20 pm
When I attempt to put my name in the “doesn’t have” field, the filter no longer catches any messages. My name does not appear anywhere in the body of the message, but my address is mike.lastname@gmail.com so I assume that is what it is picking up. Any suggestions?
February 19th, 2008 at 10:34 pm
Unfortunately there doesn’t appear to be a filter that specific in Gmail, Mike. We can only hope that Google adds advanced filtering in the future, which seems likely given how well Gmail has grown.
March 20th, 2008 at 10:44 pm
Great. Love this.
March 21st, 2008 at 2:12 pm
Great tip! Even if I don’t much care about the unread count on SPAM, it saves me from scanning through it so diligently looking for improperly marked spam.
Thanks!
April 4th, 2008 at 12:55 pm
Thank you so much! I’ve been trying to reclaim my inbox lately and this was the perfect solution for my only remaining problem.
April 22nd, 2008 at 2:14 pm
Exactly what I needed! Thank you.
April 27th, 2008 at 1:24 am
You sir are a legend!
This function seems to not be working in the ‘Better Gmail 2’ addon and has been annoying the crap out of me for weeks.
Keep up the great work!
April 29th, 2008 at 3:58 pm
THANK YOU!!! For the longest time I avoided spam… Once those horrible people nabbed my email address, I get this wrenching feeling of failure every time I see the counter go up. Thanks for alleviate the problem.
September 21st, 2008 at 11:14 pm
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?
September 22nd, 2008 at 2:44 am
You can just ignore that warning, Gmail is lying ;)
September 22nd, 2008 at 8:57 pm
great tip, thanks!
October 20th, 2008 at 2:51 am
wonderful !!
i just switched from pop to imap with gmail and apple mail and i was frustrated by the mess it caused to my very organised mailboxes in mail…
but now, everything is perfect !!
i can use my gmail account with Mail and my iPhone, and everything is perfectly synchronised !!
February 24th, 2009 at 11:59 am
Thaks a lot. Exactly what i was looking for!