Sorting Your Mail with Filters (Sieve) in Thunderbird

Thunderbird can create mail-sorting rules of your own — for example, moving mail from a specific sender or mailing list into its own folder automatically. This page explains how, and how these rules differ from the ordinary local filters Thunderbird has always had.

These are not local filters. The rules you create this way are stored and run on the Pacific Internet mail server using a filtering language called Sieve. That means they apply the moment a message arrives — on your phone, in webmail, everywhere — even when Thunderbird is closed. This is different from Thunderbird's older, local message filters, which only run while Thunderbird is open on that one computer.

What Sieve filters are, and why use them

Thunderbird has always let you build message filters — rules like "if the sender is X, move the message to folder Y." The classic version of that feature only runs on your own computer, only while Thunderbird is open, and only affects mail Thunderbird has already downloaded.

Sieve is a standard mail-filtering language that runs on the server itself, before a message ever reaches a mail app. When your Thunderbird account is connected with Sieve support, the filters you build in Thunderbird's ordinary filter editor are saved to the server as a Sieve script instead of staying on your computer. The result:

Pacific Internet's built-in Spam, Lists, and Updates sorting (see spam filtering) already uses this same server-side approach. Sieve filters you create yourself work alongside that system for your own additional sorting — splitting out a specific mailing list, filing receipts from one company into their own folder, and similar rules that are personal to how you like your mail organized.

What you need

Your Thunderbird account must already be set up using IMAP (not POP3) — see Setting up Thunderbird if you have not done this yet. Sieve filtering requires the same account and works over a separate connection used only for managing filters:

ManageSieve (Filter Management)
Servermail.pacific.net
Port4190 (STARTTLS)
Usernameuser@pacific.net
PasswordEmail address password

Thunderbird normally detects this automatically once your IMAP account is set up — there is nothing extra to configure by hand in most cases. You will know it is active because, as described below, the Message Filters window offers to run your filters "on the server."

Creating your first filter

As an example, this walks through a common rule: automatically moving mail from a specific sender into its own folder.

  1. In Thunderbird, go to ToolsMessage Filters… (or, from the hamburger menu, ToolsMessage Filters…).
  2. At the top of the window, confirm Filters for: shows your Pacific Internet account.
  3. Click New… to create a filter.
  4. Give the filter a descriptive name, for example Newsletter to its own folder.
  5. Under "Apply filter when," leave the defaults checked so the filter runs both when new mail arrives and when run manually.
  6. Set the matching condition — for example Fromcontains — the sender's email address or domain.
  7. Under "Perform these actions," choose Move Message to and pick or create the destination folder.
  8. Click OK to save the filter.

If your account has Sieve support (which it does by default), Thunderbird uploads this filter to the server automatically — there is no separate "save to server" step to remember. Look for wording such as Filters running on the server near the top of the Message Filters window; that confirms the rule is stored server-side rather than only locally.

Note: The exact wording and layout of the Message Filters window has changed slightly across Thunderbird versions. The steps above describe the general flow; the labels you see may differ a little depending on your version.

New filters are applied automatically only to mail arriving after the filter is created. To apply a new filter to messages already sitting in a folder, select the filter in the Message Filters list and click Run Now.

A few useful rules to try

Filters are evaluated in the order they appear in the list, top to bottom. If you want one rule checked before another — for example, pulling a VIP sender out before a broader rule files it elsewhere — drag it higher in the list.

A note on scope

Filters you create this way are for organizing your own mail the way you prefer. They are separate from, and do not replace, Pacific Internet's built-in Spam, Lists, and Updates sorting described on the spam filtering page. If you are trying to fix mail being incorrectly marked as spam, use the NotSpam folder as described there rather than building a custom filter — it trains the shared filtering system instead of only working around it for yourself.

Need help?

If the Message Filters window does not offer to run filters on the server, or you are not sure whether a filter you created is working the way you expect, email support@pacific.net and we can take a look.