Restoring Rules in Mail 6

I made a mistake (helped by nont weel described new functonality): Upgrading from lion to ML I accidentally activate the "document & data" sharing on icloud. This synced the rules of mail 6 of one of my user in icloud. Then in theother user I lost my hundred of rules built in years of work...
I my backup I found the "MessageRules.plist" file but the new mail uses three file to accomplish the job....
file://localhost/Users/macbook/Library/Mail/V2/MailData/RulesActiveState.plist
file://localhost/Users/macbook/Library/Mail/V2/MailData/UnsyncedRules.plist
file://localhost/Users/macbook/Library/Mail/V2/MailData/SyncedRules.plist
After a few try I realized that the file to modify is "UnsyncedRules.plist". I've been able to add a rule (ONLY ONE) from my backup files opening the UnsyncedRules.plist and the MessageRules.plist with XCode draggin it from the second to the first one...
That worked but only for one rule...
Adding other rules causes mail 6 not to recognize the file formatting and report an error or simply rewrite the file from scratch...
I've made a try also with text wrangler but with bad result....
How can i solve (without loosing the email downloaded in this 2 weeks)?
In order to not mistake anymore, where can I find an updated explanation of the meaning of "Document & Data" sharing in iCloud?
Thanks

I had to do the following to restore the signatures and mail rules:
1. Quit Apple Mail
2. Turn of these settings: System settings / iCloud:
    [ ] Mail
    [ ] Documents & Data
3. Copy the old Rules to the new location:
     cd /Users/phil/Library/Mail/V2/MailData
     cp "/Volumes/TimeMachine/Backups.backupdb/Computername/Latest/Macintosh HD/Users/phil/Library/Mail/V2/MailData/RulesActiveState.plist" .
     cp "/Volumes/TimeMachine/Backups.backupdb/Computername/Latest/Macintosh HD/Users/phil/Library/Mail/V2/MailData/SyncedRules.plist" .
     cp "/Volumes/TimeMachine/Backups.backupdb/Computername/Latest/Macintosh HD/Users/phil/Library/Mail/V2/MailData/SyncedRules.plist" UnsyncedRules.plist
     cp "/Volumes/TimeMachine/Backups.backupdb/Computername/Latest/Macintosh HD/Users/phil/Library/Mail/V2/MailData/MessageRules.plist" .
     rm -rf Signatures
     cp -r "/Volumes/TimeMachine/Backups.backupdb/Computername/Latest/Macintosh HD/Users/phil/Library/Mail/V2/MailData/Signatures" .
4. Restart Apple Mail. The old rules and newly copied rules are both there. So I deleted the old rules.
5. System settings / iCloud:
    [ ] Mail
    [x] Documents & Data
6. As old rules moved mails to wrong mailboxes I had to identify these old wrong mailboxes and apply the restored rules to them.
If Apple Mail didn't find the old (wrong) mailboxes it created it new and placed the emails in there. So no emails were lost!
See also "iCloud problem with Mail.app": https://discussions.apple.com/message/20670006#20670006#20670006#20670006

