Mail filters

From ProgClub
Jump to: navigation, search

If you're subscribing to any of ProgClub's mailing lists you probably want to setup mail filters so that list traffic gets routed to an appropriate folder. Here we make a suggestion about how to do this. (Note: I'd appreciate it if someone would fill out sections for other email clients).

Thunderbird

If you're using the excellent Thunderbird email client, you can follow these instructions for creating mail filters.

Firstly, we need a folder structure in the email data store (which might be a Local Folders store, or an IMAP folder store) in which to store our emails. I've created a folder structure that looks like this:

Mail filter thunderbird folders.png

Note that the folder structure I have created is:

  • ProgClub
    • announcement
    • list
    • programming
    • vcs
    • admin
      • bulk

You may not be subscribing to all of ProgClub's lists, and in that case there's no need to create the folders for the lists you're not interested in.

Now that our folders are in place, create the filters by clicking on Tools => Message Filters... You will see a dialogue box that looks something like this:

Mail filter thunderbird 1.png

Make sure that "Filters for:" is set to the appropriate email account.

Click on "New..." to create a new filter. You will fill in the form something like this:

Mail filter thunderbird announcement filter.png

Note, that this is for the announcement filter. We've given the filter a name of "ProgClub announcement", we're matching when the Subject contains "[ProgClub announcement]", and we're "Moving Message to" the "annoucement" folder. So, you need to create a filter for each of the lists you are subscribed to, and the following table will help you with the filter details.

Filters

Filter name Subject contains Move message to
ProgClub announcement [ProgClub announcement] ProgClub/announcement
ProgClub list [ProgClub list] ProgClub/list
ProgClub programming [ProgClub programming] ProgClub/programming
ProgClub vcs [ProgClub vcs] ProgClub/vcs
ProgClub admin [ProgClub admin] ProgClub/admin
Fail2Ban [ProgClub admin] [Fail2Ban] ProgClub/admin/bulk

When you're done you will have a set of mail filters that look something like this:

Mail filter thunderbird 2.png

Gmail

For the people who use Gmail, they might know that they don't do folders but things called 'labels'. If you're pulling your hair out (like I once did) and screaming 'why?!', check out this page. And if you're still not convinced (like I was), follow the rest of this section and you'll soon understand why labels > folders.

And maybe after giving a week or two.

Anyway, first let's create these labels:

  • Click the gear icon at the top right corner and choose 'Mail Settings'.
  • Choose the 'Labels' tab. Scroll down till you see the 'Create new label' button. Click it.

Let's create labels following this structure and order:

  • ProgClub
    • Announcement
    • List
    • Programming
    • VCS
    • Admin

Of course you may not follow all the mailing lists. But you should have at least have the labels 'ProgClub' and 'Announcement'. Not all labels need to be nested, so you do not need to check the 'Next label under:' box to create a label. So to nest 'Announcement' under 'ProgClub', set it to look like this:

Mail filter gmail 1 ver2.png

After you've created your labels, you should see them at the left side of the screen. If you cannot see them, they may be hidden. Select 'Show in label list' and then 'Show all'; do the same with 'Show in message list'.

Now, filters. We'll be creating a filter for the emails coming from the announcement mailing list.

Choose the 'Filters' tab and then 'Create a new filter'. At the top, you should see this:

Mail filter gmail 2 ver2.png

Let's make the announcement filter apply the label, 'ProgClub/Announcement' onto the appropriate emails. In the 'Includes the words' box, type 'list:"announcement.progclub.org"' (minus the single quotation marks [']) and then choose 'Create filter with this search'. In the background, Gmail has automatically done a test search of all your mail to see which mail fits the criteria of your filter in-progress.

You should now see something similar to this:

Mail filter gmail 3 ver2.png

  • Check 'Skip the Inbox (Archive it)' - this will make the email not appear in the Inbox, making it seem like it has 'sorted into a folder' but can still be easily searched; you do not need to torture yourself by going through every folder in existence (like some email clients that I will not name). If you fear that doing this will not alert you of new mail, do not fear; a number will appear beside the label if there is new mail. See, labels are harmless!
  • Check 'Apply the label:' and select 'Announcement'.
  • [Optional] Check 'Also apply filter to n conversations.' - this will archive and apply the label 'ProgClub/Announcement' to past emails (or 'conversations' as Gmail likes to call them) so even if you were late to the game in creating filters, do not fret!
  • Click 'Create Filter'.

Congratulations, you've created your first filter on Gmail. If you're subscribed to other mailing lists, the filter criteria are shown in the following table.

Filters

Includes the words Apply the label
List filter list:(list.progclub.org) List
Announcement filter list:(announcement.progclub.org) Announcement
Programming filter list:(programming.progclub.org) Programming
VCS filter list:(vcs.progclub.org) VCS
Admin filter list:(admin.progclub.org) Admin