Thunderbird & mail filters do not work

Updated: January 2, 2024

One of the neat features of Thunderbird, the excellent free, open-source mail client, is the ability to create filters. You can define all sorts of rules by which your email will be managed - tag, star, forward, set priority, move to a different folder, and then some. To work, the rules usually process certain conditions, like the sender or recipient name or address, specific keyword, and similar. Great, except, it doesn't work. Anymore, that is.

As I frequently test various programs, Thunderbird often comes up in my test set, and lately, I noticed the mail client does not seem to apply my message filters. At all. I cannot say when the problem started, but it's been present for at least several weeks. Namely, existing message filters seem to be ignored. They are not processed automatically, and even when you run them manually, nothing happens. Today, we shall rectify this problem. Follow me.

Filters only work on synced content

The issue is not so much in Thunderbird's message filter logic being broken (i.e., a bug) as much as the change in the configuration by which the mail client processes incoming emails. If you use the IMAP protocol for your email, then Thunderbird will only download message headers by default, and then the rest of the message when you actually open the email. But the filters only seem to work on emails that have been fully downloaded (synced) into your inbox. And that's the source of the unexpected behavior with the filters.

Furthermore, even if you do have Thunderbird configured to sync messages for offline use, in most cases, the Junk/Spam folder will not be included in the set. Therefore, if you have filters specially configured for spam, then those will not be correctly triggered and processed unless you also add Junk/Spam.

Go to Account Settings > relevant email address > Synchronization & Storage. In the right pane, under Message Synchronizing, click Advanced. This will open a box that says Items for Offline Use. Expand the list under the email address shown in the box, and tick Junk and spam. From now on, Thunderbird will fully download the messages, and your filters will - or at least should - work again.

Mail sync


Probably my shortest tutorial ever, but hey. The issue is one of expectations rather than bad functionality. However, this is not easy to understand and figure out, because Thunderbird doesn't give any indication there's anything wrong. And technically, there isn't. However, you should be aware that your mail might not be fully synced, and that you could see unexpected behavior as a result, at least when it comes to message filters.

One could say that there's no reason to download spam email, but that's true assuming the classification is always 100% correct. There still might be false positives, and you still might want to do some sort of processing for the incoming mail, even if it lands into the Junk folder. To do that, you want the filters to work, and with this guide, you now have the right solution. The next step is to make sure your filters actually do what they're supposed to do, but that's a different problem altogether. See you around.