Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gmail Filter Based on Contact Label

I have a bunch of contacts associated with a label in gmail. I would like to set up a filter to label or delete all messages not associated with those contacts in the label. Has anyone found a way to do this?

Example https://snipboard.io/wLvuZt.jpg

like image 511
Chris Hough Avatar asked Nov 06 '22 01:11

Chris Hough


1 Answers

First create an email to the group (no need to send it) as described here, under "Use groups in Gmail". Then copy-paste the list of emails to create a filter for multiple emails in the format from:{email1, email2, ...}, as described here.

Here's the step-by-step procedure:

  1. In gmail Compose a new message
  2. In the To: field type the name of the Group (aka the label)
  3. Press Tab - this will expand the list of recipients
  4. Press Ctrl-A to select all recipients (or click the first recipient to select it, then Shift-click the last recipient to select all recipients)
  5. Copy the recipients with Ctrl-C
  6. In the Search mail field enter -from:{LIST}, where LIST is the list of emails you copied (you can paste it with Ctrl-V)

The - is because you asked for "all messages not associated with those contacts in the label".

The {...} is an "OR" operator.

like image 104
Robert Mikes Avatar answered Nov 13 '22 23:11

Robert Mikes