This has been driving me nuts for MONTHS! All my nrules mograted from Lion just fine. But every few weeks my email stops moving into the folders as set up in the rules. When I check the rules, all "to mailbox" destination folders either have "no mailbox selected", or are off by one in the list of available mailboxes.
This is with Mail and an Exchange account associated with my college's Office 365.
I have been suffering with this also and have been having to reset the folders associated with my rules, everyday for a long time! However, I think I've got the answer to this. Time will tell but it seems credible at present. Now the challenge of expalining it and seeing if it works for others.
First I'll explain my thinking and then a possible solution (very easy).
So, iMachias and Loki, you both report that you are connecting to an Exchange Account. I am too. Nothing uncommon there as obviously Exchange is everywhere.
I think the problem lies with the Autodiscover service and the way the Mail Rules reference the target folders associated with those Rules.
If you look under the Account Information for the Mail account in question, you'll see there is a checkbox labellled "Use Autodiscover service". If you have this ticked on, the field below called "Internal Server" will be greyed out.
I believe that the Autodiscover service causes this Internal Server field to automatically change depending on what server address the Autodiscover service detects from your Exchange provider. The reason it changes is because the Exchange service will be distributed across a cluster of servers so that it can handle the demand and you get redirected to a different one of these servers depending on which has the most spare capacity.
Now, the thing is, that Mail Rules, as can be seen in ~/Library/Mail/V2/MailData/SyncedRules.plist, reference the target folders using a format than INCLUDES the Internal Server address.
So, you setup a rule to direct mail to the target folder, it works fine for a bit but then the Autodiscover service updates the Internal Server address in Mail and suddenly you have a conflict between the server address you're connecting to (and authenticated to) and the server address that is listed in the Rules list. I think this is the root of the issue.
In my case, the Internal Server field varies to be any one of:
And for one of rules I have (that files ChronoSync reports), the target folders in SyncedRules.plist look like this:
<string>~/Library/Mail/V2/EWS-NAME@DOMAIN.COM@cas.messageexchange.com/Inbox.mbox/Servers Services Reports.mbox/ChronoSync.mbox</string>
For some reason the folder is referenced in two ways but I think it is only the second one that changes.
So, the loop is:
- you set the target folder
- the rules plist file gets udpated
- your rules work
- Autodiscover updates your Internal Server field
- your rules stop working
<loop to start>
I think the simple but annoying way to "fix" the problem is to:
1. Untick the Autodiscover service
2. Go through and set the target mailbox on all your Rules
3. Cross your fingers (as I'm doing at present)
Clearly it's not ideal as the Autodiscover is actually doing a useful thing and you might find that for some reason your provider randomly decides to disable or reboot the particular server in the cluster that you end up being connected to.
Anyway, it's a working theory. Let's see if it actually works!
This is interesting, ok, not really.
I've deselected the autodiscover option to see what happens. I've no idea how it will react with the internal server ID as we don't really have one, our Exchange is hosted via Office 365.
I will let this thread know, however, what if anything happnes.
Thanks for the detailed info!
Haha - I accept that Loki : ). I know it's not a particularly riveting topic but I'm so pleased to have sorted this. It was soooo annoying. I wanted to make sure to spell out what I'd done in case it was of use to someone else. For the record, we don't have an internal server either - it's all Hosted Exchange. I think the terminology might be a bit confusing.
I'm having the same problem, but a tiny bit different.
In my case, I have a Gmail account to store e-mails and I don't use anything on the Exchange server except to retrieve my personal e-mail.
Nonetheless, my destination folder in my Rules changes daily, but I think I'm going to try this solution to see if it helps.
The bad part is that I just discovered this because I mainly just archive all that e-mail, but now it's all over the place. I guess they didn't think that someone might have Exchange, IMAP and Gmail accounts.