Similar Messages

  • Why do rules in mail preferences no longer work

    I just converted to Mavericks. Now the rules for mail messages don't work. I've clicked them off and on again but no change. What else to I need to do to make the rules work?

    Duplicate your copy of iTunes 10.x before upgrading to iTunes 11 (or restore it from a backup) and use iTunes 10.x to listen to (and in particular access the links in) podcasts. Further, file a bug with Apple that these links don't work when the album art is displayed in the album art mini-player.

  • Problem with rules in mail.app

    I've just started having a problem with my rules in mail.app that I just don't understand. I have several rules that I've had working for quite a while now, over a year. All of a sudden beginning about a month ago, some of them -- different ones at different times -- stop working and the incoming mail goes into my main mail box and don't get distributed according to the rules to the appropriate mail boxes.
    When I check the rules, all of which are basically the same: If any of the following conditions are met, From contains XXX, Perform the following actions: Move message to mailbox xxx, I see that mailbox XXX has changed from what it should be to some other mailbox name which is a valid name but not the one that I originally put in the rule.
    To make it a bit more strange, the rule with the wrong mailbox name is not executed and the mail winds up in my main mailbox.
    When I edit the rule and change the mailbox name and am asked whether I want to apply the rule and I respond yes, the rule executed and the mail that landed in the main mailbox gets distributed the way it should.
    But then anywhere from a day to a week later the same thing happens, that is, the mailbox name in the rule somehow gets changed again.
    Has anyone seen this behavior before and/or have any suggestions for fixing it?

    Are you really on 10.8.1 as per your profile - maybe updating to 10.8.3 might help.
    Have you tried rebuilding the mailbox? It sometimes helps sort out Mail problems:
    http://support.apple.com/kb/PH11811

  • How can I restore my e-mail

    Dear all,
    I totally reinstalled my Powerbook G4.
    Before I backup my mail by copying the content of
    Library -> Mail -> [email protected]@mail.domain.com -> INBOX.mbx -> Messages
    After the reinstallation, I opened Mail and I created my accounts.
    Then I copyed my backup into the same path of my Mac.
    But all pasted Messages (xx.emlx) are not displayed in the Inbox when I reopened Mail.
    How can I restore those e-mails?
    Many thank

    Hi Pierrot10,
    Insert your backup disc (or plug your external hd), then open Mail.
    In the File menu, click *Import Mailboxes* and follow the steps for a *Mail for Mac OS X* transfer.
    Navigate to your CD/DVD's or external HD's backup and hit "OK".
    This should create a new "Imported" folder in Mail with all your old messages in it, that you can then rearrange as you wish, creating new mailboxes etc.
    Axel

  • How do I restore just Apple Mail (and all its folders & settings) with TM?

    Hi folks,
    I was trying to set up an e-mail client on a PC, clicked and unclicked my gmail pop & imap on and off, and when I got home to my Apple MacBook, I had inadvertently reloaded (twice!) every e-mail that I've ever gotten in g-mail to Apple Mail which I use happily at home! No matter what I do, Apple Mail just won't delete the 29,000+ emails. And Mail is hanging, I suspect it just can't handle the massive numbers of e-mails and all the attachments, images, etc.
    So I figure I must start from where I was at last Time Machine backup. I want to restore everything about Apple Mail as of my last backup -- all the same folders, saved mail, preferences, etc. How do I restore just Apple Mail but nothing else? Thanks!
    -- Josh

    I've never done that, and don't think I've seen any similar posts here. You might want to look in the Mail and Address Book forum at: http://discussions.apple.com/forum.jspa?forumID=1223
    Take a look on your system at +<your home folder>/Library/Mail.+ (List view is probably best for this).
    You'll see a number of folders for accounts and mailboxes. There are separate folders for each account, and within them for various mailboxes, plus folders for "on my Mac" mailboxes.
    With Mail off, of course, I think you should be able to restore either the entire Mail folder, or selected sub-folders within it, via Finder > Time Machine.
    After you do that, you may need to use the +Mail > Mailboxes > Rebuild+ option in Mail.
    (Do not use the specialized Mail > Time Machine +Recover your <named> Mailbox+ option there, as it will leave the current contents alone, and restore the messages to a new "restored" mailbox.)
    Let us know if this helps or hurts.

  • How do I do a complete restore of my Mail from TM?

    If my Mail database is corrupt and Rebuild does not help or I can't start Mail because of the corruption, how do I restore the entire Mail database from a Time Machine backup?

    I asked this question because I was about to upgrade to Yosemite and wanted to be prepared for this.  (The Yosemite upgrade worked flawlessly.)
    During the Mavericks upgrade, a rash of people
    in the Support Community complained that
    when they upgraded,  OS X corrupted their Mail database.
    No one in the community, including the Apple experts watching,
    found a solution for this.
    Multiple people lost all of their Mail.
    Restoring V2 did not work because OS X had not converted it
    into Mavericks format
    I think this is the  secret handshake:
    Delete or move V2 and its associated Preferences.
    (Are there other hidden Mail files?)
    One should see no On My Mac Mail
    and Mail should download all the Mail stored in the cloud.
    Enter Time Machine.
    Restore each On My Mac mailbox, one by one.
    Recreate the mail-accounts.
    Any other actions needed?
    What about the folders from com.apple.Mail.Backup down to Import?
    Will Drafts, Sent, Junk, Trash, and Archive be reloaded from the cloud?
    If not restore these.
    I do not plan to attempt this procedure.
    I just worked it out in case the Yosemite upgrade corrupted my Mail.
    I'll sleep better at night knowing I probably can restore my Mail.

  • How can I remove a flag using a rule in Mail.app?

    I'm using Mail Act-On to flag messages that are important. I also have got a smart mailbox that displays only those messages that are flagged, this is my "To Do" mailbox.
    Once I've read and answered the message I want to remove the flag, preferrably via a rule using Mail Act-On as well. However in the rules dialog in the Mail.app preferences there's only the option to set a flag, not to remove one.
    Can anyone help: how can I remove a flag using a rule?? Maybe via Applescript as the last resort?
    Thanks for any advice Jan

    Hi Jan
    I haven't gotten around to put unread and unflag into Mail-ActOn but MailTags has the functionality. MailTags also allows you to mark a message unread via act-On rule.
    It is interesting to note that apple doesn't include unflag and unread as the rules were originally intended to apply only to new messages (of which none should be read or flagged) with that logic, there would be no need for unread, unflagg.
    @David: The reason to do it via Act-On rule would be to set up a sequence of events, one of which is to unflag, others may be to set keywords, move messages, set colors etc.
    Scott

  • How do I create a rule in mail that only applies to flagged messages?

    I would like to create a rule in mail that would delete messages of a certain age, but I need to keep some messages safe. I would like to be able to flag these or put them in a mailbox and have a rule making messages with those flags or mailboxes safe from being deleted. Is that something I can do? Thanks!

    You can create a local mailbox and move the messages you want to keep there. I don't see any kind to rule you can make to move a flagged message, so you would probably have to do it manually, unless you can use other criteria to identify messages you wish to keep.
    If you're using the server settings in mail to determine the age before deletion, the local mailboxes would be safe from that deletion. You can set to store messages on server for up to 30 days before deletion. This will work for IMAP accounts, but don't apply to the inbox. Just to the other main mailboxes such as Sent, Trash, etc.
    If you create a rule to delete messages after a certain age (outside of what the servers would do automatically), I think it would only work on the inbox if at all, but not sure. If it were applied through all, it would delete them from the local folders also.
    You can create a smart mailbox and input certain criteria such as flagged, age. You could exclude any mailbox that you don't want to include, such as local folders, by adding that to part of the criteria. You would have to delete the messages manually as they accumulate. This would be useful when you save a lot of mail, but say you only want to keep messages less than a year old. This would help you instantly see messages that meet your deletion criteria without having to manually check messages for age.

  • Cannot establish new Rules in Mail 7.3

    For at least the last 6 months when I try to set up new Rules in Mail, they don't stay. The old ones I set up >6 months ago always appear to work, but if I define a new rule and apply it immediately it works,but next time I open Mail it is gone from the list of Rules.
    Any suggestions for how to fix this? I like to filter some incoming messages into certain mailboxes using Rules but can no longer do this because new Rules  have become ephemeral  
    TIA for any help.
    Caroline

    total 224184
    drwxr-xr-x  35 501  20  -      1190 Jul  2 15:50 .
    drwxr-xr-x@  7 501  20  -       238 Dec 15  2012 ..
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      9029 Jul  2 15:50 Accounts.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -       181 Dec 13  2012 AppleScriptMigration.plist
      com.apple.quarantine       19
    -rw-------@  1 501  20  -   2105344 Dec 13  2012 AvailableFeeds
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     15141 Jul  2 15:40 BackupTOC.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -    354876 Jul  1 21:24 DefaultCounts
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  - 107220992 Jul  2 15:47 Envelope Index
      com.apple.metadata:FileSyncAgentExcludeItem        1
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     32768 Jul  2 07:24 Envelope Index-shm
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -   2801632 Jul  2 15:50 Envelope Index-wal
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     32768 Jan 28 07:04 ExternalUpdates.storedata
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     32768 Jul  2 07:25 ExternalUpdates.storedata-shm
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -         0 Jan 28 07:04 ExternalUpdates.storedata-wal
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -       915 Jul  2 15:49 FlagMailboxes.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -   1365128 Jul  1 06:58 LSMMap2
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -    137048 Dec  7  2012 MessageRules.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -    135832 Dec  7  2012 MessageRules.plist.backup
      com.apple.quarantine       19
    -rw-------@  1 501  20  -      4615 Sep  8  2005 MessageSorting.plist
      com.apple.quarantine       19
    -rw-------@  1 501  20  -      4615 Sep  8  2005 MessageSorting.plist.backup
      com.apple.quarantine       19
    -rw-------@  1 501  20  -     28672 Sep 11  2012 MessageUidsAlreadyDownloaded3
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      3944 Dec 13  2012 OpenedAttachmentsMigration.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     18413 Jul  2 13:25 OpenedAttachmentsV2.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      6743 Jun 23 06:59 RulesActiveState.plist
      com.apple.quarantine       19
    drwx------  32 501  20  -      1088 Jan 25 14:37 Signatures
    -rw-r--r--@  1 501  20  -    170952 Jan 19  2004 Signatures.plist
      com.apple.FinderInfo       32
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     25759 Dec 13  2012 SmartMailboxes.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     25758 Dec 12  2012 SmartMailboxes.plist.backup
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      6353 Jul  2 15:49 SmartMailboxesLocalProperties.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      7562 Jul  2 07:25 SyncedFilesInfo.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -    134527 Jan 25 14:37 SyncedRules.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -     34724 Jan 25 14:37 SyncedSmartMailboxes.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      1992 Jun 23 06:59 UnsyncedRules.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -      5214 Jul  2 15:49 VIPSenders.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -       944 Dec 13  2012 VersionedSmartMailboxes.plist
      com.apple.quarantine       19
    -rw-r--r--@  1 501  20  -       944 Dec 12  2012 VersionedSmartMailboxes.plist.backup
      com.apple.quarantine       19

  • How to amend Rules in Mail

    I am using Mail on my Mac and also have it configured on my iPhone and iPad.
    I have an alias e-mail address and set up a rule for any mails to that e-mail address to go straight into a specific folder (mailbox) within Mail.
    I am now trying to amend the rule but cannot access it.
    I have tried via Mail > Preferences but no rules are displayed.
    I have also tried to delete the folder and then send a test mail to the e-mail address, but when the mail arrives in the inbox it just creates a new folder again.
    How can I amend the rule in Mail?
    Thank you

    Many thanks. Would be more helpful if the rules in Mail on my Mac reflected those in iCloud but I followed your advice and made the change successfully.
    Two other linked questions:
    1. Why can't I access icloud.com on my iPad? (to effect the change, I had to use my Mac to go to icloud.com)
    2. Can the e-mail alias addresses be colour coded so that I can easily identify incoming mail?
    Thank you

  • Restoring Backed up mail settings, mails, & attachments.

    Hi,
    I've just bought my MBA to upgrade from my 5 year old MacBook.
    I have copied the MAIL folders from my MB to an external HDD, and am trying to restore, have my MAIL read and recognize the folders as per my MAIL back in my MB.
    What I mean is to have my MAIL app on my MBA to recognize and read all my old emails, folders, and attachments as with in my old MB.
    Thanks

    If you copied the right folders from your Library / Mail folder, then I'd suggest you first set up Mail on your new MBA (if necessary look at screenshots of old account settings if you need to enter anything). Then quit Mail. Open the User/Library/Mail folder and see which new folders (empty) were created during setup. Open your copied old folders. If you have an inbox folder in both locations, delete the new one and replace it with the old one, etc, etc. If you have added your own folders (old), place the entire folder hierarchy into the new Mail folder. When done, open Mail - it should work.
    Message was edited by: Barbara Daniels1

  • Rules in Mail are not working!!

    I set up rules in mail to moved messages after 7 days old from date send and will not apply! not working! if this can help I am using an AOL account. . . any suggestions on how to solve this issue. I am also running SL . . thanks.

    Hey, Ray & welcome to the forums.
    Don't set a 'rule' - go to Mail preferences/general/advanced and do it there √ instead.

  • When I add a rule to mail preferences, they don't work at all

    When I add a rule to mail preferences, they don't work at all

    One thing to remember is that mail rules are only executed on incoming email.  To run a rule against existing email, Mail > Message > Apply rule.
    Captfred

  • TS3276 Setting Rules in Mail, and misunderstanding the terms.

    Just tried, for the first time, setting a Rule in mail to deal with holiday messages. Thought sending it to 'Every message' would be appropriate, as couldn't make sense of any other options. Now EVERYONE, who ever sent me a message has received the absence message, some people hugely multiple times. They would be correct to be very irritated.
    Anyone else every done this?

    Hi Redkite7,
    Welcome to the Support Communities!
    The following article will provide some information about sending automatic replies.
    Mail (Mountain Lion): Send automatic replies
    http://support.apple.com/kb/PH11760
    I gathered this information from the Help menu in the Mail application for you:
    Send automatic replies
    You can create a rule to have Mail automatically reply to incoming messages.
    Choose Mail > Preferences, and then click Rules.
    Click Add Rule and type a descriptive name for the rule.
    Set the conditions necessary for the rule to apply to a message.
    From the “Perform the following actions” pop-up menu, choose “Reply to Message.”
    Click “Reply message text” and enter the text for your reply message.Mail will include the text you enter, along with the full text of the original message, in the reply that it sends.
    I hope this information helps ....
    Have a great day!
    - Judy

  • How many rules will Mail allow???

    That's the question... How many rules will Mail allow??? I can't find any documentation indicating a quantity. I can not save more that six. Am I missing something?

    What was occuring. I was able to save and apply a rule once. If I closed mail, the rule just dissapeared. I was able to replicate this time and time again. I post4ed this question once before on 5/10/13. https://discussions.apple.com/message/21985327#21985327 . Because I received no response to that querry, I posted this again. Thank you for your repsone. I'm not sure what has occurred but I am able to make additional rules, save apply them; quit the application and upon re launch they are there. I have no explination as to what facillitated the change. Thank you for your response and querry.

Maybe you are looking for