{"id":897,"date":"2016-10-02T22:12:54","date_gmt":"2016-10-02T20:12:54","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=897"},"modified":"2021-07-02T22:33:11","modified_gmt":"2021-07-02T20:33:11","slug":"microsoft-exchange-multiple-mail-relays","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html","title":{"rendered":"Double Microsoft Exchange and Mail Relay on a Remote Site"},"content":{"rendered":"\n<p>You have an <a href=\"\/en\/category\/mail\/exchange\">Exchange<\/a> server (or cluster) that communicates to the outside world through a mail relay (also called smarthost in Microsoft terminology), usually in a DMZ. You&#8217;d now like to give some high availability to this infrastructure, that could ideally cover a disaster recovery plan. This can be achieved doubling servers on a second site &#8211; siteB &#8211; in case something goes wrong on site A, meaning a relay on each site, with its own Internet connection.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Secure Incoming Mail Traffic<\/h2>\n\n\n\n<p>I use <a href=\"https:\/\/www.broadcom.com\/products\/cyber-security\/network\/messaging\/gateway\">Symantec Messaging Gateway<\/a> for mail relay: it is powerful, easy to configure, and can be set up as a virtual machine. It also comes at no additional cost if you have already purchased Symantec antivirus licenses. You can use any other mail gateway indeed.<br>\u00a0<br>Routing incoming mail is only a matter of creating DNS MX records for each mail relay and forwarding mail to Exchange servers. External mail servers will automatically fail back to the second mail relay if they cannot reach the first.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Outgoing Traffic Failover<\/h2>\n\n\n\n<p>Routing mail to the outside is a bit more complicated.<br>If you add a 2nd mail gateway to the Exchange send connector, it will load balance emails over the 2 relays wether they&#8217;re up or not, and will not fail over. But there is a way.<br>&nbsp;<br>Create a DNS entry for each smarthost, in their own subdomain:<br>SiteA: RelayA.siteA.mydomain.com<br>SiteB: RelayB.siteB.mydomain.com<br>These could be aliases indeed pointing to real hostnames.<br>&nbsp;<br>Then, create 2 MX records for siteA subdomain that point to the previous entries. The local relay having a lower number (higher priority):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"vim\" class=\"language-vim\">siteA.mydomain.com.\t3600\tIN\tMX\t5  relayA.siteA.mydomain.com.\nsiteA.mydomain.com.\t3600\tIN\tMX\t10 relayB.siteB.mydomain.com.<\/code><\/pre>\n\n\n\n<p><br>Do the same for siteB if there&#8217;s also an Exchange server on the site.<br>&nbsp;<br>All you need to do is create a send connector pointing to siteA.mydomain.com. Before resolving the DNS hostname for sitea.mydomain.com, Exchange will first attempt to do an MX lookup, even though this is not clearly stated in Exchange EAC.<br>&nbsp;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" src=\"\/images\/Exchange_Smarthost.png\" alt=\"Exchange smart host mail relay\"\/><\/figure><\/div>\n\n\n\n<p><br>With this flexible solution, you have loads of possible setups. You could:<br>&#8211; Send traffic to the local relay and fail over to the remote site<br>&#8211; Load balance the traffic on the 2 sites and fail over if one goes down (setting the same MX priority)<br>&#8211; Load balance the traffic on 2 local mail relays and failover to a single remote (two equal high priority MX and a lower for the remote relay)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><br>Conclusion<\/h2>\n\n\n\n<p>All is fully automated if a relay becomes unreachable and new relay hosts are managed through DNS. You have now a redundant architecture with high availability.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You have an Exchange server (or cluster) that communicates to the outside world through a mail relay (also called smarthost in Microsoft terminology), usually in a DMZ. You&#8217;d now like to give some high availability to this infrastructure, that could ideally cover a disaster recovery plan. This can be achieved doubling servers on a second [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[369],"tags":[401,52,373,69],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site<\/title>\n<meta name=\"description\" content=\"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site\" \/>\n<meta property=\"og:description\" content=\"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-02T20:12:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-02T20:33:11+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html\",\"name\":\"Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2016-10-02T20:12:54+00:00\",\"dateModified\":\"2021-07-02T20:33:11+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster\",\"breadcrumb\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Double Microsoft Exchange and Mail Relay on a Remote Site\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site","description":"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site","og_description":"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster","og_url":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html","og_site_name":"Netexpertise","article_published_time":"2016-10-02T20:12:54+00:00","article_modified_time":"2021-07-02T20:33:11+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html","url":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html","name":"Netexpertise - Double Microsoft Exchange and Mail Relay on a Remote Site","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2016-10-02T20:12:54+00:00","dateModified":"2021-07-02T20:33:11+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"Give high availability to Microsoft Exchange infrastructure with multiple mail relays to receive and send mail from an Exchange cluster","breadcrumb":{"@id":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.netexpertise.eu\/en\/mail\/exchange\/microsoft-exchange-multiple-mail-relays.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Double Microsoft Exchange and Mail Relay on a Remote Site"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/897"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=897"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/897\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=897"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}