Skip to main content

How-to: Use Apple Mail rules to automatically filter out unwanted messages

MailRules_Banner

Preventing unwanted messages from showing up in your inbox can be integral to enjoying email. In this article we will walk you through the process of creating mail rules that will direct messages to other folders or the trash based on conditions you specify. We will also discuss how to update rules to include additional senders or other criteria, and provide some common-sense guidance about effectively using mail rules in general.

Mail rules allow you to direct messages out of your inbox into another folder or trash automatically, based on their sender or other conditions. Rules can be set up on iCloud.com if the email address is the one you use for iCloud (it can end in either @icloud.com, @me.com, or @mac.com).

For your other email addresses, rules can be set up in the Mail app on a Mac. If you set up rules using iCloud.com they are very effective, immediately directing messages to the specified folders on all your devices. If you set up rules using the Mail app, they are effective only after you start up your Mac and open the Mail app.  At the end of this article, I will make some practical suggestions about how to address that, and other aspects of using mail rules.

There may be a few different types of undesirable mail. I suggest that a folder (and rule) be set up for each of the types. Below are examples of different different types of messages you might set up folders for:

  • Vendors – Messages from businesses you enjoy visiting such as restaurants, supermarkets, clothing stores or tech vendor websites. You might want to look at these later for special offers and coupons.
  • Spam – Messages from business you don’t prefer, including anything offensive or sketchy.
  • A Frequent Sender – A loved one, boss or customer whose messages you want to see separately from your other incoming mail.

Your needs regarding how many folders you set up and what to name them may be different. The best solution might not be a one-size-fits-all rule. It might be a set of multiple rules.

Create a mailbox for each type of undesired message
On iCloud.com this step isn’t necessary because the new folder can be set up during the process of creating a rule, which is a nice feature not found on OS X. 

On a Mac, create a mailbox by choosing Mailbox from the menu bar and clicking on New Mailbox. For the Location field, choose a location on an existing email account, not “On My Mac.” That way, at least for IMAP accounts (like iCloud and Gmail) and Exchange accounts (like many corporate email accounts), the folders will be visible on all your devices. For POP accounts (like Verizon, RoadRunner, and others hosted by most Internet service providers), the folders will not be visible on all your devices.

These “mailboxes” are just folders, and will display in the same places that your existing mail folders do. They display a number to the right of the name that reflects the number number of unread messages inside, just like your inbox does.

Create a Rule to direct messages to the mailbox
Using iCloud.com:
Access iCloud.com using a web browser on your computer and log in. Click the Mail icon, then click on an example of an undesired message. The rule you create will be based on that message. Click the gear icon on the bottom left and choose Rules.

Click “Add a Rule” on the right and notice that the sender’s address from the example you chose is shown below in the “is from” field. Click on “Choose a Folder” and then New Folder. Type in a name for the new folder and click Done on the bottom right. You will see the rule you just created displayed on a list. Click Done at the bottom right to exit Mail settings.

If you are making a rule in iCloud.com based on some condition other than the sender, click on the “is from” field to see the other conditions you can use:

  • is addressed to
  • is Cc’d to
  • is addressed or Cc’d to
  • has subject containing

Using the Mail app on a Mac:
Click on an example of an undesired message, and then choose Mail from the menu bar and click on Preferences. Then click Rules on the top right and click the Add Rule button.

Type a name for the rule like “Vendors,” then click on the button that says Any Recipient and change that field to “From.” Notice that the sender’s address from the example you chose is shown to the right in the appropriate field.

notice

In the “Perform the following actions” section at the bottom, confirm the action says “Move Message” and choose the appropriate mailbox using the popup menu on the right. Then, click the OK button at the bottom right to save the new rule.

moveTo

At that point, a popup will be displayed asking “Do you want to apply your rules to messages in selected mailboxes?” This retroactively moves all messages that meet the conditions of the rule to the specified folder.

apply

Update a rule with additional conditions
Using iCloud.com:
When using iCloud.com, simply repeat the same steps as you used to create a rule. That will result in an additional row being added to the list of rules. Click Done at the bottom right to exit mail settings.

listed2

