I want to setup a mail filter to filter my catchall email by their domain and subdomain only.

I've tried the obvious way of to:example.com for the primary domain and another filter to:sub.example.com for the subdomain, but the problem is that anything to the subdomain is tagged from the to:example.com filter as well and I want them completely separate.

So I tried to:(example.com) -to:(sub.example.com) for the primary and the reverse for the subdomain, but then for some reason nothing is being tagged in the subdomain even though the primary one is working correctly. Argh. Any ideas?


If you want to do the opposite of to:(example.com) -to:(sub.example.com), you need to do to:(sub.example.com). If you add -to:(example.com) you'll also exclude all the sub.example.com as well.

| improve this answer | |
  • Thank you! Wow, so obvious now when you explained it like that. I had to do it in reverse since as you said, I was excluding the primary domain. Thank you! Just tested it and worked as expected! :) – Elsa Nov 21 '14 at 7:56
  • Always happy to help. – ale Nov 21 '14 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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