I have a number of Mail.app rules whose action is to move the message to mailbox A. I just created a new mailbox B that I want them to move to instead.
Doing this by hand is very tedious. Also, there's a bug in the rule editor that causes the list of actions to shift up each time I edit one of them, and after doing a few rules the dropdown with the list of rules is moving out of the little window so I can't click on it.
So I quit out of Mail.app and loaded ~/Library/Mail/V5/MailData/SyncedRules.plist
into a text editor (Emacs in my case) and went through this, changing
<key>CopyToMailboxURL</key>
<string>imap://[email protected]/A</string>
and
<key>MailboxURL</key>
<string>imap://[email protected]/A</string>
to
<key>CopyToMailboxURL</key>
<string>imap://[email protected]/B</string>
and
<key>MailboxURL</key>
<string>imap://[email protected]/B</string>
in all the relevant rules.
But when I restarted Mail.app, all the rules I modified reverted to their old actions. How do I get my manual changes to be used?
I don't have iCloud syncing enabled for Mail, so I don't think it should be in iCloud.
Every rule has a field like this:
<key>TimeStamp</key>
<integer>96332387</integer>
with the same number.
Do I need to increment that so it will know that the rule changed on macOS High Sierra 10.13.6?
UPDATE:
I tried using
defaults read com.apple.mail
This has lots of preference settings, but it doesn't include the rules.
defaults read ...
(or export) anddefaults write ...
so that you can change the preferences in the database which notifies Mail when running that the preferences have changed and persist them to storage?defaults read ~/Library/Mail/V5/MailData/SyncedRules.plist
saysDomain /Users/barmar/Library/Mail/V5/MailData/SyncedRules.plist does not exist
defaults read com.apple.mail
is where I'd start, but I don't have mail rules - so my results won't help youdefaults
to update them, I need to know the domain and keys.