An unofficial blog that watches Google's attempts to move your operating system online since 2005. Not affiliated with Google.

Send your tips to gostips@gmail.com.

May 28, 2007

Gmail Filters

Gmail's filters are a simple way to organize your messages automatically by providing a set of rules. Like most email clients, Gmail applies the rules to the messages you receive and to the sent mail.

Here are some of the most common Gmail filters:

1. Categorization filters

If you receive a lot of messages that need a distinctive category, create a filter that attaches them a label and archives them.

To separate your messages, you could share a different version of your email address that adds some information after the plus sign. So you could put this email address in your blog: daniel+blog@gmail.com, instead of daniel@gmail.com. All the messages are sent to your address, but now you can create a filter that labels the messages sent to daniel+blog@gmail.com.

2. Search filters

You can create filters for frequent queries. Just type in the "has the words" box your query (this list of Gmail operators should help):

has:attachment - messages that include attachments
filename:.mp3 - messages that include MP3 attachments
is:unread - collects all the messages you haven't read yet (or you marked as unread)
label:voicemail - the voicemail from Google Talk

3. Separate your identities

If you forward messages from other mail accounts or use Gmail's mail fetcher, create filters that attach labels to these messages. Just enter the appropriate mail address in the To field when you create each filter.

4. Newsletters

Newsletters save you time and bring (sometimes) useful information, but they also clutter your inbox. If you receive daily newsletters, create filters that label the messages and archive them, so they don't stand in your way.

5. Blacklists

If you don't want to read messages from a bunch of people, create a filter that sends to trash each and every message received from them. Just enter their email addresses separated by OR in the From field. I made a small script that makes it easy to build a blacklist.

6. Anti-spam

Gmail's spam filters are pretty good for most people, but that doesn't mean you won't see false positives. If most of the spam mail that reaches your inbox has some easy to identify traits (for example, it contains "lottery"), create a filter that sends these messages to the trash. Because you won't mark these messages as spam, you won't be improving Gmail's spam filters. Also you may lose some genuine messages if you don't build your filter carefully.

7. No more spam counters

If you don't like to see how many unread spam messages you have, create a filter that marks as read all your spam.

Type in "Has the words": is:spam
Check Mark as read
Click OK to Gmail's warning

You should check the messages marked as spam from time to time because you may lose important messages incorrectly classified by Gmail.

8. Backup filters

Create a filter that forwards some of your messages to another account. You could send all the messages that include attachments, so you could easily delete them when you reach Gmail's storage limit.

This Greasemonkey script (that requires Greasemonkey and Firefox) lets you create filters from each message by filling the email address of the sender and the destination address.


Also when you create a new filter, Gmail provides an option to apply the rules to the existent messages (you can't forward existent messages using filters, though).

24 comments:

  1. Not true Alex. Gmail actually does apply the rules to sent messages.

    ReplyDelete
  2. The problem is "daniel+blog@gmail.com"-like address aren't allowed everywhere.
    "Please enter a valid email address"...

    ReplyDelete
  3. The problem with forwarding all your spam to the trash bucket is it combines email into one place, making it more difficult to go searching for false positives.

    Google has gone to great efforts to try to eliminate the need for creating spam filters yourself. Personally, I don't see the benefit in creating spam-specific filters, it just undoes all the hard work Google has done.

    Perhaps the best advice is to use multiple email addresses. Use one as a primary, and several secondary email addresses that flow into the primary email account. Then if one secondary account tends to get excessive amounts of spam, delete it and stop letting it forward email to your primary. This is the best method to avoiding spam. Never post your primary address online for any form. Use an email address that doesn't forward to your primary address when filling out online forms.

    ReplyDelete
  4. You can create filters for frequent queries. Just type in the "has the words" box your query

    Can you actually use filters to save dynamic searches? I have used greasemonkey plugins to do this, but I thought all gmail filters were only applied when messages are received (or when you go in to filters, edit the filter, use test search, and apply to existing). Is the latter procedure to what you are referring to?

    ReplyDelete
  5. I'm unable to apply filter to existing messages. I tried forwarding my all messages to another gmail inbox. But i can't see any messages in the new one.
    IsmuDev

    ReplyDelete
  6. You can't forward existing messages using filters.

    ReplyDelete
  7. I wish using filters I could forward mails to two or more people at the same time (multiple names in the To: field)- I use mutiple filters now to do this, but a mail receipient cannot tell who else has got the mail, because they will see only one name in the To: field. Such a simple change and a great addition Google-Please!

    ReplyDelete
  8. Forward mails to two or more people by setting them up in a Google group. Works well !!

    ReplyDelete
  9. I have a problem:
    I've no filters, but, when I receive mail,
    i receive it both in my INBOX & my TRASH - simultaneously! Anybody have a solution?
    zuga38

    ReplyDelete
  10. When I hit reply in Gmail it says my email is in the trash and it can not be sent. I changed my filter but am still having trouble with this. I assume I was part of a phishing scam at one point as some from me are not really from me! Argh! Help anyone?
    stubbswk@gmail.com

    ReplyDelete
  11. why don't gmail do it as outlook express does....create a rule and it works right now.....geeeze even ole M$ is better......sad

    ReplyDelete
  12. I'd like to see a filter action which also marks the trashed message as SPAM. I keep getting unwanted messages by unknown persons from FACEBOOK asking me to join them. Although it would be difficult to blacklist Facebook, identifying them as serious spammers is something important to do in my book.

    ReplyDelete
  13. has anyone tried forwarding google calendar reminders received in your inbox to a listserv? I am trying to send reminders for practices and games for a kids sports team to parents. I can't seem to get my gmail to do this. Any suggestions?

    ReplyDelete
  14. I'm unable to apply filter to existing messages.

    ReplyDelete
  15. I'm unable to apply filter to existing messages.how to apply on existing messages

    ReplyDelete
  16. Hey

    Is der a way to move mails from certain id to directly in sub folders

    ReplyDelete
  17. I would LOVE an off gmail package where I can change my labels easily as well as the filters.

    I have about 50 filters that I have named aFilter or gFilter or zFilter etc. and I'd like to rename them or, at least, drag and drop them to be sub-directories of other labels.

    ReplyDelete
  18. The lack of the unread as a standard option in any location is retarded...would think this is useful to anyone, regardless of what filter, inbox, star, etc..

    If you create a filter with this "is:unread" it seems pointless because then you have to apply a label so you can find them...and then the application of the label itself gets in the way, as it is now applied to "read" mail...

    would love a solution to this...being able to simple have a nav menu you can hit in the normal UI to show a subset of unread... Microsoft Exchange has had this for years, and I use it daily...+1 MSFT.

    ReplyDelete
  19. @Anonymous:
    Here's the thing: Gmail filters are only triggered when you receive a message. Obviously, all the messages are unread when you receive them.

    ReplyDelete
  20. Here's a nice way of filtering out Newsletter - http://www.tech.nolicio.us/2011/09/gmail-filter-to-prevent-newsletters.html

    ReplyDelete
  21. We want to send an email to about 20 people and
    those using gmail don't get it.
    What can we do?

    ReplyDelete
  22. The account-filter trick does not work for bulk mailers (whose "to" field often is their own address or some similar nonsense).

    ReplyDelete

Note: Only a member of this blog may post a comment.