Rules run automatically when new mail arrives.
- In Mail, open Mail settings → Rules and filters and click New rule.
- Add conditions, for example From (address) contains newsletter. All conditions must match.
- Add actions: Move to folder, Mark as read, Mark as unread or Move to Trash.
- Save the rule.
Rules run in the order they are listed. Drag them to change the order, and use stop to keep later rules from running on the same mail.