Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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.

share|improve this answer
add comment

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 name@site.com to 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.

share|improve this answer
add comment

Your Answer

 
discard

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.