I had many problems getting the courier server running with LE certificates. After a while i found the problem:
The .pem files from LE are merged into "combined.pem" and when there is no newline at the end of the LE files this happens:
-----END CERTIFICATE----------BEGIN CERTIFICATE-----
Which causes the imap server to fail.
Changing Line 129 in start-mailserver.sh to:
( cat "/etc/letsencrypt/live/$(hostname)/cert.pem"; echo""; cat "/etc/letsencrypt/live/$(hostname)/chain.pem"; echo ""; cat "/etc/letsencrypt/live/$(hostname)/privkey.pem"; echo ) > "/etc/letsencrypt/live/$(hostname)/combined.pem"
solves the problem
I had many problems getting the courier server running with LE certificates. After a while i found the problem:
The .pem files from LE are merged into "combined.pem" and when there is no newline at the end of the LE files this happens:
-----END CERTIFICATE----------BEGIN CERTIFICATE-----Which causes the imap server to fail.
Changing Line 129 in start-mailserver.sh to:
( cat "/etc/letsencrypt/live/$(hostname)/cert.pem"; echo""; cat "/etc/letsencrypt/live/$(hostname)/chain.pem"; echo ""; cat "/etc/letsencrypt/live/$(hostname)/privkey.pem"; echo ) > "/etc/letsencrypt/live/$(hostname)/combined.pem"solves the problem