{"id":203,"date":"2020-09-09T19:08:51","date_gmt":"2020-09-09T09:08:51","guid":{"rendered":"http:\/\/menhennitt.com.au\/wordpress\/?p=203"},"modified":"2020-09-09T19:08:51","modified_gmt":"2020-09-09T09:08:51","slug":"generating-a-letsencrypt-cert-for-dovecot","status":"publish","type":"post","link":"https:\/\/menhennitt.com.au\/wordpress\/2020\/09\/09\/generating-a-letsencrypt-cert-for-dovecot","title":{"rendered":"Generating a LetsEncrypt  cert for Dovecot"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I have web hosting with with a provider and use their DNS service. But I don&#8217;t use their IMAP server &#8211; I host my own at home. Email clients like Thunderbird are averse to self-signed certs. So I generate a LetsEncrypt signed cert for my Dovecot IMAP server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On my home machine:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>install the certbot utility (FreeBSD port : py37-certbot)<\/li><li>run certbot:<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>certbot certonly --manual --preferred-challenges=dns --agree-tos --email=&lt;my email address> -d &lt;imap host name><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>confirm that I&#8217;m OK with my IP being logged<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">On the provider&#8217;s control panel web site:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Add a DNS TXT record with the name and value generated by certbot<\/li><li>Wait a few minutes for the DNS record to be served<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Back on my home machine:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Press Enter at the certbot prompt<\/li><li>Wait for certbot to clean up and show the names of the files containing the cert<\/li><li>Edit the Dovecot config file to point the ssl_cert and ssl_key lines to the files generated by certbot. Note that the first less-than sign on each line is part of the config. E.g.<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>ssl_cert = &lt; &lt;generated fullchain.pem file name>\nssl_key = &lt; &lt;generated privkey.pem file name><\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>Restart Dovecot<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When I need to renew the cert in a couple of months time, I can just do:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>certbot renew<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I have web hosting with with a provider and use their DNS service. But I don&#8217;t use their IMAP server &#8211; I host my own at home. Email clients like Thunderbird are averse to self-signed certs. So I generate a LetsEncrypt signed cert for my Dovecot IMAP server. On my home machine: install the certbot [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[39,33,38,35,34,37,36],"class_list":["post-203","post","type-post","status-publish","format-standard","hentry","category-computing","tag-cert","tag-certbot","tag-certificate","tag-dovecot","tag-letsencrypt","tag-ssl","tag-thunderbird"],"_links":{"self":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/203","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/comments?post=203"}],"version-history":[{"count":2,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/203\/revisions"}],"predecessor-version":[{"id":205,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/posts\/203\/revisions\/205"}],"wp:attachment":[{"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/media?parent=203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/categories?post=203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/menhennitt.com.au\/wordpress\/wp-json\/wp\/v2\/tags?post=203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}