Thunderbird: Spam Filter for Recurring Emails
The fight against spam can be nerve-wracking. If you receive a lot of spam, especially as a private individual, you should consider whether your current email provider or your current behavior on the internet is the right choice. Not every service handles your data carefully.
Why Thunderbird
Thunderbird as a standalone email client offers you more control, privacy, and comfort than the web interface of your free email provider. Especially when filtering recurring spam emails, you are not dependent on the often limited or changing functions in the browser, but have a uniform, powerful filter system for all accounts in one place.
This tutorial shows how to create filter rules in Mozilla Thunderbird that also reliably catch varying spam senders (e.g., changing numbers in the name).
Check Prerequisites
Ensure that Thunderbird is up to date, as the filter interface can vary slightly between versions.
For IMAP accounts, you should decide whether spam should be moved locally or deleted/moved directly on the server.
Open Message Filters
Start Thunderbird.
Select in the menu bar: Extras → Message Filters (or Tools → Message Filters depending on language settings).
At the top of the window, select the affected email account (important when using multiple accounts).
Click New… to create a new filter.
Create Basic Spam Filter Rule
Give the rule a name, e.g., “Recurring Spam”.
Under “Execute when” / “Apply filter when”, select at least “On message retrieval”.
In the area “For incoming messages that…”, set the Match option to:
- „Mindestens eine der folgenden Bedingungen erfüllt“ (engl. „Match any of the following“), damit ODER‑Logik verwendet wird.
Catch Variable Senders with Text Patterns
Many spam emails only change part of the sender address (e.g., no-reply463@spamdomain.com , no-reply789@spamdomain.com ).
Example 1: Match Start and End
First condition:
Field: “From”
Operator: „beginnt mit“
Wert: z.B. no-reply
Second condition (add via +):
Feld: „Von“
Operator: „endet mit“
Wert: z.B. @spamdomain.com
Ensure at the top that “All following conditions” is used if you want to combine this pattern exactly (AND logic).
This catches all addresses built like: no-replyXYZ@spamdomain.com .
Example 2: Different Spam Domains with OR
Set the Match option to “At least one of the following conditions” (OR).
Create multiple conditions:
Von „enthält“ @spamdomain.com
Von „enthält“ @andere-spamdomain.net
Betreff „enthält“ typische Spam‑Wörter (z.B. Gewinn, Bonus, Casino, in der Sprache der Mails).
This way, emails from different spam domains or with typical spam subjects are caught together.
More Flexible: Filter by Patterns Instead of Addresses
Since spammers constantly use new sender addresses, it is more robust to filter by patterns.
Possible patterns:
Subject contains recurring phrases (e.g., “Your account will be deleted”, “confirm now”).
Body contains certain links or domains, e.g., click.hier-spam-link.com.
Recipient (To / CC) is a specific alias that is frequently spammed.
In the filter mask, you can use the operators “contains”, “is”, “starts with”, “ends with” for each of these components to describe recurring features.
Action: What Should Happen to Spam
In the lower area “Perform following actions”, you select what Thunderbird should do with recognized spam emails.
Typical actions:
Move to folder → e.g., to “Junk” / “Spam” or a custom folder like “Spam-Filter”.
Delete → directly to Trash or permanently (use carefully due to false positives).
Optional: “Mark as read”, so the inbox is not filled with unread spam emails.
Create Filters Based on Existing Spam Emails
To quickly derive rules from real spam examples:
Open a typical spam email in the Inbox
Menu Message → Create Filter from Message… (English: “Create Filter from Message”).
Thunderbird creates a new filter rule with the sender address and other data already entered.
Adjust conditions in the filter dialog:
- Ändere z.B. Von ist spam123@domain.com zu „Von enthält @domain.com“.
- Ergänze Betreff‑ oder Body‑Muster, die in diesen Spam‑Mails wiederkehren.
Bundle Multiple Spam Addresses in One Rule
If you still want to work with concrete senders:
Set the Match option at the top to “At least one of the following conditions”.
Add a condition for each spam address:
Feld: „Von“
Operator: „ist“ oder „enthält“
Wert: die jeweilige Adresse
Thunderbird then treats these conditions as OR, so any of these addresses triggers the filter action.
Test and Manually Run Filters
In the “Message Filters” window, select your spam filter.
Click “Run” after selecting the target folder (e.g., Inbox).
Check whether only the desired spam emails are moved/deleted, and adjust conditions if necessary.
Tips for Less Spam in the Long Term
Additionally use Thunderbird’s built-in adaptive junk filter and consistently mark spam emails as Junk.
With very high amounts of spam, a server-side filter with your email provider or additional spam filter software is worthwhile, since purely client-side filters can never catch all variants.
If you still receive many spam emails, consider changing your email provider. And yes, I know that depending on how long you have been with the current one, this can be a lot of work.
Nevertheless, it should be considered.
Here are 3 of my preferred email providers that also value privacy and data protection:
- Proton
- mailbox.org
- Tutanota (which I use regularly)


