1 (edited by dorpha 2016-05-20 09:23:00)

Topic: LDAP Migration Issue

======================== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 14.04 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Pro
- Related log if you're reporting an issue:
====

We are migrating the current 0.9.1 iredmail server to the latest 0.9.5-1:

  1. Built a brand-new server with the clean 0.9.5-1 iredmail installed.

  2. Installed iRedAdmin-Pro.

  3. The default postmaster account could now login to the iredadmin backend (admin working) and SOGo web interface (SOGo working) properly.

  4. Migrated the LDAP accounts:
       

    1. reference: this

    2. used vmail and vmailadmin passwords from the new 0.9.5-1, and overwrote them in the backup .ldif.bz2 file generated by the ired daily backup script.

    3. stoped the slapd server

    4. since the default db is MDB not BDB as the doc described, DB_CONFIG/ is now in ldap/ not in ldap/example.com
             

      1. we removed everything in the /var/lib/ldap/ except /var/lib/ldap/DB_CONFIG/ and /var/lib/ldap/example.com folders.

      2. there were two mdb files in /var/lib/ldap/example.com, we removed them as well.

      3. started and stoped slapd service once.

    5. imported this modified .ldif file into the new 0.9.5-1 system using slapadd. the system responsed _#################### 100.00% eta   none elapsed            none fast!.

    6. started the slapd service.

  5. copied over the vmail folder, also confirmed owner/group permissions were correct.

At this point the admin users can logged into the iRedAdmin-Pro properly, but both the admins and the ordinary users can't login into the SOGo web interface.

Any clues where we should check into?

----

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

2

Re: LDAP Migration Issue

Seems my document misses one important part:

If you're restoring from an old iRedMail release, you need to run update scripts below to add missing LDAP attribute/values:
https://bitbucket.org/zhb/iredmail/src/ … ra/update/

For example:

*) your old iRedMail release is 0.9.1, you need all update scripts for iRedMail-0.9.1. in this case, only file "updateLDAPValues_094_to_095.py" is required.

*) IF your old iRedMail release is iRedMail-0.8.6, you need 3 files:

- updateLDAPValues_086_to_087.py
- updateLDAPValues_087_to_090.py
- updateLDAPValues_094_to_095.py

In your case, iRedMail-0.9.5 changed the LDAP filter used to query mail accounts in SOGo, it requires "enabledService=sogo" now, but your old mail users don't have this. Run updateLDAPValues_094_to_095.py will add it for all users, then they can login to SOGo.

3

Re: LDAP Migration Issue

UPDATE:

Add new sub-section "After LDAP restore", it mentions the update scripts:
http://www.iredmail.org/docs/backup.res … ap-restore

4

Re: LDAP Migration Issue

That's the right answer! many thanks.