How can I filter all the messages sent to *@domain.com except for those sent exclusively to user@domain.com?

I tried to:domain.com AND -to:user@domain.com and to:(domain.com -user@domain.com) but it shows all the messages sent to *@domain.com that do not have user@domain.com as the recipient.

4 Answers 4


Was playing around with Gmail search. The syntax for what you want is as follows:

to:*@domain.com -to:user@domain.com

This also works for the "from" section as well, so it's good if you want to filter out unwanted sales and promo emails.

  • The asterisk isn't required.
    – Rubén
    Dec 1, 2018 at 23:19
  • Oh, thanks. I never really checked, and assumed that the asterisk was needed, considering it's widespread use as an identifier for "anything goes here".
    – 2001herne
    Dec 29, 2018 at 10:59

Unfortunately, what you want to do isn't currently possible in Gmail. You need a search operator like only or exclude, neither of which are among Gmail's list of operators.

It would be a nice feature to have; perhaps someone will develop a Gmail add-on with that capability.


I was able to do this by first creating a Label and a Filter for the user in which you do not want to see emails to.

  1. Go to settings
  2. Filters and Blocked Addresses
  3. Create a new filter
  4. Put the users email address in the To field
  5. In the bottom right click Create filter with this search
  6. Tick Apply the label - New Label...
  7. Tick Also apply filter to X matching conversations
  8. Create filter

Now all emails to that user will have a label attached to them.

For your search query: to:domain -is:LabelCreatedAbove

Just note that is your label has spaces like this I am a label the spaces will convert to - in the search box: I-am-a-label

  • 1
    But it still adds label to all messages sent to the user regardless of whether the user is the only recipient or not.
    – burtek
    Apr 23, 2017 at 19:29

If anyone is searching for a multi-domain automatic filter with one specific email excluded, Ben's answer could be extended to this:

{*@domain-one.com, *@domain-two.com} -user@domain-one.com

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.