1

Topic: Migrate LDAP backend to MySQL

==== Required information ====
- iRedMail version: 0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 13.04
- Related log if you're reporting an issue:
====

Hi Zhang,

I have a mail server running on 13.04 using iRedMail v0.8.5, with a LDAP backend and maildir folders.

I would like to upgrade to Ubuntu 13.10, but I understand that LDAP will not update as the versions are incompatible.

What are the steps I would need to follow to migrade my server to a MySQL backend, retaining the maildir structure?

thanks

Wayne

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Migrate LDAP backend to MySQL

You can try it on a testing machine:

1) Copy all mailboxes under /var/vmail/ to new server (with MySQL backend).
2) Sync value of below two LDAP attributes to MySQL "vmail.mailbox" table:

- LDAP: homeDirectory -> MySQL: storagebasedirectory, storagenode, maildir.
- LDAP: userPassword -> MySQL: password

Example:

# LDAP: homeDirectory
/var/vmail/vmail1/domain.com/p/o/s/postmaster-2014.02.06.04.40.28/

# MySQL
storagebasedirectory=/var/vmail
storagenode=vmail1
maildir=domain.com/p/o/s/postmaster-2014.02.06.04.40.28/

# LDAP: userPassword
{SSHA}xxxxxx

# MySQL: password. simply copy LDAP value
password={SSHA}xxxxxx

3

Re: Migrate LDAP backend to MySQL

Hi Zhang,

Finally got the time to implement it.  All worked beautifully.

Thanks

Wayne