我正在尝试将电子邮件从Protonmail导入Mailcow。
当然,Mailcow具有同步作业功能,所以我显而易见的方法是创建一个这样的作业以从ProtonMail Bridge中提取电子邮件。该网桥在本地运行于127.0.0.1,其中端口1143用于IMAP,端口1025用于SMTP。我尝试通过键入以下内容与Ngrok一起公开它:
./ngrok http https://127.0.0.1:1143
然后,用Ngrok和1143提供的URL作为端口在Mailcow的UI(邮件设置->同步作业)中打开一个同步作业,这给了我:
Command line used, run by /usr/bin/perl:
/usr/local/bin/imapsync --tmpdir /tmp --nofoldersizes --exclude (?i)spam|(?i)junk --subfolder2 External --delete2duplicates --subscribeall --automap --tls1 --host1 https://sdfsdf45.ngrok.io --user1 [email protected] --passfile1 /tmp/imapsync.XZ1EqMy --port1 1143 --host2 localhost --user2 [email protected]*[email protected] --passfile2 /tmp/imapsync.yn2Arhj --no-modulesversion --noreleasecheck
Temp directory is /tmp ( to change it use --tmpdir dirpath )
kill -QUIT 27012 # special behavior
kill -TERM 27012 # special behavior
kill -INT 27012 # special behavior
kill -HUP 27012 # special behavior
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 detected open ssl port 993 so turning ssl on (use --nossl2 --notls2 to turn off SSL and TLS wizardry)
SSL debug mode level is --debugssl 1 (can be set from 0 meaning no debug to 4 meaning max debug)
Host2: SSL default mode is like --sslargs2 "SSL_verify_mode=0", meaning for host2 SSL_VERIFY_NONE, ie, do not check the certificate server.
Host2: Use --sslargs2 SSL_verify_mode=1 to have SSL_VERIFY_PEER, ie, check the certificate server of host2
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 server [https://sdfsdf45.ngrok.io] port [1143] user [[email protected]]
Host2: IMAP server [localhost] port [993] user [[email protected]*[email protected]]
Host1: connecting and login on host1 [https://sdfsdf45.ngrok.io] port [1143] with user [[email protected]]
Host1 failure: can not open imap connection on host1 [https://sdfsdf45.ngrok.io] with user [[email protected]]: Unable to connect to https://sdfsdf45.ngrok.io: Invalid argument
Exiting with return value 10
我为端口尝试了几种变体,同时还尝试了tls而不是http,但都没有成功:
./ngrok http https://127.0.0.1:1143
./ngrok tls -subdomain=encrypted 1143
./ngrok tls 1143
我也尝试通过tcp传输层访问ProtonMail Bridge:
./ngrok tcp 1143
tcp协议使我可以在同步作业中插入与ProtonMail Bridge的端口不同的端口(在下面的示例中为15926,与IMAP的1143相反:]]
ngrok by @inconshreveable (Ctrl+C to quit)
Session Status online
Account John Doe (Plan: Pro)
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding tcp://0.tcp.ngrok.io:15926 -> localhost:1143
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
这是同步作业日志的相关部分:
Command line used, run by /usr/bin/perl:
/usr/local/bin/imapsync --tmpdir /tmp --nofoldersizes --exclude (?i)spam|(?i)junk --subfolder2 External --delete2duplicates --subscribeall --automap --host1 tcp://0.tcp.ngrok.io --user1 [email protected] --passfile1 /tmp/imapsync._aWrUsG --port1 15926 --host2 localhost --user2 [email protected]*[email protected] --passfile2 /tmp/imapsync.r4EJIwe --no-modulesversion --noreleasecheck
Temp directory is /tmp ( to change it use --tmpdir dirpath )
kill -QUIT 17173 # special behavior
kill -TERM 17173 # special behavior
kill -INT 17173 # special behavior
kill -HUP 17173 # special behavior
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 detected open ssl port 993 so turning ssl on (use --nossl2 --notls2 to turn off SSL and TLS wizardry)
SSL debug mode level is --debugssl 1 (can be set from 0 meaning no debug to 4 meaning max debug)
Host2: SSL default mode is like --sslargs2 "SSL_verify_mode=0", meaning for host2 SSL_VERIFY_NONE, ie, do not check the certificate server.
Host2: Use --sslargs2 SSL_verify_mode=1 to have SSL_VERIFY_PEER, ie, check the certificate server of host2
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 server [tcp://0.tcp.ngrok.io] port [15926] user [[email protected]]
Host2: IMAP server [localhost] port [993] user [[email protected]*[email protected]]
Host1: connecting and login on host1 [tcp://0.tcp.ngrok.io] port [15926] with user [[email protected]]
Host1 failure: can not open imap connection on host1 [tcp://0.tcp.ngrok.io] with user [[email protected]]: Unable to connect to tcp://0.tcp.ngrok.io: Invalid argument
Exiting with return value 10
我正在尝试将电子邮件从Protonmail导入Mailcow。 Mailcow当然具有同步作业功能,所以我显而易见的方法是创建一个这样的作业以从ProtonMail中提取电子邮件...
我解决了无法将ProtonMail(通过Bridge)将电子邮件直接导入Mailcow(使用同步作业功能,该功能实现了imapsync)以及在计算机本地安装的isync/mbsync的失败。有几个步骤: