Topic: Lets Encrypt with slapd
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 OPENLDAP edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Linux Ubuntu / 5.8.0-43-generic
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Thanks for putting this out there for everyone to use.. This is working pretty great. I have minimal issues right now.
1: I got SSL certs from Lets Encrypt and everything is fine except for LDAP. If I enable TLS for LDAP, it will not start.
I created sym links for the Lets Encrypt certs and everything correct in that regard. The admin page is no longer showing the unsafe error, etc...
If I enable this in /etc/ldap/slapd.conf:
TLSCACertificateFile /etc/ssl/certs/iRedMail.crt
TLSCertificateFile /etc/ssl/certs/iRedMail.crt
TLSCertificateKeyFile /etc/ssl/private/iRedMail.key
I get this error when restarting ldap:
vic@mail:~$ sudo systemctl restart slapd
Job for slapd.service failed because the control process exited with error code.
See "systemctl status slapd.service" and "journalctl -xe" for details.
Feb 15 21:04:52 mail sudo[79793]: vic : TTY=pts/2 ; PWD=/home/vic ; USER=root ; COMMAND=/usr/bin/systemctl restart slapd
Feb 15 21:04:52 mail sudo[79793]: pam_unix(sudo:session): session opened for user root by vic(uid=0)
Feb 15 21:04:52 mail systemd[1]: Starting LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol)...
Feb 15 21:04:52 mail slapd[79796]: * Starting OpenLDAP slapd
Feb 15 21:04:52 mail slapd[79801]: @(#) $OpenLDAP: slapd 2.4.53+dfsg-1ubuntu1.3 (Feb 2 2021 15:37:52) $
Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Feb 15 21:04:52 mail slapd[79801]: DIGEST-MD5 common mech free
Feb 15 21:04:52 mail slapd[79801]: DIGEST-MD5 common mech free
Feb 15 21:04:52 mail slapd[79796]: ...fail!
Feb 15 21:04:52 mail systemd[1]: slapd.service: Control process exited, code=exited, status=1/FAILURE
Feb 15 21:04:52 mail systemd[1]: slapd.service: Failed with result 'exit-code'.
Feb 15 21:04:52 mail systemd[1]: Failed to start LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol).
Feb 15 21:04:52 mail sudo[79793]: pam_unix(sudo:session): session closed for user root
Feb 15 21:05:01 mail CRON[79804]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 15 21:05:01 mail CRON[79805]: (root) CMD (/bin/bash /usr/local/bin/fail2ban_banned_db unban_db)
Feb 15 21:05:01 mail CRON[79804]: pam_unix(cron:session): session closed for user root
---
Sym links are there.
root@mail:/etc/ssl/certs# ll | grep iRed
lrwxrwxrwx 1 root root 59 Feb 15 20:04 iRedMail.crt -> /etc/letsencrypt/live/mail.domain.net/fullchain.pem
-rw-r--r-- 1 root root 2236 Feb 14 04:08 iRedMail.crt.bak
root@mail:/etc/ssl/private# ll | grep iRed
lrwxrwxrwx 1 root root 57 Feb 15 20:04 iRedMail.key -> /etc/letsencrypt/live/mail.domain.net/privkey.pem
----
Just tested this.. This does work for some reason:
TLSCACertificateFile /etc/ssl/certs/iRedMail.crt.bak
TLSCertificateFile /etc/ssl/certs/iRedMail.crt.bak
TLSCertificateKeyFile /etc/ssl/private/iRedMail.key.bak
TIA
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.