10 Replies Latest reply: Feb 14, 2014 4:40 PM by Neville Hillyer
WHN Level 1 Level 1
How can I sort the mail rules, say by Description or by name.

I have a lot of them and they are sorted by the time I added them.

I KNOW you can sort them manually, but surely there has to be a way to sort them by a click of a mouse, or a script or something.


MacBook (Late 2008) | Mac Pro, Mac OS X (10.6.6)
  • Jeffrey Jones2 Level 6 Level 6
    The order of rules is significant. They are executed in the order listed. If you could reorder them at a click then you might break some rules that assume that another rule was (or was not) previously executed.
  • WHN Level 1 Level 1
    Thanks, assume I don't care about the significant nature of the order of rules and want to visually see them all in alphabetical order, or otherwise, is this possible to do, other than to do over 100 rules I have manually?
  • WHN Level 1 Level 1
    anyone? thanks.
  • WerdnaYbrad Level 1 Level 1
    ... I'm also searching for an answer to this question.

    In addition, does anyone know of any plugin's for Mail that tackle this, and other Mail limitations?
  • LostAccount Level 1 Level 1
    I think I understand your issue and frustration.

    Let me confirm the issue first to be sure we are talking about the same thing.

    From Mail>Preferences>Rules you can see a list of all the rules you created and the list is rather long and likely not in alphabetical order making it very challenging and frustrating to find a rule for editing purposes. If this is your issue I can certainly understand. I might have a hundred rules setup as well and this is by far one of the weaker points of Mail rules.

    The only way to organize the list in a coherent human readable fashion is to grab a rule and drag it up or down the list. I tried to grab multiple rules and move them together but that can't even be done. This is most frustrating indeed.

    I suggest a few things. If your list of rules are in alphabetical disorder start organizing a few a day - patience is a virtue here. The other suggestion I can make is that when creating a new rule, immediately order it in the list so that it appears where you like.

    I wish Apple would create a way to order the list, it would seem mac like if one could just click on the 'Description' title to have Mail order it automatically. Creating sets would be a bonus to add even more organization.

    We'll have to patient and hope adds this obvious feature.

    For now please send Apple feedback at apple.com/feedback, at least there will be two of us who've sent feedback.

  • Cowicide Moo Level 1 Level 1

    This makes me wonder if enough people at Apple actually USE Apple Mail on a consistent basis.  Maybe they use a third party email app and I'd be smarter to do so as well?  Not being able to temorarily or otherwise have the option to sort the rules alphabetically hinders my workflow when I need to edit a preexisting rule.  Or at the very least allow us to search the rules and have them come up that way!


    This glaring flaw in Apple Mail should be an embarrassment to Apple.

  • Neville Hillyer Level 4 Level 4

    Rules reside at: ~/Library/Mail/MessageRules.plist


    This is an xml text file which can be edited with Textedit to reorder rules.


    A practical implementation would require a script because each rule consists of nearly 50 lines of text.

  • James Reid1 Level 1 Level 1
    Mac OS X

    @NevilleHillyer, et al:


    I think also it would be well to duplicate the ~/Library/Mail/MessageRules.plist file before performing any script action on it so that you can restore it easily if, after sorting, things go awry with mail rules. If you've got Time Machine backing up your main drive, you could also rely on a Time Machine restore in the event that the newly sorted rules don't perform as expected.


    Another thought is that you could open the xml folder and do a search for keywords in the rule you are looking for and then edit/move the rule, or weed out duplicates, within the xml file itself. Again, I advise backing up the original folder before performing any editing of the xml file.

  • James Reid1 Level 1 Level 1
    Mac OS X

    FYI, as of Fri 14 February 2014: 12 36 pm and Mavericks 10.9.1, the folder with rules is located at ~/Library/Mail/V2/MailData/SyncedRules.plist.

  • Neville Hillyer Level 4 Level 4

    Whilst it may not be your fault I am afraid it appears that your post is on a forum which is not the best for your OS. It will save the time of the unpaid volunteers here, and may resolve your issue faster, if you could examine the list below and see if there is a more appropriate forum to which you could direct your question.

    OS X 10.9 Mavericks
    OS X 10.8 Mountain Lion
    OS X 10.7 Lion
    OS X 10.6 Snow Leopard
    OS X 10.5 Leopard
    OS X 10.4 Tiger
    OS X 10.3 and earlier
    OS 9, OS 8 & System 7
    OS X Technologies
    OS X Server