# SMTP Happy Eyeballs

**URL:** <https://forum.keycloak.org/t/smtp-happy-eyeballs/31338>\
**Category:** Configuring the server\
**Created:** [April 22, 2026, 3:56am UTC](https://forum.keycloak.org/t/smtp-happy-eyeballs/31338 "2026-04-22T03:56:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ciphermenial](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/ciphermenial/32/4423_2.png) [@ciphermenial](https://forum.keycloak.org/u/ciphermenial)\
**Post date:** [April 22, 2026, 3:56am UTC](https://forum.keycloak.org/t/smtp-happy-eyeballs/31338/1 "2026-04-22T03:56:28Z")

</div>

I have a local SMTP server configured for use with my internal servers. The SMTP server is only listening on IPv6. In the Keycloak SMTP configuration I have to manually enter the IPv6 address of the SMTP server. When I enter the FQDN of the SMTP server it fails because it tries to connect on IPv4 from Keycloak. I have tested by enabling inet4 on my SMTP server.

Should I put in an issue on Github for this or is there a configuration I can change on the server to resolve this?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [April 22, 2026, 11:01am UTC](https://forum.keycloak.org/t/smtp-happy-eyeballs/31338/2 "2026-04-22T11:01:49Z")

</div>

I’d suggest to open a discussion in the Keycloak GitHub repo and ask there for help, if somebody knows if this is possible. If there is a “no” or no answer, I’d convert the discussion into a enhancement issue to request IPv6 compliance for SMTP connections.  
Let’s see what answers you get from there…

---

<div class="post-metadata">

**Author:** ![ciphermenial](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/ciphermenial/32/4423_2.png) [@ciphermenial](https://forum.keycloak.org/u/ciphermenial)\
**Post date:** [April 22, 2026, 2:00pm UTC](https://forum.keycloak.org/t/smtp-happy-eyeballs/31338/3 "2026-04-22T14:00:04Z")

</div>

Will do!

IPv6 is working fine with SMTP. The issue is it isn’t following the standard of trying IPv6 first. If you use a FQDN that has both an A and a AAAA record, it using the IPv4 address by default.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/keycloak/original/1X/eb342909d95cf32cbb7517610022c6a0046a9ffb.png) [@system](https://forum.keycloak.org/u/system)\
**Post date:** [October 19, 2026, 2:00pm UTC](https://forum.keycloak.org/t/smtp-happy-eyeballs/31338/4 "2026-10-19T14:00:10Z")

</div>

Closed on October 19, 2026, 2:00pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
