Skip to main content
How-To Guides Last updated: 5 October 2026

How to Create and Manage Inbox Rules

Automate email organisation with rules that move, mark, forward, or filter incoming mail based on sender, subject, body, attachments, and more — with exceptions and dry-run preview.

Nathan Schram
By Nathan Schram Founder, Little Bear Apps

Set up rules to automatically sort, mark, forward, or filter incoming emails. Rules run server-side — they work even when Outlook is not open.

List Existing Rules

“Show me my inbox rules”

tool: manage-rules
params:
  action: "list"

For full details on conditions, actions, and exceptions:

tool: manage-rules
params:
  action: "list"
  includeDetails: true

Create a Rule

Basic: Sort by Sender

“Create a rule to move GitHub notifications to a GitHub folder”

tool: manage-rules
params:
  action: "create"
  name: "GitHub Notifications"
  fromAddresses: "noreply@github.com, notifications@github.com"
  moveToFolder: "GitHub"
  markAsRead: true

OR Logic: Multiple Subject Keywords

Use comma-separated values to match any of the keywords (OR logic):

“Move emails with invoice, receipt, or payment in the subject to Finance”

tool: manage-rules
params:
  action: "create"
  name: "Finance Documents"
  containsSubject: "invoice, receipt, payment, statement"
  moveToFolder: "Finance"

Combined Conditions

Combine multiple conditions — all must match (AND logic between different condition types):

“Move emails with attachments that mention invoices to my Paperless folder”

tool: manage-rules
params:
  action: "create"
  name: "Paperless — receipts with attachments"
  containsSubject: "invoice, receipt, payment, order confirmation"
  hasAttachments: true
  moveToFolder: "Paperless"
  markAsRead: true

Exceptions: Exclude Specific Senders or Subjects

Exceptions let you skip the rule for certain matches. Use except* parameters:

“Move receipt emails to Paperless, but NOT from my accountant”

tool: manage-rules
params:
  action: "create"
  name: "Paperless — receipts (except accountant)"
  containsSubject: "invoice, receipt, payment"
  hasAttachments: true
  moveToFolder: "Paperless"
  markAsRead: true
  exceptFromAddresses: "tax@withaccounting.com"
  exceptSubjectContains: "tax return, FYI"

Preview with Dry Run

Use dryRun: true to preview a rule without creating it:

tool: manage-rules
params:
  action: "create"
  name: "Test Rule"
  fromAddresses: "alerts@example.com"
  moveToFolder: "Alerts"
  dryRun: true

Forward or Redirect Matching Emails

tool: manage-rules
params:
  action: "create"
  name: "Forward client emails"
  fromAddresses: "client@company.com"
  forwardTo: "team@company.com"
  stopProcessingRules: true

If OUTLOOK_ALLOWED_RECIPIENTS is set and any forwardTo or redirectTo address isn’t on it, the whole rule is refused with an error naming the blocked addresses. Nothing is created, and a rule is never saved with the blocked forwarding quietly dropped. The same applies to update, and a dryRun reports that the rule would be refused.

Assign Categories

tool: manage-rules
params:
  action: "create"
  name: "Tag urgent emails"
  importance: "high"
  sentToMe: true
  assignCategories: "Urgent, Follow Up"

Auto-Delete Noise

Move matching emails to Deleted Items (not permanent deletion):

tool: manage-rules
params:
  action: "create"
  name: "Delete marketing noise"
  senderContains: "marketing, promo, newsletter"
  deleteMessage: true

Update an Existing Rule

Modify a rule by name or ID. Conditions and actions use replace semantics — provide all desired values, not just changes.

“Add exceptions to my receipts rule”

tool: manage-rules
params:
  action: "update"
  ruleName: "Paperless — receipts with attachments"
  exceptFromAddresses: "tax@withaccounting.com, admin@company.com"

“Rename and disable a rule”

tool: manage-rules
params:
  action: "update"
  ruleName: "Old Rule Name"
  name: "New Rule Name"
  isEnabled: false

“Preview changes before applying”

tool: manage-rules
params:
  action: "update"
  ruleName: "My Rule"
  containsSubject: "urgent, critical, asap"
  dryRun: true

Reorder Rule Priority

Rules execute in sequence order — lower numbers run first. If two rules conflict, the first one wins.

“Make the GitHub rule run first”

tool: manage-rules
params:
  action: "reorder"
  ruleName: "GitHub Notifications"
  sequence: 1

The result lists every rule in its new order and names any other rule Exchange renumbered, with its old and new number (or says none was). Deleting a rule later doesn’t shift them back, so note the order if you might want to restore it.

