You can use inbox rules to automatically perform specific actions on emails that populate your inbox. You can send emails to certain folders, or delete the emails automatically.
1. Sign into your Office 365 email.
2. Select the Settings icon and then Mail.
3. In the Options panel that opens on the left, choose Inbox and sweep rules from the Automatic processing section.
4. Select Add under Inbox rules.
5. Type a name for the inbox rule in the Name field and then select a condition and action from the respective drop-down lists. You can add additional conditions or actions by selecting Add condition or Add Action.
6. Add exceptions to the inbox rule by selecting Add exception and then choosing one from the Add exception menu.
7. By default, the Stop processing more rules option is turned on. With this option on, when a message arrives in your inbox that meets the criteria for more than one rule, only the first rule will be applied. If you don't select this check box, all inbox rules that a message meets the criteria for will be applied.