Tell me more ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

If I have multiple filters that match the same email do they all get processed? If so, in what order are they processed? What if the first filter matched modifies the email to make it match (or no longer match) a different filter?

share|improve this question

6 Answers

up vote 10 down vote accepted

I just tried it, and it seems that they happen in the order they are defined in the list:

If you have:

  1. Star email message from:foo
  2. Apply label to is:starred

... then it will apply the label to the message. If you reverse the order, it won't.

share|improve this answer
1  
The caveat is that when you have multiple filters that skip the inbox, filters are processed in order but each mail is subject to all the filters before it is processed. – briankb Aug 28 '12 at 17:19

Any and all GMail filter rules that match will run and do their thing.

I'm not sure it's possible to create rules that potentially conflict. The filter criteria available are:

  • From
  • To
  • Subject
  • Containing words
  • Doesn't contain words
  • Has attachment

You can't affect any of these with the filter actions that are available, so I don't see how one rule could run and then affect the message in a way that would stop it matching another filter that it would have previously matched.

share|improve this answer
1  
you can add a label to a message and have a filter which uses label:, see this question. – Senseful Jul 7 '10 at 22:25
See also my answer which shows an example of this. – Senseful Aug 3 '10 at 0:00

The only exception to bbodiens comment (I was just about to post almost exactly the same answer!!) is that one would expect a 'marked as read' and 'archived' message to essentially skip further filtering, but this is not the case.

To test this i set up two test filters, one that labels incoming mail with the subject 'testing' as test1 and archives it, and a second filter on 'testing' that labels test2.

The mail was archived AND labeled twice, so it appears that filters are concurrent.

share|improve this answer
Bad test and incorrect conclusion -1 – Yar Nov 29 '10 at 20:58

I ran into a funky bug where the order of filters made a difference:

Filter #1: Apply label "Foo" to mail from "foo-sender"

Filter #2: Apply label "Bar" to all mail EXCEPT for mail from "foo-sender".

If I fully specify the email address in the filter definition, including the domain ("foo-sender@domain.com"), then the order doesn't matter. But if I just give the username without the domain in the filter definition (just plain "foo-sender"), then both labels are incorrectly applied to mail from "foo-sender". It only works if I reverse the order of the filters.

I think this is just a bug, not a feature.

share|improve this answer

If you have your filters set to be marked by labels an email will be label with all that match.

share|improve this answer

I think these two filters in this order will cause the email to remain in the inbox:

if From foo@bar.com then Skip the Inbox. if From @bar.com then Never send it to Spam.

share|improve this answer

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.