{"id":168,"date":"2011-11-17T10:51:00","date_gmt":"2011-11-17T10:51:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=168"},"modified":"2011-11-17T10:51:00","modified_gmt":"2011-11-17T10:51:00","slug":"exim-interface-ip-address","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/","title":{"rendered":"Exim interface IP address"},"content":{"rendered":"<p><b>How to change exim interface IP in cPanel?<\/b><\/p>\n<p>You can change the interface IP address for exim mail server in the exim configuration file (exim.conf).<br \/>1) Open the configuration file of exim.<br \/>vi \/etc\/exim.conf<br \/>2) Check for the following parameters.<br \/>remote_smtp:<br \/>driver = smtp<br \/>interface=<br \/>Change to like this:<br \/>remote_smtp:<br \/>driver = smtp<br \/>interface=x.x.x.x<br \/>NB: Replace x.x.x.x with your IP address.<br \/>3) Restart the mail service using the following command.<br \/>\/etc\/init.d\/exim restart<\/p>\n<p>++++++++++++++++++++<br \/>Anyone running a shared hosting server is probably now accustomed to dealing with constant complaints about blacklisting. It\u00e2\u20ac\u2122s exim\u00e2\u20ac\u2122s default setup on a cPanel server to use the shared IP of the server to send email, which means that all your clients on one server are sending out email on the same IP.  All it takes is for one spammer to send out a mailing list or one customer to get hacked and run a Darkmailer script, and suddenly everyone on your server seems to be complaining about getting their mail bounced.<br \/>You can change the server\u00e2\u20ac\u2122s IP address for sending email. Assuming you already have an IP set up on your server with a valid PTR, you probably already saw on the cPanel forums or some other location that you can simply change the interface lines in your \/etc\/exim.conf file and restart exim:<\/p>\n<p>remote_smtp:<br \/>driver = smtp<br \/>interface = ${if exists {\/etc\/mailips}{${lookup{$sender_address_domain}lsearch*{\/etc\/mailips}{$value}{}}}{}}<br \/>helo_data = ${if exists {\/etc\/mailhelo}{${lookup{$sender_address_domain}lsearch*{\/etc\/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}<br \/>dk_remote_smtp:<br \/>driver = smtp<br \/>interface = ${if exists {\/etc\/mailips}{${lookup{$sender_address_domain}lsearch*{\/etc\/mailips}{$value}{}}}{}}<br \/>helo_data = ${if exists {\/etc\/mailhelo}{${lookup{$sender_address_domain}lsearch*{\/etc\/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}<br \/>dk_private_key = &#8220;\/var\/cpanel\/domain_keys\/private\/${dk_domain}&#8221;<br \/>dk_canon = nofws<br \/>dk_selector = default<\/p>\n<p>In the above example, all you\u00e2\u20ac\u2122d do is comment out the interface lines and replace them with:<br \/>interface = xx.xx.xx.xx<br \/>However, this tends to be a band-aid fix, as a cPanel update or any change made in WHM\u00e2\u20ac\u2122s Exim Configuration Editor will regenerate the Exim config and overwrite your change. To make this more permanent, you\u00e2\u20ac\u2122ll want to use the \/etc\/mailips file.<br \/>To set this up initially, go into WHM > Exim Configuration and enable this option:<br \/>** Send outgoing mail from the ip that matches the domain name in \/etc\/mailips (*: IP can be added to the file to change the main outgoing interface) [?]<br \/>Or, in \/etc\/exim.conf.localopts, add\/change this line:<br \/>per_domain_mailips=1 <br \/>Then run<br \/>\/scripts\/buildeximconf<br \/>service exim restart<br \/>*The \/etc\/mailips file should be root:exim, chmod 440  if it doesn\u00e2\u20ac\u2122t already exist.<br \/>chattr +i \/etc\/mailips<br \/>Now for actually changing the IP:<\/p>\n<p><b>Changing the IP Globally<\/b><\/p>\n<p>If you want everyone on the server to send out on the same IP, just add the following to \/etc\/mailips:<br \/>*: xxx.xxx.xxx.xxx<br \/>Then add the IP and it\u00e2\u20ac\u2122s matching PTR to \/etc\/mail_reverse_dns:<br \/>xxx.xxx.xxx.xxx hostname.tld<br \/>This will tell Exim to use that IP for any sender on the server.<\/p>\n<p>Changing the IP Per Domain<\/p>\n<p>If you want your users with dedicated IP addresses to be able to use those IPs to send email as well, you can add them to \/etc\/mailips. cPanel actually now has documentation on how to do this properly:<br \/>http:\/\/docs.cpanel.net\/twiki\/bin\/view\/AllDocumentation\/WHMDocs\/EximDifferentIps<br \/>If you have multiple dedicated IP domains already, I\u00e2\u20ac\u2122ve devised a simple loop you can use to populate \/etc\/mailips automatically:<br \/>while read line ; do DOMAIN=`echo -e $line |awk &#8216;{print $2}&#8217;` &#038;&#038; IP=`echo -e $line |awk &#8216;{print $1}&#8217; |cut -d: -f1` &#038;&#038; echo &#8220;$DOMAIN: $IP&#8221; >> \/etc\/mailips ;done < \/etc\/domainips<br \/>You\u00e2\u20ac\u2122ll always want the wildcard line to be in there to account for any domain not listed in the file, whether it is the main server\u00e2\u20ac\u2122s IP or another that you have assigned for email:<br \/>*: xxx.xxx.xxx.xxx<br \/>Then:<br \/>cp \/etc\/domainips \/etc\/mail_reverse_dns<br \/>This will set all the existing sites on dedicated IPs to send out mail on those IPs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to change exim interface IP in cPanel? You can change the interface IP address for exim mail server in the exim configuration file (exim.conf).1) Open the configuration file of exim.vi \/etc\/exim.conf2) Check for the following parameters.remote_smtp:driver = smtpinterface=Change to like this:remote_smtp:driver = smtpinterface=x.x.x.xNB: Replace x.x.x.x with your IP address.3)&hellip; <a href=\"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/\" class=\"more-link read-more\" rel=\"bookmark\">Continue Reading <span class=\"screen-reader-text\">Exim interface IP address<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-168","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"h-entry","9":"h-as-article"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Pheonix Solutions - We Empower Your Business Growth<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pheonix Solutions - We Empower Your Business Growth\" \/>\n<meta property=\"og:description\" content=\"How to change exim interface IP in cPanel? You can change the interface IP address for exim mail server in the exim configuration file (exim.conf).1) Open the configuration file of exim.vi \/etc\/exim.conf2) Check for the following parameters.remote_smtp:driver = smtpinterface=Change to like this:remote_smtp:driver = smtpinterface=x.x.x.xNB: Replace x.x.x.x with your IP address.3)&hellip; Continue Reading Exim interface IP address\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/\" \/>\n<meta property=\"og:site_name\" content=\"PHEONIXSOLUTIONS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/\" \/>\n<meta property=\"article:published_time\" content=\"2011-11-17T10:51:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3837\" \/>\n\t<meta property=\"og:image:height\" content=\"2540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:site\" content=\"@pheonixsolution\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\"},\"headline\":\"Exim interface IP address\",\"datePublished\":\"2011-11-17T10:51:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/\"},\"wordCount\":697,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/\",\"name\":\"Pheonix Solutions - We Empower Your Business Growth\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\"},\"datePublished\":\"2011-11-17T10:51:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/exim-interface-ip-address\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Exim interface IP address\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"name\":\"Pheonix Solutions\",\"description\":\"We Empower Your Business Growth\",\"publisher\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#organization\",\"name\":\"PheonixSolutions\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/wp-content\\\/uploads\\\/2016\\\/12\\\/logo.png\",\"width\":454,\"height\":300,\"caption\":\"PheonixSolutions\"},\"image\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/PheonixSolutions-209942982759387\\\/\",\"https:\\\/\\\/x.com\\\/pheonixsolution\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/#\\\/schema\\\/person\\\/0ffa33d73c869faec2d50e79c24e3503\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"http:\\\/\\\/blog.pheonixsolutions.com\"],\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Pheonix Solutions - We Empower Your Business Growth","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":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/","og_locale":"en_US","og_type":"article","og_title":"Pheonix Solutions - We Empower Your Business Growth","og_description":"How to change exim interface IP in cPanel? You can change the interface IP address for exim mail server in the exim configuration file (exim.conf).1) Open the configuration file of exim.vi \/etc\/exim.conf2) Check for the following parameters.remote_smtp:driver = smtpinterface=Change to like this:remote_smtp:driver = smtpinterface=x.x.x.xNB: Replace x.x.x.x with your IP address.3)&hellip; Continue Reading Exim interface IP address","og_url":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/","og_site_name":"PHEONIXSOLUTIONS","article_publisher":"https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","article_published_time":"2011-11-17T10:51:00+00:00","og_image":[{"width":3837,"height":2540,"url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/09\/PX2.png","type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_creator":"@pheonixsolution","twitter_site":"@pheonixsolution","twitter_misc":{"Written by":"admin","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/"},"author":{"name":"admin","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503"},"headline":"Exim interface IP address","datePublished":"2011-11-17T10:51:00+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/"},"wordCount":697,"commentCount":0,"publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/","url":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/","name":"Pheonix Solutions - We Empower Your Business Growth","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#website"},"datePublished":"2011-11-17T10:51:00+00:00","breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/blog\/exim-interface-ip-address\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Exim interface IP address"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/blog\/#website","url":"https:\/\/pheonixsolutions.com\/blog\/","name":"Pheonix Solutions","description":"We Empower Your Business Growth","publisher":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/pheonixsolutions.com\/blog\/#organization","name":"PheonixSolutions","url":"https:\/\/pheonixsolutions.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","contentUrl":"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2016\/12\/logo.png","width":454,"height":300,"caption":"PheonixSolutions"},"image":{"@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/PheonixSolutions-209942982759387\/","https:\/\/x.com\/pheonixsolution"]},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/blog\/#\/schema\/person\/0ffa33d73c869faec2d50e79c24e3503","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09bacc0294abee1322a23ab4bc6a0330dd4cb4df707dc9d0b0efeba6c109608b?s=96&r=g","caption":"admin"},"sameAs":["http:\/\/blog.pheonixsolutions.com"],"url":"https:\/\/pheonixsolutions.com\/blog\/author\/admin\/"}]}},"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p7F4uM-2I","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/168","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=168"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/168\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=168"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=168"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=168"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}