Helo command rejected: need fully-qualified hostname, can't add SMTP
Are there any related issues?
No, everything is fine with other accounts.
What operating system are you using?
Windows 10 x64 and Linux Mint 19.
What version of Mailspring are you using?
On Windows, 1.4.2-f587b7b7, on Mint, the same version, installed from snap.
--
Bug?
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 protected]> # 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
Is this an email sync or connection issue?
Connection.
Is the issue related to a specific email provider (Gmail, Exchange, etc.)?
Yep, to my workplace e-mail, which works with other mail clients using the same configuration.
Is the issue reproducible with a particular attachment, message, signature, etc?
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
--
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!
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
IP can be used instead of hostname, like this:
EHLO [10.20.30.121]
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
This issue has been mentioned on Mailspring Community. There might be relevant details there:
https://community.getmailspring.com/t/helo-command-rejected-need-fully-qualified-hostname-cant-add-smtp/674/1
We are in the process of migrating issues to Discourse, which can better facilitate discussion and discovery, and so GitHub Issues can focus on issues that are confirmed and slated for resolution in the near term. Learn more about the changes here.
As part of this, we've migrated this issue to Discourse:
https://community.getmailspring.com/t/helo-command-rejected-need-fully-qualified-hostname-cant-add-smtp/674
Please consider joining that community and continuing the discussion there! Votes on the issue on Discourse will help raise its priority in our planning.
@levaid @fredrik84 @underley @rdlu: if you join and reply to the issue, the moderators can make an effort to reassign your posts to you, so you get the credit for them.
We're closing and locking the issue here as part of this migration. Rest assured, this doesn't mean the issue is being discarded or ignored.
We hope to see you on Discourse soon!
-The Mailspring Team