{"id":4661,"date":"2019-04-02T11:17:23","date_gmt":"2019-04-02T14:17:23","guid":{"rendered":"https:\/\/blog.clusterweb.com.br\/?p=4661"},"modified":"2019-04-02T11:17:23","modified_gmt":"2019-04-02T14:17:23","slug":"setup-smtp-relay-smarthost-with-cpanel","status":"publish","type":"post","link":"https:\/\/blog.clusterweb.com.br\/?p=4661","title":{"rendered":"Setup SMTP relay \/ smarthost with cPanel"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>If you want or need to setup your mail server to send all outgoing mail to a specific server which will handle the delivery to the recipients you need to setup a SMTP relay or smarthost.<\/p>\n<h3>Prerequisites<\/h3>\n<ul>\n<li>You need to know the hostname of the SMTP server which is going to relay the mail for your mailserver, which is smtprelay.snel.com in our case<\/li>\n<li>This article assumes that no authentication is necessary on the SMTP relay server<\/li>\n<li>This article is written for\u00a0cPanel with Exim<\/li>\n<li>You need to have the login\u00a0details of WHM ready<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<h4>Step 1: Login on WHM<\/h4>\n<p>Go to https:\/\/x.x.x.x:2087 (replace x.x.x.x with the IP address of your server).<\/p>\n<h4>Step 2: Configure the MTA<\/h4>\n<p>Within WHM navigate to: Main &gt; Service Configuration &gt; Exim Configuration Editor, click on the Advanced Editor button and search on the page for \u201cSection: POSTMAILCOUNT\u201d and add the following:<\/p>\n<div class=\"EnlighterJSWrapper twilightEnlighterJSWrapper\">\n<ul class=\"hoverEnabled twilightEnlighterJS EnlighterJS\">\n<li class=\" odd\"><span class=\"\">smart_route:<\/span><\/li>\n<li class=\" even\"><span class=\"\"> driver = manualroute<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> domains = ! +local_domains<\/span><\/li>\n<li class=\" even\"><span class=\"\"> ignore_target_hosts = 127.0.0.0\/8<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> transport = remote_smtp<\/span><\/li>\n<li class=\" even\"><span class=\"\"> route_list = * smtprelay.snel.com::587<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> no_more<\/span><\/li>\n<\/ul>\n<\/div>\n<p>If \u201cSection: POSTMAILCOUNT\u201d is not available proceed to step 3, otherwise proceed to step 4.<\/p>\n<h4>Step 3: ONLY IF\u00a0\u201cSection:\u00a0POSTMAILCOUNT\u201d is not available<\/h4>\n<p>On the same page search\u00a0for \u201cSection: ROUTERSTART\u201d and add the following:<\/p>\n<div class=\"EnlighterJSWrapper twilightEnlighterJSWrapper\">\n<ul class=\"hoverEnabled twilightEnlighterJS EnlighterJS\">\n<li class=\" odd\"><span class=\"\">smart_route:<\/span><\/li>\n<li class=\" even\"><span class=\"\"> driver = manualroute<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> domains = ! +local_domains<\/span><\/li>\n<li class=\" even\"><span class=\"\"> ignore_target_hosts = 127.0.0.0\/8<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> transport = remote_smtp<\/span><\/li>\n<li class=\" even\"><span class=\"\"> route_list = * smtprelay.snel.com::587<\/span><\/li>\n<li class=\" odd\"><span class=\"\"> no_more<\/span><\/li>\n<\/ul>\n<\/div>\n<h4>Step 4: Save changes<\/h4>\n<p>Click on the \u201cSave\u201d button on the bottom of the page to save changes and restart the mailserver to apply the new configuration.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction If you want or need to setup your mail server to send all outgoing mail to a specific server which will handle the delivery to the recipients you need to setup a SMTP relay or smarthost. Prerequisites You need to know the hostname of the SMTP server which is going to relay the mail [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1,730,772,725,51,495,85,68,74],"tags":[945,1316,1169,1317,1315,983],"class_list":["post-4661","post","type-post","status-publish","format-standard","hentry","category-viazap","category-clusterweb","category-dns-2","category-hospedagem","category-linux-linuxrs","category-profissional-de-ti","category-proxy","category-redes-2","category-servidor-de-e-mail","tag-cpanel","tag-relay","tag-setup","tag-smarthost","tag-smtp","tag-with"],"_links":{"self":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4661"}],"version-history":[{"count":1,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4661\/revisions"}],"predecessor-version":[{"id":4662,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=\/wp\/v2\/posts\/4661\/revisions\/4662"}],"wp:attachment":[{"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.clusterweb.com.br\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}