6.7. Email sending through SMTP#
This section describes how to configure the SMTP server connection for Nubus for Kubernetes. Various components in Nubus for Kubernetes need an SMTP server for sending email notifications. For information about SMTP server requirements, see SMTP server.
You configure the SMTP server connection through the Helm Chart values file. The configuration includes connection parameters and authentication credentials. This page describes the configuration settings for each component in detail.
6.7.1. UMC Server SMTP configuration#
The UMC Server uses SMTP to send password reset emails and other notifications.
It retrieves SMTP connection parameters from UCR (Univention Configuration Registry),
defined in the nubusStackDataUms.stackDataContext values.
You configure the SMTP password separately through Helm Chart values.
To define the SMTP configuration for the UMC Server,
apply the following steps:
To configure the SMTP connection parameters for UMC Server, add the configuration in Listing 6.23 to your
values.yamlfile.Connection parameter reference
The
stackDataContextvalues populate the following UCR variables that UMC Server needs for self-service emails:smtpHostSMTP server hostname.
Populates the UCR variable
umc/self-service/passwordreset/email/server.smtpPortSMTP server port.
Common values are
25,587, and465. The default port is25.Populates the UCR variable
umc/self-service/passwordreset/email/server/port.smtpUserSMTP authentication username.
Populates the UCR variable
umc/self-service/passwordreset/email/server/user.smtpStartTlsUse StartTLS encryption.
Recommended for port
587. Possible values aretrueandfalse.Populates the UCR variable
umc/self-service/passwordreset/email/server/starttls.
nubusStackDataUms: stackDataContext: smtpHost: "smtp.example.com" smtpPort: 587 smtpUser: "smtp-user@example.com" smtpStartTls: true
To configure the SMTP password for UMC Server, choose one of the following options.
Use an existing Kubernetes secret to store the SMTP password. This option is recommended for production deployments.
nubusUmcServer.smtp.auth.existingSecret.nameThe name of the Kubernetes secret containing the SMTP password.
nubusUmcServer.smtp.auth.existingSecret.keyMapping.passwordThe key in the secret that contains the SMTP password.
Add the configuration in Listing 6.24 to your
values.yamlfile.nubusUmcServer: smtp: auth: existingSecret: name: "umc-smtp-credentials" keyMapping: password: "smtp-password"
Provide the SMTP password directly in the Helm Chart values. This option isn’t recommended for production deployments.
nubusUmcServer.smtp.auth.passwordThe SMTP password.
Add the configuration in Listing 6.25 to your
values.yamlfile.nubusUmcServer: smtp: auth: password: "<your-smtp-password>"
6.7.2. Keycloak Extensions SMTP configuration#
Note that the Keycloak Extensions provide experimental features and are currently disabled by default.
The Keycloak Extensions use SMTP to send account verification emails and other authentication-related notifications. To define the SMTP configuration for the Keycloak Extensions, apply the following steps:
To configure the SMTP connection parameters for Keycloak Extensions, add the configuration in Listing 6.26 to your
values.yamlfile.Connection parameter reference
The following Helm Chart values configure the SMTP connection for Keycloak Extensions:
nubusKeycloakExtensions.smtp.connection.hostSMTP server hostname.
nubusKeycloakExtensions.smtp.connection.portSMTP server port.
Common values are
25,587, and465.nubusKeycloakExtensions.smtp.connection.sslUse SSL/TLS encryption.
Possible values are
trueandfalse.nubusKeycloakExtensions.smtp.connection.starttlsUse StartTLS encryption.
Recommended for port
587. Possible values aretrueandfalse.nubusKeycloakExtensions.smtp.auth.enabledEnable SMTP authentication.
Possible values are
trueandfalse.nubusKeycloakExtensions.smtp.auth.usernameSMTP authentication username.
nubusKeycloakExtensions: smtp: connection: host: "smtp.example.com" port: "587" ssl: false starttls: true auth: enabled: true username: "smtp-user@example.com"
To configure the SMTP password for Keycloak Extensions, choose one of the following options.
Use an existing Kubernetes secret to store the SMTP password. This option is recommended for production deployments.
nubusKeycloakExtensions.smtp.auth.existingSecret.nameThe name of the Kubernetes secret containing the SMTP password.
nubusKeycloakExtensions.smtp.auth.existingSecret.keyMapping.passwordThe key in the secret that contains the SMTP password.
Add the configuration in Listing 6.27 to your
values.yamlfile.nubusKeycloakExtensions: smtp: auth: existingSecret: name: "keycloak-extensions-smtp-credentials" keyMapping: password: "smtp-password"
Provide the SMTP password directly in the Helm Chart values. This option isn’t recommended for production deployments.
nubusKeycloakExtensions.smtp.auth.passwordThe SMTP password.
Add the configuration in Listing 6.28 to your
values.yamlfile.nubusKeycloakExtensions: smtp: auth: password: "<your-smtp-password>"
See also
- SMTP server
for SMTP server requirements and recommendations.
- Overview
for general information about configuring Nubus for Kubernetes.