Rather than configure email filter rules in your email client, you might want to configure filters on the server. Many hosted email servers such as iCloud and Gmail support this. The advantage is that rules are carried out before the message is delivered to all your devices and will even execute if your devices are offline.
To configure server-side rules for your iCloud email account, log in to icloud.com using a web browser. Click Mail. Click the gear in the upper right corner. Click “Rules…” from the drop down menu. Then click the “Add a Rule” button.
You can move incoming emails to a folder, to the trash, or forward it depending on criteria you choose.