# How to accept email *only* from white-listed addresses in Gmail? [duplicate]

Possible Duplicate:
How to implement a white-list-based system in Gmail?

I only want to accept email from two addresses, the rest I want to delete immediately, unseen.

I know how to make filters and I can white-list those two addresses.

If I make 3 filter, in this order;

1) from a@a.com move to inbox, never mark as spam
2) from b@b.com move to inbox, never mark as spam
3) from *@*.* delete immediately, never move to trash

can I be guaranteed that that will do what I want?

For instance, can I be sure that the filters are executed in that order? I don't want to lose any mail from those two addresses.

[Update] The accepted answer was almost correct, but instead of doesn't have <list of email addresses> (which did not work) I used from ~{<list of email addresses>}

The tilde ~ negates and the curly braces {} delimit the list. So, mail from anyone who is not in the approved list will be filtered.

## migrated from superuser.comDec 5 '12 at 3:15

This question came from our site for computer enthusiasts and power users.

Thought I'd leave this answer here as well in case it works for you:

You can try setting up a filter that only looks for emails that are NOT from the intended recipients. In the case you list int he question, you would set up your filter like this:

Doesn't have: a@a.com, b@b.com (Delete it)


This means that the filter selects everything unless it either comes from these addresses, or contains these addresses somewhere in the email thread.

By using the "Doesn't have:" field, this allows you to reply to the thread, have a non-contact reply, and still have the thread safely reach the inbox.

Filters are run in no particular order. Even if they were, your 3rd filter would delete all mails, including the ones u want to keep. You could instead create a filter to forward mails from those 2 email addresses to an other account. And if that account is new, you wouldn't need to worry about getting other emails.

• +1 Thanks, @AbhishekGirish. I was not sure if they run in order or not. Your suggestion of a new account would work, I suppose. – Mawg Dec 5 '12 at 3:19
• This did't work in the end. Please see the updated question for the solution. – Mawg Dec 27 '12 at 3:27

You could use multiple inboxes and labels, with the following settings:

1. Create two labels for those 2 very important addresses. (label1 1 & label2)
2. Create filters to attach those labels to messages from those addresses, and have them skip the inbox.
3. Enable the multiple inboxes option via Gear button/Settings/labs.
4. Under settings/multiple inboxes set the top 2 boxes as "is:label1" and "is:label2"
5. Increase the maximum page size to 50, to show 50 messages/conversations for those labels.
6. Set "Extra panels positioning:" to "Above the inbox" via the radio button.
7. Click save changes.

Only messages associated with those address will end up in the top two inboxes. The rest of the emails will be either in spam or the main inbox.

You can quickly archive all the unwanted messages by using the quick select shortcut for the main inbox that is on the left side of the taskbar for that inbox. Select all, slap a label on them, and then click archive. They will then only exist under that label, and be hidden from the main inbox.

Using multiple inboxes and the labels will make sure that any reply that can be associated with a message from the key addresses will appear with the appropriate label attached, and displayed at the top of the specific inbox.