Suppose someone sends me an email. If he is not in my contact list, I want his mail will go in a "Stranger" label.
How to create filter for this this label?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communityYou can do this:
You can also add whole domains inside like *@domain.com inside the {} just remember to add extra OR between every address.
Little tricky but should work. I hope this helps! :)
When posting your email adress, you could use a different email adress like [email protected]
where codeword
could be the name of the website you're posting the address (or just a random word you like).
In the filters, label any email not sent to [email protected]
(without a code) as stranger
(or all emails sent to [email protected]
).
Using multiple email address can be really helpful in tracking where the spam comes from and for blocking it.
I couldn’t find an automated way to do this (the way I do it in Outlook/Exchange), so I wrote a Google Apps Script that will keep checking Gmail and create a filter for email sent from addresses that are not in my Contacts. The code and a YouTube video showing how to install and schedule it are at https://github.com/garyholeman/CreateGmailFilters.