This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.
Outgoing Mail in Nice¶
Set Default Sender¶
For installations managed via Ansible, set mail_sender_default instead, see Configure Default Sender Addresses. Ansible will, in turn, set this property correctly.
The application property
email.default.from defines the global fallback sender address. It is used for mails
whose sender domain isn’t allowed, see next section, or if no sender address is available.
Allow Domains in Outgoing Mails¶
For installations managed via Ansible, set mail_domains instead, see Configure Email Sender Domains. Ansible will, in turn, set this property correctly.
Domains are allowed using the
email.allowedFromDomainsRegex application property. The value is a regular
expression matching the domains that are allowed as
From in emails.
Mail send from a domain not covered by the given regular expression are rewritten to the mail address specified on the
business unit, if any, and
Before you allow a domain make sure SPF, DKIM and DMARC are set up.
Rewrite Recipient Addresses¶
For installations managed via Ansible, set mail_allowed_recipients_enabled and mail_allowed_recipients instead, see Restrict Allowed Mail Recipients. Ansible will, in turn, set this property correctly.
recipientrewrite.mappings application property can be used to rewrite recipient addresses.
The syntax is very simple:
recipientrewrite.mappings=ORIGINAL -> REDIRECT1[, REDIRECT2]...[; ORIGINAL -> REDIRECT1[, REDIRECT2]...]...
Recipient address before rewriting.
Rewrite rule for the address. You can specify multiple
Rewrite All Recipients¶
A single asterisk (
*) can be used to redirect all mails.
recipientrewrite.mappings=* -> email@example.com
Rewrite One Domain¶
recipientrewrite.mappings=(.*?)@example.com -> $firstname.lastname@example.org
$1 matches the first group (=content of first
( … )) in the regular expression.
Rewrite to Multiple Recipients¶
recipientrewrite.mappings=(.*?)@tocco.ch -> $email@example.com, $firstname.lastname@example.org;
The name of the recipient is not preserved if multiple recipients are used.
Combine Multiple Rules¶
Redirect mails for
example.net and redirect everything else to
recipientrewrite.mappings=(.*?)@example\.com -> $email@example.com; * -> firstname.lastname@example.org
Because the first matching pattern, from left to right, wins make sure the wildcard pattern (
*) is at the
Use a Custom Mail Server¶
For installations managed via Ansible, set mail_relay instead, see Configure Mail Relay. Ansible will, in turn, set this property correctly.
In case a customer wishes to use his own SMTP server the application property
email.hostname can be used
to set a custom mail server. (Our mail server is preconfigured.)
A custom port can be set too (default is 25):