Topic: [SOLVED] STARTTLS not working for iRedAPD
==== 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, self-hosted
- Linux/BSD distribution name and version: CentOS Linux release 8.3.2011
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Not yet on this testing server
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I'm running a separate OpenLDAP server, to which iRedMail connects for authentication. Generally, everything is working smoothly. Recently however I got around to setting up STARTTLS; and even more recently, to requiring it. I think both iRedAdmin & iRedAPD are supposed to be ok with that (I see in the source that they try STARTTLS).
Watching the debug output for iRedAPD, I see that the modules seem to load & run properly, except for one: ldap_force_change_password. When an email is sent, I see this:
Feb 10 15:40:04 irm-ldap journal[5797]: iredapd [+] Getting LDIF data of account: user@server-z.net
Feb 10 15:40:04 irm-ldap journal[5797]: iredapd search base dn: o=domains,dc=server-y,dc=net#012search scope: SUBTREE #012search filter: (&(!(domainStatus=disabled))(|(mail=user@server-z.net)(shadowAddress=user@server-z.net))(|(objectClass=mailUser)(objectClass=mailList)(objectClass=mailAlias)))#012search attributes: ['objectClass', 'shadowLastChange']
Feb 10 15:40:04 irm-ldap journal[5797]: iredapd <!> ERROR: CONFIDENTIALITY_REQUIRED({'desc': 'Confidentiality required', 'info': 'TLS confidentiality required'},)
Feb 10 15:40:04 irm-ldap journal[5797]: iredapd --> Apply plugin: ldap_force_change_password
Feb 10 15:40:04 irm-ldap journal[5797]: iredapd <-- Result: DUNNO Not a local user (no sender ldif)
...and the email is (of course) sent successfully, because iRedAPD couldn't bind to the server, and therefore couldn't read "shadowLastChange" attribute. In this case, it should have been blocked, because "shadowLastChange" is set to 50 years ago (and "CHANGE_PASSWORD_DAYS = 3652")!
The problem appears to be in the "CONFIDENTIALITY REQUIRED" line, which normally happens when STARTTLS is not requested (e.g., not using -Z option with 'ldapsearch', etc.), and seems to indicate that iRedAPD is not requesting STARTTLS. Am i missing something? I'm happy for suggestions! :-)
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.