Skip to content

Check of cert.pem in Let's Encrypt #843

@dolanor

Description

@dolanor

Configuring my letsencrypt for my container, I found this.
https://github.com/tomav/docker-mailserver/blob/b08c9b42ed2a211784499a3adbc46d4a80ad4b71/target/start-mailserver.sh#L731

As I was using letsencrypt certificates generated by my caddy, it stored it differently. It only had the fullchain and the key. No simple cert.pem.
Then I had to investigate how to make the container letsencrypt configuration work. And this line made me wonder why we check for cert.pem existence, since we don't use it afterwards: both postfix and dovecot use fullchain.pem.

For info, I made it work for my use case with caddy by volume mounting.

    volumes:
      - ${HOME}/.caddy/acme/acme-v01.api.letsencrypt.org/sites/mail.mydomain.org/mail.mydomain.org.crt:/etc/letsencrypt/live/mail.mydomain.org/fullchain.pem
      - ${HOME}/.caddy/acme/acme-v01.api.letsencrypt.org/sites/mail.mydomain.org/mail.mydomain.org.crt:/etc/letsencrypt/live/mail.mydomain.org/cert.pem
      - ${HOME}/.caddy/acme/acme-v01.api.letsencrypt.org/sites/mail.mydomain.org/mail.mydomain.org.key:/etc/letsencrypt/live/mail.mydomain.org/privkey.pem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions