Dovecot provides a master login (a master user name and password that can log into all user accounts).
I've setup Dovecot as per: http://wiki1.dovecot.org/Authentication/MasterUsers
Here's my problem.
The only way I can authenticate successfully is if I try to authenticate through telnet twice.
$ telnet mail01.server.com 143
Trying 10.10.10.10...
Connected to mail01.server.com.
Escape character is '^]'.
* OK Dovecot ready.
1 login [email protected]*master my_password
1 NO Authentication failed.
1 login [email protected]*master my_password
1 OK Logged in.
imapsync (the tool I need to use to migrate over emails from Dovecot to Zimbra) won't work.
$ imapsync --nosyncacls --syncinternaldates --host1 mail01.server.com --user1 [email protected]*master --authmech1 PLAIN --password1 my_password --host2 mail02.server.com --user2 [email protected] --authmech2 PLAIN --ssl2 --password2 user2_password
$RCSfile: imapsync,v $ $Revision: 1.286 $ $Date: 2009/07/24 15:53:04 $
Here is a [linux] system (Linux mylinuxbox 2.6.32-30-generic #59-Ubuntu SMP Tue Mar 1 21:30:21 UTC 2011 i686)
with perl 5.10.1
Mail::IMAPClient 3.21
IO::Socket 1.31
IO::Socket::SSL
Digest::MD5 2.39
Digest::HMAC_MD5
Term::ReadKey 2.30
Date::Manip
and the module Mail::IMAPClient version used here is 3.21
Command line used:
/usr/bin/imapsync --nosyncacls --syncinternaldates --host1 mail01.server.com --user1 user@server*master --authmech1 PLAIN --password1 MASKED --host2 mail02.server.com --user2 [email protected] --authmech2 PLAIN --ssl2 --password2 MASKED
Turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1.
TimeZone:[america/new_york]
Will try to use PLAIN authentication on host1
Will try to use PLAIN authentication on host2
From imap server [mail01.server.com] port [143] user [[email protected]*master]
To imap server [mail02.server.com] port [993] user [[email protected]]
Banner: * OK Dovecot ready.
Host mail01.server.com says it has CAPABILITY for AUTHENTICATE PLAIN
Error login: [mail01.server.com] with user [user@server*master] auth [PLAIN]: 2 NO Authentication failed.
Error login: [mail01.server.com] with user [user@server*master] auth [PLAIN]: 2 NO Authentication failed.
If I try without the master user it works. Please help.
The
imapsync --authuser1
option explained by Jazzy Pierre may solve your issue. Have a try.(I wrote
imapsync
).I've successfully used imapsync to migrate from dovecot to zimbra using a master password. I did change the master user separator from * to +, because the * causes the shell to process it as a wildcard.
Find this line in your dovecot.conf and change it to read:
Here's the command I typically use:
Hope that helps.
Have you looked at the mail migration page on Zimbra's wiki? There are scripts for importing directly from mbox or maildir mail stores into Zimbra. That strategy may be faster and simpler than using
imapsync
.If you do need to use
imapsync
, I second the comment about the Dovecot auth logs. Something is clearly going wrong with the master password authentication. What version of Dovecot are you using? Could you post the relevant parts of your Dovecot configuration?