Mail: Can't send emails in IPv6 network

REPRODUCIBILITY (% or how often): always
BUILD ID:
HARDWARE (Jolla1, Tablet, XA2,…): Xperia X, Gemini
UI LANGUAGE: German
REGRESSION: (compared to previous public release: Yes, No, ?): No

DESCRIPTION:

When sending emails in a IPv6 network, the Mail app sends the IP address in a wrong format during EHLO to the SMTP server. Therefore most SMTP servers will refuse to accept those emails. Sending emails fails.

PRECONDITIONS:

  • IPv6 network
  • SMTP server that does basic checks on the EHLO fields

STEPS TO REPRODUCE:

  1. Send email in Mail app

EXPECTED RESULT:

Email gets send

ACTUAL RESULT:

Email does not get send

ADDITIONAL INFORMATION:

When connecting to the SMTP server, the Mail app sends the following EHLO (excerpt of Posfix error log):

Apr 15 17:25:20 router postfix/smtpd[101678]: NOQUEUE: reject: EHLO from unknown[2a03:2260:116:0:2a3f:69ff:fecd:446]: 501 5.5.2 <[2a03:2260:116:0:2a3f:69ff:fecd:446]>: Helo command rejected: invalid ip address; proto=SMTP helo=<[2a03:2260:116:0:2a3f:69ff:fecd:446]>

The format of the IPv6 address is wrong.
Instead of “helo=<[2a03:2260:116:0:2a3f:69ff:fecd:446]>” it must be “helo=<[IPv6:2a03:2260:116:0:2a3f:69ff:fecd:446]>” - note the “IPv6:” before the IP address.

See RFC 2821, chapter 4.1.3

6 Likes

Is this a continuation of this one?
https://together.jolla.com/question/202367/buggemini-smtp-connections-to-smtpstratode-dont-work/

I thought to the same thing at the beginning, but as far as I understand, it’s a different issue on the same spot. The one addressed in the TJC report is about the fact that the interface is appended to the IP address, which is wrong. There is a patch upstream developped by @rainemak, see https://codereview.qt-project.org/c/qt-labs/messagingframework/+/268401

The issue reported here seems new to me. I need to read the RFC pointed by the reporter (thanks for all the detail by the way). But it seems that the address is missing a prepended IPV6: tag this time, not sufferring from a wrong appended text.

1 Like

I’m running into the same problem and debugged it the same way from the old TJC thread :smiley:

I was actually waiting to upgrade my phone to 3.4.x first to see if it was fixed there, but here we are.

I’ve got an XA2 Plus, dual sim, running SFOS 3.3.0.16.

This is still an issue in 3.4.0.24.

1 Like