4

Does anyone fathom how to setup a Gmail/Google Apps Mail filter that catches ALL destinations to a particular domain?

I've tried

deliveredto:*@mydomain.com

and

deliveredto:@mydomain.com

in the "Has the words" field but neither work.

Similar to this question except not specific to any complete address (only the domain is constant in my case, the user/account part before the @ is unpredictable): Is it possible to create a Gmail filter that works on headers other than From, To, Subject?

I already have another filter setup to catch and forward *@mydomain.com in the To: field; that works fine.

3 Answers 3

4

deliveredto:"@mydomain.com"

Not sure why this works when the others don’t, but the quotes act as some kind of delimiter.

2
  • Haven't tried it but thanks. Parens worked for me.
    – Marcos
    Commented Apr 25, 2012 at 12:31
  • Its not longer working in 2023 sadly Commented Jun 1, 2023 at 10:42
2

Using parens seems to do the trick:

deliveredto:(*@mydomain.com)

Also figured out how to negate properly (placement of hyphen):

-to:(*@mydomain.com)

Combined:

deliveredto:(*@mydomain.com)  AND  -to:(*@mydomain.com)  AND -cc:(*@mydomain.com)
0

You can separate different emails and use - (minus) to negate, like this in "to:" text box, like this (literally):

@domain.tld [email protected]

This would make possible labelling or processing a catch-all, so it would match every email for @domain.tld which is NOT (-) for [email protected]. Thanks to @Marcos for helping me find the answer.

Your Answer

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

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