{"id":125,"date":"2018-04-02T09:31:03","date_gmt":"2018-04-02T09:31:03","guid":{"rendered":"http:\/\/www.dabbler.dk\/?p=125"},"modified":"2023-03-17T16:08:59","modified_gmt":"2023-03-17T16:08:59","slug":"sendmail-smart-host-with-mysmtp-eu-smtp-dk","status":"publish","type":"post","link":"https:\/\/www.dabbler.dk\/index.php\/2018\/04\/02\/sendmail-smart-host-with-mysmtp-eu-smtp-dk\/","title":{"rendered":"Sendmail\/smart host with mysmtp.eu\/smtp.dk"},"content":{"rendered":"<p>Hi,<\/p>\n<p>My internet service provider (ISP, Eniig) has announced that they will no longer provide a SMTP relay host (outgoing Simple Mail Transfer Protocol relay), and on top of that they earlier they stated that they will not setup reverse DNS on my fixed IP &#8211; so with these two (really bad) decisions in mind, I had to come up with a solution.<\/p>\n<p>By the way &#8211; Eniigs reason for not providing SMTP relay servides anymore is that they apparently cannot manage to have such a server in production anymore because of SPAM anti measures etc. Really? An ISP not having the resources and knowledge to run a SMTP server in production anymore? Really!?!?!<\/p>\n<p>Anyway &#8211; Eniig suggested using\u00a0<a href=\"https:\/\/smtp.dk\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/smtp.dk\/<\/a> and even provides a free (almost unlimited) access until end of May 2018, so although there is a lot of cheaper alternatives out there &#8211; why not?<br \/>\nFor non-Danish speakers wanting to join, smtp.dk also runs an international version of their service on\u00a0<a href=\"https:\/\/mysmtp.eu\/\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/mysmtp.eu\/<\/a>.<\/p>\n<p>Only problem is that it requires SMTP to the submit port (587) and authentication. And it is a requirement for me to continue to use my FreeBSD\/Sendmail box, which is providing a lot of services &#8211; including some rarely used SMTP-services &#8211; for family and friends. This is actually a non-profit\/free setup &#8211; so it is a pita that Eniig actually are putting extra costs into this, without reducing the cost for the Internet connection. Shame on them!!!<\/p>\n<p>Actually, it was not that big of a hassle to configure Sendmail for this purpose &#8211; and I&#8217;m also doing SMTP authentication, SpamAssassin filtering, procmail\u00a0 and a lot of other stuff in my Sendmail :-).<\/p>\n<p>This is what I had to do:<\/p>\n<p>1.<br \/>\nCreate \/etc\/mail\/authinfo with one line (terminate it with a line break):<\/p>\n<pre>AuthInfo:smtp.dk \"U:root\" \"I:&lt;smtp.dk login name&gt;\" \"P:&lt;smtp.dk password&gt;\" \"M:LOGIN PLAIN\"<\/pre>\n<p>&#8230;replacing values in &lt; &gt; with you accounts values from smtp.dk<br \/>\nI feel most secure by making this file rw for root only<\/p>\n<p>2.<br \/>\nRun makemap of this file to create a authinfo.db-file<\/p>\n<pre>makemap hash authinfo &lt; authinfo<\/pre>\n<p>3.<br \/>\nCorrect your sendmail.mc-file (whatever it is called on your system). Add these lines:<\/p>\n<pre>define(`SMART_HOST',`[smtp.dk]')dnl\ndefine(`RELAY_MAILER_ARGS', `TCP $h 587')dnl\nFEATURE(`authinfo',`hash \/etc\/mail\/authinfo')dnl<\/pre>\n<p>Note: You should change this for the sendmail queue runner process, not a SMTP submit service etc.<\/p>\n<p>4.<br \/>\nCompile your sendmail.mc file into a sendmail.cf file. This is easily done on FreeBSD \ud83d\ude42<\/p>\n<pre>make cf<\/pre>\n<p>5.<br \/>\nRestart sendmail. Again &#8211; this is easy on FreeBSD<\/p>\n<pre>make restart<\/pre>\n<p>Also: remember to correct your SPF and similar setups on your domains according to smtp.dk\/mysmtp.eu.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, My internet service provider (ISP, Eniig) has announced that they will no longer provide a SMTP relay host (outgoing Simple Mail Transfer Protocol relay), and on top of that they earlier they stated that they will not setup reverse DNS on my fixed IP &#8211; so with these two (really bad) decisions in mind, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.dabbler.dk\/index.php\/2018\/04\/02\/sendmail-smart-host-with-mysmtp-eu-smtp-dk\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Sendmail\/smart host with mysmtp.eu\/smtp.dk&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,5],"tags":[20,22,21],"class_list":["post-125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-freebsd","category-software","tag-freebsd","tag-sendmail","tag-smtp"],"_links":{"self":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":9,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":670,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions\/670"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media\/237"}],"wp:attachment":[{"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dabbler.dk\/index.php\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}