Linux – Imapsync authentication login error

g-suiteimapsynclinux

I have deployed my own domain over cPanel server and have used imapsync to backup my google app email to my local domain email. But i'm facing below error.
I've switched on "Access for less secure apps" and enabled imap from gmail settings:

/usr/bin/imapsync --host1 imap.gmail.com --user1 EMAILID1 --ssl1 --port1 993 --password1 MASKED --syncinternaldates --host2 mail.mydomainname --user2 EMAILID2 --password2 MASKED

Command line Output:

Temp directory is /tmp  ( to change it use --tmpdir dirpath )
PID file is /tmp/imapsync.pid ( to change it use --pidfile filepath ; to avoid it use --pidfile "" )
Wrinting my PID 31248 in /tmp/imapsync.pid
Modules version list:
Mail::IMAPClient     3.38
IO::Socket           1.38
IO::Socket::INET     1.35
IO::Socket::INET6    2.72
IO::Socket::SSL      2.024
Net::SSLeay          1.72
Compress::Zlib       2.068
Digest::MD5          2.54
Digest::HMAC_MD5     1.01
Digest::HMAC_SHA1    1.03
Term::ReadKey        2.33
File::Spec           3.56
Time::HiRes          1.9726
Unicode::String      2.10
IO::Tee              0.64
File::Copy::Recursive 0.38
Authen::NTLM         1.09
URI::Escape          3.31
Data::Uniqid         0.12
JSON                 2.90
JSON::WebToken       0.10
Crypt::OpenSSL::RSA  ?
LWP                  6.15
HTML::Entities       3.69
Getopt::Long         2.45
Test::MockObject     1.20161202
( use --no-modulesversion to turn off printing this Perl modules list )
SSL debug mode level is --debugssl 1 (can be set from 0 meaning no debug to 4 meaning max debug)
Host1: SSL default mode is like --sslargs1 SSL_verify_mode=0 meaning SSL_VERIFY_NONE on host1 (do not check the certificate server)
Host1: Use --sslargs1 SSL_verify_mode=1 for SSL_VERIFY_PEER on host1
Info: turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1.
Host1: will try to use LOGIN authentication on host1
Host2: will try to use LOGIN authentication on host2
Host1: imap connexion timeout is 120 seconds
Host2: imap connexion timeout is 120 seconds
Host1: IMAP server [imap.gmail.com] port [993] user [EMAILID1]
Host2: IMAP server [mail.mydomainname] port [143] user [EMAILID2]
Host1: connecting and login on host1 [imap.gmail.com] port [993] with user [EMAILID1]
Host1 banner: * OK Gimap ready for requests from MYWANIP j22mb61820836wrb
Host1: imap.gmail.com says it has NO CAPABILITY for AUTHENTICATE LOGIN
Host1 failure: Error login on [imap.gmail.com] with user [EMAILID1] auth [LOGIN]: * BYE System Error j22mb61820836wrb; * BYE System Error w191mb503225056wmw; * BYE System Error f194mb800234777wmg; * BYE System Error tt3mb112923762wjc; * BYE System Error 3mb869986783wrx

Best Answer

The warning "NO CAPABILITY for AUTHENTICATE LOGIN" is often printed and it means nothing relevant since all imap servers have the capability to authenticate with a LOGIN command, they just don't announce it because it is a mandatory imap authentication method. So the "Host1 failure: Error login" is something else, maybe double-check credentials, user and password. Read also Gmail FAQ

Related Topic