We have moved to a new Sailfish OS Forum. Please start new discussions there.
3

[Bug/Gemini] SMTP Connections to smtp.strato.de don't work

asked 2019-03-25 21:08:28 +0200

codeandcreate gravatar image

On my Gemini (official SFOS X) SMTP connections to strato.de don't work. Jolla C / Jolla Tablet don't have this problem. I readed the accounts serveral times (with reboot between delete/add). IMAP with the same username/passwort works with no problem. Other accounts - for example GMX - working without a problem on the gemini.

Example messageserver log:

[1131] März 25 19:56:34 [Debug] SMTP :  newConnection
[1131] März 25 19:56:34 [Debug] SMTP :  Open SMTP connection
[1131] März 25 19:56:34 [Debug] Messaging :  QMailTransport::Socket::Socket SET PROXY host= "" port= 0
[1131] März 25 19:56:34 [Debug] Messaging :  Opening connection -  "smtp.strato.de" : 465  SSL
[1131] März 25 19:56:34 [Debug] Messaging :  SMTP : connection established
[1131] März 25 19:56:34 [Debug] Messaging :  SMTP : Secure connection established
[1131] März 25 19:56:34 [Debug] SMTP :  Connected
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "220 smtp.strato.de ESMTP RZmta (P5 -)"
[1131] März 25 19:56:34 [Debug] SMTP :  SEND: EHLO [fe80::7f1c:9e91:8e04:70b2%ifb0]
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-smtp.strato.de greets 2003:da:3712:d300:175d:f6f6:241:7576"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-ENHANCEDSTATUSCODES"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-PIPELINING"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-8BITMIME"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-DELIVERBY"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-SIZE 104857600"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-AUTH PLAIN LOGIN CRAM-MD5 DIGEST-MD5"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-REQUIRETLS"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-BURL imap"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250-CHUNKING"
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "250 HELP"
[1131] März 25 19:56:34 [Debug] SMTP :  SEND: AUTH CRAM-MD5
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "334 PDYyMjFhNWMxMjgwMTM5ODE2OWQ0MTc4NGQyQHNtdHAuc3RyYXRvLmRlPg=="
[1131] März 25 19:56:34 [Debug] SMTP :  SEND: <login hidden>
[1131] März 25 19:56:34 [Debug] SMTP :  RECV: "501 5.0.0 Invalid HELO domain name"
[1131] März 25 19:56:34 [Debug] Messaging :  void SSOSessionManager::recreateSsoIdentity() Recreating SSO identity using auth method  "password"
[1131] März 25 19:56:34 [Debug] connection-manager.cpp 107 setupSocketConnection p2p error: QDBusError("org.freedesktop.DBus.Error.FileNotFound", "Failed to connect to socket /run/user/100000/signond/socket: Datei oder Verzeichnis nicht gefunden") 1
[1131] März 25 19:56:34 [Debug] connection-manager.cpp 148 init Peer connection unavailable, activating service
[1131] März 25 19:56:34 [Debug] authsessionimpl.cpp 94 initInterface
[1131] März 25 19:56:35 [Debug] connection-manager.cpp 165 init Connected to "libsignon-qt3"
[1131] März 25 19:56:35 [Debug] SMTP :  Got SSO response
[1131] März 25 19:56:35 [Debug] SMTP :  SEND: AUTH CRAM-MD5
[1131] März 25 19:56:35 [Debug] SMTP :  RECV: "503 5.5.0 Already authenticated"
[1131] März 25 19:56:35 [Debug] Messaging :  void SSOSessionManager::credentialsNeedUpdate() Setting credentials need update for the service  "smtp"  from account  42  using authentication method  "password"
[1131] März 25 19:56:35 [Debug] SMTP :  Closed connection: "503 5.5.0 Already authenticated\r\n"
[1131] März 25 19:56:35 [Debug] Messaging :  Action completed 10488310136833 result failure

Does somebody have an idea? :(

edit retag flag offensive close delete

Comments

<login hidden> do you happen to supply only a login name or also a domain\login name. It looks like the HELO response is quite late for the EHLO message.

Bart S ( 2019-03-26 15:35:07 +0200 )edit

2 Answers

Sort by » oldest newest most voted
2

answered 2019-03-26 09:29:06 +0200

reinob gravatar image

updated 2019-03-26 09:31:17 +0200

The server doesn't like your computer name (see HELO "[fe80::7f1c:9e91:8e04:70b2%ifb0]"), and responds with "501 5.0.0 Invalid HELO domain name"

Don't know which e-mail program you use and/or whether the HELO name can be configured, but you will have to check that, or contact strato.de to tell me to allow your name. Can't say right now whether the name should be allowed though, as it seems to be a non-routable IPv6 address, instead of your public one (the one mentioned by the server in reply to the HELO).

Good luck.

edit flag offensive delete publish link more

Comments

i use the default sfos mail program on the gemini. how can i alter the hostname mail communicates with the smtp ?

codeandcreate ( 2019-03-26 09:35:02 +0200 )edit
1

The HELO/EHLO name should be a FQDN, which ideally should resolve back and forward to the IP you are using to connect to the server.

However the server should not reject messages based on that, which strato.de is apparently doing. see RF2821, section 4.1.4: " The SMTP client MUST, if possible, ensure that the domain parameter to the EHLO command is a valid principal host name (not a CNAME or MX name) for its host. If this is not possible (e.g., when the client's address is dynamically assigned and the client does not have an obvious name), an address literal SHOULD be substituted for the domain name and supplemental information provided that will assist in identifying the client.

An SMTP server MAY verify that the domain name parameter in the EHLO command actually corresponds to the IP address of the client. However, the server MUST NOT refuse to accept a message for this reason if the verification fails: the information about verification failure is for logging and tracing only. "

I have no experience with the SFOS mail program. If it's using the hostname, it should be fine (my Jolla1 replies the domain name, hostname -i produces the (local) IP). But I have no clue why your mail program sends an invalid EHLO "[fe80::7f1c:9e91:8e04:70b2%ifb0]" (the "%ifb0" should not be there).

You should try with a better server (gmail, if you have an account there, will give you better diagnostics).

Add.: why the Sailfish mail program sends "AUTH CRAM-MD5" when the server has replied with 501 failure is a mystery to me (and a bug..)

So you might want to use a better e-mail program too.

reinob ( 2019-03-26 15:58:22 +0200 )edit
2

answered 2020-04-15 19:43:12 +0200

citronalco gravatar image

updated 2020-04-15 19:47:18 +0200

This is definitely a bug in the SFOS mail client: It does not sent its IP address properly in HELO when using IPv6.

My Postfix SMTP server says with enabled "reject_invalid_helo_hostname" option:

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]>

As far as I know the client is supposed not to send "helo=<[2a03:2260:116:0:2a3f:69ff:fecd:446]>", but helo=<[IPv6:2a03:2260:116:0:2a3f:69ff:fecd:446]>" - note the "IPv6:" before the IP address.

In your one year old example it should be: EHLO [IPv6:fe80::7f1c:9e91:8e04:70b2%ifb0]

See RFC 2821, chapter 4.1.3

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2019-03-25 21:08:28 +0200

Seen: 779 times

Last updated: Apr 15 '20