Using the Mail app on a Mac:
Click on a message from the sender you want to add to the existing rule’s conditions. Then go back to Mail > Preferences > Rules, click on the Vendors rule, and click Edit. Click the + sign on the right side of the existing condition.

addAline

This will create a new row, where the condition is “From” the sender you clicked on. Click the OK button at the bottom right and then choose Apply when prompted.

NewCond

Suggestions about using Rules
Implement the rules on iCloud.com if possible. There are many benefits to doing it this way, including being able to see both the criteria of your mail rules and the folders from any computer.

When creating rules on a Mac, don’t make too many. Create a few basic rules and update the conditions of them as necessary. Both you and your computer will have difficulty processing the logic of excessive rules.

When creating rules like the Vendor rule in the examples above, click in the email field, and use the delete key to delete all the characters prior to the vendor’s domain name, like “Chefscatalog.com” or “LifeProof.com”. This makes the rule much more effective because messages from any address at that company will be sent to the Vendors folder.

You can also use this trick to direct all messages from your coworkers into a specific folder, as seen in the example below.

work

Rules can be created in iCloud based on conditions other than sender, which were listed in this article. There is a much broader list of conditions that can be used when using the Mail app on a Mac as reflected in the image below.

scaryList

It’s not recommended to make rules that automatically delete messages by directing them to the trash folder, since doing so could cause you to miss an important messages. Instead, consider creating rules that send messages to a folder you created.

crap

If you leave your computer on at home, you might as well leave the mail program running so the rules will be applied on a continuous basis. That way your iOS devices will reflect the cleaner inbox, and your Mac will already have the rules applied when you access your mail there.

