Exchange – Forwarding And Redirecting


My colleague sent me email regarding to email forwarding and its configuration from Exchange point of view recently. I checked this topic little deeper and I would like to summarize my remarks.

We can set up forwarding or redirecting in Exchange environment for example by:

Outlook rule

Clients are able to create a rule which can examine each message that you receive for certain characteristics and then automatically forward or redirect any message to another email account. If clients want to use also external recipients, Exchange administrator has to allow it through RemoteDomain especially with AutoForwardEnabled paramater (The AutoForwardEnabled parameter specifies whether to allow messages that are auto-forwarded by client e-mail programs in your organization. Setting this parameter to $true enables auto-forwarded messages to be delivered to the remote domain. The default value is $false.) Message Tracking Log indicates related mailflow with Source: MAILBOXRULE, EventId: RECEIVE (Forwarding – from receiver side, Redirect – from sender side).

ForwardingAddress and ForwardingSmtpAddress

Both parameters can be used with cmdlet Set-Mailbox and ensure either forwarding or redirecting based on parameter DeliverToMailboxAndForward (DeliverToMailboxAndForward parameter specifies whether messages sent to this mailbox are forwarded to another address – $True / $False).

Forwarding Address – It is RecipientIdParameter value which give us power to specify address by name or alias. This parameter is accessible via mailbox properties (Mail Flow Settings → Delivery Options) in EMC. Forwarding Address has higher priority than Forwarding SMTP Address (This user has already set up the parameter ForwardingSmtpAddress. If you set the parameter ForwardingAddress, the user’s setting will be overridden.). The property does not require for external forwarding  AutoForwardEnabled / RemoteDomain, just a MailContact (with external email address) in Exchange organization is needed. Message Tracking Log indicates this type of forwarding with EventID: REDIRECT/TRANSFER, Source: ROUTING, SourceContext: Resolver.

ForwardingSmtpAddress – It is ProxyAddress value known as msExchGenericForwardingAddress in AD attributes. Forwarding SMTP Address has lower priority than Forwarding Address. This property is not accessible in GUI (EMC), you can use only PowerShell. For external forwarding has to set up the RemoteDomain. If a remote domain configuration blocks a specific message type from being sent to recipients in that domain, the message is deleted (classic black hole same like empty distribution list). Message Tracking Log indicates this type of forwarding with EventID: DEFER,
Source: AGENT, SourceContext: Redirection Agent.

TargetAddress

The TargetAddress is basically used in co-existence scenarios (e.g. LotusNotes / Exchange). It can be used only for redirecting (messages are delivered only to the forwarding address) by specifying email address “smtp:ficility@windowslive.com”. External forwarding is supported without RemoteDomain control. The property can be accessible via ADSI Edit, PowerShell AD module and for Exchange objects MailContacts and MailUser as ExternalEmailAddress property in EMS (additionally Michel de Rooij and TargetAddress, ExternalEmailAddress and Set As External). Message Tracking Log indicates this type of redirect with EventID: REDIRECT/TRANSFER, Source: ROUTING, SourceContext: Resolver (same like for ForwardingAddress).

Example how to manage TargetAdress with PowerShell AD module:

PS C:\> Import-Module ActiveDirectory

PS C:\> Get-ADUser filip -Properties *| select targetAddress
targetAddress
-------------
ficility@gmail.com

PS C:\> $a = Get-ADUser filip -Properties *

PS C:\> $a.targetAddress
ficility@gmail.com

PS C:\> $a.targetAddress="ficility@windowslive.com"

PS C:\> Set-ADUser -instance $a

PS C:\> Get-ADUser filip -Properties *| select targetAddress
targetAddress
-------------
ficility@windowslive.com
Advertisements

2 thoughts on “Exchange – Forwarding And Redirecting

  1. This is exactly what I am looking for to allow me to change the targetaddress on users mailbox during a migration project. I was wondering if it would be possible to use this script and call the users from an imported csv list and then change the address on each one of them in turn?

    • I found the solution to this – Powershell script is as follows:
      import-csv c:\import.csv | foreach { $targetaddress = $_.targetaddress
      Set-ADUser $_.sAMAccountName -Replace @{targetaddress=”$targetaddress”}}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s