Topic: Can't get slapd to start when TLS is enabled
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Ubuntu 20.04 & Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Not
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
Feb 8 18:47:23 ml slapd[5390]: @(#) $OpenLDAP: slapd (Jan 22 2021 03:54:40) $#012#011Debian OpenLDAP Maintainers <pkg-openldap-devel@lists.alioth.debian.org>
Feb 8 18:47:23 ml slapd[5390]: main: TLS init def ctx failed: -1
Feb 8 18:47:24 ml slapd[5390]: slapd stopped.
Feb 8 18:47:24 ml slapd[5390]: connections_destroy: nothing to destroy.
====
When I uncomment TLSCACertificateFile..., TLSCertificateFile..., TLSCertificateKeyFile... in /etc/ldap/slapd.conf, slapd will not start. SSL certificate is Lestencrypt, and it works fine for Nginx (iredadmin, sogo, etc.) after following the instructions in the documentation.
I've tried changing the paths in /etc/ldap/slapd.conf directly to /etc/letsencrypt/... and even to custom directories to where I copied the certificates. I tried changing ownership to openldap:openldap on all directories and subdirectories and cert files. I've even tried setting permissions to 777 (the server is not in production, obviously). It doesn't seem to be a permissions issue.
I tried setting slapd apparmor profile to 'complain', editing the profile manually, disabling apparmor, and even removing apparmor entirely. Apparmor doesn't seem to be causing the problem.
I have done all this first on a fresh install of Ubuntu 20.04 on a digitalocean droplet, and then on a fresh Debian 10 on another droplet. Same issue on both.
Any ideas what is going on? I can't figure it out.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.