Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create a filter in gmail as:

to:@mycompany.com OR from:@mycompany.com

However when I attempt to create or edit a filter I am given a form with individual fields and cannot find a way to create a combined filter as above.

Has anybody successfully created such a filter lately and how would I do it?

UPDATE: The Build advanced Gmail filters and persistent searches article has the solution. Put the query, as above, into the "Has words" section of the gmail filter! Fantastic!

share|improve this question

migrated from superuser.com Oct 5 '10 at 14:07

This question came from our site for computer enthusiasts and power users.

Do you men filtering or searching with that criteria? – cYrus Oct 5 '10 at 13:21
'filtering' means 'message arrived - aplly it a label/archive/delete/forward. So what? – mhambra Oct 5 '10 at 13:29
(*typo: mean) I know what a filter is. You can't create a filter but you can search for to:@mycompany.com OR from:@mycompany.com. – cYrus Oct 5 '10 at 13:36
up vote 7 down vote accepted

Currently, you can not create such filters. Create two and use both. If you really need strict display of only @mycompany.com-related messages in your inbox, either use IMAP and some client, or some GMail app (there are few for MacOS), or write a greasemonkey script that hides anything without from/to label.

UPD: http://lifehacker.com/276499/build-advanced-gmail-filters-and-persistent-searches -- really neat, thought that just adding e-mails to a list of known words is not good, but didn't know that!

share|improve this answer
Ah, so one cannot definitively mix advanced search classifiers in their filter. Looking at lifehacker.com/276499/… seems to imply this is possible in the "Has words" section... – PP Oct 5 '10 at 13:35
If you want to edit your answer with the solution I've provided I'll accept it as the authoritative solution. – PP Oct 5 '10 at 13:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.