[keycloak-user] "Test connection" in Realm Settings/Email fails

Michael Kefeder mike at multiwave.ch
Mon Dec 11 07:23:06 EST 2017


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\",\"replyTo\":\"\",\"from\":\"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


More information about the keycloak-user mailing list