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 [email protected] 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: [email protected] 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 firstname.lastname@example.org 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 email@example.com and set your spam account to forward to firstname.lastname@example.org.
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:[email protected] in the Has the words textbox. Congratulations, now all of your forwarded email will be automatically labeled! 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”).
Coincidentally, an Official Gmail Blog post about plus addressing 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. The official blog post did not mention the real secret to making plus addressing work, though, which is the “deliveredto:” operator.