{"id":6867,"date":"2016-08-22T16:29:58","date_gmt":"2016-08-22T21:29:58","guid":{"rendered":"http:\/\/www.highclouder.ninja\/?p=6867"},"modified":"2024-05-21T14:49:54","modified_gmt":"2024-05-21T14:49:54","slug":"convenient-way-handle-multiple-email-addresses-receive-send","status":"publish","type":"post","link":"https:\/\/www.highclouder.com\/?p=6867","title":{"rendered":"Most Convenient Way to Handle Multiple eMail Addresses: &#8220;Receive As&#8221; \/ &#8220;Send As&#8221;"},"content":{"rendered":"<p>During many <strong>Exchange<\/strong> projects (<em>On-Premises<\/em> or in the <em>Cloud<\/em>) we see a lot of situations when organisations create an additional mailbox (secondary mailbox) for some users. Everybody, who works with Exchange environments, knows that a mailbox could have multiple email addresses associated with it. The question is always, why not just define an additional email as an alias to the mailbox? Of course, this scenario could work in some use cases. You\u00a0probably think, it&#8217;s OK&#8230;<\/p>\n<p>However, when someone sends an email to the address that defined as an alias, the recipient is not going to easily see to what email address the email was sent (<em>in more details down in this blog post<\/em>). Also, when we only use aliases, all emails that we send are always seen as if they were sent from the <strong>primary email<\/strong> address associated with the mailbox.<\/p>\n<p>We all know that\u00a0 pictures explain better than 1000 words, so let&#8217;s take a look. Because of this, let&#8217;s see how to do this <strong>On-Premises<\/strong> and in the <strong>Cloud<\/strong> (<em>Office 365<\/em>).<!--more--><\/p>\n<h2>The &#8220;Challenge&#8221;<\/h2>\n<p>The following image illustrates that I have multiple email addresses associated with my mailbox:<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6868\" title=\"Multiple eMail Addresses (aliases)\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/1.jpg\" alt=\"Multiple Email Addresses (eMail Aliases)\" width=\"759\" height=\"670\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/1.jpg 713w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/1-300x265.jpg 300w\" sizes=\"auto, (max-width: 759px) 100vw, 759px\" \/><\/a><\/p>\n<p>When someone sends me an email to one of my addresses, let&#8217;s say to <strong>InterruptYourVacation@iRangers.com <\/strong>\ud83d\ude42 , of course it will arrive at my main mailbox.<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6869\" title=\"Receive As (SendAsRecipient)\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/2.jpg\" alt=\"Email in the mailbox\" width=\"760\" height=\"437\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/2.jpg 816w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/2-300x172.jpg 300w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/2-768x441.jpg 768w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>As \u00a0you can see, the email arrived. And\u2026 do you see the first issue?! At least it bothers me! \ud83d\ude42 \u2026 If I look on the line &#8220;<strong>To:<\/strong>&#8220;, I see that this email was sent to <strong>Misha Hanin<\/strong>. When I double-click at the name I see the following screen:<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/31.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6871\" title=\"SendAsRecipient\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/31.jpg\" alt=\"Contact Details\" width=\"760\" height=\"799\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Yes, it&#8217;s not clear to what address the email was sent! Of course, I can go and check &#8220;<em>Internet headers<\/em>&#8221; and I will see something like this:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6872\" title=\"internet headers\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/4.jpg\" alt=\"Internet headers\" width=\"760\" height=\"712\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/4.jpg 619w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/4-300x281.jpg 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>I don&#8217;t know about you, but for me going and checking headers for all emails, every time when I need to know to what address it was sent to is too much :)!<\/p>\n<p>And, this is only the first part of the problem! \u00a0In addition to this, we also have a &#8220;challenge&#8221; to use &#8220;<strong>Send As<\/strong>&#8221; functionality!<\/p>\n<p>Let&#8217;s try to &#8220;<strong>Send As<\/strong>&#8221; <strong><em>InterruptYourVacation@iRangers.com<\/em><\/strong>. So, logically, many of us will try to do something like this:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6873\" title=\"Send As\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/5.jpg\" alt=\"5\" width=\"760\" height=\"712\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/5.jpg 619w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/5-300x281.jpg 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>or<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6874\" title=\"Send-As\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/6.jpg\" alt=\"Send As\" width=\"760\" height=\"791\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now, let&#8217;s see how I will see this email when I check my <strong>@highclouder.ninja<\/strong> mailbox:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6875\" title=\"Receive As\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/7.jpg\" alt=\"Send As - Wrong\" width=\"760\" height=\"676\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/7.jpg 741w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/7-300x267.jpg 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Seems like, ALL my attempts to send emails as\u00a0 <strong>InterruptYourVacation@iRangers.com<\/strong> were ignored and as a result, this email looks like it was sent from <strong>misha.hanin@irangers.com<\/strong> (<em>this is the primary email address of my corporate mailbox<\/em>)!<\/p>\n<p>Therefore, exactly at this moment, many companies decide to create an additional mailbox (in my case it should be <em>InterruptYourVacation@iRangers.com<\/em>) and configure &#8220;<strong><em>Send As<\/em><\/strong>&#8221; permissions.<\/p>\n<p>It&#8217;s nothing wrong with this approach, however, as a result of this decision, now you have to manage multiple mailboxes (<em>I even not touching the licensing topic yet!<\/em>).<\/p>\n<h2>HOW EXPERTS WORK WITH MULTIPLE EMAIL ADDRESSES<\/h2>\n<p>So, when our clients deal with this &#8220;<strong>Receive As<\/strong> \/ <strong>Send As<\/strong>&#8221; problem, we, at iRangers, do the following:<\/p>\n<ol>\n<li>Create a new <strong>Distribution Group<\/strong>. As a Primary Email address for this group we define an address that we want to use as &#8220;<strong>Receive As<\/strong> \/ <strong>Send As<\/strong>&#8220;<\/li>\n<li>We add required users to this new Distribution Group. So, in My case, I added myself (<em>misha.hanin@irangers.com<\/em>) to this group. Now, all emails that will arrive to address <em>InterruptYourVacation@iRangers.com<\/em> will be forwarded to <em>misha.hanin@irangers.com<\/em><\/li>\n<li>Assign &#8220;<strong>Send As<\/strong>&#8221; permissions. By doing this, <em>misha.hanin@irangers.com<\/em> will be able to Send As: <em>InterruptYourVacation@iRangers.com<\/em><\/li>\n<\/ol>\n<p>I hope you know how to do all this by using GUI, therefore let&#8217;s see one of the ways how to do this in PowerShell (<em>first of all,\u00a0If you are in the Hybrid Mode, you will need to do all steps, from <strong>On-Premises<\/strong> and <strong>Office 365<\/strong>\u00a0sections<\/em>):<\/p>\n<h3>On-Premises:<\/h3>\n<pre>$SendAsRecipient = \"InterruptYourVacation@irangers.com\"\n$ForwardToRecipient = \"Misha.Hanin@irangers.com\"\n\n$ContactsOU = \"OU=Contacts,OU=Users,OU=Winnipeg,OU=Canada,OU=iRangers,DC=prv,DC=irangers,DC=com\"\n\nNew-DistributionGroup -Name $SendAsRecipient -Members $ForwardToRecipient -Alias $SendAsRecipient.Split('@')[0] -PrimarySmtpAddress $SendAsRecipient -OrganizationalUnit $ContactsOU\nSet-DistributionGroup $SendAsRecipient -RequireSenderAuthenticationEnabled $False\n\nAdd-ADPermission -Identity $SendAsRecipient -User $ForwardToRecipient -AccessRights \"ExtendedRight\" -ExtendedRights \"Send-As\"\n<\/pre>\n<p>Also, we can try to allow the Group itself to Sen-As (<em>Sometimes this doesn&#8217;t work. So, please consider this command just as<\/em> <em>a reference<\/em>):<\/p>\n<pre>Add-ADPermission -Identity $SendAsRecipient -User \"NT AUTHORITY\\SELF\" -AccessRights \"ExtendedRight\" -ExtendedRights \"Send-As\"\n<\/pre>\n<p><em>For a validation<\/em>:<\/p>\n<pre>(Get-ADPermission -Identity $SendAsRecipient -User $ForwardToRecipient).ExtendedRights<\/pre>\n<h3>Office 365:<\/h3>\n<p>Before moving forward, be sure that <strong>Azure Active Directory Connector<\/strong> (<strong>AADC<\/strong>) has already synchronized all data. Of course, you can force the sync by executing the following command from the AADC server:<\/p>\n<pre>Enter-pssession IR-SYNC01<\/pre>\n<p>(<em>iR-Sync01 is our AADC server. And&#8230;., Yes, I am lazy\u2026 I am connecting to my AADC server with remote PowerShell&#8230; <\/em> )<\/p>\n<pre>&amp; \"C:\\Program Files\\Microsoft Azure AD Sync\\Bin\\DirectorySyncClientCmd.exe\"<\/pre>\n<p>Now, when all objects get synced to the cloud, let&#8217;s connect to <strong>Office 365<\/strong> and execute there a few commands. Here is how we connect to the Office 365:<\/p>\n<pre>$strUserName = \"yourAdminAccountAtO365@YourOrgName.onmicrosoft.com\"\n$strConnectionURL = \"https:\/\/outlook.office365.com\/powershell-liveid\"\n$objCredential = Get-Credential -Credential $strUserName\n\n$objPSSession = New-PSSession -ConfigurationName \"Microsoft.Exchange\" -ConnectionUri $strConnectionURL -Authentication \"Basic\" -Credential $objCredential -AllowRedirection\nImport-PSSession -Session $objPSSession\n<\/pre>\n<p>OK, now as a result of the previous steps, we are inside <strong>O365 PowerShell<\/strong> session. Let&#8217;s run this commands:<\/p>\n<pre>$SendAsRecipient = \"InterruptYourVacation@irangers.com\"\n$ForwardToRecipient = \"Misha.Hanin@irangers.com\"\n\nGet-RecipientPermission -Identity $SendAsRecipient\nAdd-RecipientPermission -Identity $SendAsRecipient -Trustee $ForwardToRecipient -AccessRights \"SendAs\" -Confirm:$False\n<\/pre>\n<p><em>In addition, for a validation purposes<\/em>:<\/p>\n<pre>Get-RecipientPermission $SendAsRecipient | Where { ($_.IsInherited -eq $False) -and -not ($_.Trustee -like \"NT AUTHORITY\\SELF\") } | Select Trustee,AccessControlType,AccessRights\n<\/pre>\n<h2>In Conclusion<\/h2>\n<p>Now, after all those steps, let&#8217;s repeat <strong>Receive As<\/strong> and <strong>Send As<\/strong> exercise \u00a0:). First of all, I will send an email to <strong>InterruptYourVacation@iRangers.com<\/strong><\/p>\n<p>And&#8230; Voila! As a result of all our hard work \ud83d\ude42 \u00a0email was automatically forwarded to my primary mailbox: <em>misha.hanin@irangers.com<\/em> and \u2026in the &#8220;<strong>To<\/strong>&#8221; field I see that this email was sent to <em>InterruptYourVacation@iRangers.com<\/em>:<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/9.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6876\" title=\"Receive As\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/9.jpg\" alt=\"Recieve As\" width=\"760\" height=\"512\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>We are almost at the end :). So, I think this is a time for the last test. Now let&#8217;s <strong>Send as<\/strong>: <em>InterruptYourVacation@iRangers.com<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/9.5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6877\" title=\"Send as\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/9.5.jpg\" alt=\"Send As - Working\" width=\"760\" height=\"805\" srcset=\"https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/9.5.jpg 734w, https:\/\/www.highclouder.com\/wp-content\/uploads\/2016\/08\/9.5-283x300.jpg 283w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Yes, here is the result we were looking for!<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/10.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-6878\" title=\"Receive as\" src=\"http:\/\/dev.highclouder.com\/wp-content\/uploads\/2016\/08\/10.jpg\" alt=\"Send As \/ Receive As\" width=\"760\" height=\"512\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Finally, I hope you find this blog post informative.<\/p>\n<p>Don&#8217;t hesitate to contact me via <a href=\"http:\/\/www.highclouder.ninja\/contact-me\/\">contact form<\/a> or be in touch through <a href=\"https:\/\/www.irangers.com\" target=\"_blank\" rel=\"noopener\">iRangers.com<\/a><\/p>\n<p>Cheers,<br \/>\nMisha<\/p>\n<p>P.S.<br \/>\nSpecial thanks to <a href=\"https:\/\/ca.linkedin.com\/in\/stanvy\" target=\"_blank\" rel=\"noopener\">Alexander Stankevich<\/a> and <a href=\"https:\/\/ca.linkedin.com\/in\/drazbornov\/en\" target=\"_blank\" rel=\"noopener\">Dima Razbornov<\/a> (<em>iRangers&#8217; Sr. Solutions Architects<\/em>), who were actively involved in crafting this blog post!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During many Exchange projects (On-Premises or in the Cloud) we see a lot of situations when organisations create an additional mailbox (secondary mailbox) for some users. Everybody, who works with Exchange environments, knows that a mailbox could have multiple email addresses associated with it. The question is always, why not just define an additional email [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6905,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6867","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/posts\/6867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6867"}],"version-history":[{"count":1,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/posts\/6867\/revisions"}],"predecessor-version":[{"id":7246,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/posts\/6867\/revisions\/7246"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=\/wp\/v2\/media\/6905"}],"wp:attachment":[{"href":"https:\/\/www.highclouder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.highclouder.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}