Monday, August 16, 2010

Gmail: Robust tagging of forwarded email

One of the nice features of reading mail via POP 3 in Gmail is how it can automatically tag the emails with any tag of your choice. For example, you could create a tag for each email account you read. Then, you could select one of these labels to view only that mailbox’s emails.

The way it’s implemented in POP3 is very robust. Even if your name is not listed in any of the to fields (e.g. like in a BCC message), it will still tag the message correctly.

One of the drawbacks of using POP3 is that it can sometimes take up to an hour before it reads your mailbox. One solution for this is to use forwarding instead of POP3 which will deliver the emails as they arrive. However, if you switch to forwarding, you won’t have the correct tagging capabilities of POP3. In this post, I will show you how you can combine the two methods and get the best of both worlds.

Let’s say you have the following email accounts:

… and now you want to set it up so that the email from the first two is forwarded to the main one. This way you only need to check a single mailbox. Furthermore, let’s say you want the following tags:

  • sales
  • support

… which correspond to the first two email addresses, obviously. This is how you would set that up…

To set up robust tagging via forwarding in Gmail:
  1. Forward the mail to the main accounts plus address. Use a different address per forward.

    In the example above, you could set up to forward to and to
  2. On the main account, create a filter which checks for these plus addresses, and labels them, by doing the following:
    1. Create a new filter (in the main account).
    2. For the has the words field, enter:
    3. For the action, set it to apply a label of your choice (sales, in this example).
  3. Repeat the process for each account (besides the main account). Here’s what it looks like for the other account:
    1. Create a new filter (in the main account).
    2. For the has the words field, enter:
    3. For the action, set it to apply a label of your choice (support, in this example).

You now have all the benefits of POP3, with the instantaneous delivery of email forwarding.

Note: one other benefit POP3 has is that it will keep your account from expiring by logging in on your behalf every hour or so. If you want this feature, you could set up POP3 in addition to the above method so that both are working simultaneously. Don't worry, it won't cause duplicate emails.

Note: this is mainly written for reading from/to Google Apps or Gmail accounts, but should work with other providers as well.


  1. I like the idea of automatically tagging the forwarded emails with the right tags according to my choice. This is the reason why I love using POP3 in Gmail.

    email encryption

  2. This is a very good article, I think there will be many people like it, of course, I was one of the people. I think this article increase my knowledge. it is nice to know this. Thanks for the time and effort.

  3. Thanks for the great post. Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts.
    unblockedgamesfree4all | geometrydashliteonline | unblockedhappywheels | 1on1soccerheads | |