Here is imapsync 2.229 on host telme.k1.com.br, a netbsd system with 18.2/31.9 free GiB of RAM, 0.00% used by processes. with Perl 5.38.2 and Mail::IMAPClient 3.43 Transfer started at Tuesday 23 January 2024-01-23 09:31:54 -0300 -03 PID is 719 my PPID is 19054 Log file is LOG_imapsync/2024_01_23_09_31_54_187_ricardo_ricardoitc.txt ( to change it, use --logfile path ; or use --nolog to turn off logging ) Load is unknown on 1 cores Current directory is /home/ricardoitc Real user id is root (uid 0) Effective user id is root (euid 0) $RCSfile: imapsync,v $ $Revision: 2.229 $ $Date: 2022/09/14 18:08:24 $ Command line used, run by /usr/pkg/bin/perl: /usr/pkg/bin/imapsync --dry --host1 itc.k1.com.br --user1 ricardo --password1 MASKED --host2 localhost --user2 ricardoitc --password2 MASKED --ssl1 --ssl2 --authmech1 LOGIN --authmech2 LOGIN --syncinternaldates --automap --skipsize --noauthmd5 --allowsizemismatch Temp directory is /tmp ( to change it use --tmpdir dirpath ) kill -QUIT 719 # special behavior: call to sub catch_exit kill -TERM 719 # special behavior: call to sub catch_exit kill -INT 719 # special behavior: call to sub catch_reconnect kill -HUP 719 # special behavior: call to sub catch_print kill -USR1 719 # special behavior: call to sub toggle_sleep File /tmp/imapsync.pid does not exist PID file is /tmp/imapsync.pid ( to change it, use --pidfile filepath ; to avoid it use --pidfile "" ) Writing my PID 719 in /tmp/imapsync.pid Writing also my logfile name in /tmp/imapsync.pid : LOG_imapsync/2024_01_23_09_31_54_187_ricardo_ricardoitc.txt Modules version list ( use --no-modulesversion to turn off printing this Perl modules list ): Authen::NTLM Not installed CGI Not installed Compress::Zlib 2.204 Crypt::OpenSSL::RSA 0.33 Data::Uniqid Not installed Digest::HMAC_MD5 1.04 Digest::HMAC_SHA1 1.04 Digest::MD5 2.58_01 Encode 3.19 Encode::IMAPUTF7 1.05 File::Copy::Recursive 0.45 File::Spec 3.88 Getopt::Long 2.54 HTML::Entities 3.81 IO::Socket 1.52 IO::Socket::INET 1.52 IO::Socket::INET6 2.73 IO::Socket::IP 0.4101 IO::Socket::SSL 2.084 IO::Tee 0.65 JSON 4.10 JSON::WebToken Not installed LWP 6.72 MIME::Base64 3.16_01 Mail::IMAPClient 3.43 Net::Ping 2.76 Net::SSLeay 1.92 Term::ReadKey 2.38 Test::MockObject Not installed Time::HiRes 1.9775 URI::Escape 5.21 Unicode::String 2.10 Info: will resync flags for already transferred messages. Use --noresyncflags to not resync flags. 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 for host1 SSL_VERIFY_NONE, ie, do not check the server certificate. Host1: Use --sslargs1 SSL_verify_mode=1 to have SSL_VERIFY_PEER, ie, check the server certificate. of host1 Host2: SSL default mode is like --sslargs2 "SSL_verify_mode=0", meaning for host2 SSL_VERIFY_NONE, ie, do not check the server certificate. Host2: Use --sslargs2 SSL_verify_mode=1 to have SSL_VERIFY_PEER, ie, check the server certificate. of host2 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 connection timeout is 120 seconds Host2: imap connection timeout is 120 seconds Host1: imap connection keepalive is on on host1. Use --nokeepalive1 to disable it. Host2: imap connection keepalive is on on host2. Use --nokeepalive2 to disable it. Host1: IMAP server [itc.k1.com.br] port [993] user [ricardo] Host2: IMAP server [localhost] port [993] user [ricardoitc] Host1: connecting and login on host1 [itc.k1.com.br] port [993] with user [ricardo] Host1 IP address: 187.122.103.126 Local IP address: 45.185.2.208 Host1 banner: * OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=LOGIN AUTH=PLAIN SASL-IR] itcserver.itc Cyrus IMAP 2.5.12 server ready Host1 capability before authentication: IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY AUTH=LOGIN AUTH=PLAIN SASL-IR COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE RIGHTS THREAD AUTH COMPRESS X-QUOTA Host1: itc.k1.com.br says it has CAPABILITY for AUTHENTICATE LOGIN Host1: success login on [itc.k1.com.br] with user [ricardo] auth [LOGIN] or [LOGIN] Host2: connecting and login on host2 [localhost] port [993] with user [ricardoitc] Host2 IP address: 127.0.0.1 Local IP address: 127.0.0.1 Host2 banner: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot ready. Host2 capability before authentication: IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH Host2: localhost says it has CAPABILITY for AUTHENTICATE LOGIN Host2: success login on [localhost] with user [ricardoitc] auth [LOGIN] or [LOGIN] Host1: state Authenticated Host2: state Authenticated Host1 capability once authenticated: IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxten QUOTA MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ SORT=DISPLAY SORT=UID THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE ANNOTATE-EXPERIMENT-1 METADATA LIST-EXTENDED LIST-STATUS LIST-MYRIGHTS WITHIN QRESYNC SCAN XLIST XMOVE MOVE SPECIAL-USE CREATE-SPECIAL-USE URLAUTH URLAUTH=BINARY LOGINDISABLED AUTH=LOGIN AUTH=PLAIN COMPRESS=DEFLATE X-QUOTA=STORAGE X-QUOTA=MESSAGE X-QUOTA=X-ANNOTATION-STORAGE X-QUOTA=X-NUM-FOLDERS IDLE RIGHTS THREAD AUTH COMPRESS X-QUOTA Host2 capability once authenticated: IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY PREVIEW STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE THREAD I18NLEVEL CONTEXT SNIPPET PREVIEW STATUS Host1: found ID capability. Sending/receiving ID, presented in raw IMAP for now. In order to avoid sending/receiving ID, use option --noid Sending: 4 ID ("name" "imapsync" "version" "2.229" "os" "netbsd" "vendor" "Gilles LAMIRAL" "support-url" "https://imapsync.lamiral.info/" "date" "14-Sep-2022 18:08:24 +0000" "side" "host1") Sent 182 bytes Read: * ID ("name" "Cyrus IMAPD" "version" "2.5.12 a4c4768f 2018-10-08" "vendor" "Project Cyrus" "support-url" "http://www.cyrusimap.org" "os" "FreeBSD" "os-version" "10.4-STABLE" "environment" "Built w/Cyrus SASL 2.1.26; Running w/Cyrus SASL 2.1.26; Built w/Berkeley DB 5.3.28: (September 9, 2013); Running w/Berkeley DB 5.3.28: (September 9, 2013); Built w/OpenSSL 1.0.1u-freebsd 22 Sep 2016; Running w/OpenSSL 1.0.1u-freebsd 22 Sep 2016; Built w/zlib 1.2.11; Running w/zlib 1.2.11; CMU Sieve 2.4; TCP Wrappers; mmap = shared; lock = fcntl; nonblock = fcntl; idle = idled") 4 OK Completed Host2: found ID capability. Sending/receiving ID, presented in raw IMAP for now. In order to avoid sending/receiving ID, use option --noid Sending: 4 ID ("name" "imapsync" "version" "2.229" "os" "netbsd" "vendor" "Gilles LAMIRAL" "support-url" "https://imapsync.lamiral.info/" "date" "14-Sep-2022 18:08:24 +0000" "side" "host2") Sent 182 bytes Read: * ID ("name" "Dovecot") 4 OK ID completed (0.026 + 0.000 + 0.025 secs). Host2: No QUOTA capability found, skipping it. Host1: Compression is off. Use --compress1 to allow compression on host1 Host2: Compression is off. Use --compress2 to allow compression on host2 Host1: found 8 folders. Host2: found 1 folders. Host1: guessing separator from folder listing: [/] Host1: separator given by NAMESPACE: [/] Host2: guessing separator from folder listing: [/] Host2: separator given by NAMESPACE: [.] Host1: guessing prefix from folder listing: [INBOX/] Host1: prefix given by NAMESPACE: [INBOX/] Host2: guessing prefix from folder listing: [] Host2: prefix given by NAMESPACE: [] Host1: separator and prefix: [/][INBOX/] Host2: separator and prefix: [.][] Including all folders found by default. Use --subscribed or --folder or --folderrec or --include to select specific folders. Use --exclude to unselect specific folders. Host1: Checking wanted folders exist. Use --nocheckfoldersexist to avoid this check (shared of public namespace targeted). Host1: Checking wanted folders are selectable. Use --nocheckselectable to avoid this check. Turned on automapping folders ( use --noautomap to turn off automapping ) Host1: INBOX/Sent Messages not \Sent because set to INBOX/Sent ++++ Listing folders All foldernames are presented between brackets like [X] where X is the foldername. When a foldername contains non-ASCII characters it is presented in the form [X] = [Y] where X is the imap foldername you have to use in command line options and Y is the utf8 output just printed for convenience, to recognize it. Host1: folders list (first the raw imap format then the [X] = [Y]): * LIST (\HasChildren) "/" INBOX * LIST (\HasNoChildren) "/" INBOX/Drafts * LIST (\HasNoChildren) "/" "INBOX/Itens Exclu&AO0-dos" * LIST (\HasNoChildren) "/" "INBOX/Lixo Eletr&APQ-nico" * LIST (\HasNoChildren) "/" INBOX/Sent * LIST (\HasNoChildren) "/" "INBOX/Sent Messages" * LIST (\HasNoChildren) "/" INBOX/Spam * LIST (\HasNoChildren) "/" INBOX/Trash 18 OK Completed (0.000 secs 9 calls) [INBOX] [INBOX/Drafts] [INBOX/Itens Exclu&AO0-dos] = [INBOX/Itens Excluídos] [INBOX/Lixo Eletr&APQ-nico] = [INBOX/Lixo Eletrônico] [INBOX/Sent] [INBOX/Sent Messages] [INBOX/Spam] [INBOX/Trash] Host2: folders list (first the raw imap format then the [X] = [Y]): * LIST (\HasNoChildren) "." INBOX 10 OK List completed (0.001 + 0.000 secs). [INBOX] Checking SEARCH ALL works on both accounts. To avoid that check, use --nochecknoabletosearch Host1: checking if SEARCH ALL works on INBOX Host1: folder [INBOX] has 56137 messages mentioned by SELECT Host1: folder [INBOX] has 56137 messages found by SEARCH ALL Host1: folder [INBOX] has the same messages count (56137) by SELECT and SEARCH ALL Host2: checking if SEARCH ALL works on INBOX Host2: folder [INBOX] has 0 messages mentioned by SELECT Host2: folder [INBOX] has 0 messages found by SEARCH ALL Host2: folder [INBOX] has the same messages count (0) by SELECT and SEARCH ALL Good! SEARCH ALL works on both accounts. Folders sizes before the synchronization. It can take some time. Be patient. You can remove foldersizes listings by using "--nofoldersizes" and "--nofoldersizesatend" but then you will also lose the ETA (Estimation Time of Arrival) given after each message copy. Host1 folder 1/8 [INBOX] Size: 18528224444 Messages: 56137 Biggest: 84431617 Host2 folder 1/8 [INBOX] Size: 0 Messages: 0 Biggest: 0 Host2-Host1 -18528224444 -56137 -84431617 Host1 folder 2/8 [INBOX/Drafts] Size: 12671623 Messages: 3 Biggest: 12155720 Host2 folder 2/8 [Drafts] does not exist yet Host2-Host1 -12671623 -3 -12155720 Host1 folder 3/8 [INBOX/Itens Exclu&AO0-dos] = [INBOX/Itens Excluídos] Size: 0 Messages: 0 Biggest: 0 Host2 folder 3/8 [Itens Exclu&AO0-dos] = [Itens Excluídos] does not exist yet Host2-Host1 0 0 0 Host1 folder 4/8 [INBOX/Lixo Eletr&APQ-nico] = [INBOX/Lixo Eletrônico] Size: 75205 Messages: 2 Biggest: 37666 Host2 folder 4/8 [Lixo Eletr&APQ-nico] = [Lixo Eletrônico] does not exist yet Host2-Host1 -75205 -2 -37666 Host1 folder 5/8 [INBOX/Sent] Size: 0 Messages: 0 Biggest: 0 Host2 folder 5/8 [Sent] does not exist yet Host2-Host1 0 0 0 Host1 folder 6/8 [INBOX/Sent Messages] Size: 8543242303 Messages: 5177 Biggest: 73159017 Host2 folder 6/8 [Sent Messages] does not exist yet Host2-Host1 -8543242303 -5177 -73159017 Host1 folder 7/8 [INBOX/Spam] Size: 770880 Messages: 45 Biggest: 64203 Host2 folder 7/8 [Spam] does not exist yet Host2-Host1 -770880 -45 -64203 Host1 folder 8/8 [INBOX/Trash] Size: 1315138 Messages: 20 Biggest: 157634 Host2 folder 8/8 [Trash] does not exist yet Host2-Host1 -1315138 -20 -157634 Host1 Nb folders: 8 folders Host2 Nb folders: 8 folders Host1 Nb messages: 61384 messages Host2 Nb messages: 0 messages Host1 Total size: 27086299593 bytes (25.226 GiB) Host2 Total size: 0 bytes (0.000 KiB) Host1 Biggest message: 84431617 bytes (80.520 MiB) Host2 Biggest message: 0 bytes (0.000 KiB) Time spent on sizing: 36.1 seconds ++++ Looping on each one of 8 folders to sync ETA: Tuesday 23 January 2024-01-23 09:32:32 -0300 -03 2 s 61384/61384 msgs left Folder 1/8 [INBOX] -> [INBOX] Host1: folder [INBOX] has 56137 messages in total (mentioned by SELECT) Host2: folder [INBOX] has 0 messages in total (mentioned by SELECT) Host2: folder [INBOX] permanentflags: Host1: folder [INBOX] considering 56137 messages Host2: folder [INBOX] considering 0 messages Host1: parsing headers of folder [INBOX]. It can take time for huge folders. Be patient. Got a signal INT (my PID is 719 my PPID is 19054) Hit 2 ctr-c within 2 seconds to exit the program Hit only 1 ctr-c to reconnect to both imap servers For now only one signal INT within 2 seconds. Info: reconnecting to host1 imap server itc.k1.com.br Info: reconnected to host1 imap server itc.k1.com.br Info: reconnecting to host2 imap server Info: reconnected to host2 imap server localhost Info: reconnected to both imap servers Got a signal INT (my PID is 719 my PPID is 19054) Hit 2 ctr-c within 2 seconds to exit the program Hit only 1 ctr-c to reconnect to both imap servers For now only one signal INT within 2 seconds. Info: reconnecting to host1 imap server itc.k1.com.br Info: reconnected to host1 imap server itc.k1.com.br Info: reconnecting to host2 imap server Info: reconnected to host2 imap server localhost Info: reconnected to both imap servers Got a signal INT (my PID is 719 my PPID is 19054) Hit 2 ctr-c within 2 seconds to exit the program Hit only 1 ctr-c to reconnect to both imap servers For now only one signal INT within 2 seconds. Info: reconnecting to host1 imap server itc.k1.com.br Info: reconnected to host1 imap server itc.k1.com.br Info: reconnecting to host2 imap server Info: reconnected to host2 imap server localhost Info: reconnected to both imap servers Got a signal INT (my PID is 719 my PPID is 19054) Hit 2 ctr-c within 2 seconds to exit the program Hit only 1 ctr-c to reconnect to both imap servers For now only one signal INT within 2 seconds. Info: reconnecting to host1 imap server itc.k1.com.br Info: reconnected to host1 imap server itc.k1.com.br Info: reconnecting to host2 imap server Info: reconnected to host2 imap server localhost Info: reconnected to both imap servers Got a signal INT (my PID is 719 my PPID is 19054) Hit 2 ctr-c within 2 seconds to exit the program Hit only 1 ctr-c to reconnect to both imap servers For now only one signal INT within 2 seconds. Info: reconnecting to host1 imap server itc.k1.com.br Exiting with return value 10 (EXIT_CONNECTION_FAILURE) 1/50 nb_errors/max_errors PID 719 Removing pidfile /tmp/imapsync.pid Disconnecting from host2 localhost user2 ricardoitc Log file is LOG_imapsync/2024_01_23_09_31_54_187_ricardo_ricardoitc.txt ( to change it, use --logfile filepath ; or use --nolog to turn off logging )