Mail Rules syntax - separators possible?

Hello all,
I have a Junk Mail rule in Apple Mail that filters mail as junk if contains certain keywords in the Subject or Message Content, things like:
OEM
software
posing
drunk mom
I'm sure you get the picture?!
Anyway, I have around 20-30 keywords so far and it works very well for the Junk I receive however, I can't tweak them as once the number gets above a certain amount, the screen isn't big enough to hold the box and I can't see them.
Is there some sort of separator I can use which would do the trick? Something along the lines of:
OEM|software|posing
OEM,software,posing
or similar? I have tried these but they don't seem to work.
Thanks if you can help!

Hello all,
I have a Junk Mail rule in Apple Mail that filters mail as junk if contains certain keywords in the Subject or Message Content, things like:
OEM
software
posing
drunk mom
I'm sure you get the picture?!
Anyway, I have around 20-30 keywords so far and it works very well for the Junk I receive however, I can't tweak them as once the number gets above a certain amount, the screen isn't big enough to hold the box and I can't see them.
Is there some sort of separator I can use which would do the trick? Something along the lines of:
OEM|software|posing
OEM,software,posing
or similar? I have tried these but they don't seem to work.
Thanks if you can help!

Similar Messages

  • Is it possible to sort Mac Mail Rules into alphabetical order?  I have in excess of 50 rules and everytime I want to add to a rule, such as "delete incoming" I have to go through the entire list to find it.

    Is it possible to sort Mac Mail Rules into alphabetical order?  I have in excess of 50 rules and everytime I want to add or amend a rule, such as "delete incoming" I have to go through the entire list to find it.  I have tried clicking on the heading "Description" but it does not sort.  Any assistance would be greatly appreciated

    Hi,
    According to your description, my understanding is that use CMAK to configure split tunneling on VPN clients, traffic to specified devices can be routed via their own default gateway.
    If the manually added route entries all have default metric and interface, clients will select one by the default routing rule, can’t select one of them according to clients’ own conditions. So, I am afraid that CMAK can’t implement the function which you need.
    A blog described about How to configure split tunneling on VPN clients using CMAK, for your reference:
    http://blogs.technet.com/b/rrasblog/archive/2007/06/11/split-tunnelling-using-cmak.aspx
    Best Regards,
    Eve Wang 
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

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

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

  • Using a Mail rule to run an AppleScript

    I've been trying to get a Mail rule to run a very simple AppleScript on 10.5.3 and it just doesn't work, period.
    I've tried making everything as simple as possible:
    1. My Mail rule sets the background color of a message and runs the AppleScript if the subject contains "test".
    2. The AppleScript displays a Finder alert.
    [(screenshot)|http://i26.tinypic.com/nqxou8.png]
    Naturally, the script runs fine within the Script Editor. I also know that the rule works since the background color action gets applied.
    But, the AppeScript never runs when I apply the rule to a message manually or when it gets automatically applied to new messages. I really can't imagine where I'm going wrong here...

    You can't simply feed it some arbitrary script to execute, you have to write a handler that Mail can dispatch events to. This generally looks something like
    using terms from application "Mail"
    on perform mail action with messages theMessages for rule theRule
    tell application "Mail"
    repeat with suspectMessage in theMessages
    --do something
    end repeat
    end tell
    end perform mail action with messages
    end using terms from

  • Mail rule does not appear in my mail list but continues to be active

    How to i make a mail rule inactive it it doesn't appear in my list of rules? It is still actively replying saying I'm on vacation to my incoming mail?
    imac   Mac OS X (10.4.3)  

    The purchase history on your iTunes account will only show purchases from the iTunes stores (iTunes, app store, ibookstore, Mac app store), not from Apple online or bricks-and-mortar stores.
    Does anything show on your credit card ? If the email is genuine then it's possible that your and their email addresses are similar and that they gave the wrong id (or the store typed it incorrectly), it doesn't necessarily mean that anybody has access to your account.
    For the contact, you will initially just receive an acknowledgement email, the proper reply may take 24 (possibly 48) hours.

  • Mail rule message content as variable

    I run a minecraft serer, and i need a way to promote a player when they fill in a form on the website. Every time a player filles in the form, I get an email like this:
    New application for member:
    Naam:  <name of the pearson>
    Username:  <minecraft username of the person>
    Skype naam:  <skype name of the person>
    E-mail:  <email of the person>
    Nieusbrief:  <Whether they want to get the newsletter or not>
    I know there is a way to setup a mail rule that runs an applescript, and from that I can run a shel script, but is it posible to feed the playername to the shel script script as a variable? So from the mesage body to the apple script, and from the apple script th the shel script. First problem I face is getting the username to the apple script. Then there is the second problem: I know there is an run-shel-script thingy, but i'm not sure how to pass the variable on from the apple script to the shel scrip. (I don't have anny experience with apple scripts...)
    Anny help is appreciated.

    Hi Stefan,
    Thanks for your reply.  I am glad to hear that I am wrong again )
    In your opinion is it possible to force the Outlook Exchange server to add the content attachment every time?  I mean by doing some configuration on it...?
    The reason why we would like to do this is because when - in the content tag of a Mail Package message - we have MIME message parts that are of content-type text/html we are having problems in decoding the html back to a readable format.
    To do this we use the apache QuotedPrintableCodec Java class.
    This works fine when the content type of the message is just text/plain but we get an exception when we try with text/html.
    The exception we get is:
    org.apache.commons.codec.DecoderException: Invalid URL encoding: not a valid digit (radix 16): 13
    I don't know if this is because of the two character sets we have in the payload (utf-8 and iso-8859-1) or if it is for other reasons...
    If you could help me figure out how to forward any HTML email to another system in a readable format it would be great.
    Thanks for your support,
    Aldo

  • Mail rule or script

    I´m using Mail and OrganizePro on my Mac. I would like to add a script working like if I move an email to a specific folder it should automatic create a task in OrganizePro related to the email. Any ideas how this can be done ? It is possible to create OrganizePro tasks by forwarding the email to a specific email. My problem is that mail rules can not be triggered by new mail added to a folder.
    DA

    My initial thought was that you could run a script and then move the mail to the mail folder.  However, it seems that OrganizePro is not scriptable so it's not possible.
    You could:
    select an email
    run a script (from the Scripts menubar) that will forward the email to the OrganizePro address and then move the mail to the desired folder.

  • 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

  • Applescript: creating mail rules

    Hi Community,
    I can't find the syntax for creating a mail rule in applescript anywhere on the web. If someone could just post all the different options in one snippet (Move Message, Play Sound, Set Color, Delete Message, and run applescript) that would be awesome. Thanks!

    I agree with twtwtw.  Most of the rules I use simply organize the inbox into separate mailboxes. So with a list of 150 or so students each semester, it would be great to have this script work..it creates the rules, one for each student number,  but then the rule won't move the incoming messages.  Hmm...
    So if anyone figues out why, it would be great to let us know! 
    tell application "Microsoft Excel"
              set hpath to "Macintosh-HD:Users:bg:20f11:Hmwk:graded:"
              set theGrades to open workbook workbook file name "Macintosh-HD:Users:bg:20f11:20f11_grades.xlsx" update links do not update links
              set email_list to value of every cell of range "e_mail"
              set theMailbox to "20f11"
      activate
              set sn to value of every cell of range "sn"  --sn is student number
    end tell
    tell application "Mail"
              repeat with j from 1 to length of sn
                        set newRule to make new rule at end of rules with properties {name:item j of sn), enabled:false}
                        tell newRule
      make new rule condition at end of rule conditions with properties {rule type:from header, expression:item j of email_list), qualifier:does contain value, move message:mailbox theMailbox}
                end tell
              end repeat
    end tell

  • Invisible or buggy Mail Rule

    Oh boy, how to describe this? Let me try...
    I've been creating mail rules to shunt spam to the junk box. They work as expected. I don't like to click on a spam email, because if the images load, then the spammers get confirmation of a "live" email address. So I was creating a rule with my room mate's email selected instead, since it was next door to the spam. Of course, the rule was "born" populated with my room mate's email address in the "From Contains" field. So I deleted his address and put in the spam title. Now the rule works on the spam, but also all my room mate's emails keep getting sent to the junk box! Yet I completely eliminated his address from the rule. Just to make sure, I deleted and recreated the rule, to eliminate the possibility of contamination. My room mate's emails are still getting junked, and I can find no rule or reason for this in my mail account. This is truly annoying! It's like there is an invisible rule, or a corruption in my mail rules. Every time my rom mate sends me an email now, it shows up in my junk mail box. How to identify the problem & fix this? I have used the exact same method many times before to create mail rules without any problems!

    Nothing you will ever do or no amount of rules will catch all spam. I try to use basic thought on this.
    First off, you should have a good address book with trusted contacts and all their emails listed.
    Here's the 3 rules I use for spam: You might also add another for .gif attatchments.
    Depending on the spam you get, you might think of different ones to include. Any contact I have would be excluded from these rules. Any other ligitiment company or person wanting to contact me personally would not be send me anything under these conditions and would be spam to me. It won't stop the clever spamers sending messages specifically to me, but most will send to multiple addresses at one time and get picked up by these rules.

  • Please Help - Same issue for years - Mail rule switches itself!

    This issue has plagued me with Apple Mail for years and I would like to finally resolve this to keep my sanity. Please help!
    We have used the MobileMe family account (5 pack) for awhile and both my wife and I have our own unique email address that is set and we also have one combined account that we use as well. I have some rules in place to help keep the mail organized. Often we will get 1 e-mail for both of us (i.e. a message about a group we are both in or a sports team for our children) - it is sent to our joint account and then the Mail rule will handle putting them in both our boxes.
    There is the one rule that keeps changing itself! It's maddening. Here is what I want to occur:
    1. I get an e-mail to our joint MobileMe account.
    2. The rule will move that specific message to my folder and then place a copy of that message in my wife's folder.
    That's it. That's all that I want it to do.
    Here is what I put in the mail rule description to make that happen:
    IF "any" conditions met:
    "Any recipient" is equal to "joint account e-mail address"
    Perform following actions:
    "Move message" to "my mailbox"
    "copy message" to "her mailbox"
    "Stop evaluating rules"
    That's it. Here is where the problem ensues. This rule will actually work correctly for 1 or 2 times. Then what happens is somehow this rule actually changes itself and when I open up the rule description it will actually show:
    "Move message" to "my mailbox"
    "Copy message" to "my mailbox"
    Ugh. So I end up getting two copies of the same thing and have to physically move it over. It seems so simple and I can't understand why it keeps switching itself.
    I've had the issue ever since we had our family account and back to the Tiger operating system. I would love to get this fixed for good!

    I may well have missed something, but it seems to me that the command to Copy to her mailbox should come before the command to Move to your mailbox. That way the source remains available until the final Move step. I cannot say why the Rule construction would change by itself, but I can see the possibility of confusion if the Move comes before the Copy.
    Ernie

  • Mail Rule seems to be confusing messages

    This script extracts email addresses from the body of a message and resends the message to each of the extracted addresses. It works well when one message arrives at a time. However, when several messages arrive at once, it often sends a message to the wrong address. The script is very straight forward, yet I am not sure what is going on. Any ideas?
    property debug : false
    property choAddress : "[email protected]"
    using terms from application "Mail"
       on perform mail action with messages theMessages for rule theRule
           tell application "Mail"
               repeat with aMessage in theMessages
                   -- Extract addresses from message content
                   set messageContent to aMessage's content
                   set messageSubject to aMessage's subject
                   set mAddresses to my extractAddresses(messageContent)
                   -- Build a unique list of addresses
                   set uAddresses to {}
                   repeat with mAddress in mAddresses
                       set mAddress to contents of mAddress
                       if mAddress ≠ choAddress and mAddress is not in uAddresses then set end of uAddresses to mAddress
                   end repeat
                   -- Forward messages to each extracted address
                   repeat with uAddress in uAddresses
                       set newMessage to make new outgoing message at the beginning of outgoing messages with properties {sender:choAddress, subject:messageSubject}
                       tell newMessage
                           make new to recipient at beginning of to recipients with properties {address:uAddress}
                           set content to aMessage's content
                           if debug then
                               set visible to true
                           else
                               send
                               delay 1
                           end if
                       end tell
                   end repeat
                   delay 1
               end repeat
           end tell
       end perform mail action with messages
    end using terms from
    on extractAddresses(mContent)
       try
           -- Thanks Nigel Garvey
           set extractedAddresses to paragraphs of (do shell script "echo " & quoted form of mContent & " | grep -Eo '[[:alnum:]][^[:space:]<>@\":;]+@[^ <>\"]+[][:alpha:]]'")
       on error
           error number -128
       end try
    end extractAddresses

    Sorry but my AppleScript is too rusty to wade through your script. However, a while ago I wrote a script to extract email addresses from an emailed web form with a defined format and send a reminder 4 days later with a specified message.
    I opted to use a mail rule to put a copy of specified messages into another mail folder - this may be more reliable for you.
    For my 4 day delay I set a 'Users Daemon' to run an AppleScript every hour. This is more efficient and reliable than setting delays in AppleScript.
    The most tedious task is parsing for all possible email formats - check email RFCs if you doubt this.
    This script was not completed but the sections I tested on Leopard worked well. Here is the incomplete script - just in case you find something useful:
    tell application "Mail"
      set fourDays to 345600 -- normally 345600 but can be 0 for testing
              repeat with lastMsg from (count messages of mailbox "Pending") to 1 by -1
      try
                                  set thisMsg to message lastMsg of mailbox "Pending"
      end try
      if (current date) - (date sent of thisMsg) > fourDays then
      set txt to content of thisMsg
      set AppleScript's text item delimiters to {"Email id"}
      set newRecipient to paragraph 3 of text item 2 of txt
      set html to source of thisMsg
                                  set AppleScript's text item delimiters to {"<body bgcolor=\"#FFFFFF\" text=\"#000000\">"}
      set bodyPlus to text item 2 of html
      set AppleScript's text item delimiters to {"</html>"}
      set oldBody to text item 1 of bodyPlus
      set newMsg to make new outgoing message with properties {sender:"[email protected]"}
      tell newMsg
      make new to recipient with properties {address:newRecipient}
                                            set subject to "Your Heating Oil Order"
                                            set html content to "<html><body bgcolor='#FFFFFF' text='#000000'>
    <!-- Use normal html with inline style after this line - do not use double quotes -->
    <br>
    <hr style='color:pink; background-color:pink; height:4px; width:60%; text-align:middle'>
    <br>
    <p style='color:red; font-size:xx-large'>Thank you for placing your heating oil order with us.</p>
    <p style='color:brown; font-size:x-large'>I would appreciate feedback (good or bad) about how your oil delivery went.</p>
    <p style='color:blue; font-size:medium'>Please contact me if you experienced any difficulties with your order.</p>
    <br>
    <p style='color:navy; font-size:medium'>Sincerely,<br>
    <br>
    Peter Pan</p>
    <br>
    <hr style='color:pink; background-color:pink; height:4px; width:60%; text-align:middle'>
    <!-- End of extra html - original message follows -->
    <br>" & oldBody & "</html>"
      send -- normally send but can be set to save to put email in Drafts for testing
      end tell
      delete thisMsg -- normally delete thisMsg but can be removed for testing
      end if
      end repeat
    end tell

Maybe you are looking for