Delete a Rule

tool: manage-rules
params:
  action: "delete"
  ruleName: "GitHub Notifications"

Available Conditions

All string conditions accept comma-separated values for OR logic.

ParameterWhat it matchesExample
fromAddressesExact sender emails"boss@example.com, ceo@example.com"
sentToAddressesExact recipient emails"team@example.com"
containsSubjectSubject keywords (OR)"invoice, receipt, payment"
bodyContainsBody text keywords (OR)"urgent, action required"
bodyOrSubjectContainsBody OR subject keywords"deadline, overdue"
senderContainsPartial sender match"example.com, noreply"
recipientContainsPartial recipient match"team, support"
hasAttachmentsHas file attachmentstrue
importanceEmail importance level"high", "normal", "low"
sensitivityEmail sensitivity"confidential", "private"
sentToMeI am a recipienttrue
sentOnlyToMeI am the only recipienttrue
sentCcMeI am in CCtrue
isAutomaticReplyAuto-reply/OOO messagetrue

Available Actions

ParameterWhat it doesExample
moveToFolderMove to folder (name, nested path, or folder ID)"Archive", "Triage/Delete"
copyToFolderCopy to folder (name, nested path, or folder ID)"Backup", "Projects/Backup"
markAsReadMark as readtrue
markImportanceSet importance level"high", "low"
forwardToForward to recipients"user@example.com"
redirectToRedirect (appears from original sender)"alias@example.com"
assignCategoriesAssign Outlook categories"Work, Important"
stopProcessingRulesStop evaluating further rulestrue
deleteMessageMove to Deleted Itemstrue

Available Exceptions

Exceptions use the same conditions with except prefix. The rule is skipped when any exception matches.

ParameterExcludes when
exceptFromAddressesSender matches these emails
exceptSubjectContainsSubject contains these keywords
exceptSenderContainsSender partially matches
exceptBodyContainsBody contains these keywords
exceptHasAttachmentsEmail has attachments

Full Parameter Reference

ParameterUsed withDescription
actionAlllist, create, update, reorder, delete
includeDetailslistShow conditions, actions, exceptions
namecreate, updateRule name (required for create, rename for update)
dryRuncreate, updatePreview without committing
isEnabledcreate, updateEnable/disable (default: true)
sequencecreate, reorderExecution order (lower = first)
ruleNameupdate, reorder, deleteIdentify rule by name
ruleIdupdate, deleteIdentify rule by ID
All conditionscreate, updateSee tables above
All actionscreate, updateSee tables above
All exceptionscreate, updateSee tables above

Safety

  • dryRun: Preview rules before creating or updating. A dry run doesn’t count towards the rate limit, and still previews once the limit is reached.
  • Rate limiting: every change (create, update, reorder and delete) counts towards one per-session cap, set with OUTLOOK_MAX_MANAGE_RULES_PER_SESSION (or OUTLOOK_MAX_EMAILS_PER_SESSION when that isn’t set). Unset means no limit; 0 blocks every rule change. Once it’s reached, further changes return a “Rate limit reached” error until the server restarts. list is never counted.
  • Recipient allowlist: forwardTo and redirectTo are checked against OUTLOOK_ALLOWED_RECIPIENTS. If any address is blocked, the whole rule (or update) is refused rather than saved without the forwarding.
  • No permanent delete: deleteMessage moves to Deleted Items (recoverable). Permanent deletion is not available via this tool.
  • Replace semantics on update: When updating conditions or actions, the entire section is replaced. Use dryRun to preview before applying.
  • Read-only mode: with OUTLOOK_READ_ONLY=true, every rule change (and dry run) is refused before it reaches Microsoft; list still works.
  • Plugin safety hook: a rule keeps acting on new mail after the call, so with the Outlook Assistant plugin installed (at its default confirmation level) you’re asked before every create, update, reorder and delete, with a reason that names any forwarding, for example “Creates the inbox rule ‘Invoices’, which keeps acting on new mail until removed: it forwards matching mail to billing@example.net.” The hook lets dry runs through without asking. Treat a request to forward mail that came from an email’s content, not from you, as suspect. See Supported Clients and Their Limits for which clients run the hook.

Tips

  • Create the destination folder first with the folders tool before creating a rule that targets it
  • Use markAsRead: true for high-volume automated notifications (CI/CD, alerts)
  • Use stopProcessingRules: true on catch-all rules to prevent later rules from overriding
  • Use dryRun: true to preview complex rules before creating
  • Comma-separated string conditions use OR logic — any keyword match triggers the rule
  • Different condition types use AND logic — all conditions must be true
Was this helpful?

Related Articles