{"id":435,"date":"2021-07-23T12:29:47","date_gmt":"2021-07-23T12:29:47","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/how-to-configure-the-exim-outgoing-ip-address\/"},"modified":"2021-07-23T12:29:47","modified_gmt":"2021-07-23T12:29:47","slug":"how-to-configure-the-exim-outgoing-ip-address","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/how-to-configure-the-exim-outgoing-ip-address\/","title":{"rendered":"How to Configure the Exim Outgoing IP Address"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>By default, Exim sends mail from the server\u2019s primary IPv4 address. To decrease the chance that spam filters mark your mail as spam, verify that the reverse DNS (rDNS) entry of Exim\u2019s outgoing IP address matches the DNS response of your server\u2019s hostname.<\/p>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>The steps in this document require <code>root<\/code>-level privileges on the server.<\/p>\n<\/p><\/div>\n<\/div>\n<h2 id=\"modify-exim-preferences-for-outgoing-mail\">Modify Exim preferences for outgoing mail<\/h2>\n<p>cPanel &#038; WHM offers two ways by which to modify Exim\u2019s default preferences for outgoing mail\u2019s IP address:<\/p>\n<h3 id=\"enable-automatic-configuration-of-the-server-ipv4-address-for-outgoing-mail\">Enable automatic configuration of the server IPv4 address for outgoing mail<\/h3>\n<p>To automatically configure Exim to send mail from each domain\u2019s dedicated IPv4 address, perform the following steps:<\/p>\n<ol>\n<li>\n<p>Modify the rDNS for each IPv4 address to point to the desired domain.<\/p>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>An incorrect rDNS configuration may cause mail servers to reject your server\u2019s mail.<\/li>\n<li>For more information, read our How to Configure Reverse DNS for BIND in WHM documentation.<\/li>\n<\/ul><\/div>\n<\/div>\n<\/li>\n<li>\n<p>Enable the <em>Send mail from account\u2019s dedicated IP address<\/em> setting in WHM\u2019s <em>Exim Configuration Manager<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Service Configuration &gt;&gt; Exim Configuration Manager<\/em>).<\/p>\n<div class=\"callout callout-danger\">\n<div class=\"callout-heading\">Warning:<\/div>\n<div class=\"callout-content\">\n<p>If you select this setting, cPanel &#038; WHM uses the <code>\/usr\/local\/cpanel\/scripts\/updateuserdomains<\/code> script to automatically configure Exim, and overrides any manual changes in the following files:<\/p>\n<ul>\n<li><code>\/etc\/mailhelo<\/code><\/li>\n<li><code>\/etc\/mailips<\/code><\/li>\n<\/ul><\/div>\n<\/div>\n<\/li>\n<\/ol>\n<h3 id=\"manually-configure-exim-outgoing-ip-addresses\">Manually configure Exim outgoing IP addresses<\/h3>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>We do <strong>not<\/strong> recommend that you modify your Exim files.<\/li>\n<li>To modify your Exim configuration files, you <strong>must<\/strong> possess <code>root<\/code>-level privileges.<\/li>\n<\/ul><\/div>\n<\/div>\n<p>To use a custom Exim configuration, you <strong>must<\/strong> enable the following settings in the <em>Basic Editor<\/em> section of WHM\u2019s <em>Exim Configuration Manager<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Service Configuration &gt;&gt; Exim Configuration Manager<\/em>):<\/p>\n<ul>\n<li><em>Reference \/etc\/mailhelo for outgoing SMTP HELO<\/em><\/li>\n<li><em>Reference \/etc\/mailips for outgoing SMTP connections<\/em><\/li>\n<\/ul>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>If you disable the <em>Reference \/etc\/mailhelo for outgoing SMTP HELO<\/em> setting, the system <strong>will<\/strong> overwrite any changes that you make to the <code>\/etc\/mailhelo<\/code> file.<\/li>\n<li>If you disable the <em>Reference \/etc\/mailips for outgoing SMTP connections<\/em> setting, the system <strong>will<\/strong> overwrite any changes that you make to the <code>\/etc\/mailips<\/code> file.<\/li>\n<\/ul><\/div>\n<\/div>\n<p>If you change the outgoing IP address to a non-cPanel main IP address, the cPanel user <strong>must<\/strong> update that email address\u2019 SPF record. They can configure the SPF record in cPanel\u2019s <em>Email Deliverability<\/em> interface (<em>cPanel &gt;&gt; Home &gt;&gt; Email &gt;&gt; Email Deliverability<\/em>).<\/p>\n<h3 id=\"the-mailhelo-file\">The mailhelo file<\/h3>\n<p>The <code>\/etc\/mailhelo<\/code> file contains Exim\u2019s configuration for the <code>HELO<\/code> command, which initiates dialog between a mail server and a client. This file governs which domain sends the <code>HELO<\/code> command.<\/p>\n<p>Use your preferred text editor to create an <code>\/etc\/mailhelo<\/code> file that resembles the following example:\n<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>\n<span style=\"color:#a6e22e\">sub<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>\n<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>\n<span style=\"color:#a6e22e\">addon<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>\n<span style=\"color:#f92672\">*<\/span>: <span style=\"color:#a6e22e\">hostname<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<h3 id=\"the-mailips-file\">The mailips file<\/h3>\n<p>The <code>\/etc\/mailips<\/code> file controls the IP address from which each domain sends mail.<\/p>\n<p>Use your preferred text editor to create an <code>\/etc\/mailips<\/code> file that resembles one of the following examples:<\/p>\n<h4 id=\"ipv4\">IPv4<\/h4>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">192.0.2.0<\/span>\n<span style=\"color:#a6e22e\">sub<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">192.0.2.1<\/span>\n<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">192.0.2.2<\/span>\n<span style=\"color:#a6e22e\">addon<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">192.0.2.3<\/span>\n<span style=\"color:#f92672\">*<\/span>: <span style=\"color:#ae81ff\">192.0.2.4<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li>In the example above, the system uses the asterisk (<code>*<\/code>) entry to direct outbound mail for domains without entries within this file. In this case, this is your server\u2019s main shared IPv4 address. You can set this value to another IP address if you ensure that the asterisk entry in the <code>\/etc\/mailhelo<\/code> file uses the appropriate domain name.<\/li>\n<li><strong>Only<\/strong> use valid, publicly-accessible IP addresses.<\/li>\n<li>Do <strong>not<\/strong> separate multiple IP addresses with commas. Instead, use semicolons.<\/li>\n<\/ul><\/div>\n<\/div>\n<h4 id=\"ipv4-with-nat\">IPv4 with NAT<\/h4>\n<p>NAT (Network Address Translation) transforms your private IPv4 address into a public IPv4 address. This process helps to preserve the limited number of IPv4 IP addresses available.<\/p>\n<p>Exim sends mail from the server\u2019s primary IPv4 address. You <strong>must<\/strong> use your private IP address, and not your public NAT IP address, when configuring the Exim service.<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">192.168.0.2<\/span>\n<span style=\"color:#a6e22e\">sub<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">192.168.0.2<\/span>\n<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">192.168.0.3<\/span>\n<span style=\"color:#a6e22e\">addon<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">192.168.0.3<\/span>\n<span style=\"color:#f92672\">*<\/span>: <span style=\"color:#ae81ff\">192.168.0.1<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li><strong>Only<\/strong> use private IPv4 addresses on a NAT system.<\/li>\n<li>Do <strong>not<\/strong> separate multiple IPv4 addresses with commas. Instead, use semicolons.<\/li>\n<\/ul><\/div>\n<\/div>\n<h4 id=\"ipv6\">IPv6<\/h4>\n<p>IPv6 does <strong>not<\/strong> utilize NAT technology due to the large number of IPv6 addresses available. For more information about IPv6, read our Guide to IPv6 documentation.<\/p>\n<div class=\"highlight\">\n<div style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\">\n<table style=\"border-spacing:0;padding:0;margin:0;border:0;width:auto;overflow:auto;display:block;\">\n<tr>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">1\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">2\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">3\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">4\n<\/span><span style=\"margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f\">5\n<\/span><\/code><\/pre>\n<\/td>\n<td style=\"vertical-align:top;padding:0;margin:0;border:0;;width:100%\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-go\" data-lang=\"go\"><span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">2001<\/span>:<span style=\"color:#a6e22e\">db8<\/span>:<span style=\"color:#ae81ff\">3<\/span><span style=\"color:#a6e22e\">c4d<\/span>:<span style=\"color:#ae81ff\">15<\/span>::<span style=\"color:#ae81ff\">7334<\/span>\n<span style=\"color:#a6e22e\">sub<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">com<\/span>: <span style=\"color:#ae81ff\">2001<\/span>:<span style=\"color:#a6e22e\">db8<\/span>:<span style=\"color:#ae81ff\">3<\/span><span style=\"color:#a6e22e\">c4d<\/span>:<span style=\"color:#ae81ff\">15<\/span>::<span style=\"color:#ae81ff\">7334<\/span>\n<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">2001<\/span>:<span style=\"color:#a6e22e\">db8<\/span>:<span style=\"color:#ae81ff\">3<\/span><span style=\"color:#a6e22e\">c4d<\/span>:<span style=\"color:#ae81ff\">15<\/span>::<span style=\"color:#ae81ff\">7334<\/span>\n<span style=\"color:#a6e22e\">addon<\/span>.<span style=\"color:#a6e22e\">example<\/span>.<span style=\"color:#a6e22e\">net<\/span>: <span style=\"color:#ae81ff\">2001<\/span>:<span style=\"color:#a6e22e\">db8<\/span>:<span style=\"color:#ae81ff\">3<\/span><span style=\"color:#a6e22e\">c4d<\/span>:<span style=\"color:#ae81ff\">15<\/span>::<span style=\"color:#ae81ff\">7334<\/span>\n<span style=\"color:#f92672\">*<\/span>: <span style=\"color:#ae81ff\">2001<\/span>:<span style=\"color:#a6e22e\">db8<\/span>:<span style=\"color:#ae81ff\">3<\/span><span style=\"color:#a6e22e\">c4d<\/span>:<span style=\"color:#ae81ff\">15<\/span>::<span style=\"color:#ae81ff\">7334<\/span><\/code><\/pre>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<ul>\n<li><strong>Only<\/strong> use valid, publicly-accessible IPv6 addresses.<br \/>\nIn the example above, the system uses two colons (<code>::<\/code>) to indicate a collapsed section.<\/li>\n<li>Do <strong>not<\/strong> separate multiple IPv6 addresses with commas. Instead, use semicolons.<\/li>\n<\/ul><\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview By default, Exim sends mail from the server\u2019s primary IPv4 address. To decrease the chance that spam filters mark your mail as spam, verify that the reverse DNS (rDNS) entry of Exim\u2019s outgoing IP address matches the DNS response of your server\u2019s hostname. Note: The steps in this document require root-level privileges on the &hellip;<\/p>\n","protected":false},"author":1,"featured_media":436,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/435"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=435"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/435\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/436"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}