You may often receive emails from multiple senders within the same organization for example, @company.com. Instead of setting up individual filters for each email address, you can create a single domain-based filter. This ensures that any message from john@company.com, sarah@company.com, or any other user at @company.com will automatically follow the same rule. (e.g. Move to folder, Forward to another address, Mark as read, or Star the message).
Steps for Creating Domain-Based Rules.
From within Settings:
You can create domain-based rules by clicking on Settings (gear icon) → Preferences → Rules. When creating a rule based on domains, here’s what you need to specify:
a. Set the condition
Select conditions to identify emails coming from specific domains.
You can set the condition based on the sender’s domain, for example:
example.com.You can also combine conditions, e.g., from a specific domain and subject includes certain keywords.
b. Set the action
Once the condition is set, choose the action for emails that match the domain:
Move the emails to folders such as Spam, Archive, Trash, or any custom folder.
Mark emails as read, starred, or important.
Forward emails from a particular domain to another address.
You can also choose to apply the rule to existing emails in your inbox.
Once a domain-based rule is created, it can be edited or deleted anytime from the Rules section in Settings.
From within Open Email Thread
You can also create domain-based rules directly from an open email thread:
Click on More Actions (the three dots next to the email thread) → Create a Rule.
Set the conditions by selecting Domain from the dropdown menu.
Choose the action to apply, such as moving emails to a folder or marking them as read.