How to Set Rules for Mail in Mountain Lion
If you really want to tap the power of Mail in OS X Mountain Lion, you need to set rules. With some cool rules, you can automatically tag messages with a color; file them in a specific mailbox; reply to/forward/redirect the messages automatically (handy when you’re going to be away for a while); and automatically reply to messages.
Rules even enable you to kill-file messages (just delete them without even bothering to look at them — what better fate for mail from people you hate?).
Here's how to create rules in Mail:
Click the Rules icon on the toolbar of the Preferences window.
Click the Add Rule button.
The first condition should say From in its first pop-up menu and Contains in its second pop-up menu. Look at your options in these menus but return them to their original state — From and Contains — when you’re done looking.
In the field to the right of the Contains pop-up menu, type a word you want to filter for.
Below the condition you just created, you should see an action under the words Perform the Following Actions. It should say Move Message in its first pop-up menu and No Mailbox Selected in its second pop-up menu.
Look at the options on these menus, but this time, change the first one from Move Message to Play Sound and the second one from No Mailbox Selected to Blow.
Type a description of the rule, such as Message from LeVitus, in the Description field.
Mail asks whether you want to apply your rule(s) to the selected mailboxes.
Choose Apply if you want Mail to run this rule on the selected mailboxes, or choose Don’t Apply if you don’t.
And that’s how you build a rule. From this point forward, every time you get a message from Levitus, you hear the Blow sound.
Notice the little + (plus) and – (minus) buttons to the right of each condition and action. Use the + button to add more conditions or actions and the – button to delete a condition or action. If you have multiple conditions, you can choose Any or All from the pop-up menu above them, which executes this rule when either any of the conditions or all of the conditions are met.
Either way, all the actions you create are always executed when this rule is triggered.