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.
Share
Categories
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...
Add a Comment
sometimes, my rules overlap and i want one rule to take priority - how can i control this?
December 08 2009 at 5:56 PM Report abuse Permalink rate up rate down ReplyWhat peeves me is that mail rules should be server based for mobileme, not local like now.
I want the rules to be performed on the mobileme server, instead of on the computer. Shouldn't be too hard to do, right apple?
I imported a ton of rules when I migrated from Eudora and immediately discovered some surprising oversights.
1. If you have more than a few dozen, have fun finding them. The best Mail offers is the highlight as-you-type method, which floods you with error sounds if you type too fast. I've been requesting iTunes-like filter/search for a couple of years.
2. To make finding Rules even more fun, when you select that tab in Preferences, the window shrinks down to show only nine of 'em. I don't know what legacy reason is behind it, but it's not great.
3. Unlike Eudora, the Rules UI offers little assistance. It doesn't automatically name your rule based on conditions, nor does it let you create new folders on the fly. It often requires copying, pasting and window swapping to make a new rule.
4. There is nothing to indicate when a Rule was last used, if ever. That can be very handy to weed out old junk. Unlike their useless "mood" icons for email, the little dinosaur icon on Eudora rules was instantly understood and convenient.
5. Emails in a Smart Folder don't have that handy "Show in Mailbox" link in the top-right corner, like a live search will show. Aren't Smart Folders just a pre-set search? (I use a Smart Folder to display unread/flagged emails as my Inbox after routing via Rules.)
That said, I use a combination of Rules and Smart Folders and don't miss Eudora much at all. I just wish Apple would put more "Apple" into it.
Whenever I get an email from my uncle, Mail.app points Safari to ImOscar(dot com).
December 01 2009 at 9:20 PM Report abuse Permalink rate up rate down ReplyGRR. I accidentally created a rule that highlighted every single email. I deleted it, and it still didn't remove the highlight.
How do I remove this rule?
Rules are not constantly live. They perform an action and then stop. It would have saved more time to use the same rule again with an opposite action.
December 01 2009 at 9:34 PM Report abuse Permalink rate up rate down ReplyDylan, as "G" suggests, how about creating a new rule that changes the background color of all your messages back to white? Then highlight all of your messages and select "Apply Rules".
December 06 2009 at 5:38 PM Report abuse Permalink rate up rate down Replythanks for the Tip!
you guys should have a rate this article button so that i can like articles
Apple Mail continues to fail me in one major respect that should not be a problem. I want to create a log of all messages filtered by my rules. I have set my various spam-deleting Mail rules to run an applescript which writes info to a log file, and then delete the offending message. What happens is that Mail changes the action order to delete the message first, and then NEVER RUNS the applescript. I even changed it to run a basic script that just pops up a dialog to say that the script has indeed run, but no dice.
I don't know if this will work, but here's a link to a screenshot of an example rule: http://imgur.com/dhPQ7.png
The script it calls is at:
~/Library/Scripts/Mail Scripts/Rule Actions/Log.scpt
I'm not including the script because it doesn't matter. Mail never runs it.
Anyone with an idea why this doesn't work? (I'm running 10.5.8, and upgrading to 10.6 is not a useful suggestion for me at present.)
Something must be messed up with your Mail.app installation:
-I have configured to only show To:-column in my Sent-box, and it is always remembered across restarts. No From:-column, since as you say it is not very informative.
- When double-clicking / pressing Enter on an already opened mail message, it automatically pops to the front.
- Not sure what you mean with a "rule" here, but you can always go to the Window-menu and select the main window there -> it will be above all message windows.
Are you running some kind of third-party plugin for Mail.app? As far as I can tell, Mail.app has worked exactly like this for quite some time. If not I fear you'll have to do some bug hunting :-(
How about a rule that says that if you specify that your Sent mailbox should show a To: column and not a From: column, which (duh!) always lists the sender (me), that this will remain in effect should I close mail.app?
How about a rule that says that if I attempt to open an already-open message, that there is sufficient program that it brings the open message to the front?
And how about a set of rules that allows me to send messages to the back of the stack of windows, so I can manage the mess that mail presents me with?
I DO realize these are not programmed rules, but they oughta be in place before we even talk about user initiated rules.
This is not rule related, but here's hoping someone can point me in the right direction:
Is there a way to have ALL attachments automatically zipped? I have a lot of clients who only see non-zipped attachments as inline files that they can't access. Very annoying. Would an Applescript do it, perhaps or am I missing something very obvious?
Hot Apps on TUAW
Deals of the Day
more deals- miFrame Picture Frame Dock for iPad for $64 + $8 s&h
- Refurb Apple iPod nano 8GB MP3 Player for $99 + free shipping, 16GB for $119
- Hannspree Apple-Shaped 28" 1080p LCD HDTV for $270 + free shipping
- Philips wOOx Alarm Clock Radio for Apple iPod / iPhone for $60 + free shipping
- iWatchz Elemetal Collection Bracelet for iPod nano for $75 + free shipping
- iFrogz Luxe Lean Hard Case for iPod touch for $10 + free shipping
Software Updates
more updates- EFI Firmware Update brings Lion Internet Recovery to 2010-model Macs
- OS X Lion 10.7.3 released with Safari 5.1.3, Wi-Fi bug fix
- Aperture updated to 3.2.2, addresses Photo Stream issue
- Apple updates Keynote to address Lion issues
- Google Search app gets new look on iPad
- Apple releases Apple TV Software Update 4.4.3



26 Comments