[GH-ISSUE #2686] Ubuntu 22.04.1 Can't load SSL certificate #1679

Closed
opened 2026-02-27 11:18:31 +03:00 by kerem · 1 comment
Owner

Originally created by @kafkiano on GitHub (Nov 10, 2022).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/2686

Impacted versions

  • OS Type: Debian
  • OS Version: Ubuntu 22.04.1
  • Database Type: PostgreSQL
  • Database version: postgres (PostgreSQL) 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1)
  • Modoboa: 2.0.3
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Install fresh ubuntu 22.04.01

git clone https://github.com/modoboa/modoboa-installer
cd modoboa-installer
sudo ./run.py --stop-after-configfile-check example.com
sudo nano installer.cfg
----
[certificate]
generate = true
type = letsencrypt
----
sudo hostnamectl set-hostname mail.example.com
sudo ./run.py --interactive example.com

Current behavior

You are not able to login with imap and ssl you get the following error:

dovecot: imap-login: Error: Failed to initialize SSL server context: Can't load SSL certificate (ssl_cert setting): The certificate is empty: user=<>, rip=XXX, lip=XXX, session=<XXX>

Expected behavior

You should be able to use ssl on port 993 to login with email accounts. This problem is produced by this workaround related to issue #2570

If you remove this workaround and modify /etc/dovecot/conf.d/10-ssl.conf like this:

#!include_try = /etc/dovecot/conf.d/10-ssl-keys.try
ssl_cert = </etc/letsencrypt/live/mail.thurm.de/fullchain.pem
ssl_key = </etc/letsencrypt/live/mail.thurm.de/privkey.pem

You can login without problems but you have again the bugs described in #2570

Originally created by @kafkiano on GitHub (Nov 10, 2022). Original GitHub issue: https://github.com/modoboa/modoboa/issues/2686 # Impacted versions * OS Type: Debian * OS Version: Ubuntu 22.04.1 * Database Type: PostgreSQL * Database version: postgres (PostgreSQL) 14.5 (Ubuntu 14.5-0ubuntu0.22.04.1) * Modoboa: 2.0.3 * installer used: Yes * Webserver: Nginx # Steps to reproduce Install fresh ubuntu 22.04.01 ``` git clone https://github.com/modoboa/modoboa-installer cd modoboa-installer sudo ./run.py --stop-after-configfile-check example.com sudo nano installer.cfg ---- [certificate] generate = true type = letsencrypt ---- sudo hostnamectl set-hostname mail.example.com sudo ./run.py --interactive example.com ```` # Current behavior You are not able to login with imap and ssl you get the following error: ``` dovecot: imap-login: Error: Failed to initialize SSL server context: Can't load SSL certificate (ssl_cert setting): The certificate is empty: user=<>, rip=XXX, lip=XXX, session=<XXX> ``` # Expected behavior You should be able to use ssl on port 993 to login with email accounts. This problem is produced by this [workaround](https://github.com/modoboa/modoboa/issues/2570 ) related to issue #2570 If you remove this workaround and modify `/etc/dovecot/conf.d/10-ssl.conf` like this: ``` #!include_try = /etc/dovecot/conf.d/10-ssl-keys.try ssl_cert = </etc/letsencrypt/live/mail.thurm.de/fullchain.pem ssl_key = </etc/letsencrypt/live/mail.thurm.de/privkey.pem ``` You can login without problems but you have again the bugs described in #2570
kerem closed this issue 2026-02-27 11:18:31 +03:00
Author
Owner

@kafkiano commented on GitHub (Nov 10, 2022):

As mentioned here https://github.com/modoboa/modoboa-installer/pull/458 the installer had an issue:

you need to change !include_try = /etc/dovecot/conf.d/10-ssl-keys.try to !include_try /etc/dovecot/conf.d/10-ssl-keys.try

<!-- gh-comment-id:1310334313 --> @kafkiano commented on GitHub (Nov 10, 2022): As mentioned here [https://github.com/modoboa/modoboa-installer/pull/458](https://github.com/modoboa/modoboa-installer/pull/458) the installer had an issue: you need to change `!include_try = /etc/dovecot/conf.d/10-ssl-keys.try` to `!include_try /etc/dovecot/conf.d/10-ssl-keys.try`
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1679
No description provided.