Advertisement

Mail.app rules!

One of the neat things about Mail.app is rules. Rules will perform a specified action if a certain condition is met. These actions include moving, copying, and setting the color of a message, as well as automatically replying, forwarding, and redirecting a message. For example, the "News from Apple" rule, which highlights messages received from Apple in light blue, is included in mail.app by default. Here are a few of my favorite rules.

To create a rule, choose "Add Rule" within the "rules" pane of mail.app's preferences.

When some emails are more important than others
Some emails are more important than others. With this rule, you'll know get a more visual way of discerning which emails may demand more immediacy. Say you're awaiting an email from Stan Sitwell, (CEO of Sitwell Enterprises), about a possible business deal. The following rule will result in the mail.app icon bouncing in the dock when an email from Stan Sitwell, or a high priority, message arrives in your inbox.

  • In this case, "any of the following conditions" should be chosen

  • "From" contains "stan@sitwellenterprises.com"

  • "Priority is high" -Perform the following actions: "Bounce icon in dock"

And then there are the less important emails
Say your brother, George Oscar Bluth (also known as "GOB"), continually asks you to borrow money to help fund his fledgling career as a magician. You're tired of it, and you want any email from GOB that contain the word "money" in it to automatically be filed in a special folder.

  • Here, "all of the following conditions" should be selected

  • "From" contains "gob@bluthcompany.com"

  • "Message Content Contains" "money"

  • In the "Perform the following actions" action, choose "Move Message" to mailbox and choose the folder of your liking

Announce the name of the email sender
Similar to how mom would tell you if Jimmy or Mike was calling on the other line, this mail rule, when combined with an AppleScript that George Sudarkoff put together, will speak the name of the sender of the message as the message arrives in your inbox. What's more, if you have a song playing in iTunes, said song will pause and resume play after the name is spoken.

  • First, launch the AppleScript Editor and copy and paste the code from this page on George Sudarkoff's site. Then, save the AppleScript somewhere on your computer.

  • Now, choose your conditions, as you may not want the names of all senders read along.

  • In the "Perform the following actions" action, choose "Run AppleScript," and select the AppleScript file you just saved.

Automatically queue up torrents
One of my favorite mail-centric AppleScripts that I like to incorporate with rules (via macosxhints) automatically runs an AppleScript when it sees the words "download torrent" in the subject field. To do this, just click on Mail.app's preferences and create a subject-based rule that, when met, will run a AppleScript: that particular AppleScript is downloadable here [download link]. The AppleScript will then launch your specified torrent client (by default, it's Azureus, so you'll need to use the AppleScript Editor to change this if you so desire) and add the torrent file to the queue.

While torrents are often used for illegal purposes, there are many legally distributed torrent files, which often help companies and individuals reduce their bandwidth burden; for example, while at work, I've emailed myself the torrent files for new releases of the iPhone PwnageTool.

As the issue of the legality of torrents and P2P networks may vary depending on your locality, users should abide by their local laws accordingly.

Readers, let us know about some of your favorite rules in mail.app.