If you're like me, you've gotten tired of checking each of your multiple email accounts and have finally decided to have all of your mail forwarded to your main Gmail account. You login to the extraneous accounts and set them to forward to you@gmail.com. You login to Gmail and setup filters based on the To: header so your forwarded mail is automatically colored orange. It sounds like a great plan -- and it is -- until you discover that only some of the forwarded messages are getting labeled. Huh? As it turns out, those mailing list messages are addressed To: mailing.list@school.edu and those viral marketers can't be bothered with the To: header at all, so your filters aren't very effective.

Fear not, however, because there is a simple solution to this problem! This trick works because of plus addressing, a feature in Gmail that allows you to create an unlimited number of email addresses by adding a plus symbol (+) after your username. In other words, all mail sent to you+anything@gmail.com will arrive in your inbox. You can take advantage of this when aggregating your email accounts by having your secondary accounts forward to a unique plus address. For example, set your school email to forward to you+school@gmail.com and set your spam account to forward to you+junk@gmail.com.

Now for the real key: Gmail has a secret "deliveredto:" search operator that will catch all mail arriving at the given email address -- whether or not you were listed in the To: header. In other words, this will even apply to messages from mailing lists and bcc emails. To automatically label you forwarded junk mail, for example, create a new filter and type deliveredto:you+junk@gmail.com in the Has the words textbox. Congratulations, now all of your forwarded email will be automatically labeled! [Update 3/28/08 (thanks Phil): The deliveredto: operator expects you to enter the entire email address, but if you want to filter on just a portion of the email address, you can place it inside of double quotes (for example, deliveredto:"+junk").]


[Update 3/5/08: Wow, what timing! An Official Gmail Blog post about plus address appeared about six hours after this was published. Although plus addressing is nothing new, this is the first time Google has publicly acknowledged its existence on their blog. They didn't mention the real secret to making plus addressing work, though, which is the "deliveredto:" operator.]