Hello,
I have a problem using imapsync with the german hoster "hetzner" - the starttls sequence is not being started correctly. I have already tried several command line options without success. It seems the sequence is not being initiated correctly.
After "1 OK Begin TLS negotiation now" the Negotiation does NOT take place.
I tried also older versions of imapsync ans also the last one from the git repository without success.
If needed I can provide a mail-account on that server.
Here is my console log:
root@hetzner1:~/mailSync# ./sync_loop_unix.sh
Looping on account credentials found in file.txt
==== Syncing user [email protected] to user [email protected] ====
Transfer started at Thu Oct 29 18:18:59 2015
PID is 14789
Log file is LOG_imapsync/[email protected] ( to change it, use --logfile filepath ; or use --nolog to turn off logging )
$RCSfile: imapsync,v $ $Revision: 1.644 $ $Date: 2015/07/17 01:22:52 $
Here is a [linux] system (Linux someserver.internet.local 2.6.32-504.8.1.el6.x86_64 #1 SMP Wed Jan 28 21:11:36 UTC 2015 x86_64)
With perl 5.10.1 Mail::IMAPClient 3.34
Command line used:
./imapsync --host1 mail.ims-firmen.de --user1 [email protected] --password1 MASKED --host2 mail.your-server.de --user2 [email protected] --password2 MASKED --tls2 --port2 143 --debugimap2 --usecache --useuid --tmpdir ./cache
Temp directory is ./cache ( to change it use --tmpdir dirpath )
PID file is ./cache/imapsync.pid ( to change it use --pidfile filepath ; to avoid it use --pidfile "" )
Modules version list:
Mail::IMAPClient 3.34
IO::Socket 1.31
IO::Socket::IP ?
IO::Socket::INET 1.31
IO::Socket::SSL 1.31
Net::SSLeay 1.35
Compress::Zlib 2.021
Digest::MD5 2.39
Digest::HMAC_MD5 1.01
Digest::HMAC_SHA1 1.01
Term::ReadKey 2.30
File::Spec 3.3
Time::HiRes 1.9721
Unicode::String 2.09
IO::Tee 0.64
File::Copy::Recursive 0.38
Authen::NTLM ?
URI::Escape 3.29
Data::Uniqid ?
JSON::WebToken ?
( use --no-modules_version to turn off printing this Perl modules list )
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 LOGIN authentication on host2
Info: imap connexions timeout is 120 seconds
Host1: IMAP server [mail.ims-firmen.de] port [143] user [[email protected]]
Host2: IMAP server [mail.your-server.de] port [143] user [[email protected]]
Host1: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.
Host1: mail.ims-firmen.de says it has CAPABILITY for AUTHENTICATE LOGIN
Host1: success login on [mail.ims-firmen.de] with user [[email protected]] auth [LOGIN]
Host2 connection
Connecting with IO::Socket::INET PeerAddr mail.your-server.de PeerPort 143 Proto tcp Timeout 120 Debug 1
Connected to mail.your-server.de
Read: * OK [CAPABILITY IMAP4 IMAP4rev1 STARTTLS UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] perdition ready on sslproxy01.your-server.de 0002f017
Host2: * OK [CAPABILITY IMAP4 IMAP4rev1 STARTTLS UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] perdition ready on sslproxy01.your-server.de 0002f017
Sending: 1 STARTTLS
Sent 12 bytes
Read: 1 OK Begin TLS negotiation now
Sending: 2 CAPABILITY
Sent 14 bytes
Read: * CAPABILITY IMAP4 IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION
Read: 2 OK CAPABILITY
Host2: mail.your-server.de says it has NO CAPABILITY for AUTHENTICATE LOGIN
Sending literal: 3 LOGIN [email protected] {13}
then: itsmypassword
Sending: 3 LOGIN [email protected] {13}
Sent 44 bytes
Read: + OK ready for additional input
Sending: itsmypassword
Sent 14 bytes
Read: 3 NO failed: Re-Authentication Failure
ERROR: 3 NO failed: Re-Authentication Failure at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1364
Mail::IMAPClient::ANON('3 NO failed: Re-Authentication Failure\x{d}\x{a}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1400
Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x121c230)', 3, undef) called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1326
Mail::IMAPClient::_imap_command_do('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN [email protected] {13}\x{d}\x{a}itsmypassword\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1225
Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN [email protected] {13}\x{d}\x{a}itsmypassword\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 576
Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x121c230)') called at ./imapsync line 2269
main::authenticate_imap('Mail::IMAPClient=HASH(0x121c230)', 'mail.your-server.de', 143, '[email protected]', undef, 'itsmypassword\x{d}', 1, 120, 0, ...) called at ./imapsync line 2236
main::login_imap('mail.your-server.de', 143, '[email protected]', undef, 'itsmypassword\x{d}', 1, 120, 0, undef, ...) called at ./imapsync line 1017
ERROR: 3 NO failed: Re-Authentication Failure at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1274
Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN [email protected] {13}\x{d}\x{a}itsmypassword\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 576
Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x121c230)') called at ./imapsync line 2269
main::authenticate_imap('Mail::IMAPClient=HASH(0x121c230)', 'mail.your-server.de', 143, '[email protected]', undef, 'itsmypassword\x{d}', 1, 120, 0, ...) called at ./imapsync line 2236
main::login_imap('mail.your-server.de', 143, '[email protected]', undef, 'itsmypassword\x{d}', 1, 120, 0, undef, ...) called at ./imapsync line 1017
Failure: error login on [mail.your-server.de] with user [[email protected]] auth [LOGIN]: 3 NO failed: Re-Authentication Failure
==== End syncing user [email protected] to user [email protected] ====
Thanks,
Sebastian