Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mail rules in Lion not working

Multiple issues here.


  • Rules are not applied - though I confirm they should.
  • Rules don't actually change.


Has the whole rules functionality wor for you?


Thanks

MacBook Pro, Mac OS X (10.7)

Posted on Jul 22, 2011 10:12 AM

Reply
89 replies

Jul 26, 2011 11:25 AM in response to simonparker

I appeared to be having the same problem, then I realised that messages marked as read by an IMAP server were not having rules applied, while new messages unread on the IMAP server are having rules applied. I don't remember this behaviour before, and only have IMAP accounts, so presume Mail in Lion is handeling IMAP accounts slightly differently.


Hope that helps or leads to an explanation.

Jul 26, 2011 1:54 PM in response to phaistonian

Actually, that's not the full story: The IMAP accounts on my work user account don't seem to be handling rules in any dependable way, while the IMAP account on my personal account is working as it always has. Think I'll try deleting and recreating the rules. Begining to think the Lion mail migration process has upset the balance. Will let you know.

Jul 27, 2011 2:07 PM in response to phaistonian

After re-creating all of the 30 some rules I used in Snow Leopard in Mail in Lion, I discovered that many of them were not working properly.


The rules that specified relatively simple criteria to match, such as specific strings to search for in the From, To, Subject fields, were working OK.


The rules that weren't working properly were the ones for Apple Developer mailing lists, in which I look for a string value in the custom List-Id header. For example, if the List-Id of the email contains cocoa-dev.lists.apple.comcocoa-dev.lists.apple.com, move it to such-and-such a mailbox. I noticed after I added the custom header field to the list of rule headers (by using the Edit Header List… command), that List-Id was sometimes changed to just plain List. After quitting mail and looking at the saved version of Mail's rules (in the file /Users/<username>/Library/Mail/V2/MailData/MessageRules.plist), I found that Mail was saving the rules as List rather than the proper custom header of List-Id. As a result, the rules appeared not to work because, obviously, there was no List header value. After editing the MessageRules.plist manually with Property List Editor, and replacing List with List-Id, all of the rules started working properly.


Just wondering what types of rules you guys had and whether it might be the same inability to save headers with a - in them.

Jul 30, 2011 10:24 AM in response to phaistonian

Ok. Good news. I think I figured out the problem and a workaround. After umpteen hours of testing, it appears the problem is isolated to IMAP email. (I'm not using Gmail IMAP.) The problem does NOT seem to occur with my MobileMe mail.


Here's the scoop: for whatever reason with IMAP mail, when a Move action is combined with others (highlighting background in color, adding mailtags, marking as read, etc.), the Move action is performed but the others are not always applied. What's the solution/workaround? The Move action needs to be placed in a separate rule. For example, Rule #1 can say set background color, add mailtag 'abc', add mailtag 'xyz', and mark as read. Rule #2 can say Move to folder. Rule #2 MUST occur after Rule #1 in your Preferences list.


Alternatively, if you're using Indev Mail Act-On, you can define Rule #1 as I did but then add the following action LAST in the action list: Apply Act-on Rule "Move My Email to Folder ABC" ...whereas, "Move My Email to Folder ABC" would be an independent rule you have defined in Preferences > Rules > Act-On.


If the solution above works for you, please make a note here so others know. Thanks! 🙂

Aug 1, 2011 5:00 PM in response to MileHiGuy66

I'm experiencing this same issue with many of my rules not working. However, I only have color coding mine and even those don't work dependably. They are IMAP accounts, but I don't have any move actions. I did notice that I right click on a single message and select "Apply Rules" the rule performs, but of course this is no solution.

Mail rules in Lion not working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.