My Mail rules went missing after reinstalling a clean build of Mavericks and manually restoring my data (something I've done many times before without any problems). I believe the cause in this case was due to upgrading iCloud to iCloud Drive when I installed iOS8 on my iPad (what with Mavericks not being compatible etc).
Here's what I did to fix it -- working well so far:
- Exit Mail (i.e Cmd+Q while Mail is the active window)
- Logout of iCloud (via Settings > iCloud). Where prompted keep settings local where possible, otherwise delete from computer.
- Disconnect from the internet (unplug the cable or switch off your router / modem)
- Open the following path in finder
~/Library/Mail/V2/MailData
- Enter Time Machine (via toolbar icon at the top of the screen)
- Restore the following files from Time Machine:
RulesActiveStatus.plistSyncedRules.plistUnsyncedRules.plist
- Click Restore
- Open the following path in finder
~/Library/Mobile Documents/com~apple~mail/Data/MailData
- Move the following file to the desktop (in the unlikely event that you need to put it back - OSX should recreate a new one later anyway):ubiquitous_SyncedRules.plist
- Open Mail (while still offline)
- Open Mail Preferences>Rules and you should see your old rules back.
- IMPORTANT: Create a couple of new rules. The purpose here is to make the restored plist files update so that it is newer than the one present on iCloud.
- Exit Mail.
- Open Mail again and just check the rules (via Settings > iCloud) are still in place -- they should be.
- Exit Mail.
- Reconnect to the internet.
- Login to iCloud again (via Settings > iCloud)
- Open Mail
- Check the rules (via Settings > iCloud) are still in place.
- Exit Mail again
- Open Mail once more and check if the rules are still in place. Hopefully you'll find your old rules and possibly an additional "News from Apple" rule merged in.
I hope this works for you too. 🙂
I'm guessing you'll need to do something similar with signatures. I.E. Exit Mail, logout of iCloud, Exit Mail, Restore missing signature files, Open Mail, Add a new signature to make the signature file newer than the iCloud one, Exit Mail, Reconnect to internet, Login to iCloud, Open Mail, Check old signatures are back.