Hello,
I am trying to sync all my mail from a gmail account to my localhost docker container (one way only and delete it from the gmail server). I have configured a job using:
Host: imap.gmail.com
Port: 993
Username
Password
Encryption: SSL
Ticked: –delete1
Yet when I try to run the job I get:
Docker context detected with the file /.dockerenv
No log by default in Docker context. Use --log to trigger logging to the logfile.
Changing current directory to /var/tmp/uid_65534
Here is imapsync 2.178 on host ae73fe0c9755, a linux system with 0.3/15.4 free GiB of RAM
with Perl 5.32.1 and Mail::IMAPClient 3.42
Transfer started at Sunday 26 June 2022-06-26 23:55:14 -0300 -03
PID is 259 my PPID is 252
No log file because of option --nolog
Load is 1.09 0.97 0.99 3/3241 on 4 cores
Current directory is /var/tmp/uid_65534
Real user id is nobody (uid 65534)
Effective user id is nobody (euid 65534)
$RCSfile: imapsync,v $ $Revision: 2.178 $ $Date: 2022/01/12 21:28:37 $
Command line used, run by /usr/bin/perl:
/usr/local/bin/imapsync --tmpdir /tmp --nofoldersizes --addheader --exclude (?i)spam|(?i)junk --delete2duplicates --subscribeall --delete --automap --ssl1 --host1 imap.gmail.com --user1 <my-gmail> --passfile1 /tmp/imapsync.yJf5eVA --port1 993 --host2 localhost --user2 <my-mailbox>*9xqc4906wwzdg520@mailcow.local --passfile2 /tmp/imapsync.oD5QzSf --no-modulesversion --noreleasecheck
Temp directory is /tmp ( to change it use --tmpdir dirpath )
Under docker context so installing only signals to exit
kill -INT 259 # special behavior: call to sub catch_exit
kill -QUIT 259 # special behavior: call to sub catch_exit
kill -TERM 259 # special behavior: call to sub catch_exit
No variable pid_filename
PID file is unset ( to set it, use --pidfile filepath ; to avoid it use --pidfile "" )
Info: will resync flags for already transferred messages. Use --noresyncflags to not resync flags.
Host2: probing ssl on port 993 ( use --nosslcheck to avoid this ssl probe )
Host2: sslcheck did not detected open ssl port 993. Will use standard 143 port.
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 certificate server.
Host1: Use --sslargs1 SSL_verify_mode=1 to have SSL_VERIFY_PEER, ie, check the certificate server of host1
Info: turning on --expunge1 because --delete1 --noexpunge1 is very dangerous on the second run.
Info: if expunging after each message slows down too much the sync then use --noexpungeaftereach to speed up
Info: will act as --uidexpunge2
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 [imap.gmail.com] port [993] user [<my-gmail>]
Host2: IMAP server [localhost] port [143] user [<my-mailbox>]
Host1: connecting and login on host1 [imap.gmail.com] port [993] with user [<my-gmail>]
DEBUG: ...base/IO/Socket.pm:47: local error: IO::Socket::IP configuration failed
Host1 failure: can not open imap connection on host1 [imap.gmail.com] with user [<my-gmail>]: Unable to connect to imap.gmail.com: IO::Socket::IP configuration failed Invalid argument
Host2: connecting and login on host2 [localhost] port [143] with user [<my-mailbox>]
Host2 failure: can not open imap connection on host2 [localhost] with user [<my-mailbox)]: Unable to connect to localhost: Connection refused
++++ Listing 2 errors encountered during the sync ( avoid this listing with --noerrorsdump ).
Err 1/2: Host1 failure: can not open imap connection on host1 [imap.gmail.com] with user [<my-gmail>]: Unable to connect to imap.gmail.com: IO::Socket::IP configuration failed Invalid argument
Err 2/2: Host2 failure: can not open imap connection on host2 [localhost] with user [<my-mailbox>]: Unable to connect to localhost: Connection refused
The most frequent error is ERR_CONNECTION_FAILURE_HOST1. Check that host1 imap.gmail.com on port 993 is the right IMAP server to be contacted for your mailbox.
Exiting with return value 101 (EXIT_CONNECTION_FAILURE_HOST1) 2/50 nb_errors/max_errors PID 259
No log file because of option --nolog
I am not sure why this is not working, this should be straight forward. I am trying this on my notebook (lan cable, wifi off). I am not sure if the problem might be routing lan traffic through the docker container. Any ideas please? Thanks.