iCloud syncing of Mail rules | Dafacto
Dafacto

The personal website of Matt Henderson.

iCloud syncing of Mail rules

26 May 2013

I have a personal account setup on three different Macs—my own MacBook Air, an iMac that serves as our home server and the kid's mini. In my account on the iMac, I had Mail running with an elaborate set of rules, including those related to spam handling.

This morning, I woke up to discover loads of unfiltered messages in Mail on my iPhone. I checked the rules panel in Mail on the iMac and discovered all my custom rules were gone.

I couldn't understand how this happened, since I have Mail syncing disabled in the iCloud preferences. After some googling though, I discovered that it's the "Data & Documents" that controls the syncing of Mail rules—a sync setting I can't disable (since I need data and document syncing in other apps.)

This left me with three questions:

  1. How did I lose my rules?

  2. Can I restore my rules?

  3. How does rules syncing work? (So I can avoid this happening again.)

How did I lose my rules?

Two things happened this weekend which could have triggered the sync that caused this to happen, both related to installing Drive Genius 3:

  1. Drive Genius reported that the startup volume on my MacBook Air needed repairing. I rebooted from a bootable backup that Carbon Copy Cloner supposedly keeps up to date with a nightly backup.

The Air booted into a state from the past. Apps launched that hadn't been launched in a long time, Dropbox didn't realize it was installed, etc. — basically a mess. (So that's another mystery to resolve, later...) Mail launched, but I didn't think to check its rules setup.

  1. Drive Genius on the kid's mini tried to send a mail, which opened Mail.app in my account on the mini, for the first time. I suppose a sync could have happened in its setup.

I don't know which of these was the culprit.

Can I restore my rules?

Someone in the Apple Discussion forums claimed you can restore lost Mail rules by restoring this file from a Time Machine backup.

~/Library/Mail/V2/MailData/SyncedRules.plist

Every time I restored this file (including other files I found in MailData that seemed related), they would immediately get updated once I launched Mail, leaving me with the same minimal set of rules.

So I guess I'm left with having to re-create them all, which motivates me to understand...

How does Mail rules syncing work?

The iMac ended up with about six Mail rules I had created long ago. When I checked my MacBook Air though—expecting to find its rules lost—they were all intact! So I thought I'd recreate the rules on the Air, but rules I add there are not getting propagated to other Macs.

So, how Mail rules syncing works remains a total mystery to me.

Update 2013-05-28

Michael Tsai suggests removing this file, so that my other restored files can overwrite iCloud:

@mhenders Did you check /Library/Mobile Documents/comapple~mail/Data/MailData/ubiquitous_SyncedRules.plist ?

— Michael Tsai (@mjtsai) May 27, 2013

Enjoy this article? — You can find similar content via the category and tag links below.

Questions or comments? — Feel free to email me using the contact form below, or reach out on Twitter.