{"id":358,"date":"2018-08-09T23:15:21","date_gmt":"2018-08-10T04:15:21","guid":{"rendered":"http:\/\/zewwy.ca\/?p=358"},"modified":"2018-09-21T18:29:51","modified_gmt":"2018-09-21T23:29:51","slug":"configuring-an-anonymous-receive-connector-on-exchange-2016","status":"publish","type":"post","link":"https:\/\/zewwy.ca\/index.php\/2018\/08\/09\/configuring-an-anonymous-receive-connector-on-exchange-2016\/","title":{"rendered":"Configuring an Anonymous Receive Connector on Exchange 2016"},"content":{"rendered":"<h1 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"The_Story\"><\/span>The Story<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>Well in my previous post I discussed the issue I faced resolving an email problem with one of our development applications in which it was unable to send emails after a recent Exchange upgrade\/migration. So initially we were going to simply rebuild our own workflow in-house using ASP .NET Core. Until we noticed that even our own workflows were failing&#8230; in this case the answer from the old post which was super vague &#8220;reconfigure the receive connector&#8221;. Then I somehow stumbled upon my answer through one of my hundreds of google searches&#8230; I founds this gem!<\/p>\n<p>OK before I link the gem which will be the source to my answer. I also wanted to point something out real quick here in hopes maybe someone can comment below the answer to this one:<\/p>\n<p>When using Exchange 2016 as an email SMTP relay, and you use a no-reply from address, with an external email address for the destination, how do you query to find out if its gone through, or stuck in que? All I could see in the ECP it always required me to select a mailbox&#8230; there&#8217;s no mailbox associated with these relayed email messages, so how does one check this?<\/p>\n<p>OK, <a href=\"https:\/\/practical365.com\/exchange-server\/exchange-2016-smtp-relay-connector\/\">now for the gem.<\/a> This guy &#8220;Paul Cunningham&#8221; He&#8217;s&#8230; uhhhhhh&#8230; He&#8217;s uhhhhh&#8230; he&#8217;s uhhhh a good guy. So I always knew you could use telnet to check certain ports and services&#8230; but this was so concise&#8230; it nailed the problem&#8230;<\/p>\n<p>From my K2 Server or my in house workflow server:<\/p>\n<p>1)  Ensure Telnet Client feature is enabled<\/p>\n<p>2) Open cmd prompt or PowerShell:<\/p>\n<p>telnet exchangeServer 25<br \/>\nhelo<br \/>\nmail from: user@corp.ca<br \/>\nrcpt to: ExternalUser@gmail.ca<\/p>\n<pre>220 EXSERVER.exchange2016demo.com Microsoft ESMTP MAIL Service ready at Thu, 22\r\nJun 2018 12:04:45 +1000\r\nhelo\r\n250 EXSERVER.exchange2016demo.com Hello [192.168.0.30]\r\nmail from: adam.wally@exchange2016demo.com\r\n250 2.1.0 Sender OK\r\nrcpt to: exchangeserverpro@gmail.com\r\n550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain<\/pre>\n<p>huh, just like the source blog, now why would I be getting that error&#8230; I allowed Anonymous users via the check box under the receive connectors security tab&#8230; yet Paul does a lil extra step that doesn&#8217;t seem to be  mentioned elsewhere, and that check box I mentioned is his first line, but then look at the interesting second line&#8230;.<\/p>\n<pre>[PS] C:\\&gt;Set-ReceiveConnector \"EXSERVER\\Anon Relay EXSERVER\" -PermissionGroups AnonymousUsers<\/pre>\n<pre>[PS] C:\\&gt;Get-ReceiveConnector \"EXSERVER\\Anon Relay EXSERVER\" | Add-ADPermission -User 'NT AUTHORITY\\Anonymous Logon' -ExtendedRights MS-Exch-SMTP-Accept-Any-Recipient<\/pre>\n<p>Since I was using anonymous settings on the Application server side (K2 in this case) I gave the second PowerShell cmdlet a run from my new exchange server.<\/p>\n<p>Amazingly enough just like the source blog after running the second line (edited to fit my environment obviously) then the rcpt to succeeded!<\/p>\n<pre>20 EXSERVER.exchange2016demo.com Microsoft ESMTP MAIL Service ready at Thu, 22\r\nJun 2018 12:59:39 +1000\r\nhelo\r\n250 EXSERVER.exchange2016demo.com Hello [192.168.0.30]\r\nmail from: test@test.com\r\n250 2.1.0 Sender OK\r\nrcpt to: exchangeserverpro@gmail.com\r\n250 2.1.5 Recipient OK<\/pre>\n<h2 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Part_2_%E2%80%93_The_Solution\"><\/span>Part 2 &#8211; The Solution<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If K2 is configured to use EWS, check that stuff out elsewhere, if you landed here from my previous post looking for the answer to the &#8220;There is no connection string for the destination email address &#8216;Email Address'&#8221; and wanted to know how that person altered his receive connector:<\/p>\n<pre>[PS] C:\\&gt;Get-ReceiveConnector \"EXSERVER\\Anon Relay EXSERVER\" | Add-ADPermission -User 'NT AUTHORITY\\Anonymous Logon' -ExtendedRights MS-Exch-SMTP-Accept-Any-Recipient<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The Story Well in my previous post I discussed the issue I faced resolving an email problem with one of our development applications in which it was unable to send emails after a recent Exchange upgrade\/migration. So initially we were going to simply rebuild our own workflow in-house using ASP .NET Core. Until we noticed &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/zewwy.ca\/index.php\/2018\/08\/09\/configuring-an-anonymous-receive-connector-on-exchange-2016\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Configuring an Anonymous Receive Connector on Exchange 2016&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"sfsi_plus_gutenberg_text_before_share":"","sfsi_plus_gutenberg_show_text_before_share":"","sfsi_plus_gutenberg_icon_type":"","sfsi_plus_gutenberg_icon_alignemt":"","sfsi_plus_gutenburg_max_per_row":"","footnotes":""},"categories":[36,8],"tags":[62,37,61],"class_list":["post-358","post","type-post","status-publish","format-standard","hentry","category-exchange","category-server-administration","tag-anonymous","tag-exchange","tag-receive-connectors"],"_links":{"self":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":1,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions\/359"}],"wp:attachment":[{"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zewwy.ca\/index.php\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}