Imapsync – 没有能力进行authenticationlogin

我已经在cPanel服务器上部署了我自己的域名,并使用imapsync将我的谷歌应用邮件备份到本地域名邮件。 但是我正面临着错误。 我打开了“访问不太安全的应用程序”,并从Gmail设置启用了IMAP:

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

命令行输出:

 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 

通常会打印出“无法进行authenticationlogin”的警告,因为所有的imap服务器都具有使用LOGIN命令进行authentication的function,所以它们没有任何相关性,只是因为它是一个强制的imapauthentication方法而没有公布它。 所以“Host1失败:错误login”是别的,也许仔细检查凭据,用户名和密码。 另请阅读Gmail常见问题