How to Set Up a Contact Only Email Filter

Aymane S. Aymane S.

Route non-contacts out of your Inbox in ~10 minutes using Gmail filters, labels, and precise “from:” rules.

Filter Emails from unknown senders

Take control of your Inbox

4.7 based on 1,011 user reviews
Get Started for Free

1. THE OUTCOME

When you’re done, Gmail will automatically treat mail from your approved people (your “contacts”) as first‑class: it lands exactly where you want (Inbox + label, or a VIP label), and it’s far less likely to be buried in Spam. Everything else can be routed to a separate label for later review.

This is the “inversion” approach: don’t guess what’s bad—only allow what’s good.


2. BEFORE YOU START

  • Required: Gmail on a desktop browser (Chrome/Edge/Safari/Firefox). The Gmail mobile app can’t create filters.
  • Required: Permission to open SettingsSee all settings (some managed Workspace admins restrict this).
  • Required: A short list of people you trust (5–50 senders) or one trusted domain.
  • Optional but helpful: Your contacts are already saved in Google Contacts.
  • Time estimate: ~5–10 minutes setup + ~2–5 minutes testing.

Gmail cannot build a true “only allow emails from Contacts” gate by itself. Filters match patterns you specify. If your contact list changes daily, you’ll need ongoing maintenance—or automate it (see “The Better Way”).


3. THE STEPS

Step 1: Decide what “contact-only” means for you

Pick one of these models before touching Gmail settings:
- Short allow-list (recommended): Only specific people (your real contacts) get VIP handling.
- Domain allow-list: Anyone from @yourcompany.com and @topclient.com gets VIP handling.
- Hybrid: VIP handling for certain people + separate routing for everyone else.

Expected result: You have a clear rule set (people and/or domains) so your filter won’t sprawl.

If you want “contact-only” because of spam bombing or phishing, combine this with security hygiene. See: /blog/how-to-stop-gmail-spam-bombing-fast

Step 2: Create a label for approved senders

  1. Open Gmail on desktop.
  2. In the left sidebar, click More (if needed).
  3. Scroll to Labels and click Create new label.
  4. Name it KK:CONTACTS (or Contacts Only).
  5. Click Create.

Expected result: A new label appears in the left sidebar.

Keep label names sortable. Prefixes like KK: or 01- keep your “screening” labels together.

Step 3: Open Gmail’s filter editor

  1. Click Settings (gear icon).
  2. Click See all settings.
  3. Click Filters and Blocked Addresses.
  4. Click Create a new filter.

Expected result: A “Search mail” filter dialog opens with fields like From, To, Subject, and Has the words.

Step 4: Type your allow-list using a precise From rule

In the filter dialog, use one of these patterns.

Option A (best for a handful of people): OR-match multiple emails

In From, paste:
- alice@company.com OR bob@client.com OR ceo@partner.org

Option B (cleanest syntax): Curly-brace group

In From, paste:
- from:{alice@company.com bob@client.com ceo@partner.org}

Option C (domain allow-list): Trust a whole domain

In From, paste:
- *@yourcompany.com

Expected result: The From field contains your exact allow-list logic.

Avoid mixing commas in the From box. Gmail is picky. Use OR or the { } grouping.

Step 5: Preview matches before you create the filter

  1. Click Search (or Search icon in the dialog; Gmail may show “Search” instead of “Create filter” depending on UI).
  2. Review the results list.
  3. If results are too broad or too narrow, click the filter bar again and adjust your From value.

Expected result: Search results show only messages from the people/domains you intended.

If you get zero results but you know emails exist, remove domain wildcards and test a single sender first: alice@company.com.

Step 6: Create the filter and choose VIP actions

  1. Re-open the filter dialog (search bar caret) if needed.
  2. Click Create filter.
  3. Select actions:
    - Check Never send it to Spam
    - Check Apply the label → choose KK:CONTACTS
    - Optional: Check Always mark it as important (only if you really mean it)
    - Optional: Check Categorize as → choose Primary (if Categories are enabled)
  4. Optional: Check Also apply filter to matching conversations (for retroactive labeling).
  5. Click Create filter.

Expected result: The filter appears in SettingsFilters and Blocked Addresses, and matching mail is labeled.

Those checkboxes you see next to filters in the list are not enable/disable toggles. They’re selection boxes for bulk actions like export/delete. Filters are active even when unchecked.

Step 7: Create a label for everyone else (outsiders)

This label is where you’ll review non-contacts on your schedule.

  1. In the left sidebar, click Create new label.
  2. Name it KK:OUTSIDERS.
  3. Click Create.

Expected result: You now have two labels: one for approved senders and one for outsiders.

Step 8: Add a “catch-all” filter for outsiders (optional, but powerful)

Gmail does not have a perfect “NOT in contacts” filter. The practical workaround is: filter “known good” into KK:CONTACTS, then aggressively route common noise patterns into KK:OUTSIDERS.

  1. Go to SettingsSee all settingsFilters and Blocked AddressesCreate a new filter.
  2. In Has the words, paste a broad rule set you want treated as outsiders. Examples:
    - unsubscribe OR "view in browser" OR "manage preferences"
    - list: OR "mailing list"
  3. Click Create filter.
  4. Choose actions:
    - Check Apply the labelKK:OUTSIDERS
    - Optional: Check Skip the Inbox (Archive it)
  5. Click Create filter.

Expected result: Many mass emails are routed out of your Inbox automatically.

This is methodology, not magic: you’re building a screening system. For why unsubscribing doesn’t scale, read /blog/unsubscribe-not-working-methods-compared/.

Step 9: Test the contact-only behavior

  1. Ask one approved contact to email you (or send from an approved account).
  2. Ask a non-approved sender (or use a second address) to email you.
  3. Confirm:
    - Approved sender: labeled KK:CONTACTS and not in Spam
    - Non-approved sender: not mislabeled as KK:CONTACTS

