deltachat-core icon indicating copy to clipboard operation
deltachat-core copied to clipboard

"Stream error" during SMTP-SSL connection

Open link2xt opened this issue 6 years ago • 4 comments

I am running deltachat-fat-debug-0.101.0.apk on Android, but the issue seems to be in deltachat-core.

I have an SMTP server that only accepts SSL/TLS on port 465, but not port 587. When trying to connect, I get error "SMTP-Socket connection to SERVER_REDACTED:587 failed (Connection refused)". This error is irrelevant due to the bug https://github.com/deltachat/deltachat-core/issues/594

Attaching adb to DeltaChat, I get the following log:

I DeltaChat: Configure ...
I DeltaChat: Trying: LOGIN_REDACTED LOGIN_REDACTED:***:SERVER_REDACTED:993 LOGIN_REDACTED:***:SERVER_REDACTED:465 AUTH_NORMAL IMAP_SSL SMTP_SSL
I DeltaChat: IMAP-server SERVER_REDACTED:993 SSL-connected.
E DeltaChat: SMTP-SSL connection to SERVER_REDACTED:465 failed (Stream error)
I DeltaChat: Trying: LOGIN_REDACTED LOGIN_REDACTED:***:SERVER_REDACTED:993 LOGIN_REDACTED:***:SERVER_REDACTED:587 AUTH_NORMAL IMAP_SSL SMTP_STARTTLS
E DeltaChat: SMTP-Socket connection to SERVER_REDACTED:587 failed (Connection refused)
I DeltaChat: IMAP disconnected.

I can trace this "Stream error" down to https://github.com/deltachat/deltachat-core/blob/dddae8beccb41d37cebb773f687f25f96e08c33e/libs/libetpan/src/low-level/smtp/mailsmtp.c#L1202 but there is no context available on where exactly this MAILSMTP_ERROR_STREAM is returned.

link2xt avatar Mar 10 '19 22:03 link2xt

If deltachat is going to move to deltachat-core-rust, I may just stop caring about this since libetpan is going away: https://github.com/deltachat/deltachat-core-rust/commit/83917ef93e9d2e829e201ab51ba4e47450589af3#diff-a7b0a2dee0126cddf994326e705a91ea

(or not, looks like mmime is a c2rust translation of libetpan)

link2xt avatar May 10 '19 10:05 link2xt

yip, i would not put much effort into this and see how deltachat-core-rust behaves.

mmime is only used for mime-parsing, there is no network involved in this part. the imap- and smtp-parts of libetpan are going to be rewritten in pure-rust, resp. this is already done :)

r10s avatar May 10 '19 11:05 r10s

Everything works on 0.500.0, closing this.

link2xt avatar Jul 02 '19 23:07 link2xt

Reopening. The interface works, but nothing is actually sent/received. After some timeout, I get errors on the screen, both for SMTP and IMAP.

Waiting for Rust version, then. I have been able to receive a message sent from example REPL with an ordinary MUA.

link2xt avatar Jul 02 '19 23:07 link2xt