{"id":4248,"date":"2021-11-30T12:43:18","date_gmt":"2021-11-30T18:43:18","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=4248"},"modified":"2021-11-30T13:21:39","modified_gmt":"2021-11-30T19:21:39","slug":"adding-email-disclaimer-for-entire-domain-on-whm-cpanel","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/adding-email-disclaimer-for-entire-domain-on-whm-cpanel\/","title":{"rendered":"Adding Email Disclaimer for Entire Domain on WHM\/cPanel"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-9.png\"><img loading=\"lazy\" decoding=\"async\" width=\"616\" height=\"106\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-9.png\" alt=\"\" class=\"wp-image-4265\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-9.png 616w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-9-300x52.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-9-500x86.png 500w\" sizes=\"auto, (max-width: 616px) 100vw, 616px\" \/><\/a><figcaption>Email Disclaimer<\/figcaption><\/figure>\n\n\n\n<p>Altermime is a small utility that allows you to append a disclaimer to all outbound emails on a cPanel server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. <strong>Installing altermime<\/strong><\/h2>\n\n\n\n<p>You should be able to copy and paste the following commands in. You&#8217;ll need to be root.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cd \/usr\/local\/src\/ \nwget pldaniels.com\/altermime\/altermime-0.3.10.tar.gz \ntar xvfz altermime-0.3.10.tar.gz \ncd altermime-0.3.10 \nmake \nmake install<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. <strong>Setup Disclaimer Text<\/strong><\/h2>\n\n\n\n<p>Create two disclaimer files.  One is text and the other is for HTML.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Text file<\/strong><\/h3>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/usr\/local\/etc\/exim\/textdisclaimer<\/pre>\n\n\n\n<p>Add your disclaimer text.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">-------------\nincredigeek.com<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>HTML File<\/strong><\/h3>\n\n\n\n<p>Create the HTML disclaimer file with<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano \/usr\/local\/etc\/exim\/htmldisclaimer<\/pre>\n\n\n\n<p>And add your disclaimer HTML to the file.  Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;p>\n-----\n&lt;br \/>\n  &lt;a href=\"http:\/\/www.incredigeek.com\">incredigeek.com &lt;\/a>\n&lt;\/p><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. <strong>Modify Exim Configuration<\/strong><\/h2>\n\n\n\n<p>Now that we have the disclaimer files set up, we can move on to configuring Exim so the disclaimer text gets added to every email sent out.<\/p>\n\n\n\n<p>Open up WHM and go to Exim Configuration Editor -> Advanced Editor<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"374\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4-1024x374.png\" alt=\"\" class=\"wp-image-4253\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4-1024x374.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4-300x110.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4-768x281.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4-500x183.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-4.png 1154w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Exim Advanced Editor<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>A. Configuring Routers Configuration<\/strong><\/h3>\n\n\n\n<p>Find the ROUTERS CONFIGURATION section.  We will add some configuration in the &#8220;<strong>Section: PREROUTERS<\/strong>&#8221; <\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Add disclaimer to Single Domain<\/strong><\/h4>\n\n\n\n<p>Paste in the following to add the disclaimer to a single domain.  Replace &#8220;incredigeek.com&#8221; with your domain.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">disclaimer:\ndriver = dnslookup\ndomains = ! +local_domains\ntransport = ${if eq {$sender_address_domain}{incredigeek.com}{disclaimer_smtp}{remote_smtp}}\nno_more<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"321\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5.png\" alt=\"\" class=\"wp-image-4254\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5.png 771w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5-300x125.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5-768x320.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-5-500x208.png 500w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/a><figcaption>Add Disclaimer to Single Domain<\/figcaption><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Add Disclaimer to Entire Server (Optional)<\/strong><\/h4>\n\n\n\n<p>If you would rather apply the disclaimer to the entire server, use the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">disclaimer:\ndriver = dnslookup\ndomains = ! +local_domains\ntransport = disclaimer_smtp<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6.png\"><img loading=\"lazy\" decoding=\"async\" width=\"770\" height=\"168\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6.png\" alt=\"\" class=\"wp-image-4255\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6.png 770w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6-300x65.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6-768x168.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-6-500x109.png 500w\" sizes=\"auto, (max-width: 770px) 100vw, 770px\" \/><\/a><figcaption>Add Disclaimer to Entire Server<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>B. Configure Transports Configuration<\/strong><\/h3>\n\n\n\n<p>Once we have that added we can find the &#8220;TRANSPORTS CONFIGURATION&#8221; section and under the first &#8220;<strong>Section: TRANSPORTSTART<\/strong>&#8221; add<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">disclaimer_smtp:\ndriver = smtp\ntransport_filter = \/usr\/local\/bin\/altermime  --input=- --disclaimer=\/usr\/local\/etc\/exim\/textdisclaimer --disclaimer-html=\/usr\/local\/etc\/exim\/htmldisclaimer\nsize_addition = 1<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"101\" src=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7-1024x101.png\" alt=\"\" class=\"wp-image-4257\" srcset=\"https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7-1024x101.png 1024w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7-300x30.png 300w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7-768x76.png 768w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7-500x49.png 500w, https:\/\/www.incredigeek.com\/home\/wp-content\/uploads\/2021\/11\/image-7.png 1210w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Add Disclaimer to TRANSPOTSTART<\/figcaption><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>That should be everything that you need.  Send a test email to an external email account to verify that it works.<\/p>\n\n\n\n<p>Note that it looks like sending an email locally to email addresses on the same domain or to yourself bypass the filter and do not get the disclaimer added.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The following links were helpful for getting this set up.<\/p>\n\n\n\n<p><a href=\"https:\/\/forums.cpanel.net\/threads\/howto-footer-disclaimer-in-outgoing-mails.98465\/\">https:\/\/forums.cpanel.net\/threads\/howto-footer-disclaimer-in-outgoing-mails.98465\/<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/pldaniels.com\/altermime\/\">https:\/\/pldaniels.com\/altermime\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Altermime is a small utility that allows you to append a disclaimer to all outbound emails on a cPanel server. 1. Installing altermime You should be able to copy and paste the following commands in. You&#8217;ll need to be root. &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/adding-email-disclaimer-for-entire-domain-on-whm-cpanel\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[195,1],"tags":[196,1262,223,1048,1263,382],"class_list":["post-4248","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-uncategorized","tag-cpanel-2","tag-disclaimer","tag-email","tag-exim","tag-footer","tag-whm"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=4248"}],"version-history":[{"count":14,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4248\/revisions"}],"predecessor-version":[{"id":4268,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/4248\/revisions\/4268"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=4248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=4248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=4248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}