After changing my email ISP I lost the possibility to filter emails using regular expressions. So I had to find a way to do it on the client side (in my case: in Thunderbird).
Why use regular expressions on emails?
A typical scenario to filter emails using regular expressions is the usage of catch-all email addresses. While this opens the floodgates for spammers (any email sent to WHATEVER@yourdomain.com will be delivered), it can be a convenient way to use special email addresses for special occasions without the need to define email accounts or email aliases each time.
To avoid spam flooding of catch-all email addresses I use a simple strategy:
All email accounts that I use follow a defined naming pattern that is not trivial to guess, so the random accounts that many spammers try to send to can be filtered out.
And this is where regexp patterns come into play:
They provide the means to match the secret pattern in the email addresses and to sort out the random email addresses that spammers tend to use.
How can it be done in Thunderbird?
Many advanced email clients (like Eudora) provide regular expression filters by default. Thunderbird (as of v3.1) unfortunately does not. So I was happy to find that there is a really great add-on that allows not only regexp to be used on the email’s subject and any email header field, but also extends the Thunderbird filter methods by many new convenient rules and actions. This gem is called FiltaQuilla. You can download it from the Mozilla add-on repository.
FiltaQuilla in action!
After installing the extension you can activate all filter actions and search terms that you need in the add-on options (Thunderbird→Tools→Add-ons→FiltaQuilla→Options). These are the options provided by the current version as of this writing (1.1.0):
You will definitely want to have a look at the documentation on the authors website to explore all the possibilities and find out how to use regexp filters and all the other goodies.
Here is a typical example of a (very simple) catch-all email address pattern, that accepts only addresses that contain at least one dot in front of the @. You can also see some exceptions to these rules for senders that are found in the local address book and for legacy addresses that don’t obey the secret pattern.
Finally! Lack of regex has been the only major feature that Thunderbird was lacking for me. Thanks for the quick tutorial too.
“Mark as read” – unsupported by filter action?
@gescheit: Looks like this is indeed unsupported in the current version (1.1.0) – while “Mark as unread” is available. Strange.
Unfortunately, the regex doesn’t work for the message BODY, right?
Yes, you are correct: unfortunately there is no Body Regex Match option!
I installed FiltaQuilla on Thunderbird 31.2.0, and then deactivated all other add-ons by beginning the start of Thunderbird in safe-mode, and reactivated FiltaQuilla.
In the filter creation dialog box, I have the new actions, but in the filtering fields I do not see Header Regex Match, neither Subject Regex Match, whereas they are checked in the FiltaQuilla options.
A few months ago I inserted a “Supersedes” field in that list, does this have anything to do with the topic ?
I just rechecked on TB 31.2.0 and it works nicely for me.
Remember that when changing any FiltaQuilla options you have to restart TB to make the new filters available in the dialogs.
Is it possible that you searched for the filters in the wrong dropdown column? They do NOT appear in the second dropdown (with conditions like “contains”)? The Regex options actually appear in the FIRST dropdown column (where you select the header fields, e.g. “Subject”). Here they appear as additional items called “Subject Regex Match” and “Header Regex Match”. See the last screenshot in the article.
As you see here : http://cjoint.com/?DJFnhB0BMqa
I downdropped the first list, and there is no Subject Regex Match in it.
Do you have Supersedes in your list of fields ?
Perhaps you can need this :
Wo erstelle ich überhaupt einen neuen Filter? Das wird nirgendwo erwähnt, auch nicht auf der Seite des Autors…
Allet kloor, ich habe den Entwickler gefragt. Mir war gar nicht aufgefallen, dass nur die Einstellungen in den allgemeinen Filtern erweitert werden.