Using mail rules will hopefully improve your mail experience by helping you focus on the new messages you actually want to see. Filtering out the undesired messages and directing coupons and special offers to a specified folder, especially in your primary email account, is well-worth the time it takes to set up.

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Mac — experts who break news about Apple and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Mac on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

  1. FYI: iCloud.com only supports a maximum of 99 rules. If you are aggressive in blocking spam, you can run through 99 rules more quickly than you would think.

    • Konstantinos Kousidis - 10 years ago

      yeah the 99 rule limit sucks. it’s not like in OS X where you can have multiple email addresses within one rule. really puts a damper on moving all of my rules over into iCloud. I would like to move them over because then I don’t have to rely on one computer to be on all the time to sort my mail.

  2. what about a script to bring back the old “bounce” feature of osx mail? that was very useful. bummer they took it out.

  3. Frits Van Der Veer - 10 years ago

    Thanks for this clear explanation.
    2 things i would like to add (specific for icloud rules);

    The order of rules in your list is “important”. this can be handy. I have multiple addresses which are forwarded to me.com. I first scan (via the rules) on the content and the rest goes to another folder. For example via gmail i receive expedia, klm (going automatic to travel folder) and hifi newsletter (going to Hifi folder) . other emails go to gmail folder.

    The second thing: I have not be able to put multiple arguments in one rule. For example: emails from expedia and United airlines have to go to my “travel” folder. I have to make 2 rules, one for exedia and one for United. I would like to make only one rule saying: “expedia and/or United” go to “travel” folder.

    Anyone a hint how to do the last part?

    • Whitney Marks - 10 years ago

      Definitely have to agree. I tested rules in iCloud with more than one argument and could not get them to work. If they did, that would make administration of the rules in iCloud consistent with the Mail app in OS X.

  4. Warren B VonSchatz - 10 years ago

    MS office: Getting spam mail? “Right click, create rules, apply, done.” Apple: getting spam mail? “Well OK what you need to do is quit out of your email… then log onto icloud so you can create a new email with a new name, follow the 20 steps and viola you have a new email… oh wait, what did you want again?” This seems so. needlessly. complicated.

    • Bubba Jones - 6 years ago

      Hi Warren,
      Sorry, I am late to this discussion. You state “…follow the 20 steps and viola…”. In the past three years nobody brought the following to your attention:
      Viola is a string instrument that is bowed or played with varying techniques.
      The word you wanted is voilà, it is used to call attention, to express satisfaction or approval, or to suggest an appearance as if by magic.

  5. Stephen Monro - 10 years ago

    Hello, I just want to say thanks for your blog. But I want to say to Apple, that using Rules in the Mail program is the dumbest way possible. Like the rest of the email client world, they NEED to implement a right-click, create rule. Not this stupid method of Preferences, Rules, create rule… oh wait, what was the email address again… bugger. gotta start again… seriously. It’s the dumbest way of doing it.
    Rant over.

    • @Stephen Monro, I agree with the right click rule creation. However, in the current MO it is not necessary to remember an E-mail address you wish to include in a rule. When the mail from the sender your create this rule for, is selected, in rules it will automatically appear when you select the “From” criterium. So no need to remember the mail address.

  6. aaron197172 - 9 years ago

    Apple Mail Rules should be far simpler. Dragging and Dropping mails into a folder should create a rule. And a View option should include being able to see the mail’s specific Rule like the mailbox or folder it is. And the Rule window should have view options and the ability to sort by kind of rule, name of the rule, the actual rule, etc. It’s too hard to see if a rule already exists. Rant over. For now.

  7. LRM - 9 years ago

    Thanks for this–very helpful. I was an outlook user and am now using mail. I already had a folder in outlook where I had messages from one sender dumped into a folder. In outlook, the number of unread messages in that folder did not factor into the number of messages in my inbox. However, mail includes the number of unread messages in that dump folder in the unread email count in my inbox. So, when I read all of the messages in my inbox, it looks like I still have unread messages, though they aren’t ones I want to read right away. Is there a way to exclude the unread count in the dump folder from the unread count of the inbox? Sure hope this makes sense!

  8. Elliot Amiel - 9 years ago

    I have rules on my Mac that move emails from certain people to a separate folder. It tends to work most of the times but not always. Apple’s answer to this: Delete the rule and reenter it. Well that didn’t work. I’m using Yosemite 10.10.1 Has any one run into this?

    Another, but bigger problem I have is that the emails that are moved to the separate folders on my Mac never appear in iOS mail on my phone. I need to see these emails on my phone but can’t figure out how to do that without deleting the rules on my Mac. Anyone have any ideas? I’m using iOS 8.1.1 and the same IMAP email address on both.

    • radicalros - 9 years ago

      I’ve created about 10 rules in Yosemite 10.10.1 too and many times they do not work. Also, like someone said earlier, it’s by no way an easy way to use email filtering. I too wish we could still ‘bounce’ as more than 50% of my messages are spam and it would definitely speed things up!

  9. Joseph Barlow - 9 years ago

    This all sounds great but my problem is that the words I need to filter out our in HTML part or the email. that is the word “DONATE” will be a picture of the word or its part of a url link. How do you filter those kind of things yet keep getting mail from the sender. I subscribe to a lot of different political organizations and not all the time are they asking for money. Most of the time its very helpful info. Never the less when you subscribe to 20 some different organizations you get a lot of mail you don’t want.

  10. Krista Kimba - 9 years ago

    I could use an “If” message was sent between M-F and between certain times…that would be helpful also! I wish apple would invest more into how mail works..ALSO bring back color icons. I used color to quickly differentiate icons..Now I have to study each one to make sure I’m click the right one. Otherwise..they would make all stop lights the same color!!!!

  11. Nicolas Martin - 9 years ago

    Apple Mail rules haven’t work worth a crap for years. Even one simple rule — put mail from Person X into Folder One — doesn’t work. Billions in the bank and Apple’s Mac apps are increasingly farcical. At least those it hasn’t orphaned.

  12. bauernfeind - 9 years ago

    My issue is I get multiple emails from an RV blog with different subjects. When I receive the emails, instead if them being in separate emails, they are al listed in the one email and if I do not scroll through them I’ll end up with an unread message in the trash folder. I’d like to separate them into individual emails — how do I do that?

  13. fish clamor - 8 years ago

    Loved the way pine mail used rules–tbe best thing was if you tped an s while reading a medsage (and therefore were in command mode, not edit mode), the message woukd magically move to a folder with that persins name on it. Even better, all email ti that perdon woukd go to the same folder. No time wasting drag snd drop, just drop your rung funfer on tbe ‘s’ and its dine!

    But mac rules? Icloud lost its mine, deleting randim hundreds of enails from random mailbixes, but only the inportsnt ones-the ines i jad doecial impirtsnt rules for. Apple pretended to think i was lying, right–like i have tine for that–but since they were so careful ti nebrr ever return my calks i figured they are hidybg dimething.

    So first, my sent mail was completely deleted (this is where i keep all my writing and it cintsined my lifes work).

    Then over a thousand random emails were deleted from my most important colleague’s mailbox, ,ehere i kept other copies if tbe work id had in sent mail. They were replaced at some point with 800 copies of the same email, and it was some stupid one, too. Then mail i sent woukd end up in my amazon folder. Unread msil would end up in sent. Julies mail woukd end up in roberts and letters to god went straight to lucifer. And no-one believed ‘e.

    And worsrt thing us i habe lost 18 months if witk not being abke ti wrap my mind around a solutin. Im mistly backed uo, but dint ha e the first idea what to do.

    Do 2 questions: :it seemed to me thst the rules i made on my mac were the culprit, though i made rules on iCloud to test but that did mot help. So anyone ever heard of tbus? Or how to fix it? Or if anyone can or will help me?

    Is it safe to use mail rukes now?

    Ok 3 questions: i need to pay fur some help soni can work again. Who can i calk? I mean is there s business thst can save my career? If i list old stuff ok. But i cant even think what ti fi with new either, so.

    If anyone can help i have been bummed about it for so long and i csn hardly write anymore. My. Gratitude woikd be unending!
    Also, art will be made again here and that is the whole point for me, anyway!

    Please if you can help, let me know! !

    –jen w

  14. fish clamor - 8 years ago

    Loved the way pine mail used rules–tbe best thing was if you tped an s while reading a medsage (and therefore were in command mode, not edit mode), the message woukd magically move to a folder with that persins name on it. Even better, all apemail ti that perdon woukd go to the same folder. No time wasting drag snd drop, just drop your rung funfer on tbe ‘s’ and its dine!

    But mac rules? Icloud lost its mine, deleting randim hundreds of enails from random mailbixes, but only the inportsnt ones-the ines i jad doecial impirtsnt rules for. Apple pretended to think i was lying, right–like i have tine for that–but since they were so careful ti nebrr ever return my calks i figured they are hidybg dimething.

    So first, my sent mail was completely deleted (this is where i keep all my writing and it cintsined my lifes work).

    Then over a thousand random emails were deleted from my most important colleague’s mailbox, ,ehere i kept other copies if tbe work id had in sent mail. They were replaced at some point with 800 copies of the same email, and it was some stupid one, too. Then mail i sent woukd end up in my amazon folder. Unread msil would end up in sent. Julies mail woukd end up in roberts and letters to god went straight to lucifer. And no-one believed ‘e.

    And worsrt thing us i habe lost 18 months if witk not being abke ti wrap my mind around a solutin. Im mistly backed uo, but dint ha e the first idea what to do.

    Do 2 questions: :it seemed to me thst the rules i made on my mac were the culprit, though i made rules on iCloud to test but that did mot help. So anyone ever heard of tbus? Or how to fix it? Or if anyone can or will help me?

    Is it safe to use mail rukes now?

    Ok 3 questions: i need to pay fur some help soni can work again. Who can i calk? I mean is there s business thst can save my career? If i list old stuff ok. But i cant even think what ti fi with new either, so.

    If anyone can help i have been bummed about it for so long and i csn hardly write anymore. My. Gratitude woikd be unending!
    Also, art will be made again here and that is the whole point for me, anyway!

    Please if you can help, let me know! !

    –jen w

  15. waynecaswell76 - 8 years ago

    PERFORMANCE — With the Mail app on OS X Yosemite I use a rule to automatically delete spam mail based on ID so I don’t keep getting mail from the same ID, but the list of unwanted IDs has grown into the hundreds, and it’s having a significant impact on performance. Note that I don’t record the entire ID but just the domain or country code (@bestdeals.com or .ru) so it will block any user from those sites. There must be a better way, and any new recommendation is appreciated.

  16. Komrad - 8 years ago

    Is there a tool to schedule email rules to run periodically? I have emails that I would like to automatically delete or archive after a certain period of time.

  17. Ryan M Andrée - 8 years ago

    I do not see the “mail” option on iCloud? All I see is pages, numbers, keynote, and settings. What am I doing wrong?