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
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.pemexistence, since we don't use it afterwards: both postfix and dovecot usefullchain.pem.For info, I made it work for my use case with caddy by volume mounting.