Topic: Case sensitive domain name in LDAP
==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP / 389-ds
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====
Hello,
I'm testing to get iRedMail working with 389-ds. During that process I came across a strange problem of not being able to create users. So I switched backed to the normal LDAP and tried it there, also without luck. After digging through the logfiles (which didn't give any clues, everything seems normal) I started digging through the source of iRedAdmin and found out that the domainname is lowered after the form is submitted. But I have a domainname which have some uppercase letters. Comparing the two domainnames resulted in a false return.
I've created a testserver with the domain myDOmain.com . Creating a new user the domainname is showed correctly in the webform. After submitting the form iRedAmin lowercases the domain into mydomain.com. Comparing myDOmain.com and mydomain.com results in a False, so the user isn't created and an error is returned
The code causing this is located in /var/www/iredadmin/libs/ldaplib/connUtils.py rule 156 . For now I added an extra function which lowers the domains and return them. Then the comparison is made.
I don't know if this problem also exists in MySQL or PSQL. Or maybe this is not a problem at all, but then please change the install-script to lower the domainname also.
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.