Get Rid of the Unread Spam Message Count in Gmail and Your IMAP Client

If you are a Gmail user, you’ve probably noticed the annoying unread message count for the Spam folder. It’s even worse when you use an IMAP client to access your email, and then try and use a search folder for unread mail… which gives you nothing but spam.

What we’ll do is use Gmail’s filter capabilities to create a filter that automatically marks spam messages as read, preventing the unread count from appearing anywhere.

image

This method should work for both Gmail as well as any IMAP client that you use. (Note: This only works if you are using the new gmail interface.)

Mark All Spam as Read Automatically

Open up Gmail and then click the link to create a new filter. In the “Has the words” box, enter “in:spam” (without the quotes) as you can see in the image below. You can use the Test Search button to make sure it shows just spam emails.

image

Now click the Next Step button, and ignore the error message you get. Select the checkbox for “Mark as read”, and then click the Create Filter button. Note that you could auto-delete all spam using this same filter, although I’m not recommending that.

image

At this point, all incoming spam will be automatically marked as read. (You’d want to clear out the current spam, of course)

image

The best part is that you no longer have to deal with the unread count in your IMAP client either:

image 

I don’t understand why some of this spam isn’t just automatically deleted.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.