OC300 sends localhost in EHLO smtp message, google doesn't like
OC300 sends localhost in EHLO smtp message, google doesn't like
I'm trying to setup e-mail notifications.
When the OC-300 connects to google it does the following:
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "smtp-relay.gmail.com", port 25, isSSL false
220 smtp-relay.gmail.com ESMTP o16-20020a81de50000000b005869ca7bcdbsm634088ywl.54 - gsmtp
DEBUG SMTP: connected to host "smtp-relay.gmail.com", port: 25
EHLO localhost
421-4.7.0 Try again later, closing connection. (EHLO)
421-4.7.0 Learn more at
421 4.7.0 https://support.google.com/a/answer/3221692 o16-20020a81de50000000b005869ca7bcdbsm634088ywl.54 - gsmtp
HELO localhost
DEBUG SMTP: EOF: [EOF]
It appears that google does not like 'localhost' in the EHLO message. I've tried w/wo SSL, w/wo AUTHENTICATION, etc. Always the same response.
It there somewhere to configure what hostname the OC-300 sends in that EHLO message? I have verified this by manually working through an SMTP session with the google relay and it is the localhost that is tripping it up.
- Copy Link
- Subscribe
- Bookmark
- Report Inappropriate Content
Steps to reproduce "localhost" problem when sending SMTP mail from OC-300 controller:
1) Go to Settings->Server Settings
2) Configure an SMTP Mail Server
2.1) Enable SMTP Server.
2.2) Enter "smtp-relay[.]gmail[.]com" in the "SMTP:" field.
2.3) Enter "25" in the "Port:" field.
2.4) Disable "SSL:".
2.5) Disable "Authentication:".
2.4) Enter a valid e-mail address in the "Sender Address:" field.
2.5) Click "Apply"
2.6) Enter a valid e-mail address in the "Send Test Email to" field.
2.7) Click "Send"
3) The UI responds with the following popup error at the top of the page:
"Failed to send the email to the specified recipient."
4) Download the OC-300 logs:
4.1) Go to Settings->Maintenance
4.2) At the very bottom click "Export Running Logs"
4.3) Your browser will download a file with a timestamped filename like this:
logs_yyyy-mm-dd_MM-HH-SS.zip
4.4) Unzip that file.
4.5) Locate the file logs/logs/startup.log
4.6) In the startup.log file you will find an error message like this:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.3)
DEBUG: setDebug: JavaMail version 1.6.2
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com[.]sun[.]mail[.]smtp[.]SMTPTransport,Oracle]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "smtp-relay[.]gmail[.]com", port 25, isSSL false
220 smtp-relay.gmail.com ESMTP o16-20020a81de50000000b005869ca7bcdbsm634088ywl.54 - gsmtp
DEBUG SMTP: connected to host "smtp-relay[.]gmail[.]com", port: 25
EHLO localhost
421-4.7.0 Try again later, closing connection. (EHLO)
421-4.7.0 Learn more at
421 4.7.0 https[:][/][/]support[.]google[.]com/a/answer/3221692 o16-20020a81de50000000b005869ca7bcdbsm634088ywl.54 - gsmtp
HELO localhost
DEBUG SMTP: EOF: [EOF]
4.7) This log shows that the OC-300 is sending an EHLO command to the SMTP server with a hostname of localhost. Many SMTP relays are no longer accepting localhost in this field. I can find no way in the UI to change the value that is sent.
I have temporarily setup an SMTP server running Postfix of my own here localy. I have pointed the OC-300 at my local SMTP server and I can confirm from those logs that yes the OC-300 is sending localhost.
- Copy Link
- Report Inappropriate Content
nah. i can send it to my server without any issues at all.
RTM. https://www.tp-link.com/us/support/faq/2919/
- Copy Link
- Report Inappropriate Content
what's the update?
- Copy Link
- Report Inappropriate Content
The update is the OC-300 sends an incorrect value (localhost) for the EHLO message and there appears to be no way to fix that.
The example that you provided was significantly different than my example. You were sending mail directly to gmail into the gmail smtp endpoint.
In my example I'm attempting to use smtp-relay.gmail.com because I could have addresses outside the gmail domain.
Sending to smtp-relay.gmail.com works correctly with everything else I've tried because the other things send a correct hostname.
I have no idea who to contact inside tp-link to get this fixed. The easiest fix would be to add a 'hostname' field in the SMTP Server setup screen and have the mail relay use that.
Michael
- Copy Link
- Report Inappropriate Content
Hello @gantzm,
Thanks for your valuable feedback!
After confirming with the support engineer, it doesn't support this kind of domain like "smtp-relay[.]gmail[.]com". I've recorded this request and will report it to the developer team for evaluation.
- Copy Link
- Report Inappropriate Content
Information
Helpful: 0
Views: 1243
Replies: 15
Voters 0
No one has voted for it yet.