diff --git a/docs/rolereference.rst b/docs/rolereference.rst index 83dc41b1463ebcc6aad3afaec2cb9c79c17292d8..136026a40c778ce1d2c87f18b06a39c9723fe1ba 100644 --- a/docs/rolereference.rst +++ b/docs/rolereference.rst @@ -733,3 +733,58 @@ Here is an example configuration for setting-up XMPP server using Prosody: smtp_allow_relay_from: - ldap.example.com - xmpp.example.com + + +Mail Forwarder +-------------- + +The ``mail_forwarder`` role can be used for setting-up a local SMTP server for +sending out mails and receiving mails for local users. The SMTP server is +provided by Postfix. + +SMTP service on server set-up this way is not meant to be exposed to the +Internet directly, and should receive delivery failures from the relay server +instead. + +The role implements the following: + +* Installs and configures Postfix. +* Purges Exim4 configuration (just in case). +* Sets-up aliases for the local recipients. + +Postfix is configured as follows: + +* Local destinations are set-up. +* A relay host is set. + + +Parameters +~~~~~~~~~~ + +**local_mail_aliases** (dictionary, mandatory) + Dictionary defining the local aliases. Aliases defined this way will either be + appended to default aliases on the server, or replace the existing entries (if + the alias/recipient is already present). Keys in the dictionary are the local + recipients/aliases, while the value provided should be a space-separated list + of mail addresses (or local users) where the mails should be forwarded. + +**smtp_relay_host** (string, mandatory) + SMTP server via which the mails are sent out for non-local recipients. + + +Examples +~~~~~~~~ + +Here is an example configuration for setting-up the mail forwarder: + +.. code-block:: yaml + + --- + + # All mails sent to local user root will be forwarded to external account as + # well. + local_mail_aliases: + root: "root john.doe@example.com" + + smtp_relay_host: mail.example.com +