Modify the space used by Inbox rules in Exchange Online

Inbox rules in Outlook on the web (formerly known as Outlook Web App) and Outlook are limited to 256 KB total for all rules. Each rule you create will take up space in your mailbox. The actual amount of space a rule uses depends on several factors, such as how long the name is and how many conditions you've applied. When you reach the 256 KB limit, you'll be warned that you can't create any more rules or that you can't update a rule. You can't increase the amount of space that's allocated to store Inbox rules in Exchange Online, but you can decrease it to suit your business needs.

Notes:

  • The valid range for the Inbox rules quota is 32 KB to 256 KB.

  • There isn't a maximum number of rules that users can create.

  • The quota for Inbox rules applies only to enabled rules. There's no restriction on the number of disabled rules that a mailbox can have. However, the total size of rules that are enabled or active in the mailbox can't exceed the quota value

What do you need to know before you begin?

  • Estimated time to complete each procedure: 5 minutes or less.

  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Mailbox settings" entry in the Feature permissions in Exchange Online topic.

  • You can only use Exchange Online PowerShell to perform the procedure in this topic. To connect to Exchange Online PowerShell, see Connect to Exchange Online PowerShell.

Tip

Having problems? Ask for help in the Exchange forums. Visit the forums at Exchange Online or Exchange Online Protection.

Use Exchange Online PowerShell to increase the limit for Inbox rules

There are three basic methods you can use to modify the rules quota for a mailbox:

  • Individual mailboxes: Use the following syntax:

    Set-Mailbox -Identity <MailboxIdentity> -RulesQuota "<32 KB to 256 KB>"
    

    This example decreases the rules quota to 200 KB for the user douglas@contoso.com.

    Set-Mailbox -Identity douglas@contoso.com -RulesQuota " 200 KB"
    
  • Filter mailboxes by attributes: This method requires that the mailboxes all share a unique filterable attribute. For example:

    • Title, Department, or address information for user accounts as seen by the Get-User cmdlet.

    • CustomAttribute1 through CustomAttribute15 for mailboxes by as seen the Get-Mailbox cmdlet.

    The syntax uses the following two commands (one to identify the mailboxes, and the other to apply the rules quota to the mailboxes):

    $<VariableName> = <Get-User | Get-Mailbox> -ResultSize unlimited -Filter <Filter>
    
    $<VariableName> | foreach {Set-Mailbox -Identity $_.MicrosoftOnlineServicesID -RulesQuota "<32 KB to 256 KB>"}
    

    This example decreases the rules quota to 32 KB to all mailboxes whose Title attribute contains "Vendor" or "Contractor".

    $V = Get-User -ResultSize unlimited -Filter {(RecipientType -eq 'UserMailbox') -and (Title -like '*Vendor*' -or Title -like '*Contractor*')}
    
    $V | foreach {Set-Mailbox -Identity $_.MicrosoftOnlineServicesID -RulesQuota "32 KB"}
    
  • Use a list of specific mailboxes: This method requires a text file to identify the mailboxes. Values that don't contain spaces (for example, the user account) work best. The text file must contain one user account on each line like this:

    akol@contoso.com

    tjohnston@contoso.com

    kakers@contoso.com

    The syntax uses the following two commands (one to identify the user accounts, and the other to apply the rules quota to those users):

    $<VariableName> = Get-Content "<text file>"
    
    $<VariableName> | foreach {Set-Mailbox -Identity $_ RulesQuota "<32 KB to 256 KB>"}
    

    This example decreases the rules quota to 150 KB to the mailboxes specified in the file C:\My Documents\Junior Managers.txt.

    $Jr = Get-Content "C:\My Documents\Junior Managers.txt"
    
    $Jr | foreach {Set-Mailbox -Identity $_ -RulesQuota "150 KB"}
    

How do you know this worked?

To verify that you've modified the Inbox rules quota on a mailbox, use any of the following steps in Exchange Online PowerShell:

  • Replace <MailboxIdentity> with the name, alias, email address, or account name of the mailbox, and run the following command to verify the value of the RulesQuota property:

    Get-Mailbox -Identity "<MailboxIdentity>" | Format-List RulesQuota
    
  • Run the following command to verify the value of the RulesQuota property for all mailboxes:

    Get-Mailbox -ResultSize unlimited | Format-Table -Auto Name,RulesQuota
    

What else do I need to know?

  • Inbox rules are run from top to bottom in the order in which they appear in the Rules window. To change the order of rules, click the rule you want to move, and then click the up or down arrow to move the rule to the position you want in the list.

  • When you create a forwarding rule, you can add more than one address to forward to. The number of addresses you can forward to may be limited, depending on the settings for your account. If you add more addresses than are allowed, your forwarding rule won't work. If you create a forwarding rule with more than one address, test it to be sure it works.