Helo command rejected: need fully-qualified hostname, can't add SMTP

Problem

I cannot add my work e-mail account with the same information as in other mail clients, like Thunderbird. I’ve removed the private information. Styx is the local machine’s name.

EHLO Styx
250-**********.******.**
250-PIPELINING
250-SIZE 26214400
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN **********************************************=
235 2.7.0 Authentication successful
MAIL FROM:<*****@******.**>
250 2.1.0 Ok
RCPT TO:<email@invalid.com> # I do not understand this line.
504 5.5.2 <Styx>: Helo command rejected: need fully-qualified hostname
SMTP Last Response Code: 504
SMTP Last Response: 5.5.2 <Styx>: Helo command rejected: need fully-qualified hostname

Context

Everytime I try to add my e-mail, it does not work.

Comparing it to a Thunderbird log, it sends the local IP as EHLO, or I don’t know. I hope the information I’ve provided is useful.

[7668:Main Thread]: I/SMTP SMTP Connecting to: ****.******.**:465
[7668:Main Thread]: I/SMTP SMTP Response: 220 **********.******.** ESMTP Postfix
[7668:Main Thread]: I/SMTP SMTP Send: EHLO [192.168.0.248] # It sends local address here.
[7668:Main Thread]: I/SMTP SMTP Response: 250-**********.******.**
[7668:Main Thread]: I/SMTP SMTP Response: 250-PIPELINING
[7668:Main Thread]: I/SMTP SMTP Response: 250-SIZE 26214400
[7668:Main Thread]: I/SMTP SMTP Response: 250-ETRN
[7668:Main Thread]: I/SMTP SMTP Response: 250-AUTH PLAIN LOGIN
[7668:Main Thread]: I/SMTP SMTP Response: 250-AUTH=PLAIN LOGIN
[7668:Main Thread]: I/SMTP SMTP Response: 250-ENHANCEDSTATUSCODES
[7668:Main Thread]: I/SMTP SMTP Response: 250-8BITMIME
[7668:Main Thread]: I/SMTP SMTP Response: 250 DSN
[7668:Main Thread]: D/SMTP SMTP auth: server caps 0x20334, pref 0x300, failed 0x0, avail caps 0x300
[7668:Main Thread]: D/SMTP (GSSAPI = 0x800, CRAM = 0x2000, NTLM = 0x4000, MSN =  0x8000, PLAIN = 0x200, LOGIN = 0x100, EXTERNAL = 0x400)
[7668:Main Thread]: D/SMTP trying auth method 0x200
[7668:Main Thread]: I/SMTP SMTP entering state: 16
[7668:Main Thread]: D/SMTP SMTP AuthLoginStep1() for *****@smtp.******.**
[7668:Main Thread]: D/SMTP PLAIN auth
[7668:Main Thread]: I/SMTP Logging suppressed for this command (it probably contained authentication information)
[7668:Main Thread]: I/SMTP SMTP Response: 235 2.7.0 Authentication successful
[7668:Main Thread]: D/SMTP SMTP Login response, code 235
[7668:Main Thread]: I/SMTP SMTP Send: MAIL FROM:<******@******.**> BODY=8BITMIME SIZE=440
[7668:Main Thread]: I/SMTP SMTP Response: 250 2.1.0 Ok
[7668:Main Thread]: I/SMTP SMTP Send: RCPT TO:<********@gmail.com>
[7668:Main Thread]: I/SMTP SMTP Response: 250 2.1.5 Ok
[7668:Main Thread]: I/SMTP SMTP Send: DATA
[7668:Main Thread]: I/SMTP SMTP Response: 354 End data with <CR><LF>.<CR><LF>
[7668:Main Thread]: I/SMTP SMTP Send: .
[7668:Main Thread]: I/SMTP SMTP Response: 250 2.0.0 Ok: queued as BB63BE0025
[7668:Main Thread]: I/SMTP SMTP Send: QUIT
[7668:Main Thread]: I/SMTP SMTP Response: 221 2.0.0 Bye

Email Provider

Specific to my workplace e-mail, which works with other mail clients using the same configuration. Everything is fine with other accounts.

Setup

  • OS and Version: Windows 10 x64 and Linux Mint 19
  • Mailspring Version: On Windows, 1.4.2-f587b7b7, on Mint, the same version, installed from snap.

(Orginally posted by levaid on GitHub.)

Hey! Thanks for reporting this—I’ve actually never seen an SMTP server strictly require valid hostnames, but it /is/ part of the spec. I’ll see if I can make Mailspring fall back to a valid hostname when your local host doesn’t have one. Stay tuned!


(Originally posted by bengotow on GitHub.)

My workaround for this (on Ubuntu 19.04) was to just set the hostname to a fqdn.

sudo hostname computer.domain.tld
echo computer.domain.tld > /etc/hostname

(Originally posted by fredrik84 on GitHub.)

IP can be used instead of hostname, like this:
EHLO [10.20.30.121]


(Originally posted by underley on GitHub.)

Any updates on this? My university server rejects mailspring because of this. While all other email clients works just fine.

Using Manjaro Linux and Mailspring 1.7.8


(Originally posted by rdlu on GitHub.)