{"action":"created","issue":{"url":"https://api.github.com/repos/imapsync/imapsync/issues/42","labels_url":"https://api.github.com/repos/imapsync/imapsync/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/imapsync/imapsync/issues/42/comments","events_url":"https://api.github.com/repos/imapsync/imapsync/issues/42/events","html_url":"https://github.com/imapsync/imapsync/issues/42","id":114103359,"number":42,"title":"starttls does not work as expected","user":{"login":"slemke76","id":6418880,"avatar_url":"https://avatars.githubusercontent.com/u/6418880?v=3","gravatar_id":"","url":"https://api.github.com/users/slemke76","html_url":"https://github.com/slemke76","followers_url":"https://api.github.com/users/slemke76/followers","following_url":"https://api.github.com/users/slemke76/following{/other_user}","gists_url":"https://api.github.com/users/slemke76/gists{/gist_id}","starred_url":"https://api.github.com/users/slemke76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slemke76/subscriptions","organizations_url":"https://api.github.com/users/slemke76/orgs","repos_url":"https://api.github.com/users/slemke76/repos","events_url":"https://api.github.com/users/slemke76/events{/privacy}","received_events_url":"https://api.github.com/users/slemke76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-29T17:27:36Z","updated_at":"2015-10-29T17:59:19Z","closed_at":null,"body":"Hello,\r\n\r\nI 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. \r\nAfter \"1 OK Begin TLS negotiation now\" the Negotiation does NOT take place.\r\nI tried also older versions of imapsync ans also the last one from the git repository without success.\r\n\r\nIf needed I can provide a mail-account on that server.\r\n\r\nHere is my console log:\r\nroot@hetzner1:~/mailSync# ./sync_loop_unix.sh\r\nLooping on account credentials found in file.txt\r\n\r\n==== Syncing user sourcebox@ims-firmen.de to user targetbox@mail.your-server.de ====\r\nTransfer started at Thu Oct 29 18:18:59 2015\r\nPID is 14789\r\nLog file is LOG_imapsync/2015_10_29_18_18_59_targetbox@mail.your-server.de.txt  ( to change it, use --logfile filepath ; or use --nolog to turn off logging )\r\n$RCSfile: imapsync,v $ $Revision: 1.644 $ $Date: 2015/07/17 01:22:52 $\r\nHere 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)\r\nWith perl 5.10.1 Mail::IMAPClient  3.34\r\nCommand line used:\r\n./imapsync --host1 mail.ims-firmen.de --user1 sourcebox@ims-firmen.de --password1 MASKED --host2 mail.your-server.de --user2 targetbox@mail.your-server.de --password2 MASKED --tls2 --port2 143 --debugimap2 --usecache --useuid --tmpdir ./cache\r\nTemp directory is ./cache  ( to change it use --tmpdir dirpath )\r\nPID file is ./cache/imapsync.pid ( to change it use --pidfile filepath ; to avoid it use --pidfile \"\" )\r\nModules version list:\r\nMail::IMAPClient     3.34\r\nIO::Socket           1.31\r\nIO::Socket::IP       ?\r\nIO::Socket::INET     1.31\r\nIO::Socket::SSL      1.31\r\nNet::SSLeay          1.35\r\nCompress::Zlib       2.021\r\nDigest::MD5          2.39\r\nDigest::HMAC_MD5     1.01\r\nDigest::HMAC_SHA1    1.01\r\nTerm::ReadKey        2.30\r\nFile::Spec           3.3\r\nTime::HiRes          1.9721\r\nUnicode::String      2.09\r\nIO::Tee              0.64\r\nFile::Copy::Recursive 0.38\r\nAuthen::NTLM         ?\r\nURI::Escape          3.29\r\nData::Uniqid         ?\r\nJSON::WebToken       ?\r\n( use --no-modules_version to turn off printing this Perl modules list )\r\nInfo: turned ON syncinternaldates, will set the internal dates (arrival dates) on host2 same as host1.\r\nInfo: will try to use LOGIN authentication on host1\r\nInfo: will try to use LOGIN authentication on host2\r\nInfo: imap connexions timeout is 120 seconds\r\nHost1: IMAP server [mail.ims-firmen.de] port [143] user [sourcebox@ims-firmen.de]\r\nHost2: IMAP server [mail.your-server.de] port [143] user [targetbox@mail.your-server.de]\r\nHost1: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready.\r\nHost1: mail.ims-firmen.de says it has CAPABILITY for AUTHENTICATE LOGIN\r\nHost1: success login on [mail.ims-firmen.de] with user [sourcebox@ims-firmen.de] auth [LOGIN]\r\nHost2 connection\r\nConnecting with IO::Socket::INET PeerAddr mail.your-server.de PeerPort 143 Proto tcp Timeout 120 Debug 1\r\nConnected to mail.your-server.de\r\nRead:   * 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\r\nHost2: * 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\r\nSending: 1 STARTTLS\r\nSent 12 bytes\r\nRead:   1 OK Begin TLS negotiation now\r\nSending: 2 CAPABILITY\r\nSent 14 bytes\r\nRead:   * CAPABILITY IMAP4 IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION\r\nRead:   2 OK CAPABILITY\r\nHost2: mail.your-server.de says it has NO CAPABILITY for AUTHENTICATE LOGIN\r\nSending literal: 3 LOGIN targetbox@mail.your-server.de {13}\r\n        then: itsmypassword\r\nSending: 3 LOGIN targetbox@mail.your-server.de {13}\r\nSent 44 bytes\r\nRead:   + OK ready for additional input\r\nSending: itsmypassword\r\nSent 14 bytes\r\nRead:   3 NO failed: Re-Authentication Failure\r\nERROR: 3 NO failed: Re-Authentication Failure at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1364\r\n        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\r\n        Mail::IMAPClient::_get_response('Mail::IMAPClient=HASH(0x121c230)', 3, undef) called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1326\r\n        Mail::IMAPClient::_imap_command_do('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN targetbox@mail.your-server.de {13}\\x{d}\\x{a}itsmypassword\\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1225\r\n        Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN targetbox@mail.your-server.de {13}\\x{d}\\x{a}itsmypassword\\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 576\r\n        Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x121c230)') called at ./imapsync line 2269\r\n        main::authenticate_imap('Mail::IMAPClient=HASH(0x121c230)', 'mail.your-server.de', 143, 'targetbox@mail.your-server.de', undef, 'itsmypassword\\x{d}', 1, 120, 0, ...) called at ./imapsync line 2236\r\n        main::login_imap('mail.your-server.de', 143, 'targetbox@mail.your-server.de', undef, 'itsmypassword\\x{d}', 1, 120, 0, undef, ...) called at ./imapsync line 1017\r\nERROR: 3 NO failed: Re-Authentication Failure at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1274\r\n        Mail::IMAPClient::_imap_command('Mail::IMAPClient=HASH(0x121c230)', 'LOGIN targetbox@mail.your-server.de {13}\\x{d}\\x{a}itsmypassword\\x{d}') called at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 576\r\n        Mail::IMAPClient::login('Mail::IMAPClient=HASH(0x121c230)') called at ./imapsync line 2269\r\n        main::authenticate_imap('Mail::IMAPClient=HASH(0x121c230)', 'mail.your-server.de', 143, 'targetbox@mail.your-server.de', undef, 'itsmypassword\\x{d}', 1, 120, 0, ...) called at ./imapsync line 2236\r\n        main::login_imap('mail.your-server.de', 143, 'targetbox@mail.your-server.de', undef, 'itsmypassword\\x{d}', 1, 120, 0, undef, ...) called at ./imapsync line 1017\r\nFailure: error login on [mail.your-server.de] with user [targetbox@mail.your-server.de] auth [LOGIN]: 3 NO failed: Re-Authentication Failure\r\n==== End syncing user sourcebox@ims-firmen.de to user targetbox@mail.your-server.de ====\r\n\r\n\r\nThanks,\r\nSebastian\r\n"},"comment":{"url":"https://api.github.com/repos/imapsync/imapsync/issues/comments/152266769","html_url":"https://github.com/imapsync/imapsync/issues/42#issuecomment-152266769","issue_url":"https://api.github.com/repos/imapsync/imapsync/issues/42","id":152266769,"user":{"login":"gilleslamiral","id":3310469,"avatar_url":"https://avatars.githubusercontent.com/u/3310469?v=3","gravatar_id":"","url":"https://api.github.com/users/gilleslamiral","html_url":"https://github.com/gilleslamiral","followers_url":"https://api.github.com/users/gilleslamiral/followers","following_url":"https://api.github.com/users/gilleslamiral/following{/other_user}","gists_url":"https://api.github.com/users/gilleslamiral/gists{/gist_id}","starred_url":"https://api.github.com/users/gilleslamiral/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilleslamiral/subscriptions","organizations_url":"https://api.github.com/users/gilleslamiral/orgs","repos_url":"https://api.github.com/users/gilleslamiral/repos","events_url":"https://api.github.com/users/gilleslamiral/events{/privacy}","received_events_url":"https://api.github.com/users/gilleslamiral/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T17:59:19Z","updated_at":"2015-10-29T17:59:19Z","body":"Hi Sebastian,\n\nWhat makes you believe the Negotiation did not take place?\nIt look like it's just a normal authentication issue\nwith error message\"NO failed: Re-Authentication Failure\" from the server.\n\nDo the exact same credentials work with a classic imap client like Thunderbird\nor Outlook in imap?\n\nOn 29/10/2015 18:27, slemke76 wrote:\n> Hello,\n>\n> 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.\n> After \"1 OK Begin TLS negotiation now\" the Negotiation does NOT take place.\n> I tried also older versions of imapsync ans also the last one from the git repository without success.\n>\n> Sending: 3 LOGIN targetbox@mail.your-server.de <mailto:targetbox@mail.your-server.de> {13}\n> Sent 44 bytes\n> Read: + OK ready for additional input\n> Sending: xxx\n> Sent 14 bytes\n> Read: 3 NO failed: Re-Authentication Failure\n\n-- \nAu revoir,                             09 51 84 42 42\nGilles Lamiral. France, Baulon (35580) 06 20 79 76 06\n"}}