Choose Mail > Preferences, and then click Rules.
To review an example of a rule, select a provided rule and click Edit. To close the rule, click Cancel.
Click Add Rule, and then type a descriptive name for the rule.
Indicate whether any one or all of the conditions must be true for the rule to be applied to a message.
Specify the conditions.
Use the pop-up menus and entry fields. Click Add ➕ to add another condition.
From the first pop-up menu, you can choose Edit Header List to use other header fields, such as Cc, in conditions. To add your own header, click Add ➕ in the Message Headers window.
Choose actions to perform on messages that meet the conditions. To specify multiple actions, click Add (+).
Here is a screenshot of an example of what you would do:

Hope this helps,
xeni