Is there a way to implement a whitelist-based system in Gmail? Specifically:

  1. all messages coming from addresses in a "white list" get through;
  2. all messages coming that are responses in a pre-existing thread get through;
  3. all messages that include a special "passcode" string get through;
  4. the remaining messages trigger an automated canned response giving instructions on how to get added to the whitelist; these massages are automatically marked as spam.
  • Will you settle for a need to update two filters when you change white list? Feb 13, 2012 at 3:25
  • I'm definitely interested!
    – kjo
    Feb 13, 2012 at 17:35
  • 1
    OK, I'll put together an answer Feb 14, 2012 at 0:31

1 Answer 1


Enter the following in the search bar, replacing the angle-bracket delimited stuff with actual details.

-from:{<space-separated list of whitelisted emails>} AND -body:{<passcode>} AND -label:{whitethread}

Run the search, then click the dropdown arrow in the search box:

enter image description here

Select "Create filter with this search", and make it send the canned response.

Now, run a search for

from:{<space-separated list of whitelisted emails>} OR body:{<passcode>}

and make it apply the label "whitethread" in the same manner.

Also apply "whitethread" to all the emails in your account. (All Mails>Select All)

This will put all "whitelisted" emails/threads in a label, and check for mails:

which do NOT come from your whitelisted email, AND don't have the passcode, AND aren't in the whitelisted thread. Probably what you wanted :)

  • awesome!!!! thank you
    – david72
    Feb 17, 2021 at 18:34

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.