Gmail – Filter out notifications from github except those from specific users

gmailgmail-filters

I belong to a Github organization and am being overwhelmed by notifications sent to the various repos in that org. I have a team of people whose notifications I do need to see; I'd like to filter out every other message.

These notifications have from fields such as:


Guy DeFalt <notifications@github.com>
SomeGithubUsername <notifications@github.com>
Grace Hopper <notifications@github.com>

Ideally, I'd like to auto-archive anything matching a GMail filter like:

-{"Guy DeFalt" OR "SomeGithubUsername" OR "Grace Hopper"} AND from:notifications@github.com

However, this doesn't work: notifications that include, say, Grace Hopper are still being filtered out. How do you filter out all messages from a specific email address except those of particular, specific people?

Best Answer

You can setup the filter for the FROM address field to reflect both a person's display name and email address as follows:

Guy DeFalt <notifications@github.com>

Additionally, if you want just one filter for multiple email addresses you can use a logical OR between parentheses wrapped name/email pairs

For your example use case, you'd set up the filter's From field as:

(Guy DeFalt <notifications@github.com>) OR (SomeGithubUsername <notifications@github.com>) OR (Grace Hopper <notifications@github.com>)

Gmail Filter with multiple email names/addresses

You can use the SEARCH button to test the filter before applying/saving it.