How to Configure Message Forwarding on a Mailbox Level

The Set-Mailbox cmdlet has two parameters to configure forwarding for a mailbox: ForwardingAddress and ForwardingSmtpAddress. Those two parameters serve the same puspose but in two different ways. There is also a third parameter called DeliverToMailboxAndForward that when set will leave a copy of the message on the mailbox.

The "ForwardingAddress" accepts RecipientIdParameter input which means that you have to use the identity of an existing object on your organization such as another mailbox or a mail contact.

The "ForwardingSmtpAddress" accepts input in a proxy address format such as plain old email addresses. Although this is pretty straight forward, there's a catch you need to be aware of. This will only work if the remote domain of the recipient is configured to allow message forwarding. Let me elaborate.

There's a thing on Exchange, called Remote Domains. Those are used in order to define settings for the communication between your Exchange server and other mail servers outside your organization.

By default there's a default remote domain created when Exchange is set up for the first time that applies to all the remote domains but you add others for specific domains.

One of the settings for a remote domain is -AutoForwardEnabled, a boolean setting that allows messages to be forwarded automatically from your organization to the specific remote domain. In order for ForwardingSmtpAddress to work, the remote domain corresponding to the recipient has to be configured to allow AutoForward.

Let's see it in action!

Here I've used a Mail Contact with my address as a recipient to forward the messages to:

The ForwardingAddress property of the mailbox is mapped to the altRecipient attribute of the Active Directory object with the difference that the one shows the canonical name and the other the distinguishedname of the object to forward to:

When configuring the DeliverToMailboxAndForward setting on the mailbox, the deliverandredirect attribute is set to "True":

To clear the settings, set the ForwardingAddress and DeliverToMailboxAndForward to false and null respectively. This will result in attributes altRecipient and deliverandredirect being cleared:

When configuring the ForwardingSmtpAddress, the address specified on the command will be configured on the ForwardingSmtpAddress property of the mailbox and the msExchGenericForwardingAddress Active Directory attribute after being prefixed with the "smtp:" string:

The default domain does not allow messages to be automatically forwarded and this is why I've created a new remote domain and configured it accordingly:

To clear the configuration, set the ForwardingSmtpAddress to null:

Be very carefull when configuring message forwarding because it can raise privacy issues.

Have fun!

Popular posts from this blog

Domain Controller Machine Password Reset

Configuring a Certificate on Exchange Receive Connector

Verbose Parameter Passing to cmdlet inside Function