Mail Rules

Any reason why I have lost all my Mail rules?  They have simply disappeared.  Any reason why and where can I find them on my backup ?  Thanks.  IanT

It could be a corrupt plist file, I guess.
I think if you quit Mail, then go to Home Folder > Library > Preferences and drag <com.apple.mail.plist> to the Trash, and empty the Trash, then when you relaunch Mail, a new plist file will be made. If you can then make that rule without a problem, that's what the trouble was.
Do note, though, that you will have to reset your preferences, and rewrite any rules you've already made. I'm pretty sure you don't lose your account details, but it'd be a good idea to have a note of what they are, just in case.
By the way, after you've set your rule and clicked on OK, do you not get a message asking if you'd like to apply your rules to messages in open mailboxes?

Similar Messages

  • Transfer Mail Rules from Leopard to Mountain Lion

    I have succesfully moved my mail, mailboxes and folders from my old Power PC to my new iMac by moving my Library>Mail folder from one to the other.
    The only thing that didn't carry over were my Mail Rules.
    Is there some other file I'm missing?
    Thanks,
    - Peter

    Mail rules are stored in your user Library/Mail/V2/Mail Data/SyncedRules.plist or at least they are on my computer.
    To make your user library visible:
    Hold down the option key while using the Finder "Go To Folder" command. Enter ~/Library. If you prefer to make your user library permanently visible, use the Terminal command found below. It does work with Mountain Lion.
    http://osxdaily.com/2011/07/22/access-user-library-folder-in-os-x-lion/ 
    You might want to bookmark the command. I had to use it again after I installed 10.8.2. I have also been informed that if you drag the user library to Finder it will remain visible.

  • Lost mail rules when upgrading to ML, can't restore from time machine

    Hi,
    I've installed mountain lion and restored from time machine and mail rules were not there. There's only news from apple.
    I tried to restore the rules myself (MessageRules.plist and MessageRules.plist.backup) but when opening mail rules were not there yet. Nevertheless, i can add rules manually, so if there was a way of looking at the past rules I could just copy them (though it's not the best way).

    My rules are still there, so perhaps Apple support speak with resource forked tongue.
    Comparing an old (pre ML) rules file from 20th June with the ML one, the differences are:
    The file name was: MessageRules.plist, the ML one is SynchedRules.plist. Both are in my V2 folder, but the old Rules have been copied (by Mail, not me) into the new SynchedRules file.
    In the old file, for each item (Rule) the first line was Active (Key) String (Type) 1 (Value). In the ML file, this line is no longer there, so the first line is AllCriteriaMustBeSatisfied.
    You can see these differnces in the "preview" part of Finder Show Info, if you have the two files to compare.
    Thus, just copying and renaming the old Rules file probably won't work, because of this difference. Mail probably just makes a new file because the copied file isn't as expected. It should be possible to edit the old plist file to remove the "Active" line, and rename it to SynchedRules.plist (but see below). The top is slightly different, just below <dict>, as this relates to the Active line. There are a  couple of lines at the bottom that aren't in the new file.
    The "Active" line that has gone is now in a file called RulesActiveState.plist. This file is just a list of RuleIds from the SynchedRules.plist (like this:
    AC6F6611-FF61-4AA6-9682-BA100EFAC233)
    Doing this does sound rather tedious, but might be quicker than manually re-entering blocked email addresses etc. to replicate old rules. As plist files are in xml format, it should be possible to use a text editor to delete the unwanted "Active" line from the message rules list by Find & Replace All (with nothing). All this could then be copied to the "SynchedRules.plist. You would need to copy the RuleIds into the RulesActiveState.plist as well.
    Make a copy of the files first just in case...

  • Transfering mail rules from Lion to Yosemite.

    Help please, how do you transfer mail rules from Apple Mail 5.3 in Lion to 8.0 in Yosemite.  Thanks

    The file in question that you are looking for is SyncedRules.plist in the MailData folder.  I tried re-naming a MessageRules.plist file and it didn't work.  It would be an arduous task, but the best suggestion that I have, other than to re-create your rules, is to use a texteditor like SubEthaEdit to make the format of MessageRules comply with the format of SyncedRules.plist.  I haven't tried it myself, but it might work.  Best of luck!!!

  • How to import Mail rules from Lion to Mavericks?

    I tried importing my several dozen rules from OS X 10.7.5 to Mavericks 10.9.4. I tried the method described by SECollins7 here:
    Import Lion Mail rules into Mavericks Mail?
    It did not work. Nor does manually copying the text from «MessageRules.plist» to «SyncedRules.plist». They just do not appear in the rules settings in Mail in Mavericks.
    Is there a way to import rules anyway?
    Thanks for any hints!

    This issue is caused by a combination of two things:
    The file used in previous versions of OS X to store local (not iCloud-based) Mail rules is not used in Mavericks.
    The migration process doesn't transfer the rules from the old file to the new one, which has a different format.
    You may be able to recover the Mail rules by taking the steps below.
    Warning: Do not use this procedure if you synchronize Mail rules with other devices via iCloud.
    Quit Mail if it's running.
    Back up all data.
    Triple-click anywhere in the line below on this page to select it:
    cd Library/Mail/V2/MailData; /usr/libexec/PlistBuddy -x -c 'Print :rules' MessageRules.plist > SyncedRules.plist
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window by pressing the key combination command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
    Wait for a new line ending in a dollar sign (“$”) to appear. You can then quit Terminal. Test.

  • Mail rules -- apply only to inbox or all mailboxes?

    I've done a major revamp of my Mail application. I used to have a dozen or so mailboxes, and some had rules that would move newly arrived messages from my inbox to a designated mailbox.
    I've now opted instead to use a dozen or so 'smart mailboxes.' I've moved all my messages back to my inbox and deleted the dozen or so mailboxes. The smart mailboxes nicely filter the messages as I've constructed the smart mailbox rules. However, I still have two mailboxes whose content isn't easily filtered via smart mailboxes.
    Now, back to my inbox .... It's got a few thousand messages. My goal is to create a mail rule in preferences that would move anything older than 30 days into secondary mailbox. If I write this rule and run it, does it apply ONLY to my inbox? Or to the inbox and any other mailboxes?

    I played around with it and found out that my rule to move older docs to a separate folder only runs on my inbox, as I had hoped.

  • Mail Rules not applying to Sent folder

    I have rules set up to color code my e-mails. They work fine in all my mailboxes (Inbox, Trash, personal folders), but do not work properly when applied to my 'Sent' folder (the messages all turn orange). What's the problem?
    I have Gmail being forwarded to the Apple Mail program using IMAP settings.

    there is no problem. Mail rules work on incoming mail only. if you want Mail rules to apply to sent messages you need a 3rd party plugin. MailActOn
    http://www.indev.ca/MailActOn.html
    can do it.

  • Problem with Mail Rule

    I am trying to set up a mail rule that triggers an Applescript. The Applescript will open all attachments with Preview in this case. I know the rule is being triggered because I have two actions for the rule, run the Applescript and Make a sound, and I hear the sound.
    Here is the script:
    using terms from application "Mail"
    on perform mail action with messages theMessages
    tell application "Finder" to set pathToAttachments to (path to desktop folder as string)
    tell application "Mail"
    repeat with theMessage in theMessages
    set theText to content of theMessage
    if theMessage's mail attachments is not {} then
    repeat with theAttachment in theMessage's mail attachments
    set theFileName to pathToAttachments & (theMessage's id as string) & space & theAttachment's name
    try
    save theAttachment in theFileName
    on error errnum
    end try
    tell application "Preview" to open theFileName
    tell application "Finder" to delete theFileName
    end repeat
    end if
    end repeat
    end tell
    end perform mail action with messages
    end using terms from
    (* tell application "Mail"
    set myMessages to selection
    tell me to perform mail action with messages myMessages
    end tell
    If I comment out the stub at the bottom, and run the script, it runs perfectly all the time.
    If I select the e-mail in question and trigger using *Apply Rules*, the script runs some of the time.
    I have yet to get the script to trigger on newly arriving e-mails.
    The rule is checked and I haven't found a +Apply Rules to Incoming Emails+ check box. I thought that happen automatically. Anyone have any ideas on what is going wrong or further ways I could debug it?

    Testing your script, I found that, in the few cases where it didn't work well, I could have it work properly with the following modification:
    *tell application "Preview" to open theFileName*
    *delay 1*
    *tell application "Finder" to delete theFileName*
    It should also be possible to replace *delay 1* with something better, like *repeat while … end repeat*.
    Hope it can help.

  • Apple Mail Rules dont apply when mail is READ on other devices!

    Hi,
    I use IMAP settings on Apple Mail (v4.5) and also check my emails on the iPhone (iPhone also set up with IMAP). However if i have read an email on the iPhone then when i switch my computer on the incoming Apple Mail Rule that applies to that sender does not seem to work. It keeps the mail within my Inbox and does not transfer the mail/message to the desired folder.
    However, if the same sender sends me an email which i do not read on the iPhone and then switch my Apple Mail ON, then the mail is automatically transferred to the desired folder.
    It looks like the problem is only with READ mail and not UNREAD mail. 
    Is there a fix for this? There seems to be a lot of people having the same issue and was wondering if there is any work around on this?
    Would really appreciate any help from anyone on this.
    Regards,
    Jay
    PS: I recently moved from Outlook 2011 on MAC to Apple Mail as i heard is a far superior mail application and works smoothly. So far everything about Apple Mail has been correct, it is a fantastic app, however this Rule problem is pretty basic and surprised that Apple still has not fixed this.

    Hi Glenn,
    Many thanks for this. Unfortunately i dont have this facility on the server as we are using a simple opensource mail delivery and storage service, so the rules would have to be set up on the computer.
    I was using Outlook 2011 and prior that was using Entourage 2008 and both worked well with the IMAP rules. Nothing was ommitted and everything READ or UNREAD was imported and the rules applied. It's only in Apple Mail that these rules dont seem to work.
    Is there no other work around? No Apple Mail Add-Ins? I see quite a number of people complaining about the same problem and i'm surprise that Apple has not found a solution for this.
    Anyway, thank you soo much for your reply. Much appreciated.
    Regards,
    Jay

  • Is there a way I can import my mail rules as they are on my account to email client on Mac?

    I have different filters set up in my accounts and when I set up Mail client on Mac, those settings are not imported which is messing up all my inbox. Is there a way to import those filters from my account to my Mac or am I missing any configuration that imports mail rules too?

    I have different filters set up in my accounts and when I set up Mail client on Mac, those settings are not imported which is messing up all my inbox. Is there a way to import those filters from my account to my Mac or am I missing any configuration that imports mail rules too?

  • Mail rules accidentally deleted all of my emails. How to restore?

    Alright, here goes.
    I tried to set up af number of rules in my Mail application (just the standard one), that would delete some "subscribtion emails" that I never read anyways. And no, it's not spam.
    BUT, I accidentally forgot to set the "any" criteria to "all", which means it all of a sudden deleted all mails with my email address as recipent. How can I restore them? They do NOT appear in my "Deleted messages"!
    Also, is it really true that such a simple user mistake, can cause the user to lose highly important emails? I mean... It's like one click away from utter and permanent removal of the emails. If that's the case, I am really disappointed in Apple. I know I made a mistake, but forgetting to set "any" to "all" is something I feel anyone can do on accident, since it's on "any" as default. And it just applies the rule to the whole mailbox! I had no chance to stop it, and now my mails are gone. Important ones from the government, tax-mails, receipts... all just gone.
    And no... I do not have a backup of those mails. I am without a time machine harddisk, and I honestly thought that deleted mails would appear in the "deleted mails" folder on iCloud, but they do not. The rules must have deleted those two, even though I have no idea why and how that should be possible.
    And yes, the emails are gone from ALL of my devices, and not just the Mac... even iCloud.com does not have any trace that they even existed.
    Please help, I know I haven't been smart about it, but permanently deleting such a large amount of emails, without warning or recovery method, simply should not be possible!
    Any support is highly appreciated. I am looking at a world of s*** if I can't recover some of these important emails. Thank you in advance!
    And here's a smiley, so you know that I am normally a very happy guy, and so you also know that I will be immensely joyful and appreciative of your help

    Geeken wrote:
    Also, is it really true that such a simple user mistake, can cause the user to lose highly important emails? I mean... It's like one click away from utter and permanent removal of the emails. If that's the case, I am really disappointed in Apple. I know I made a mistake, but forgetting to set "any" to "all" is something I feel anyone can do on accident, since it's on "any" as default. And it just applies the rule to the whole mailbox! I had no chance to stop it, and now my mails are gone. Important ones from the government, tax-mails, receipts... all just gone.
    And no... I do not have a backup of those mails. I am without a time machine harddisk, and I honestly thought that deleted mails would appear in the "deleted mails" folder on iCloud, but they do not. The rules must have deleted those two, even though I have no idea why and how that should be possible.
    Yeah, I don't think you should be disappointed with Apple. It's definitely not their fault. Only yours. Sorry to be frank, but "Any" and "All" conditionals are very obvious, and I have never made this mistake. I am not sure what you would want Apple to do to prevent this -- make an alert box come up saying "You are choosing Any which means when you do this your rule will apple to Any of the conditions you set". That would just annoy us other users that already understand what All and Any mean.
    My point is that you should study the manuals and very good knowledge before you attempt at anything with your mac especially creating Mail Rules that will automatically delete emails.
    You don't do backups which is also very strange and you should learn how to do them, as this is very important if anything happens to your computer at a later date, as you've just experienced.

  • Mail rule no longer works - how 2 debug?

    i have a mail rule which takes an attachment & sends it on to an fba for further processing (via a do shell call) then moves the mail to a done folder.
    my shell script works perfectly when invoked from the cli, but doesn't seem to even get called from the mail rule (which used to work under tiger)
    and since "perform mail action with messages" doesn't allow interaction, i can't salt my script with display dialogs to debug...
    so where does mail rule output go? is there an error log somewhere? console shows nothing...

    on a hunch i added a delay right after i saved the attachment...that fixed it.
    but i still don't have a way of seeing what's going on in a mail rule script.

  • Mail rules no longer work.

    Having trouble with Mail rules that I have used in the past - they no longer work. Any ideas? Running 10.4.10

    Yes, the same thing has happened to me.
    But I'd like to avoid having to set up the the rules again (if I trashing the com.apple.mail.plist. I have a lot of rules, and it would take some time to set them up again. Does anyone know of other options?

  • How do I make a Mail Rule action bounce a message

    Is there a way to have a Mail Rule action bounce a message?
    Thank you in advance.
    Jeff

    paste the following into Applescript Editor and save it as a script
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #ADD8E6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    using terms from application "Mail"
    on perform mail action with messages selectedMsgs
    repeat with msg in selectedMsgs
    tell application "Mail"
    bounce msg
    end tell
    end repeat
    end perform mail action with messages
    end using terms from</pre>
    then have your Mail rule execute this script.

  • Can i use Boolean Expressions in Mail Rules?

    Can i use Boolean Expressions in Mail Rules?
    I need to create a rule to check whether a message contains BOTH a first and last name of EITHER of two people.
    For example, the rule im looking to create goes something like this:
    If ANY of the following conditions are met:
    message content - contains - john & doe
    message content - contains - jane & doe
    ive tried and cant seem to get it to work...
    Message was edited by: mysterioso

    AFAIK Mail rules do not support boolean expressions.
    to do what you want you'd have to create two rules
    rule 1
    if ALL of the following conditions are met
    message content - contains - john
    message content - contains - jdoe
    and similarly for rule 2.

  • Mail rules work for some users, don't work for others

    Ready to pull my hair out over this one:
    Leopard to Snow Leopard upgrade went uneventfully, except for the fact that server-side mail rules (accessed via browser at FQDN -> Mail Rules) work for several users (two, to be exact) and don't for the rest (about 15 or so).
    The usual culprits have been reviewed: 'Enable Server-Side Mail Rules' is checked in Mail -> Settings -> Filters, 'Allow users to configure server-side mail rules' is checked in Web -> Sites -> Web Services, users can create vacation notices and email rules without issue via browser, permissions look fine on the contents of /Library/Email Rules and /var/spool/imap/dovecot/sieve-scripts, logs give no indication of any foul play (at least the Email Rules -> debug.log generates the same entries for both functional and non-functional users), etc.
    I have noticed that /var/spool/imap/dovecot/sieve-scripts contains only two items, which - you guessed it - line up with the GUIDs of the two functional users. Theoretically every user with a rule should be represented here.
    As suggested in this thread:
    http://discussions.apple.com/thread.jspa?messageID=11171395&#11171395
    I created both a vacation notice and an email rule for several users, thinking that may force the folder creation for those users, but no dice. I even manually created folders for a few users with their GUIDs as the folder names and assigned each user ownership and read/write access. Still nothing. Created a few new test user accounts just to rule out any legacy account weirdness (although it's worth noting that I completely redid the OD and recreated user accounts after the upgrade) and replicated the problem with these, as well. Lastly, used Inspector to compare OD attributes between functional and non-functional accounts, with no glaring differences.
    Help!

    Did you find an answer? I encounter the same problem on my new MiniServer. Deleted and created all users several times, but just for some accounts mail is working.
    Do you have the answer?
    (new to this site, read a lot already, but not found)

Maybe you are looking for