Exchange / Office 365: Have a centralized mailbox for application processing with individual customer SMTP addresses


Customers may implement CRM applications that track customer interactions.  In some instances the CRM applications are configured to archive and record email transactions that are sent to and from customer service representatives. 

 

I recently worked with a customer that has their CRM application configured to monitor a centralized mailbox.  When a new organization was added to the CRM system, a proxy address would be added to this centralized mailbox for that customer.  For example, I might have a  centralized mailbox shared@company.com.  When a new customer is added to the CRM system, this mailbox would have an additional secondary proxy added of customer1@company.com.  When the customer service representatives communicate with this customer by email, the customer1@company.com alias is added to the message CC line.  This ensures that all messages to that customer and subsequent replies are retained in the centralized mailbox.  This also allows the CRM application, which monitors this centralized mailbox, to ingest the information into the CRM application.

 

The issue arises with how Outlook, Outlook Web Access, and transport handle secondary proxies.  When a secondary proxy is addresses in any of these products the proxy is immediately resolved to the user object where the proxy is applied.  Instead of retaining customer1@company.com on the CC line the address is changed to shared@company.com.  This results in exposing this mailbox / address in all correspondence to external recipients rather then the individual customer proxy address added to the object.

 

Let’s take a look. 

 

For this example I have created a mailbox CentralMailbox@domain.com.  This will serve as the mailbox that I would have subscribed for monitoring by my CRM application. 

 

PS C:\> Get-Mailbox CentralMailbox

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
CentralMailbox            CentralMailbox       by2pr06mb028     49.5 GB (53,150,220,288 bytes)

 

On this mailbox I have added a secondary proxy address of Customer1@domain.com

 

PS C:\> $a=Get-Mailbox centralmailbox
PS C:\> $a.emailAddresses
smtp:customer1@domain.com
SIP:CentralMailbox@tenant.onmicrosoft.com
SMTP:CentralMailbox@tenant.onmicrosoft.com

 

When addressing a message in OWA I manually utilize the customer1@domain.com email address. 

 

image

 

When the email is sent to the external recipient the reply to address is not the secondary address but rather the primary address of the mailbox where the secondary proxy is assigned. 

 

image

 

image

 

You can also see in the sent items that the address was resolved to the mailbox where it was assigned and not retained as an SMTP address.

 

image

 

How can this be resolved? 

 

One potential solution is to utilize customer mailboxes rather than secondary proxy addresses for customer communications.  To prevent having to configure the CRM application to monitor multiple mailboxes we would utilize the forwarding and delivery features in Exchange and Office 365.  Let’s take a look at an example.

 

In this instance a mailbox was created Customer2@domain.com

 

PS C:\> Get-Mailbox Customer2

Name                      Alias                ServerName       ProhibitSendQuota
----                      -----                ----------       -----------------
Customer2                 Customer2            dm2pr0601mb0921  49.5 GB (53,150,220,288 bytes)

 

There are two properties of the mailbox that allow us to utilize this as a solution – ForwardingAddress and DeliverToMailboxAndForward. 

 

PS C:\> Get-Mailbox Customer2 | fl ForwardingAddress,DelivertoMailboxandForward

ForwardingAddress          :
DeliverToMailboxAndForward : False

 

Using powershell I will set the ForwardingAddress to the centralized mailbox and DeliverToMailboxAndForward to FALSE.  By keeping DeliverToMailboxandForward false the message will not be delivered to the customer mailbox but only the central mailbox.  Should you desire to have it delivered to both location this would be set to TRUE.

 

PS C:\> Set-Mailbox Customer2 -ForwardingAddress CentralMailbox -DeliverToMailboxAndForward:$FALSE

PS C:\> Get-Mailbox Customer2 | fl ForwardingAddress,DelivertoMailboxandForward

ForwardingAddress          : CentralMailbox
DeliverToMailboxAndForward : False

 

When an email is addressed in OWA and the customer email address utilized it resolves to the mailbox that was created for the customer.

 

image

 

When the external customer receives the email the customer specific mailbox is retained – the centralized mailbox is not exposed.

 

image

 

image

 

When the external user performs a reply all the email continues to be addressed to the customer mailbox rather than the centralized mailbox.

 

image

 

When logging into the centralized mailbox both the original message and the reply are present.  The message retained the Customer2 email address even through they were forwarded to the centralized mailbox.

 

image

 

Utilizing a mailbox and mailbox forwarding allows us to address emails without exposing the central mailbox but still capture all correspondence in the central mailbox.  Not allowing delivery to the customer mailbox ensures that the message is stored in one location and the mailbox itself will not utilize any storage (although it will be assigned an Exchange database).

 

Another potential option utilizes distribution groups.  Let’s take a look.

 

Instead of creating a mailbox for each customer a distribution group is created. 

 

PS C:\> Get-DistributionGroup Customer3

Name                          DisplayName                   GroupType                     PrimarySmtpAddress
----                          -----------                   ---------                     ------------------
Customer3                     Customer3                     Universal                    
Customer3@fortmillrescue.com

 

The central mailbox is added as a member to the distribution group.

 

PS C:\> Add-DistributionGroupMember -Identity Customer3 -Member CentralMailbox

PS C:\> Get-DistributionGroupMember Customer3

Name                                                        RecipientType
----                                                        -------------
CentralMailbox                                              UserMailbox

 

In this example the only member of the distribution list is the central mailbox.

 

The distribution list must also be set to accept mail from all senders, specifically senders that are non-authenticated.  This is required with the assumption that email will be received from external senders that are not authenticated to the hosting message solution.

 

PS C:\> Set-DistributionGroup Customer3 -RequireSenderAuthenticationEnabled:$FALSE

 

When addressing an email in OWA the customer email is added to the CC line.  The SMTP address resolves automatically to the distribution list we created.

 

image

 

When the message is received by the external recipient this email address is retained.  The centralized mailbox is not exposed to the external recipient.

 

image

 

image

 

As in the mailbox example subsequent replies are addressed to the distribution list which results in both the original message and the replies residing in the centralized mailbox for processing.

 

 image

 

Internally those users utilizing a distribution group may be able to expand distribution list membership in the message exposing the central mailbox to both internal and external users.  Additional internal users can pull the properties of the distribution list in the Global Address List and view membership.  Utilizing a distribution list is another viable option to ensure emails are delivered to the central mailbox for processing while preserving the customer specific email address.

 

Customer may additionally want to hide the customer mailboxes or distribution lists from the global address list.  This does not alter the functionality documented here but would prevent the selection of these objects from the global address list.  Knowledge of the specific customer email addresses would be necessary in order to address emails as no automatic name resolution would occur.

 

*Special thanks to Mark Terry for the additional suggestion of utilizing distribution groups in this scenario.*


Comments (2)

  1. TIMMCMIC says:

    @TurboMCP…

    So at the time I could not figure out how to use a transport rule that met the exact requirement. The centralized mailbox had to appear on each incoming and outgoing message -> without exposing the central mailbox to any particular user external or internal.

    Also – this was a side note not necessarily relevant to the above – the CRM system could provision accounts but could not provision transport rules. So the system could be configured to automat the processes outlined above.

    TIMMCMIC

  2. turbomcp says:

    Thanks
    transport rule might also work no?

Skip to main content