SMTP: Helo command rejected: need fully-qualified hostname (solved)

Hello,

I just installed the newest verson of DeltaChat and run into a problem with my mailserver (Mailcow):

504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname; from=<xxx> to=<xxx> proto=ESMTP helo=<localhost>

Is there a way to tell DeltaChat to send a FQDN in the HELO phase of the connect? Would be great if I could make this work!

Thanks for any help in advance, Marc

Does your mail server have an internets resolvable domain?

sure, it’s a “real” mailserver with all bells and whistles. But it wants that the client that connects identifies itself with a fqdn in the ehlo/helo command and the question is if there is a way to tell DeltaChat to send a fqdn instead of “localhost”.

After reading the deltachat logs, I finally found out what the problem was: the SMTP authentication failed and therefore the Mailserver was rejecting the “invalid” EHLO (localhost). Postfix was configured that way, that authenticated clients can send whatever they want in the EHLO phase, but because DeltaChat was not authenticated, this check was active.

The question is now: why does DeltaChat not communicate properly, that the SMTP authentication failed?

Why is this marked as “solved”? There is no solution here that I can see.
DeltaChat does not send the FQDN, but <localhost> in many cases. This does seem to be a problem of the mail client (DeltaChat), or not?
I have the same problem.

Latest versions of Delta Chat send [127.0.0.1]:

Thanks. Hmm. Not sure I understand. 127.0.0.1 should also be wrong, or not?
I mean, when DeltaChat, using an e-mail@some-domain.fqdn says hello to the mail server it should say EHLO some-domain.fqdn or something, right? DeltaChat is not running on the server, so why would it say EHLO with the loopback address?
I still don’t have a good understanding of e-mail protocol. So maybe I am wrong.

Edit: Okay, probably I am wrong.
Thanks for informative comments in that issue: HELO "localhost" rejected (smtp and submission port) · Issue #1847 · deltachat/deltachat-core-rust · GitHub

But I still don’t understand really what is happening or how to work around it.
This error <localhost>: Helo command rejected: need fully-qualified hostname; happens sometimes here, but not always. How can this be?
It seems the mail server is sometimes accepting the EHLO from <localhost> and sometimes not? Any idea how this can be? Must be some inconsistency on our mail server? Using postfix here, with same smtp submission settings as shown in this GitHub issue comment here: HELO "localhost" rejected (smtp and submission port) · Issue #1847 · deltachat/deltachat-core-rust · GitHub

Is the proposed solution (sending EHLO [127.0.0.1] instead) already integrated in newer DeltaChat versions, or does it just in the development version? My DeltaChat installs are from December I think.

127.0.0.1 should also be wrong, or not?

No, see the thread linked above. [127.0.0.1] is a perfectly valid address literal.