• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

Prevent Users from Forwarding Mail to Internet Addresses

Slipstick Systems

› Exchange Server › Prevent Users from Forwarding Mail to Internet Addresses

Last reviewed on December 4, 2018     8 Comments

Applies to: Office 365 Exchange

The problem: when users leave the company, they create server side rules to forward their mail to an outside address. An administrator wanted to know if there was a way to clear rules in Outlook or with a PowerShell command.

Yes, you can use PowerShell to check for and remove forwarding rules. Use the first cmdlet to check for forwarding rules. This cmdlet will list all rules in the mailbox and if they are forwarding rules, include the address the message is being forwarded to

Get-InboxRule -Mailbox user-alias |fl Name,Identity,ForwardTo,ForwardAsAttachmentTo

Then use this cmdlet to delete the rule:

Remove-InboxRule -Mailbox user@domain.com -Identity "RuleName"

use a cmdlet to check for rules

My own preference is to configure Exchange server to not allow automatic forwarding to the Internet, problem solved.

In Office 365 and Exchange 2013 and newer, disable forwarding to remote domains in the Exchange Admin center under Mail flow, Remote Domains. If This will allow you to block forwarding to all domains then create remote domains for the domains you need to forward mail to.
change forwarding in the exchange admin center

To make this change using PowerShell, use this cmdlet:

Set-RemoteDomain remote-domain-name -AutoForwardEnabled $false

In older Exchange servers, block forwarding in the Exchange admin center
Remote Domain Settings

Remove the user-option to Forward mail

Users can set up rules to forward mail, administrators can configure Exchange to prevent users from enabling forwarding rules. See Disable automatic forwarding in Office 365 and Exchange Server to prevent information leakage (TechNet) for the instructions.
configure forwarding mailbox in outlook on the web

Other Solutions

If you can't disable automatic forwarding to the Internet, create a transport rule that drops messages sent from the terminated addresses. Add the addresses to a distribution group and create a transport rule that looks for mail sent from members of the distribution group. You can drop the messages or redirect them to another address (this will alert you to the presence of a forwarding rule on the mailbox.)

You can remove the rules from Outlook (any version) by starting Outlook with the /cleanrules switch. This requires you to open the user's profile in Outlook, which can be time consuming if you need to check a lot of mailboxes. It's not possible to do it using powershell. If you use the transport rule to redirect mail to a monitored address, you can use /cleanrules on those mailboxes that have forwarding rules configured.

The final option is to either disable or delete the mailbox. If you need to continue monitoring the address, add the user's email address to another mailbox or public folder. Otherwise, allow the mail to bounce with an NDR or deliver it to a dropbox.

If you want to keep the mailbox around for a bit, you can configure it so it can't send email by setting the maximum message size allowed to 0. You can do this using a cmdlet:

Set-Mailbox -identity "Name" -MaxSendSize "0"

If you need to apply it to many mailboxes, it can be used with a list of names in a csv:

$a= import-csv c:\terminated_users.csv $a | foreach { Set-Mailbox -MaxSendSize "0" $_.name}

One of these solutions, or a combination, should solve your problem.

More Information

Get-InboxRule
Set-Mailbox

Prevent Users from Forwarding Mail to Internet Addresses was last modified: December 4th, 2018 by Diane Poremsky

Related Posts:

  • Create Rules using PowerShell
  • Allow some users to send External Out-of-Office Replies
  • Rules Quota in Office 365 or Exchange 2013
  • Exchange Server's Rules Limitation

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
8 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

cfibanez (@guest_217931)
April 16, 2021 7:24 am
#217931

My admin is a sucker and I want to by pass this and forward my MS outlook mail to my iCloud account. How can I do it?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  cfibanez
April 16, 2021 9:20 am
#217932

If manual forwarding (you hit forward) works, a macro can automate it. The information in this article applies to automated forwarding using Rules.

0
0
Reply
Robertson (@guest_217760)
March 13, 2021 8:45 am
#217760

Hi Diane,

I wonder how to resolve signature keeps on remembering old signature and unable to delete or modify the old signature in Outlook 2007 and Outlook 2013?

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Robertson
April 16, 2021 9:47 am
#217934

You can't remove it in Outlook's signature editor? Or is it added by the exchange server?

In Outlook, you can delete it off the hard drive - its under %localappdata%.

0
0
Reply
Mike McPeak (@guest_214854)
March 3, 2020 1:29 pm
#214854

Is there an option to allow forwarding to a whitelist of domains? Onlines tools such as Slack are more valuable when e-mails can be sent directly to them.

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Mike McPeak
March 3, 2020 11:47 pm
#214855

No. But if you will always forward to the same email address, a contact user could be created in the AD - mail sent it to is forwarded to the external SMTP on the user. This will bypass the blocks because the server because you forward to the contact's AD address and the server forwards.

0
0
Reply
Phu V. Huynh (@guest_212923)
March 14, 2019 8:00 pm
#212923

Hello,

I don't see "Remote domain" in Exchange Admin Center > Mail flow.

I am using Exchange server 2013.

Thanks,

0
0
Reply
Diane Poremsky(@diane-poremsky)
Author
Reply to  Phu V. Huynh
March 14, 2019 8:31 pm
#212924

If its not exposed in the UI, you'll need to use powershell to access it.

0
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 16

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Use Classic Outlook, not New Outlook
  • How to Remove the Primary Account from Outlook
  • Disable "Always ask before opening" Dialog
  • Adjusting Outlook's Zoom Setting in Email
  • This operation has been cancelled due to restrictions
  • How to Hide or Delete Outlook's Default Folders
  • Reset the New Outlook Profile
  • Save Attachments to the Hard Drive
  • Add Attachments and Set Email Fields During a Mail Merge
  • Outlook SecureTemp Files Folder
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
  • Classic Outlook is NOT Going Away in 2026
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Classic Outlook is NOT Going Away in 2026

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment