1

Topic: Migrating from Zimbra to iRedmail issues

- iRedMail version: 1.2.1
- Deployed with iRedMail downloadable installer
- Ubuntu 18.04
- Store mail accounts in which backend: LDAP
- Web server: Nginx
- Manage mail accounts with iRedAdmin-Pro?  No

I'm trying to migrate from Zimbra (opensource 8.8.8GA) using imapsync.  Trying to use an admin account, so I don't need to hassle with passwords for each user.  Command I'm using:

imapsync --host1 my.zimbra.server --host2 my.iredmail.server --user1 'user1@my.domain' --authuser1 'adminaccount@my.domain' --password1 'supersecretpassword' --user2 'mytestaccount@my.domain' --authuser2 'adminaccount@my.domain' --password2 'supersecretpassword' --ssl1 --ssl2 --authmech1 PLAIN --authmech2 PLAIN


This properly logs into the zimbra server, but fails when trying it to Redmail - even though it says it supports "PLAIN"

Host1: success login on [my.zimbra.server] with user [user1@my.domain] auth [PLAIN]
Host2: connecting and login on host2 [my.iredmail.server] port [993] with user [mytestaccount@my.domain]
Host2 IP address: 123.123.123.12
Host2 banner: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
Host2 capability before authentication: IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN AUTH
Host2: my.iredmail.server says it has CAPABILITY for AUTHENTICATE PLAIN
Host2 info: authmech [PLAIN] user [mytestaccount@my.domain] authuser [adminaccount@my.domain] IsUnconnected []
Host2 failure: Error login on [my.iredmail.server] with user [mytestaccount@my.domain] auth [PLAIN]: 2 NO [AUTHENTICATIONFAILED] Authentication failed.
Exiting with return value 16 (EXIT_AUTHENTICATION_FAILURE) 1/50 nb_errors/max_errors
Disconnecting from host1 my.zimbra.server user1 user1@my.domain


Any help appreciated....

----

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

2

Re: Migrating from Zimbra to iRedmail issues

Use TLS please.

3

Re: Migrating from Zimbra to iRedmail issues

ZhangHuangbin wrote:

Use TLS please.

--tls2 fails in the same way.  It looks like the iRedmail server is ignorin the --authuser2 directive .... if I remove that and just use the user/pass for the mailbox, it works.   So, I guess I can't just sync every user's mailbox from zimbra to redmail without specifying the user/pass on the redmail side....

4

Re: Migrating from Zimbra to iRedmail issues

Use LOGIN as auth method.

imapsync works fine with iRedMail + Dovecot Master User, i had a lot success experience.

5 (edited by CVNBIN 2021-11-01 16:00:44)

Re: Migrating from Zimbra to iRedmail issues

I am migrating iRedmail 0.9.9(Centos server 7.6) to 1.4.2(Ubuntu server 20.04.3)
I also got the following error:
     Host2: 10.1.0.195 says it has CAPABILITY for AUTHENTICATE LOGIN
     Host2 info: authmech [LOGIN] user [ap@subdomain.domain.vn*postmaster@domain.vn] authuser [] IsUnconnected [1]
     Host2 failure: Error login on [10.1.0.195] with user [ap@subdomain.domain.vn*postmaster@domain.vn] auth [LOGIN]: socket closed while reading data from server (5x)
     Host2: failed login on [10.1.0.195] with user [ap@subdomain.domain.vn*postmaster@domain.vn] auth [LOGIN]
     ++++ Listing 1 errors encountered during the sync ( avoid this listing with --noerrorsdump ).
     Err 1/1: Host2 failure: Error login on [10.1.0.195] with user [ap@subdomain.domain.vn*postmaster@domain.vn] auth [LOGIN]: socket closed while reading data from server (5x)
     The most frequent error is ERR_AUTHENTICATION_FAILURE_USER2.
     Exiting with return value 162 (EXIT_AUTHENTICATION_FAILURE_USER2) 1/50 nb_errors/max_errors PID 17402
     Removing pidfile /tmp/imapsync.pid

Imapsync code:       parallel --max-procs 7 --delay 2 --arg-file /home/migration/test.txt --line-buffer --tagstring "user {1} :"  /root/imapsync  --host1 10.1.0.95 --user1 {1}*postmaster@domain.vn --password1 password1 --tls1 --host2 10.1.0.195  --user2 {1}*postmaster@domain.vn --password2  password2 --tls2 --delete2 --delete2folders

This code executes successfully when I migrate between 2 servers Ubuntu 20.04.3 and same version of iRedmail 1.4.2

6

Re: Migrating from Zimbra to iRedmail issues

CVNBIN wrote:

     Err 1/1: Host2 failure: Error login on [10.1.0.195] with user [ap@subdomain.domain.vn*postmaster@domain.vn] auth [LOGIN]: socket closed while reading data from server (5x)

Any related error in Dovecot log file?

7 (edited by CVNBIN 2021-11-02 15:09:49)

Re: Migrating from Zimbra to iRedmail issues

Hi
I checked at /var/log/dovecot/dovecot.log (Backup server):

Nov  2 13:31:00 mail dovecot[1879]: auth: Error: ldap(ap@subdomain.domain.vn,10.1.0.221,<gt7Ub8jPwMQKAQDd>): user not found from userdb

IP of main server: 10.1.0.95
IP of backup server: 10.1.0.223
IP of ImapSync server: 10.1.0.221

8

Re: Migrating from Zimbra to iRedmail issues

The problem has been resolved.
Error "user not found from userdb". When I migrated LDAP from iRedmail 0.9.9 to 1.4.2. Some accounts did not have the LDAP properties updated. By running two scripts: updateLDAPValues_099_to_1.py and update-ldap-dovecot-2.3.py.
Thanks for the help Mr. ZhangHuangbin