Docker-mailserver: Update LetsEncrypt certificates

Created on 27 May 2020  路  5Comments  路  Source: tomav/docker-mailserver

Hello,

Just want to confirm that this is the correct procedure to update the LetsEncrypt certificates every ~3 months:

I have in my docker-compose file:

    volumes:
    - /opt/mailserver/letsencrypt:/etc/letsencrypt

I generate/renew the certificates on the host machine, then:

cp -R -L /etc/letsencrypt/live/mail.mydomain.com/* /opt/mailserver/letsencrypt/live/mail.mydomain.com/

docker exec mailserver openssl s_client -connect 0.0.0.0:25 -starttls smtp -CApath /etc/ssl/certs/
Verify return code: 0 (ok)

docker exec mailserver openssl s_client -connect 0.0.0.0:143 -starttls smtp -CApath /etc/ssl/certs/
Verify return code: 0 (ok)

Is this correct and enough? I don't need to restart any services or even the container?

Thank you very much :)

needs triage question

Most helpful comment

Postfix also uses the certificate, so this instance should also be reloaded:
docker exec -it mail postfix reload

All 5 comments

I think Dovecot must be reloaded (at least):

docker-compose exec mail bash -c '[[ "$SMTP_ONLY" -ne 1 ]] && dovecot reload'

Postfix also uses the certificate, so this instance should also be reloaded:
docker exec -it mail postfix reload

Thanks guys!

Postfix also uses the certificate, so this instance should also be reloaded:
docker exec -it mail postfix reload

According to my tests, postfix automatically reloads new certificate. Anyone to double check that ? In the meantime, reloading postfix would not hurt 馃槈

According to my tests, postfix automatically reloads new certificate. Anyone to double check that ? In the meantime, reloading postfix would not hurt 馃槈

Your assumption could be true. I am using SSL_TYPE=manual with dehydrated and Let's Encrypt.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

strarsis picture strarsis  路  5Comments

nekrondev picture nekrondev  路  3Comments

InsOpDe picture InsOpDe  路  4Comments

m-a-v picture m-a-v  路  4Comments

42wim picture 42wim  路  4Comments