{"id":3126,"date":"2020-05-14T20:12:31","date_gmt":"2020-05-14T14:42:31","guid":{"rendered":"https:\/\/www.24x7serversupport.com\/blog\/?p=3126"},"modified":"2020-05-17T06:40:14","modified_gmt":"2020-05-17T01:10:14","slug":"cpanel-whm-ip-based-authentication-selected-domains","status":"publish","type":"post","link":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/","title":{"rendered":"cPanel\/WHM IP-based Authentication (selected domains)"},"content":{"rendered":"\n<p>This method allows you to filter selected domains via our Outgoing filter, while using IP authentication. Any domains not configured here will continue to use the standard cPanel router and transport.<\/p>\n\n\n\n<p>Ensure the IP address is added as an authorized smarthost (without authentication).<\/p>\n\n\n\n<p>Ensure the outgoing user has correct limits set matching your traffic volumes.<\/p>\n\n\n\n<p>SSH to the cPanel\/WHM node.<\/p>\n\n\n\n<p>Create the file \/etc\/spamexperts_domains.<\/p>\n\n\n\n<p>Add the domains that you wish to filter outgoing in that file (one per line).<\/p>\n\n\n\n<p>Save the file.<\/p>\n\n\n\n<p>Navigate to <strong>Exim Configuration Editor<\/strong> in WHM.<\/p>\n\n\n\n<p>Choose <strong>Advanced Editor<\/strong>.<\/p>\n\n\n\n<p>Add the following in &#8220;Section: POSTMAILCOUNT&#8221; (replace SMARTHOST with the correct SMTP hostname):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">smarthost_dkim:\ndriver = manualroute\ndomains = !+local_domains\ncondition = ${if match_domain{$sender_address_domain}{lsearch;\/etc\/spamexperts_domains}}\nrequire_files = \"+\/var\/cpanel\/domain_keys\/private\/${sender_address_domain}\"\n# Exclude null sender messages from relaying via the smarthost\ncondition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}\ntransport = remote_smtp_smart_dkim\nroute_list = $domain SMARTHOST::587\nsmarthost_regular:\ndriver = manualroute\ndomains = !+local_domains\ncondition = ${if match_domain{$sender_address_domain}{lsearch;\/etc\/spamexperts_domains}}\n# Exclude null sender messages from relaying via the smarthost\ncondition = ${if or {{!eq{$sender_address}{}} {!eq{$sender_host_address}{}}}}\ntransport = remote_smtp_smart_regular\nroute_list = $domain SMARTHOST::587<\/pre>\n\n\n\n<p>Add the following in &#8220;Section: TRANSPORTSTART&#8221; :<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">remote_smtp_smart_dkim:\ndriver = smtp\nhosts_require_tls = *\ninterface = ${if exists {\/etc\/mailips}{${lookup{$sender_address_domain}lsearch<em>{\/etc\/mailips}{$value}{}}}{}} helo_data = ${if exists {\/etc\/mailhelo}{${lookup{$sender_address_domain}lsearch<\/em>{\/etc\/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}\ndkim_domain = $sender_address_domain\ndkim_selector = default\ndkim_private_key = \"\/var\/cpanel\/domain_keys\/private\/${dkim_domain}\"\ndkim_canon = relaxed\nheaders_add = \"${perl{check_mail_permissions_headers}}\"\nremote_smtp_smart_regular:\ndriver = smtp\nhosts_require_tls = *\ninterface = ${if exists {\/etc\/mailips}{${lookup{$sender_address_domain}lsearch<em>{\/etc\/mailips}{$value}{}}}{}} helo_data = ${if exists {\/etc\/mailhelo}{${lookup{$sender_address_domain}lsearch<\/em>{\/etc\/mailhelo}{$value}{$primary_hostname}}}{$primary_hostname}}\nheaders_add = \"${perl{check_mail_permissions_headers}}\"<\/pre>\n\n\n\n<p>Save and restart.<\/p>\n\n\n\n<p>All traffic from the cPanel\/WHM server will be routed to the Spam Experts filtering nodes.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This method allows you to filter selected domains via our Outgoing filter, while using IP authentication. Any domains not configured here will continue to use the standard cPanel router and transport. Ensure the IP address is added as an authorized smarthost (without authentication). Ensure the outgoing user has correct limits set matching your traffic volumes. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3129,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[38,33],"tags":[315,316,94],"class_list":["post-3126","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloudlinux","category-cpanel","tag-cpanel-whm","tag-outgoing-route","tag-spam"],"jetpack_publicize_connections":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog<\/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:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog\" \/>\n<meta property=\"og:description\" content=\"This method allows you to filter selected domains via our Outgoing filter, while using IP authentication. Any domains not configured here will continue to use the standard cPanel router and transport. Ensure the IP address is added as an authorized smarthost (without authentication). Ensure the outgoing user has correct limits set matching your traffic volumes. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/\" \/>\n<meta property=\"og:site_name\" content=\"24x7serversupport Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-14T14:42:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-17T01:10:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"24x7support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:site\" content=\"@24x7serversuppo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"24x7support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/\",\"name\":\"cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1\",\"datePublished\":\"2020-05-14T14:42:31+00:00\",\"dateModified\":\"2020-05-17T01:10:14+00:00\",\"author\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1\",\"width\":1000,\"height\":500},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.24x7serversupport.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"cPanel\/WHM IP-based Authentication (selected domains)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#website\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/\",\"name\":\"24x7serversupport Blog\",\"description\":\"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401\",\"name\":\"24x7support\",\"url\":\"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog","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:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/","og_locale":"en_US","og_type":"article","og_title":"cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog","og_description":"This method allows you to filter selected domains via our Outgoing filter, while using IP authentication. Any domains not configured here will continue to use the standard cPanel router and transport. Ensure the IP address is added as an authorized smarthost (without authentication). Ensure the outgoing user has correct limits set matching your traffic volumes. [&hellip;]","og_url":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/","og_site_name":"24x7serversupport Blog","article_published_time":"2020-05-14T14:42:31+00:00","article_modified_time":"2020-05-17T01:10:14+00:00","og_image":[{"width":1000,"height":500,"url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1","type":"image\/jpeg"}],"author":"24x7support","twitter_card":"summary_large_image","twitter_creator":"@24x7serversuppo","twitter_site":"@24x7serversuppo","twitter_misc":{"Written by":"24x7support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/","url":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/","name":"cPanel\/WHM IP-based Authentication (selected domains) | 24x7serversupport Blog","isPartOf":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage"},"image":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1","datePublished":"2020-05-14T14:42:31+00:00","dateModified":"2020-05-17T01:10:14+00:00","author":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401"},"breadcrumb":{"@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#primaryimage","url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1","width":1000,"height":500},{"@type":"BreadcrumbList","@id":"https:\/\/www.24x7serversupport.com\/blog\/cpanel-whm-ip-based-authentication-selected-domains\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.24x7serversupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"cPanel\/WHM IP-based Authentication (selected domains)"}]},{"@type":"WebSite","@id":"https:\/\/www.24x7serversupport.com\/blog\/#website","url":"https:\/\/www.24x7serversupport.com\/blog\/","name":"24x7serversupport Blog","description":"Linux | CPanel | WHM | webhosting| Plesk | DirectAdmin | CentOs | Debian | Ubuntu Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.24x7serversupport.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.24x7serversupport.com\/blog\/#\/schema\/person\/decfb5fad6bde6ac6822d4e965c6d401","name":"24x7support","url":"https:\/\/www.24x7serversupport.com\/blog\/author\/24x7support\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.24x7serversupport.com\/blog\/wp-content\/uploads\/2020\/05\/antispam.jpeg?fit=1000%2C500&ssl=1","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/comments?post=3126"}],"version-history":[{"count":1,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3126\/revisions"}],"predecessor-version":[{"id":3127,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/posts\/3126\/revisions\/3127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media\/3129"}],"wp:attachment":[{"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/media?parent=3126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/categories?post=3126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.24x7serversupport.com\/blog\/wp-json\/wp\/v2\/tags?post=3126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}