5.5. SMTP server configuration¶
You can define SMTP server configurations in the WebUI or with the SMTP server endpoints.
An SMTP server configuration contains the
server as FQDN, IP address or URL:
smtp://host[:port], orsmtps://host[:port]for TLS from the start (usually port 465; the current WebUI then hides the StartTLS checkbox). A port in the URL takes precedence over the port field.the port (defaults to 25),
the timeout in seconds (default 10),
the sender email address,
a username and password in case of authentication
an optional description
a TLS flag
S/MIME signing flag
S/MIME private_key
password for the private_key (empty if not needed)
S/MIME certificate
Don’t send on signing error flag
Note
To use S/MIME you need to configure the paths to your S/MIME private_key and certificate for each SMTP server via the WebUI.
Each SMTP server configuration is addressed via a unique identifier. You can then use such a configuration for the Email token, the SMTP SMS provider, the User Notification Handler Module, Email tokens enrolled by the Token Handler Module, the email notifications of Conditional Access, User registration and password_reset.
Under External Services -> SMTP Servers you can get a list of all configured SMTP servers, create new server definitions and delete them.
The list of SMTP servers.¶
Edit an existing SMTP server definition.¶
On the edit page you can enter all necessary attributes to talk to the SMTP server. You can also send a test email to the address in Recipient for Testing to verify that your settings are correct.
The checkbox Send mail from job queue enables sending all emails for the given SMTP server configuration via the Job Queue. It only has an effect if a job queue is configured. The previous WebUI only shows it then, the current WebUI always shows it. Note that if the checkbox is checked, any test email will also be sent via the queue. This also means that privacyIDEA displays a success notice when the job has been sent to the queue successfully, which does not necessarily mean that the mail was actually sent. Thus, it is important to check that the test email is actually received.
5.5.1. Stored password¶
privacyIDEA never returns the stored password, neither in the WebUI nor in the
SMTP server endpoints. Instead, the password field contains the placeholder
__CENSORED__. If you save the definition or send a test email with the
placeholder, privacyIDEA uses the stored password.
This only works as long as the server, the port, the username and the TLS flag stay the same. If you change one of them, you have to enter the password again before you can save the definition or send a test email. Otherwise privacyIDEA rejects the request with an error naming the changed settings. A definition without a password is not affected: its password field is empty and all settings can be changed.
Changed in version 3.14.1: The stored password is only kept or used if server, port, username and TLS flag are unchanged.