Expected result: Your rule matches the right mail, and false positives are near zero.

Step 10: Review and tune monthly (maintenance step)

  1. Open KK:OUTSIDERS once per day (or once per week).
  2. For any outsider you actually want, add them to your allow-list filter:
    - SettingsFilters and Blocked Addresses → find the allow-list filter → Edit
    - Add the sender using OR or inside { }
  3. Click ContinueUpdate filter.

Expected result: Your allow-list stays accurate as your real network changes.


4. COMMON PATTERNS (copy/paste)

These are proven patterns that work in the real world. Use them as building blocks.

Pattern 1: VIP people only (executive inbox)

  • Filter criteria (From): from:{chief.of.staff@company.com finance@company.com board@partner.org}
  • Actions: Apply label KK:CONTACTS, Never send it to Spam, optional Star it
  • Why it works: The only mail that gets VIP handling is explicitly named.

Pattern 2: Trust your company + top client domains

  • Filter criteria (From): *@yourcompany.com OR *@topclient.com
  • Actions: Apply label KK:CONTACTS, optional Categorize as Primary
  • Why it works: Domain allow-listing is easier to maintain than individual addresses.

Pattern 3: Route newsletters out of the Inbox (not spam—just not urgent)

  • Filter criteria (Has the words): unsubscribe OR "manage preferences" OR "view this email in your browser"
  • Actions: Apply label KK:OUTSIDERS, Skip the Inbox (Archive it)
  • Why it works: Most marketing mail contains these strings.

Pattern 4: Protect important senders from Spam mistakes

  • Filter criteria (From): from:{billing@vendor.com support@criticaltool.com}
  • Actions: Never send it to Spam, Apply label KK:CONTACTS
  • Why it works: You stop the “good email in Spam” failure mode.

For more filtering mechanics and precision tips, see /blog/how-to-set-up-gmail-filters/.


5. THE BETTER WAY (KeepKnown: Contact-First Filtering)

Gmail filters are manual allow-lists. They work, but they break in two predictable ways:
1. Maintenance debt: Every new real contact requires editing the filter.
2. No true “outsiders” gate: Gmail can’t reliably say “if not in Contacts, quarantine it” using built-in filters alone.

KeepKnown solves this by enforcing the same methodology—strict allow-listing—but at the API/server level instead of per-filter guessing:
- Mechanism: API-based email filter (not a plugin)
- What it does: Automatically moves non-contacts to a KK:OUTSIDERS label/folder
- Why it’s safer: OAuth2 verified, CASA Tier 2, encrypted hashes (no plaintext storage)
- Where it works: Gmail/Google Workspace and Microsoft mailboxes

This is the KeepKnown Protocol:
- Stop relying on algorithmic sorting that guesses.
- Stop playing whack-a-mole with blacklists.
- Use contact-first filtering so only known people reach your attention.

If you want the “contact-only inbox” outcome without maintaining dozens of brittle filters, KeepKnown is the direct path: https://keepknown.com

Related methodology deep-dive: /blog/ai-email-sorting-vs-whitelisting/ and /blog/best-email-filtering-methods-compared/.


6. TROUBLESHOOTING

If the filter “does nothing,” then test the match first

  • Go to SettingsFilters and Blocked Addresses → find your filter → Edit.
  • Click Search (preview) to see if Gmail finds matching messages.
  • Fix common mistakes:
  • Use OR instead of commas.
  • Use from:{a@x.com b@y.com} for grouped senders.

If approved senders still land in Spam, then isolate the cause

  • Confirm your filter has Never send it to Spam.
  • Test using Gmail web only (disable third-party clients temporarily).
  • Add a second filter for the same sender with only Never send it to Spam (no other actions) to reduce complexity.

If the filter didn’t label older messages, then apply it retroactively

  • Edit the filter and ensure Also apply filter to matching conversations is checked during update.
  • If Gmail doesn’t show that checkbox on update, use search results:
  • Search for the sender(s) → select all → apply label manually once.

If you thought filters were “disabled” because boxes are unchecked, then ignore the boxes

  • On Filters and Blocked Addresses, the left checkboxes are for bulk actions (export/delete).
  • A listed filter is active by default.

Frequently Asked Questions

Why can’t I create a true “only allow emails from Contacts” filter in Gmail?
Gmail filters match patterns you specify (addresses, domains, keywords). Gmail doesn’t expose a reliable “sender is in my Google Contacts” condition for filters, so you can’t make a perfect contact-only gate without ongoing manual allow-list maintenance or an automation layer.
My filter has “Never send it to Spam,” but emails still go to Spam. What’s happening?
First confirm the message matches the filter (use the filter’s Search/preview). If it matches, test delivery in Gmail web only—some third-party clients or sync apps can interfere with routing. As a workaround, create a dedicated single-purpose filter for that sender with only “Never send it to Spam.”
How do I include multiple contacts in one filter without mistakes?
Use either `alice@x.com OR bob@y.com` in the From field, or use grouped syntax: `from:{alice@x.com bob@y.com}`. Avoid commas; they often fail or behave unpredictably.
Do the checkboxes next to filters enable/disable them?
No. Those checkboxes only select filters for bulk actions like delete or export. A filter listed on the page is active even when unchecked.
Why can’t I set up this filter on the Gmail mobile app?
Gmail’s mobile apps don’t support creating or editing filters. Use Gmail in a desktop browser and go to Settings → See all settings → Filters and Blocked Addresses.
How do I apply my new contact filter to emails already in my Inbox?
When creating the filter, check “Also apply filter to matching conversations.” If you missed it, edit the filter and re-run search, then label matching messages manually once to catch up.