You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure courier.smtp.connection_uri to smtps://<g-suite email address>:<application token>@smtp-relay.gmail.com:465/ and send any email (verification / recover / ...)
Relevant log output
No output but netstat shows the courier is continuously attempting to send the mail out.
However when setting RetryFailure: falseforgomail.Dialerin courier/smtp.go, I'm able to get error like:func=github.com/ory/kratos/courier.(*courier).dispatchEmailfile=/go/src/github.com/ory/kratos/courier/smtp.go:184error=map[message:gomail: could not send email 1: EOF stack_trace:stack trace could not be recovered from error type *mail.SendError]
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
After hacking around, I found the issue is caused by ory/mail module trying to handshake with gmail relay server with EHLO localhost since LocalName of the smtp dailer is not set (and localhost is the default local name) but gmail doesn't like it:
if I use openssl to establish an SSL connection with the server and send EHLO localhost, it will return 421 and hang up immediately:
However the current implementation doesn't support setting LocalName from config, in fact I tried to hard-code LocalName to "kratos" and it just works.
Another minor issue is RetryFailure: true makes back-off strategy not working as expected, for smtps://smtp-relay.gmail.com:465 it's continuously re-establishing connection silently and never stops or back-off exponentially.
The text was updated successfully, but these errors were encountered:
Preflight checklist
Describe the bug
Unable to send mails with smtps://smtp-relay.gmail.com:465
See below for relevant configuration, context, and workaround
also attach this ticket to #781
Reproducing the bug
Configure
courier.smtp.connection_uri
tosmtps://<g-suite email address>:<application token>@smtp-relay.gmail.com:465/
and send any email (verification / recover / ...)Relevant log output
Relevant configuration
Version
v0.9.0-alpha.3
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes with Helm
Additional Context
After hacking around, I found the issue is caused by ory/mail module trying to handshake with gmail relay server with
EHLO localhost
sinceLocalName
of the smtp dailer is not set (andlocalhost
is the default local name) but gmail doesn't like it:if I use openssl to establish an SSL connection with the server and send
EHLO localhost
, it will return 421 and hang up immediately:similar to https://stackoverflow.com/questions/65721463/phpmailer-not-sending-emails-from-localhost-using-gmails-smtp
However the current implementation doesn't support setting
LocalName
from config, in fact I tried to hard-codeLocalName
to"kratos"
and it just works.Another minor issue is
RetryFailure: true
makes back-off strategy not working as expected, forsmtps://smtp-relay.gmail.com:465
it's continuously re-establishing connection silently and never stops or back-off exponentially.The text was updated successfully, but these errors were encountered: