I've deployed many Google Apps accounts and have used imapsync a number of times to migrate accounts to Google Apps.
This time however, no matter what I try imapsync refuses to work claiming my credentials are incorrect - I've checked them time and time again and they are 100% correct.
On Ubuntu 12, built from source, my command is:
imapsync --host1 myserver.com --user1
[email protected] --password1 mypassword1 -ssl1 --host2 imap.gmail.com --user2
[email protected] --password2 mypassword2 -ssl2 -authmech2 PLAIN
Full output from the command:
get options: [1]
PID is 21316
$RCSfile: imapsync,v $ $Revision: 1.592 $ $Date:
With perl 5.14.2 Mail::IMAPClient 3.35
Command line used:
/usr/bin/imapsync --debug --host1 myserver.com --user1
[email protected] --password1 mypassword1 -ssl1 --host2 imap.gmail.com --user2
[email protected] --password2 mypassword2 -ssl2 -authmech2 PLAIN
Temp directory is /tmp
PID file is /tmp/imapsync.pid
Modules version list:
Mail::IMAPClient 3.35
IO::Socket 1.32
IO::Socket::IP ?
IO::Socket::INET 1.31
IO::Socket::SSL 1.53
Net::SSLeay 1.42
Digest::MD5 2.51
Digest::HMAC_MD5 1.01
Digest::HMAC_SHA1 1.03
Term::ReadKey 2.30
Authen::NTLM 1.09
File::Spec 3.33
Time::HiRes 1.972101
URI::Escape 3.31
Data::Uniqid 0.12
IMAPClient 3.35
Info: turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1.
Info: will try to use LOGIN authentication on host1
Info: will try to use PLAIN authentication on host2
Info: imap connexions timeout is 120 seconds
Host1: IMAP server [SERVER1] port [993] user [USER1]
Host2: IMAP server [imap.gmail.com] port [993] user [USER2]
Host1: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
Host1: SERVER1 says it has
CAPABILITY for AUTHENTICATE LOGIN
Host1: success login on [SERVER1] with user [USER1] auth [LOGIN]
Host2: * OK Gimap ready for requests from MY-VPS
Host2: imap.gmail.com says it has
CAPABILITY for AUTHENTICATE PLAIN
Failure: error login on [imap.gmail.com] with user [USER2] auth [PLAIN]: 2 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)
I have tried -authmech2 LOGIN as well which returns:
Host2: imap.gmail.com says it has NO
CAPABILITY for AUTHENTICATE LOGIN
Failure: error login on [imap.gmail.com] with user [
[email protected]] auth [LOGIN]: 2 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)
If anyone can shed some light on this I would greatly appreciate it.