[keycloak-user] "Test connection" in Realm Settings/Email fails
Bruno Oliveira
bruno at abstractj.org
Thu Dec 14 06:41:54 EST 2017
That's really strange. I tested it right now just running:
docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak
And used my gmail credentials to test SMTP settings. Everything works
like expected. Including the "Test connection" button.
Anyways, please file a Jira and provide the steps to reproduce,
environment setup and etc. The more detailed, the better.
On 2017-12-11, Michael Kefeder wrote:
> Hi Bruno,
>
> Thanks for your quick feedback. The admin-user in the master realm that I am
> logged on as, has a valid email address, yes. While checking this I
> configured the demo realm, I still have it from following the keycloak
> documentation, with the same smtp settings I have in my Multiwave and
> master, and tried: In the demo realm sending emails (eg verify email)
> works...
>
> Visually there is no difference between the smtp configs, so I looked at the
> DB table realm_smtp_config, for the Multiwave and master realm there is an
> empty entry for "replyTo", which causes the problem. Don't know how that
> made it in there, I guess me playing around with the Test-connection button
> created that entry.
>
> Anyways, deleting the entry from the database AND reloading keycloak fixed
> the sending emails issue.
>
> The test-connection button does not work in any realm.
>
> I am now off to write bug reports.
>
> Am 11.12.17 um 15:51 schrieb Bruno Oliveira:
> > Hi Michael, does the current logged in user has a valid e-mail address?
> > This functionality assumes that there's a valid e-mail for the user
> > requesting it. Not sure if that's the case, otherwise file a Jira with
> > the steps to reproduce and I will try to look at this.
> >
> > On Mon, Dec 11, 2017 at 11:11 AM Michael Kefeder <mike at multiwave.ch
> > <mailto:mike at multiwave.ch>> wrote:
> >
> > Hi List
> >
> > I installed your official docker image 3.4.1.Final and sending emails
> > from GUI "Users/$user/Credentials/Credential reset" failed with an
> > exception, that can be seen in `docker logs` output:
> > ERROR [org.keycloak.services] (default task-37) KC-SERVICES0088: Failed
> > to send execute actions email: org.keycloak.email.EmailException:
> > org.keycloak.email.EmailException: Please provide a valid address
> > at
> > org.keycloak.email.DefaultEmailSenderProvider.send(DefaultEmailSenderProvider.java:145)
> > ...
> >
> > I provided and saved a from-address in the Realm-Settings of course, so
> > I started to play around a bit trying to find the actual problem. I
> > found another issue: Klicking on the "Test connection" button in the
> > Realm Settings/Email tab triggers a "Status Code 400 Bad Request". Seen
> > in my javascript console (using Chrome and Firefox browser). It is a
> > POST request, but the Request URL contains all posted data, looking
> > almost like a GET request would, and therefore it includes the SMTP
> > servers password(!?), not sure if that is intended as this could end up
> > in a web-servers logfile. Looks like this (given URL is shortened):
> >
> > http://127.0.0.1:6789/auth/admin/realms/Multiwave/testSMTPConnection/%7B%22password%22:%22**********%22,%22starttls%22:true,...
> >
> > Here is the data I am POSTing (actual server/usernames changed to
> > protect the innocent):
> >
> > {"realm":"Multiwave","config":"{\"password\":\"**********\",\"starttls\":true,\"auth\":true,\"port\":587,\"host\":\"smtp.example.com
> > <http://smtp.example.com>\",\"replyTo\":\"\",\"from\":\"sso at example.com
> > <mailto:sso at example.com>\",\"fromDisplayName\":\"Keycloak\",\"ssl\":\"\",\"user\":\"smtp_loginname\"}"}
> >
> > any hints what I am doing wrong? Is this broken for somebody else using
> > docker? Not being able to send the reset-password emails is keeping me
> > from deploying keycloak for our users. Setting it up and implementing
> > the authentication clients against it worked really great so far, thanks
> > for your system!
> >
> > br
> > mike
> > _______________________________________________
> > keycloak-user mailing list
> > keycloak-user at lists.jboss.org <mailto:keycloak-user at lists.jboss.org>
> > https://lists.jboss.org/mailman/listinfo/keycloak-user
> >
>
--
abstractj
More information about the keycloak-user
mailing list