Could provide a set of non-standard ports on nine.testrun.org

  • Could nine.testrun.org provide a set of non-standard ports for connections? Certain network environments may block some standard interfaces used for mail services.

I’m uncertain whether this classification is appropriate; please do not take offense.

1 Like

Moved to Feature Proposal category.

What ports are not blocked in your environment? Using port 443 for chatmail setups should likely work, but then we need to figure out how to multiplex both SMTP and IMAP there together with HTTPS webserver already used. This could be done using ALPN but SMTP for submission port does not have ALPN assigned: Transport Layer Security (TLS) Extensions
Using ALPN for IMAP to allow connecting over port 443 and at least read emails could be interesting.

this is common problem for me, and the reason I don’t use VPNs more often, I have NekoBox and I add to it some VPNs like shadowsocks VPNs from Outline but these VPN providers (or their VPS providers) seem to block the email ports, once I enable the VPNs Delta Chat can’t connect anymore which makes it really hard to use DC with VPNs, this already affects in some censorship situations when people find a VPN to bypass some restrictions and WhatsApp etc work fine but DC can’t work with the VPN

Could you provide some logs when VPN is used? Which ports fail to connect (SMTP and/or IMAP)? What happens if you try to rerun configuration or create new nine.testrun.org account, does it select the working ports or fails to configure?

it is stuck at 60% for several seconds then it just display this dialog:

and there is no way to get the logs there, I think that dialog should have an “open logs” button

Is it possible to get it with adb logcat? It should have individual “failure” and “success” logs printed for each attempt.

I am currently utilizing a desktop client application, which provides me with access to log files. The log in question was generated during my attempt to set up a new account. It appears from the logs that the port used by SMTP has been blocked. In my particular network environment, most ports are generally open and accessible, yet for some reason, the port associated with SMTP is being restricted.

“远程主机强迫关闭了一个现有的连接” means:
The remote host has forcibly closed an existing connection.

2024-06-24T01:53:37.804Z	core/event            	WARNING	""	12	"/build/source/src/config.rs:680: No self addr configured"
2024-06-24T01:53:37.877Z	core/event            	WARNING	""	12	"/build/source/src/config.rs:680: No self addr configured"
2024-06-24T01:53:38.921Z	core/event            	INFO	""	12	"src/configure.rs:111: Configure ..."
2024-06-24T01:53:38.929Z	core/event            	INFO	""	12	"src/configure.rs:236: checking internal provider-info for offline autoconfig"
2024-06-24T01:53:38.930Z	core/event            	INFO	""	12	"src/configure.rs:251: offline autoconfig found"
2024-06-24T01:53:38.943Z	core/event            	INFO	""	12	"src/configure.rs:610: Trying: imap: 39g66f2yu@nine.testrun.org@nine.testrun.org:993 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:38.944Z	core/event            	INFO	""	12	"src/imap.rs:333: Connecting to IMAP server"
2024-06-24T01:53:38.945Z	core/event            	INFO	""	12	"src/configure.rs:662: Trying: smtp: 39g66f2yu@nine.testrun.org@nine.testrun.org:465 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:38.947Z	core/event            	INFO	""	12	"src/net.rs:72: Resolved nine.testrun.org:465 into 116.202.233.236:465."
2024-06-24T01:53:38.948Z	core/event            	INFO	""	12	"src/net.rs:72: Resolved nine.testrun.org:993 into 116.202.233.236:993."
2024-06-24T01:53:38.976Z	core/event            	INFO	""	12	"src/chat.rs:2682: Attaching \"C:\\Users\\xxxx\\AppData\\Local\\DeltaChat\\accounts\\8f4e690f-ebe9-4810-853b-472119047083\\dc.db-blobs\\welcome-image.jpg\" for message type #Image."
2024-06-24T01:53:39.158Z	core/event            	INFO	""	12	"src/configure.rs:668: failure: 远程主机强迫关闭了一个现有的连接。 (os error 10054)"
2024-06-24T01:53:39.952Z	core/event            	INFO	""	12	"src/imap.rs:412: Logging into IMAP server with LOGIN"
2024-06-24T01:53:41.017Z	renderer/loginForm    	ERROR	"\nfile:///C:/Users/xxxx/AppData/Local/Programs/DeltaChat/resources/app.asar/src/renderer/components/LoginForm.tsx:447:15"	"configure error"	{"code":-1,"message":"远程主机强迫关闭了一个现有的连接。 (os error 10054)"}
2024-06-24T01:53:41.023Z	core/event            	INFO	""	12	"src/imap.rs:428: Successfully logged into IMAP server"
2024-06-24T01:53:41.023Z	core/event            	INFO	""	12	"src/configure.rs:634: success: imap: 39g66f2yu@nine.testrun.org@nine.testrun.org:993 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:41.024Z	core/event            	INFO	""	12	"src/configure.rs:142: apply config_defaults mvbox_move=0"

// try once more

