If you’re like most people, you’ve probably grown tired of seeing the “unread spam message count” in your Gmail inbox and your IMAP client. Here’s how to get rid of it for good. First, make sure that you’re using the latest version of Gmail and your IMAP client. If not, update them both. Next, go to your Gmail settings and click on the “spam” tab. Under “message content,” make sure that “unread spam message count” is set to zero. Finally, make sure that you’re not accidentally marking messages as spam when they’re not actually spam. To do this, go to your IMAP settings and under “message content,” make sure that “spam detection enabled” is set to false. ..
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.
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.
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.
At this point, all incoming spam will be automatically marked as read. (You’d want to clear out the current spam, of course)
The best part is that you no longer have to deal with the unread count in your IMAP client either:
I don’t understand why some of this spam isn’t just automatically deleted.