I've setup gmail to capture all of my newsletter type mail using a single filter:

from:(railsstudio OR vistaprint OR shutterfly OR Weaknees OR snapfish OR lobster OR rentals OR vrbo OR "world vision" OR benihana OR madcap OR "Denver Center" OR "Great Harvest" OR "Olive Tree" OR "Cold Stone" OR Tivo OR Maggiano OR Marriott)

I then apply a label to all of those messages.

Is this a good approach to label mail from a lot of sources? Is there a limit to how many items can be in my "OR" list? Is there a performance tradeoff between one OR filter and lots of single filters?

5 Answers 5


I would not worry about performance since it won't significantly affect your experience in Gmail, especially since this only gets applied to incoming emails.

I think in this case it is a matter of personal preference. If you really want to have everything wrapped in one filter, then your approach is fine. I would personally recommend separate filters, though, so you could turn on/off individual filters for troubleshooting purposes, or if you change your mind on what labels you'd like to have applied.

For example, if the word "rentals" is too generic and false positives start getting labeled, you'd have to edit that long filter text. If you had a separate filter for each keyword, you could simply edit or delete one filter. Also, if you add a lot more keywords to filter by, it might be easier to just add them as separate filters rather than deal with squeezing more characters into one long filter list.

I don't see any harm in labeling mail from a lot of sources. It all comes down to how precise your filter is and whether the keywords affect only those emails you want and none other. In the end the filters are meant to help you organize your email, and that's exactly what you're using them to do.


Yes: 1,500 characters. More than that and it'll warn you that the filter criteria is too long. As far as I can tell, and given the passive nature of filters (they're "activated" on email reception), you shouldn't get performance issues. Furthermore, when you filter them, you're likely assigning them a label, which will make searching for them a lot quicker, since no logic will be needed for that action.

I organize my email very similarly (filtering lists/newsletters) and I needed 3 filters for that. To organize them, I keep a text file on my computer, with an email per line (starting with "OR "), where I remove any possible duplicates, and then copy just under 1,500 characters per filter (and remove the initial "OR ", obviously).

Hope this helps. :)


I have some conditions in Gmail with over a dozen "from" addresses OR'd together and they work fine. I presume that the work going on in the Gmail server is similar, whether the from addresses are in one filter or in one filter each, though I don't work at Google and haven't seen the Gmail code.

However, I would note that once the list gets rather long, it is easier to have an editing error in the condition that goes unnoticed and breaks the filter. I just arrived at this Q&A because of a filter that was failing. I thought it might be from too many ORs, but when I copied the condition out to a text editor to split it into two conditions I discovered that one of the email addresses had gone from

[email protected]


name @site.com

which broke the list of OR conditions. I never got a message from Gmail that it had a problem with the condition, it just no longer meant what I wanted it to mean.


I would approach this problem very differently and use subaddressing when signing up to newsletters instead of updating your filter every time you sign up for something new.

Everytime I sign up for a newsletter I use the e-mailaddress [email protected]. I then create a filter that looks for "newsletter" among the recipients. This way you only need to create the filter once and never update it again. I have several categories like this, such as forum, shopping, support, work, car and so on.

(The reason I add vistaprint.com is that that allows me to identify who might have leaked my e-mail address to spammers. The "-" at the end indicates that I did not accept to receive other messages from them. Not that useful when we talk about newsletters but when I buy something online I am frequently asked if I want to receive their newsletter. When I explicitly refuse that I add - at the end.)


There is another GMail filter syntax that is a bit shorter. Remove the OR (leave a space) and put the terms inside curly braces. Use () for combined terms.

from:{railsstudio vistaprint shutterfly Weaknees snapfish lobster rentals vrbo (world vision) benihana madcap (Denver Center) (Great Harvest) (Olive Tree) (Cold Stone) Tivo Maggiano Marriott}

However whatever syntax you use, I have found that GMail has some unknown limits to handling long lists. If you see Oops #2002, you have found that limit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.