Filtering Messages Effectively
Filters were discussed in Chapter 7's "Filters" section, where they were explained as the automated tasks that Gmail performs on your email before you ever see it. For instance, if you're sick of stupid joke emails from your Uncle Gussie, you could set up a filter that sends any email that is from Gussie and also has "joke" or "humor" in the subject to the Trash so you'll never even have to see it.
The "Filters" section of Chapter 7 focused on setting up filters. In this section, I'd like to talk about some uses for filters. To begin with, let's understand what aspects of an email are filterable. You can search for the following criteria and then use them to create your filters:
- From—Can be a full name (Jans Carton), part of a name (Jans), an email address (jans@websanity.com), part of an email address (websanity.com), or "me."
- To—Can be a full name (Jans Carton), part of a name (Jans), an email address (jans@websanity.com), part of an email address (websanity.com), or "me."
- Subject—You can search for an exact phrase by using quotation marks ("blogs to wikis").
- Has the Words—You can search for an exact phrase by using quotation marks ("blogs to wikis").
- Doesn't Have—You can search for an exact phrase by using quotation marks ("blogs to wikis").
- Has Attachment—A check box you can toggle.
To make sure your search criteria are correct, click Test Search, and review the results. If they're what you want, click Next Step. On the next screen you choose the actions you'd like to perform on messages that match your criteria. Those actions are the following, any of which you can check:
- Skip the Inbox (Archive It)—You won't see it in your Inbox; instead, it goes into All Mail. This is a good box to check along with others in this list.
- Mark as Read—If you check this along with Skip the Inbox, it's archived and won't stick out because it won't be bold or listed as unread.
- Star It—If it's important or needs action, star it!
- Apply the Label—Choose an existing label or create a new one. This action, when combined with Skip the Inbox, is equivalent to automatically filtering into folders with other email programs. A very common two-fer.
- Forward It To—Enter an email address to which you'd like the message to go; don't forget that you can create email lists so that you can enter one address that sends it to several people (covered in Chapter 6's "Email Addresses" section).
- Delete It—For the worst offenders.
- Never Send It to Spam—This makes sure that the important email from your significant other or boss never gets accidentally dumped into Spam by a mistake in Gmail's antispam technology.
After making your choices, click Create Filter to do just that. Next to that button is a check box labeled Also Apply Filter to # Conversations Below, where # is the number of conversations that match your filter's search criteria. Most of the time you're going to want to check that box because it will apply your filter's actions to email that has already arrived, thus making sure that your mail is nicely organized.
With the filter process in mind, here are a few of my favorite filters. What's shown in Table 8.7 is there to give you ideas, but you can search Google for others. And, of course, the best way to find a filter that works for you is to experiment.
Table 8.7. Some of My Favorite Gmail Filters
Filter Criteria |
Filter Action |
Meaning |
From: me To: me |
Apply the label: Me |
Easy to find emails I've sent myself as reminders. |
From: scott@websanity.com |
Apply the Label: WebSanity |
Emails I've sent from my work address. |
Has the words: ("serial number" OR "product key" OR "activation code" OR "license key" OR regsoft |
Skip the Inbox (Archive It) Apply the Label: Serial Numbers |
Serial numbers for software I've bought (thanks to Micah Diamond, who wrote in to Lifehacker). |
Has the words: ( OR OR Ж OR OR ) |
Skip the Inbox (Archive It) Delete It |
I don't speak Russian or Hebrew, so this is spam (that isn't a capital B, it's a Russian veh). |
Has the words: filename:jpg {photo photos pic pics picture pictures attachment attached} |
Apply the Label: Pictures |
Finds messages with photo attachments (you can do the same kind of thing for movies, documents, and music). |
to:(stlwebdev.org OR to:wwwac.org OR from:userland.com) |
Skip the Inbox Apply the Label: LIST/WebDev |
Note that you can combine to: and from: in your filter. |
from:(System Administrator) subject:("log sizes" OR subject:"disk usage report") |
Skip the Inbox Apply the Label: WS/Reports |
Look for messages with a certain From and certain phrases in the Subject. |
One final note about filters: after you've created one, you may want to add on to it later. For instance, suppose you create a filter that takes any mail from truthout.org, eff.org, or maal.org and labels it LIST/Politics. If you view your list of filters (by going to Settings, Filters, or by clicking Create a Filter and then Show Current Filters) you'll see that it looks like this:
Matches: from:(truthout.org OR from:eff.org) Do this: Skip Inbox, Apply label "LIST/Politics"
If you want to add another from:—this one for moabolition.org—you would click Edit and change it to this:
Matches: from:(truthout.org OR from:eff.org OR from:moabolition.org) Do this: Skip Inbox, Apply label "LIST/Politics"
And so on. These filters can get quite long—one of mine is 25 addresses and counting, and I've never had an issue. But what you may not know is that you can introduce other criteria that don't match the original set.
Suppose I want to find email sent to ydgsl@yahoogroups.com and also apply the LIST/Politics label to it. I could create a brand new filter for to: ydgsl@yahoogroups.com, but that's kind of silly because I already have a perfectly good filter in place that labels mail with LIST/Politics. Instead, I edit the already existing filter so that it now reads this way:
Matches: from:(truthout.org OR from:eff.org OR from:moabolition.org OR to:ydgsl@yahoogroups.com) Do this: Skip Inbox, Apply label "LIST/Politics"
Even though the Matches line starts with from:, and everything following is in parentheses, you can still put a to: inside the parentheses, and the filter will work just fine and dandy. In fact, you can sneak a from: or a subject: in there without an issue.