{"id":3505,"date":"2009-02-27T18:06:32","date_gmt":"2009-02-27T23:06:32","guid":{"rendered":"http:\/\/underhost.com\/blog\/?p=3505"},"modified":"2025-03-07T08:21:45","modified_gmt":"2025-03-07T13:21:45","slug":"configure-exim-cpanel-server-use-smart-host","status":"publish","type":"post","link":"https:\/\/underhost.com\/blog\/configure-exim-cpanel-server-use-smart-host\/","title":{"rendered":"Updated MARCH 2025: How to Configure a Smart Host in Exim"},"content":{"rendered":"<h2><strong>What is a Smart Host?<\/strong><\/h2>\n<p>\nA <strong>Smart Host<\/strong> is an SMTP relay server that accepts emails from another mail server and delivers them on its behalf.\n<\/p>\n<p>\nFor example, if <strong>server1<\/strong> is configured to use <strong>server2<\/strong> as a Smart Host, all outgoing emails from server1 will automatically be routed through server2, regardless of the recipient&#8217;s MX records.\n<\/p>\n<p>\nServer2 then looks up the correct mail destination and delivers the email. This setup is commonly used for <strong>load balancing, email filtering, or overcoming IP blacklisting issues<\/strong>.\n<\/p>\n<h2><strong>How to Configure a Smart Host in Exim<\/strong><\/h2>\n<h3><strong>Step 1: Edit the Exim Configuration File<\/strong><\/h3>\n<p>\nTo configure a Smart Host, create or edit the file:\n<\/p>\n<pre>\r\nnano \/etc\/exim.conf.local\r\n<\/pre>\n<p>\nAdd the following lines, replacing <code>host.name.of.smart.host.server<\/code> with the actual hostname or IP address of your Smart Host:\n<\/p>\n<pre>\r\n@ROUTERSTART@\r\nsmart_route:\r\n  driver = manualroute\r\n  domains = !+local_domains\r\n  transport = remote_smtp\r\n  route_list = * host.name.of.smart.host.server\r\n<\/pre>\n<h3><strong>Step 2: Rebuild Exim Configuration<\/strong><\/h3>\n<p>\nAfter saving the file, rebuild the Exim configuration to apply changes:\n<\/p>\n<pre>\r\n\/scripts\/buildeximconf\r\n<\/pre>\n<h3><strong>Step 3: Restart Exim<\/strong><\/h3>\n<p>\nRestart the Exim service to enable the new routing settings:\n<\/p>\n<pre>\r\n\/scripts\/restartsrv_exim\r\n<\/pre>\n<h2><strong>How to Verify That Smart Host is Working<\/strong><\/h2>\n<p>\nMonitor your mail logs to ensure emails are being relayed through the Smart Host:\n<\/p>\n<pre>\r\ntail -f \/var\/log\/exim_mainlog\r\n<\/pre>\n<p>\nLook for lines indicating that emails are being routed to the designated Smart Host.\n<\/p>\n<h2><strong>Why Use a Smart Host?<\/strong><\/h2>\n<ul>\n<li><strong>Improves Email Deliverability:<\/strong> Avoids IP blacklisting issues by routing through a trusted mail server.<\/li>\n<li><strong>Load Balancing:<\/strong> Distributes outgoing mail traffic across multiple servers.<\/li>\n<li><strong>Centralized Email Filtering:<\/strong> Allows security filtering at a single SMTP relay before delivery.<\/li>\n<\/ul>\n<h2><strong>Need Reliable Email Hosting? Choose UnderHost!<\/strong><\/h2>\n<p>\nLooking for secure and high-performance email solutions? <a href=\"https:\/\/customerpanel.ca\/client\/store\/email-solutions\">UnderMail<\/a> provides advanced email hosting with spam filtering and Smart Host capabilities.\n<\/p>\n<p>\nFor expert support, visit <a href=\"https:\/\/customerpanel.ca\/client\">UnderHost Customer Panel<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Need to relay outgoing emails through another mail server? Learn how to set up a Smart Host in Exim to route emails efficiently.<\/p>\n","protected":false},"author":1,"featured_media":4775,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11],"tags":[],"class_list":["post-3505","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-controlpanel","category-how-to"],"_links":{"self":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/comments?post=3505"}],"version-history":[{"count":3,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3505\/revisions"}],"predecessor-version":[{"id":5093,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/posts\/3505\/revisions\/5093"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media\/4775"}],"wp:attachment":[{"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/media?parent=3505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/categories?post=3505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/underhost.com\/blog\/wp-json\/wp\/v2\/tags?post=3505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}