2024-06-24T01:53:47.497Z	main/menu             	INFO	""	"rebuilding menu with locale zh_CN"
2024-06-24T01:53:50.413Z	core/event            	WARNING	""	12	"/build/source/src/config.rs:680: No self addr configured"
2024-06-24T01:53:51.059Z	core/event            	WARNING	""	12	"/build/source/src/config.rs:680: No self addr configured"
2024-06-24T01:53:51.438Z	core/event            	INFO	""	12	"src/configure.rs:111: Configure ..."
2024-06-24T01:53:51.447Z	core/event            	INFO	""	12	"src/configure.rs:236: checking internal provider-info for offline autoconfig"
2024-06-24T01:53:51.448Z	core/event            	INFO	""	12	"src/configure.rs:251: offline autoconfig found"
2024-06-24T01:53:51.454Z	core/event            	INFO	""	12	"src/configure.rs:610: Trying: imap: 6g42plbv1@nine.testrun.org@nine.testrun.org:993 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:51.455Z	core/event            	INFO	""	12	"src/imap.rs:333: Connecting to IMAP server"
2024-06-24T01:53:51.456Z	core/event            	INFO	""	12	"src/configure.rs:662: Trying: smtp: 6g42plbv1@nine.testrun.org@nine.testrun.org:465 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:51.456Z	core/event            	INFO	""	12	"src/net.rs:72: Resolved nine.testrun.org:465 into 116.202.233.236:465."
2024-06-24T01:53:51.458Z	core/event            	INFO	""	12	"src/net.rs:72: Resolved nine.testrun.org:993 into 116.202.233.236:993."
2024-06-24T01:53:51.458Z	core/event            	INFO	""	12	"src/chat.rs:4307: Device-message core-welcome-image already added."
2024-06-24T01:53:51.459Z	core/event            	INFO	""	12	"src/chat.rs:4307: Device-message core-welcome already added."
2024-06-24T01:53:51.688Z	core/event            	INFO	""	12	"src/configure.rs:668: failure: 远程主机强迫关闭了一个现有的连接。 (os error 10054)"
2024-06-24T01:53:52.125Z	renderer/loginForm    	ERROR	"\nfile:///C:/Users/xxxx/AppData/Local/Programs/DeltaChat/resources/app.asar/src/renderer/components/LoginForm.tsx:447:15"	"configure error"	{"code":-1,"message":"There is already another ongoing process running."}
2024-06-24T01:53:52.160Z	core/event            	INFO	""	12	"src/imap.rs:412: Logging into IMAP server with LOGIN"
2024-06-24T01:53:52.703Z	renderer/loginForm    	ERROR	"\nfile:///C:/Users/xxxx/AppData/Local/Programs/DeltaChat/resources/app.asar/src/renderer/components/LoginForm.tsx:447:15"	"configure error"	{"code":-1,"message":"远程主机强迫关闭了一个现有的连接。 (os error 10054)"}
2024-06-24T01:53:52.706Z	core/event            	INFO	""	12	"src/imap.rs:428: Successfully logged into IMAP server"
2024-06-24T01:53:52.707Z	core/event            	INFO	""	12	"src/configure.rs:634: success: imap: 6g42plbv1@nine.testrun.org@nine.testrun.org:993 security=Ssl certificate_checks=strict oauth2=false socks5_config=None"
2024-06-24T01:53:52.708Z	core/event            	INFO	""	12	"src/configure.rs:147: skip already set config_defaults mvbox_move=0"
1 Like

nine.testrun.org and other chatmail servers already have alternative SMTP port 587 but it is not tried.
Opened a PR to fix this:
Add more ports for chatmail servers and testrun.org by link2xt · Pull Request #294 · deltachat/provider-db · GitHub

2 Likes

:+1: :+1: :+1: :star_struck: :star_struck: :star_struck:

and there is no way to get the logs there […]

you can access the logs during onboarding at “Classic E-Mail Login / Advanced / View Log”

I think that dialog should have an “open logs” button

if it is about “Create New Profile”, i would more think about a three dot menu, as we have already for “Add Second Device”. Meanwhile, as the FAQ have improved, we could also link that. but that is offtopic, let’s discuss this elsewhere

The change is a part of the nightly: Index of /android/nightly/2024-06-26/

@imysl0 You can install the nightly build side by side with current Delta Chat and try to setup a nine.testrun.org account. If port 587 is not blocked on your network, nightly build should succeed in using it for SMTP setup.

Hetzner FAQ has this:

Why can I not send any mails from my server?

Unfortunately, email spammers and scammers like to use cloud hosting providers. And we at Hetzner naturally want to prevent this. That’s why we block ports 25 and 465 by default on all cloud servers. This is a very common practice in the cloud hosting industry because it prevents abuse. We want to build trust with our new customers before we unblock these mail ports. Once you have been with us for a month and paid your first invoice, you can create a limit request to unblock these ports for a valid use case. In your request, you can tell us details about your use case. We make decisions on a case-by-case basis.

As an alternative, you can also use port 587 to send emails via external mail delivery services. Port 587 is not blocked and can be used without sending a limit request.

So not trying 587 can indeed be a problem for many setups, e.g. if someone has a personal VPN hosted on a Hetzner server. I didn’t know that they block port 465 by default, thought it only applies to port 25.

Thank you @link2xt very much, however, I am unable to test with the Android client because the specific network I mentioned can only be accessed via a PC connection. If there is a Windows version available, I can test it immediately.

I opened a PR adding ALPN in the core:

Experimental PR adding multiplexing over HTTPS port to chatmail:

When the desktop preview version comes out, I will test it :heart_eyes: