Mail Rules Question

I have a lot of email on my Gmail account. A semi significant portion of them are status updates, such as Facebook, Pownce, Netflix, and other site updates. In the past when I used POP, it wasn't such a big deal to keep these emails because Gmail offers something like 4GB of space. However, now that I am switching to IMAP, it's taken me forever sync with all 14,000 emails on the Gmail server.
I don't want to have to do that again, especially not on my iPhone.
My question is this: Is it theoretically possible to setup a mail rule to have a specific folder delete all its contents after a specified amount of time? Looking in the default mail rule options, there is the ability to delete email as it comes in, but not necessarily after, say, 30 days. I'm looking for something along the lines of, "every 30 days, delete everything in this mail folder."
Any ideas?

David Gimeno Gost wrote:
Mail doesn’t provide that functionality, but you may set up a smart mailbox that displays the messages to be deleted, then manually delete whatever shows up there every once in a while.
Yeah, that's what I figured.
Another option is writing an AppleScript and selecting the "Run AppleScript" rule option, but I'm a) not 100% it's even possible, and b) rusty on AppleScript.

Similar Messages

  • New Switcher Mail Rules Question

    Hi everyone. I jsut switched and in setting up Mail I want it to move all mail from a specific account to a Folder( don't want to use the inbox for this account). When I setup the rule to move all mail from account X to folder Z, Junk mail rules are no longer followed. I want it to do the message moved based on the account, but I STILL want the JUNK rule to be active so it filters the junkmail then does the message moving.
    Make sense?
    Hope someone can help.
    Lawrence
    Macbook pro yo!   Mac OS X (10.4.6)   all pimped out

    Lawrence,
    I had been thinking, already, about what to do if this did not work. It occurred to me that the Junk filter might be putting the messages in your other mailbox, INSTEAD of the Junk mailbox, and not as a result of your Rule to move the messages.
    One way to test this possibility would be to remove your Rule to move the incoming messages, and see where the Junk filter would then place the junk messages. Your folder would still be available, and if junk mail still found its way there, we would know the answer. In this approach, you could later rewrite the Rule, and have it apply to all messages already in the Inbox.
    The other approach would be to change the preferences for Junk, to go back into Training, which should remove the Junk folder. Quit Mail, and then reset Junk to be in Automatic, which then would create new Junk folders.
    Still another approach would be to remove all Mail Preferences, and set things up again (but not losing any mailboxes) -- I do not like this approach, for now.
    Ernie

  • Mail rules question on subject and sender fields are empty

    I am getting blank messages delivered to my mailbox and the subject and or sender's name are empty, how do I set up a rule to just delete them?

    You know, the messages might not actually be blank. I've been steadily getting more and more coming in blank what when I view the source, the messages is there but Mail isn't displaying it. I'm still trying to find some fix for this, but thought you might like to know before you delete them all.

  • 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!!!

  • 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.

  • Mail Rules Are Not Being Saved After Mail Is Close & Opended

    I am using Mail 3.6 with 10.5.8 on a Macbook Pro. I have set up mail rules so that an email from a specific person's email address goes to two places: 1) Move to a folder on .Mac & 2) the Inbox on the Mail app. Upon first setting this up it works. BUT when closing and opening the program or waking up the computer from a sleep status the rule disappears and the Rule Preference window shows that email message is now going only to the .Mac folder & none to the Inbox!
    I spent a lot of time with Tech Support via telephone and even ended up reinstalling (A&I) OS 10.5 (plus updates); this was done on the tech's theory that Mail was corrupt on the root level. HOWEVER, that was not the solution as the problem still exists with the reinstalled OS.
    Can someone from Apple's tech support who has knowledge of this issue please help?
    Thanks,
    Bob

    Since replies to questions and comments in these Discussions
    is mostly from users who are registered to post & reply here,
    you may find better result in a call into AppleCare support and
    if there is an incident or case number involved in the issue you
    have experienced with corrective actions taken so far in your
    communications with Tech Support(?) by phone, be certain a
    reference is made to that conversation, for proper follow-ups.
    +{You could refer someone you talk to there, to your post in here.}+
    There may be some other issue, perhaps relating to hardware
    or something else, that may bear looking into. Have you seen
    a result of the system log files and reports, such as Console
    generates from the computer in action? There may be a clue
    in those almost cryptic reports. Also, you have a hardware test
    on bootable partition in the original system install disc; that's a
    specific test version for your computer, an Apple Hardware Test.
    Boot instructions are on the disc's label. Run it in a repeat-loop.
    Is there any third-party software installed later on, which could
    result in complications or conflicts with the Mac's Mail app?
    The problem, if not software, could be hardware. Or a logic error.
    If you have AppleCare coverage in effect on the computer, that
    is the call to make; and keep track of your incident/case number.
    Good luck & happy computing!

  • Why is Mail rule syncing only one way?

    Odd. I've got a Mac mini and an iMac, both running 10.8.2, both with iCloud syncing Documents & Data. Mail on the mini has rules -- created on that machine -- for SpamSieve that are not syncing to the iMac; in fact, both rules disappear every few days and I only notice because spam starts piling up.
    On the other hand, changes to Mail rules on the iMac are synced to the mini. The mini has been running Mountain Lion for five months; the rules only started disappearing after I upgraded to ML on the iMac last month.
    Any ideas on why the syncing is only one-way?

    It appears that I can't edit my original question. So here is new information. It is syncing. However, the contacts are syncing with my personal folders. The calendar is syncing from Outlook to Ipad from my personal folders. However, the calendar is syncing to Outlook in a hotmail calendar in the profile that I didn't know existed. How do I get it set right.
    I tried to select the calendar. However only one calendar is available in itunes. It must be the correct calendar as it is syncing fine. So how do I get ipad to sync back to the personal folders calendar instead of the hotmail calendar in my profile?
    Pastor John

  • Running AppleScript from Mail rules

    Hi.
    I'm pretty new to this, so sure it's a basic question....
    I've created An AppleScript that calls an Automator application.  This runs fine if I open the script in the editor and click run.
    I've now created a mail rule which should run this script if a mail is received with defined subject, but it doesn't....
    Whatever I try, it's just not running the script.
    Any help?

    Yes.
    tell application "iTunes"
      quit
    end tell
    delay 60
    tell application "iTunes"
      activate
    end tell
    Change 60 seconds in delay to the delay you need.
    (still might not work as a Mail Rule, but give it a try)

  • Setting up mail rules on icloud

    I have just migrated from mobileme to icloud - a scary exercise which seems to require quite a lot of tidying up.  Here are some questions relating to using mail.
    This is what I would like to happen:
    1.  When I read a message for the first time - whether on my Mac, iPad or iPhone, I want it to be moved to a number of mailboxes I have set up (or to trash).
    2.  When I read the same message later on one of the two other devices, I would like to see it mark as read and filed in the appropriate mailbox
    3.  When I send a message or reply (on any of the three devices) I would like my message to be moved to an appropriate mailbox, rather than remain in Sent.
    4.  When I set up a mail rule on iCloud I would like the same versatility as on my current Mac mail rules, with interaction between the rule and the address book, ability to have boolean rules with lots of either/or/and components.  For example, on my Mac I have a rule moving all messages from anyone in my Family group in the Address book to a mailbox called 'family'.  I have a rule which says if the subject contains x and if the sender is y then move the message to mailbox z. I have another invaluable rule which moves any message from a sender not in my Address book to trash.  Once a day I skim through trash to pick up any messages which should not be there and then can empty the remainder with one click.
    So--
    1-3  Am I right in saying these can be done?  (I'm not sure whether the To: rule works - if it does, that is an improvement over the Mac mail rules).
    4.  The mail rules on iCloud seem incredibly limited compared with those on Mac Mail.  Am I missing something?  How for example do I set up the three examples I have given?  (A related question - can Trash be moved to iCloud and how does it get emptied.)
    Sorry for this collection of questions.  What I wanted from iCloud was that I can continue to manage my email in boxes and trash, as at present, and that when I am away from base and my iMac, I see all my past correspondence for the year, and that I dont have to housekeep mail three times on the three devices.  I do hope this will be possible and appreciate anyone pointing me towards tips/answers to my requirements.

    Yeh thats where they make the big bucks.... we have managed up until not to share apps, either a 2nd account or my wife just goes without the cloud
    I'm still confused as to how i can setup my [email protected], can i have both the iPad & iPhone on the same @me.com email address. Dis regarding the 2nd phone at the moment. presume i had [email protected] on both ipad & iphone i should receive emails at both devices

  • Mail rule autoreply ignores 'reply-to' address

    Hi all
    I've just discovered that when setting a Mail Rule with the action 'reply to message', the generated reply always goes to the original sender, completely ignoring the 'reply-to' address.
    This is causing me problems - when Paypal emails me saying I've received money for my business, I have an autoreply set up to send the purchaser a download link - but that goes to a generic '[email protected]' address not the purchaser's address (which Paypal put in the 'reply to' field.).
    Any ideas on a way round this?
    Thanks - Jon

    Here is a screen shot of the Mail Rule:
    Here is a screen shot of how I receive emails from Paypal:
    As we had both explaied, the incoming notifications from Paypal now use a generic********* for the return address, and insert the actual customer email address in the reply to field.  Our question is how can we force Apple Mail to use the reply to field as the email address used in auto replies.
    <Edited By Host>

  • Sort out the Mail Rules

    How can I sort the mail rules, say by Description or by name.
    I have a lot of them and they are sorted by the time I added them.
    I KNOW you can sort them manually, but surely there has to be a way to sort them by a click of a mouse, or a script or something.
    Thanks

    Whilst it may not be your fault I am afraid it appears that your post is on a forum which is not the best for your OS. It will save the time of the unpaid volunteers here, and may resolve your issue faster, if you could examine the list below and see if there is a more appropriate forum to which you could direct your question.
    OS X 10.9 Mavericks
    OS X 10.8 Mountain Lion
    OS X 10.7 Lion
    OS X 10.6 Snow Leopard
    OS X 10.5 Leopard
    OS X 10.4 Tiger
    OS X 10.3 and earlier
    OS 9, OS 8 & System 7
    OS X Technologies
    OS X Server
    iPad
    iPhone
    iPod
    Other

  • Mail Rules: How can I sort them?

    Hi,
    I am very new to this platform and I am learning tons of new stuff everyday. But I can't always find all the answers for my questions.
    Can you sort your mail rules in any other way than manually (one by one)?
    Thanx for every one out there making life easier for us newbies.

    Assuming you mean that you want to sort strings in alphabetical order, a simple way would be to place the strings in a collection, like an ArrayList (you can use the ArrayList class Add() method to add the strings), then call the ArrayList class Sort() method.
    static void Main(string[] args)
    Console.WriteLine("\n List of words :\n");
    const string a = "Love \n";
    const string b = "Hate \n";
    const string c = "Smile \n";
    const string d = "Cry\n";
    const string e = "Women\n";
    // Creates and initializes a new ArrayList.
    ArrayList myAL = new ArrayList();
    myAL.Add(a);
    myAL.Add(b);
    myAL.Add(c);
    myAL.Add(d);
    myAL.Add(e);
    //Print strings in original order
    foreach (Object obj in myAL)
    Console.Write(obj.ToString());
    Console.WriteLine();
    //Sort the ArrayList
    myAL.Sort();
    //Reprint
    foreach (Object obj in myAL)
    Console.Write(obj.ToString());
    Console.Read();
    If I have misunderstood your issue, please clarify.

  • 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...

  • 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.

Maybe you are looking for