Status: Closed (View Workflow)
Resolution: Out of Date
Affects Version/s: None
Fix Version/s: None
Docs QE Status:NEW
Currently the configuration of JavaMail options is quite limited,
e.g. special options like mail.smtp.localhost cannot be set and
require a custom EmailSenderProvider.
It would be great if one could configure arbitrary JavaMail properties globally
and on realm level.
See the full list of JavaMail Properties here:
Concrete usecase is many SMTP servers on the Internet require a fully
qualified domain name in the HELO/EHLO command for SMTP.
Currently Keycloak/JavaMail tries to get the fully qualified domain name from your operating system.
However, often the OS only returns the current host name rather than FQDN, e.g. in some private cloud environments.
In such cases the SMTP auth failes and thus does not allow to send emails.
A workaround is to whitelist the IP addresses of the keycloak server(s) on the Mail Server but it
would be better to be able to configure Keycloak properly, e.g. by setting the
JavaMail property mail.smtp.localhost to something like mail.mycompany.com.