After migrating your Outlook mailbox to a new server, Exchange environment, or Microsoft 365 tenant, you may notice that your inbox rules execute twice for every incoming message. Each rule applies its action — moving, copying, flagging, or forwarding a message — two times instead of once. This duplication typically occurs because two rule collections exist in your mailbox: one on the server and one in your local Outlook client. This article explains why the duplication happens during migration and provides the specific steps to remove the duplicate rule set so that each rule runs only once.
Key Takeaways: Fix Duplicate Rule Execution After Mailbox Migration
- Outlook > File > Manage Rules & Alerts > Email Rules tab: Check if rules appear twice with identical names — this is the primary symptom of duplicate rule collections.
- Outlook.exe /cleanrules: Run this command-line switch to delete all client-side rules and force Outlook to download only the server-side rules after migration.
- Outlook Web App > Settings > Mail > Rules: Use OWA to verify only one copy of each rule exists on the server before re-enabling client-side rules.
Why Outlook Rules Run Twice After a Mailbox Migration
When you migrate a mailbox — whether from on-premises Exchange to Exchange Online, from one Exchange server to another, or from a PST import — two separate rule collections can exist simultaneously. Outlook stores a local copy of rules in a file named outlk16.dat or extend.dat in your local profile folder. The server stores its own copy of rules in the Exchange mailbox. After migration, Outlook may continue using the old local rule set while the server also holds a new rule set. When a message arrives, the server applies its rules first, then Outlook applies the local rules. If both sets contain the same rules, each rule executes twice.
The duplication is not caused by a bug in Outlook. It is a side effect of how Outlook synchronizes rules with the server. By default, Outlook stores rules locally for offline access. After migration, Outlook does not automatically delete the old local copy. Instead, it merges the local rules with the server rules. If the same rule exists in both locations, Outlook creates a duplicate entry in the Rules and Alerts dialog. You will see two entries with the same name, same conditions, and same actions.
This issue is most common in the following scenarios:
- Migration from Exchange on-premises to Exchange Online (Microsoft 365)
- Migration from one Exchange organization to another using a cross-forest move
- Importing a PST file that contained rules into a new mailbox that already had server-side rules
- Upgrading from Outlook 2016 to Outlook Microsoft 365 Apps on a machine with a cached profile
Steps to Remove Duplicate Rules and Stop Double Execution
The goal is to keep only one copy of each rule — the server-side copy. You will delete the local client-side rule collection and let Outlook re-sync the rules from the server. Follow these steps in order.
Step 1: Back Up Your Existing Rules
- Open the Rules and Alerts dialog
In Outlook, go to File > Manage Rules & Alerts. If you are in Outlook for Microsoft 365, you can also press Alt+F, then press M, then press R. - Export your rules to a file
Click the Options button in the Rules and Alerts dialog. Select Export Rules. Choose a location on your desktop or Documents folder and save the file with a name such as RulesBackup_YYYYMMDD.rwz. This file contains all your rules in a format that Outlook can re-import. Keep this file in case you need to restore any rules later.
Step 2: Delete All Client-Side Rules Using the /cleanrules Switch
- Close Outlook completely
Make sure Outlook is not running. Check the system tray for the Outlook icon and right-click it, then select Exit. - Open the Run dialog
Press the Windows key + R on your keyboard. - Run Outlook with the cleanrules switch
Type the following command and press Enter:outlook.exe /cleanrules
Outlook starts and immediately deletes all client-side rules from your local profile. It does not delete rules stored on the server. You will see a blank Rules and Alerts dialog after Outlook loads.
Step 3: Force Outlook to Download Server-Side Rules
- Close Outlook again
After the /cleanrules switch completes, close Outlook. - Restart Outlook normally
Open Outlook by double-clicking its icon. Outlook connects to the Exchange server and downloads the rule collection stored on the server. This process happens automatically. You do not need to run any additional commands. - Verify the rules in Rules and Alerts
Go to File > Manage Rules & Alerts. You should see only one copy of each rule. If you previously had a rule called “Move invoices to Finance folder,” it should appear only once.
Step 4: Delete Duplicate Rules Manually (Alternative Method)
If you prefer not to use the /cleanrules switch, you can delete duplicate rules manually. This method is slower but gives you control over which rules to keep.
- Open Rules and Alerts
Go to File > Manage Rules & Alerts. - Identify duplicate rules
Look for rules that have the same name, same conditions, and same actions. Duplicate rules appear as two rows with identical names. - Delete the duplicate copy
Select one of the duplicate rules and click Delete. If you are unsure which copy is the server copy, check the rule type column. Server-side rules show “Server” in the Type column. Client-only rules show “Client” or are blank. Delete the client-only copy. - Repeat for all duplicates
Continue deleting duplicate entries until only one copy of each rule remains. Click OK to save changes.
If Outlook Still Runs Rules Twice After the Main Fix
Rules Still Duplicate After /cleanrules
If rules continue to run twice after using the /cleanrules switch, the server itself may contain duplicate rules. This can happen if a migration tool copied rules from the old mailbox to the new mailbox without overwriting the existing ones. To check for server-side duplicates, log in to Outlook on the Web (OWA) and navigate to Settings > Mail > Rules. Review the list. If you see duplicate entries, delete the extra copy from OWA. Changes made in OWA apply directly to the server rule collection. After deleting duplicates in OWA, close and reopen Outlook to sync the corrected list.
Rules Disappear After /cleanrules
If all rules disappear after running /cleanrules, the server-side rule collection was empty. This can happen if the migration did not transfer rules or if rules were stored only in the local PST file. To restore your rules, go back to File > Manage Rules & Alerts, click Options, and select Import Rules. Browse to the .rwz backup file you exported in Step 1. After importing, the rules will appear only in the client. To make them server-side, create a new rule with the same conditions and actions, or use OWA to create the rules directly on the server.
Rules Run Twice on Shared Mailboxes
If you have rules on a shared mailbox that you access with Auto-Mapping, each delegate may have a separate rule collection. After migration, each delegate’s local rules can conflict with the shared mailbox’s server rules. The fix is to remove all rules from the shared mailbox using the Exchange Management Shell. Connect to Exchange Online PowerShell and run Get-Mailbox -Identity "SharedMailboxName" | Remove-InboxRule -Confirm:$false. Then have each delegate re-create their rules from scratch in OWA.
Client-Side Rules vs Server-Side Rules: Key Differences
| Item | Client-Side Rules | Server-Side Rules |
|---|---|---|
| Storage location | Local outlk16.dat or extend.dat file on your PC | Exchange mailbox on the server |
| Execution | Run only when Outlook is open and connected to the mailbox | Run even when Outlook is closed or on a different device |
| Rule types supported | All rule conditions and actions, including custom actions and running scripts | Only conditions and actions that can be processed server-side (no scripts, no custom actions) |
| Impact of migration | Old local copy persists after migration, causing duplication | New copy is created on the target server; old server copy is discarded |
| How to delete | Use Outlook.exe /cleanrules or delete manually in Rules and Alerts | Delete in OWA or use Exchange PowerShell Remove-InboxRule cmdlet |
Now you can identify and remove duplicate rule collections that cause Outlook rules to run twice after a mailbox migration. Use the /cleanrules command-line switch to clear client-side rules, then verify the server-side rule list in Outlook on the Web. For a controlled cleanup, manually delete duplicate entries in the Rules and Alerts dialog. After fixing the duplication, consider converting your most important rules to server-side rules by creating them in OWA, which ensures they run regardless of which device or Outlook version you use.