Introduction / FirstSpirit Server configuration / Configuration files (FirstSpirit Server) / FirstSpirit Server (fs-server.conf) / Mail
Area: Mail
###########################
###########################
# mail.default-recipient=
# mail.sender=
# mail.smtp=
LICENSE_EXPIRATION_WARNING_DAYS=30
LICENSE_EXPIRATION_MAIL_ADDRESS=unknown
# Optional caching policy for successful name lookups from the name service.
# Can be specified as number of seconds to cache the successful lookup, -1 indicates "cache forever".
# https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html
networkaddress.cache.ttl=
mail.smtp
Specifies an SMTP mail server. This is required, since the server sends an e-mail upon request reporting on the result after delivery or generation of a site.
mail.smtp.port
This parameter is used to specify the port that the SMTP server should use to send e-mail messages. Port 25 is used by default.
mail.default-recipient
The default e-mail address.
mail.sender
The e-mail address that will be used as the sender for all FirstSpirit Server e-mail. If no e-mail address is specified here, an e-mail address using the following format will be used:
cmsserver@[Hostname],
where the host name is determined using the method
InetAddress.getLocalHost().getHostName().
mail.subject.charset
This parameter is used to set the encoding for the subject line in e-mail messages sent from FirstSpirit.
ISO-8859-1 is used by default.
mail.mime.charset
This parameter is used to set the encoding for the body in e-mail messages sent from FirstSpirit.
The encoding of the operating system running on FirstSpirit Server is used by default.
mail.smtp.login
This parameter specifies the user name used to authenticate against the SMTP server. The user configured here must be known by the specified SMTP server.
Additionally, this user's valid password must be configured using the parameter mail.smtp.password (see below) .
mail.smtp.password
This parameter specifies the password of the user (cf. mail.smtp.login, see above) used to authenticate against the SMTP server.
If both parameters (mail.smtp.login and mail.smtp.password) are configured, mail submission by FirstSpirit will use authenticated connections. If these parameters are not specified, authenticated connections will not be used.
Further configuration options
The Java interface “Javamail” provides further parameters and configuration options for mail submission (e.g. configuration of encryption). These parameters can be configured in the file fs-server.conf, prefixed with javamail, e.g.:
# enable SASL to support CRAM-MD5 authentication
javamail.mail.smtp.sasl.enable=true
For using an encrypted connection to the SMTP server the default protocol TLSv1.2 is used. If another protocol is needed, then this can be defined via the parameter
javamail.mail.smtp.ssl.protocols
SSL encrypted communication to the SMTP server can be ensured using the mail.smtp.port parameter, for example:
mail.smtp.port=587
javamail.mail.smtp.starttls.enable=true
javamail.mail.smtp.starttls.required=true
Note: Changes to the mail configuration do not require a server restart.
Reference to the Javamail-API:
https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html
Configuration of JVM time-to-live (TTL) for DNS name look-ups
networkaddress.cache.ttl
Caching of DNS entries can optionally be configured via the parameter networkaddress.cache.ttl.
# Permanent Caching - Java Default Setting
networkaddress.cache.ttl=-1
# Caching limited to a maximum of 60 seconds
networkaddress.cache.ttl=60
Background: The Java Virtual Machine (JVM) stores DNS name look-ups in the cache for a certain amount of time, known as time-to-live (TTL). A long-term TTL is problematic if the DNS name entries change, e.g. due to fail-overs (e.g. for sending e-mails) if the IP address of the SMTP server changes or due to operation in cloud mode. If the IP address of a resource is changed, a low TTL value (e.g. 60 seconds) ensures that the FirstSpirit server can obtain and use the new IP address of that resource by way of a new DNS query.
The default TTL value depends upon the JVM that is in use. The default TTL value corresponds to the value of the parameter of the same name in the java.security file of the JDK or -1 if no corresponding value was set. In the latter case (value is -1), the DNS entries are cached until the next restart of the Java VM.
The configured value is read from the configuration file as the server starts and is adopted accordingly via Security.setProperty.
If the parameter is not set, the JDK's TTL value is preserved.