# OpenSMTPD and Let's Encrypt

**URL:** <https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132>\
**Category:** Server\
**Created:** [October 14, 2016, 6:58pm UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132 "2016-10-14T18:58:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![wizzardude](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/wizzardude/32/5554_2.png) [@wizzardude](https://community.letsencrypt.org/u/wizzardude)\
**Post date:** [October 14, 2016, 6:58pm UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132/1 "2016-10-14T18:58:05Z")

</div>

I’m getting ready to deploy a new webmail server, and want to be running everything over SSL.

The HTTPS part is pretty simple, but I want to be able to use the same certs with OpenSMTPD ([https://www.opensmtpd.org/faq/certificates.html](https://www.opensmtpd.org/faq/certificates.html)) so that the mail server (which will initially be on the same host) connects via TLS.

Of the four files that form the LE cert collection (cert.pem, chain.pem, fullchain.pem, privkey.pem), which correspond to “mail.example.com.key” and “mail.example.com.crt” in the OpenSMTPD example ([https://www.opensmtpd.org/faq/example1.html](https://www.opensmtpd.org/faq/example1.html))?

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [October 14, 2016, 7:35pm UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132/2 "2016-10-14T19:35:15Z")

</div>

The key file ( “mail.example.com.key” in the example) is privkey.pem

The certificate file ( “mail.example.com.crt” in the example ) is fullchain.pem

---

<div class="post-metadata">

**Author:** ![ahaw021](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/ahaw021/32/14882_2.png) [@ahaw021](https://community.letsencrypt.org/u/ahaw021)\
**Post date:** [October 16, 2016, 5:14am UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132/3 "2016-10-16T05:14:18Z")

</div>

Hi wizzarddue

To clear up a bit more. You want to combine the intermediate certificates and the actual certificate into one file.

Some programs let you specify an intermediate file. OpenSMTPD requires it to be in one file.

Usually I believe the certificate issued do have an intermediate certificate but it’s worthwhile checking.

KB: [https://github.com/OpenSMTPD/OpenSMTPD/issues/292](https://github.com/OpenSMTPD/OpenSMTPD/issues/292)  
Manual: [https://opensmtpd.org/faq/certificates.html](https://opensmtpd.org/faq/certificates.html)

Relevant section:

pki hostname certificate certfile

Associate the certificate located in certfile with  
hostname.  
_ **A certificate chain may be created by appending one or many certificates,** _  
_ **including a Certificate Authority certificate** _, to certfile.  
Creation of certificates is documented in  
starttls(8).

---

<div class="post-metadata">

**Author:** ![serverco](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/serverco/32/4251_2.png) [@serverco](https://community.letsencrypt.org/u/serverco)\
**Post date:** [October 16, 2016, 6:42am UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132/4 "2016-10-16T06:42:44Z")

</div>

The fullchain.pem suggested is a combination of the certificate and intermediate 😉

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [November 15, 2016, 6:47am UTC](https://community.letsencrypt.org/t/opensmtpd-and-lets-encrypt/21132/5 "2016-11-15T06:47:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
