1

Topic: LDAP to MySQL passwords

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP to MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

How can I format this hash in LDAP for migration to MySQL:

userPassword:: e1NTSEF9UlNzU3dxYzFkaG5aaGI3M2pKYllQdzdrTjVhNXV6Z3dYcjVhenc9P
 Q==

What about new line and blank space in hash?

How can I find what scheme is password?

I would like to do it with a MySQL INSERT:

 INSERT INTO mailbox (username, password, name,
                     storagebasedirectory,storagenode, maildir,
                     quota, domain, active, passwordlastchange, created)
             VALUES ('testtesttest@bla.ba', '{SSHA512}eVTT6zz/6pKIv2fXYoH1S50u8TkfKmJuFz0KuAjdKQJGvDJu4cxX7lnfA6+dx5NHLDYhEPOx9WuLX0RRvfURkkjDxFQ=', 'testtesttest',
                     '/var/vmail','vmail1', 'bla.ba/t/e/s/testtesttest-2022.07.10.19.14.21/',
                     '1024', 'bla.ba', '1', NOW(), NOW());
INSERT INTO forwardings (address, forwarding, domain, dest_domain, is_forwarding)
                 VALUES ('testtesttest@bla.ba', 'testtesttest@bla.ba','bla.ba', 'bla.ba', 1);

Thank you!
Ante

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.

2

Re: LDAP to MySQL passwords

e1NTSEF9UlNzU3dxYzFkaG5aaGI3M2pKYllQdzdrTjVhNXV6Z3dYcjVhenc9PQ==

This is just base64 encoded:

{SSHA}RSsSwqc1dhnZhb73jJbYPw7kN5a5uzgwXr5azw==

SSHA (4 char salted sha1) is fully supported by postfix

So, you only need to base64decode the password hash from ldap and then you are almost done!

3

Re: LDAP to MySQL passwords

Thank you Cthulhu!