Regular expression email filters for Thunderbird

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 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.

This extension opens up great possibilities. Regular expressions are only the tip of the iceberg. With FiltaQuilla you can run local programs and JavaScript actions from any filter, start printing, train the junk filter, and much more. I simply love it. Enjoy!

Dieser Beitrag wurde unter Configuration, Email, Regexp, Thunderbird abgelegt und mit , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

11 Antworten auf Regular expression email filters for Thunderbird

  1. Dimitri sagt:

    Finally! Lack of regex has been the only major feature that Thunderbird was lacking for me. Thanks for the quick tutorial too.

  2. gescheit sagt:

    “Mark as read” – unsupported by filter action?

  3. Jörg Wagner sagt:

    @gescheit: Looks like this is indeed unsupported in the current version (1.1.0) – while “Mark as unread” is available. Strange.

  4. JustTryIt sagt:

    Unfortunately, the regex doesn’t work for the message BODY, right?

  5. Gloops sagt:

    Hello everybody,
    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 ?

    • Jörg Wagner sagt:

      Hi Gloops,
      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.

  6. Gloops sagt:

    As you see here :
    I downdropped the first list, and there is no Subject Regex Match in it.
    Do you have Supersedes in your list of fields ?

  7. Niklas sagt:

    Wo erstelle ich überhaupt einen neuen Filter? Das wird nirgendwo erwähnt, auch nicht auf der Seite des Autors…

  8. Niklas sagt:

    Allet kloor, ich habe den Entwickler gefragt. Mir war gar nicht aufgefallen, dass nur die Einstellungen in den allgemeinen Filtern erweitert werden.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>