{"id":2734,"date":"2018-07-06T17:00:25","date_gmt":"2018-07-07T00:00:25","guid":{"rendered":"http:\/\/www.wellgolly.com\/?p=2734"},"modified":"2018-07-07T07:29:00","modified_gmt":"2018-07-07T14:29:00","slug":"getting-exim4-running-on-a-new-server","status":"publish","type":"post","link":"https:\/\/www.wellgolly.com\/?p=2734","title":{"rendered":"Getting Exim4 running on a new server"},"content":{"rendered":"<p>We\u2019ve always kept our virtual domains in <em>\/etc\/mail\/virtuals<\/em> and I was under the impression it was the default location. It isn\u2019t.<\/p>\n<p>I don\u2019t remember adding this code when I set up Exim4 on my Linode server, but it is missing on my Digital Ocean server. I needed to add the folowing lines to <em>exim4.conf.template<\/em>, just above the line <em>system_aliases:<\/em> in the router section.<\/p>\n<p><pre><code class=\"preserve-code-formatting\">\nvirtual_domains:\n&nbsp;&nbsp;driver = redirect\n&nbsp;&nbsp;domains = dsearch;\/etc\/mail\/virtuals\n&nbsp;&nbsp;data = ${lookup{$local_part}wildlsearch{\/etc\/mail\/virtuals\/$domain}}\n&nbsp;&nbsp;allow_fail\n&nbsp;&nbsp;allow_defer\n&nbsp;&nbsp;file_transport = address_file\n<\/code><\/pre><\/p>\n<p>I also missed the step of creating the self-signed key and cert, so make sure you do that as well.<\/p>\n<p>The <a href='http:\/\/www.exim.org\/exim-html-3.20\/doc\/html\/spec_23.html'>documents have lots of special cases for handling email that I never used, but one could come in handy. <\/a>An attempt to deliver to a particular local part can be deferred or forced to fail by aliasing the local part to<br \/>\n:defer:<br \/>\nor<br \/>\n:fail:<\/p>\n<p>So you could do something like this, since spammers use this address all the time.<br \/>\nsupport: :fail:<\/p>\n<p>One thing we never did in the virtuals file is to send a comment for addresses that bounce, but it could come in handy. e.g<\/p>\n<p>X.Employee:  :fail: Gone away, no forwarding address<br \/>\nsupport:  :fail: Please use the contact form on our website if you have support questions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019ve always kept our virtual domains in \/etc\/mail\/virtuals and I was under the impression it was the default location. It isn\u2019t. I don\u2019t remember adding this code when I set up Exim4 on my Linode server, but it is missing on my Digital Ocean server. I needed to add the folowing lines to exim4.conf.template, just &hellip; <a href=\"https:\/\/www.wellgolly.com\/?p=2734\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Getting Exim4 running on a new server<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2734","post","type-post","status-publish","format-standard","hentry","category-computers"],"_links":{"self":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2734","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2734"}],"version-history":[{"count":0,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=\/wp\/v2\/posts\/2734\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2734"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2734"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wellgolly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2734"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}