2019-01-16 21:01:09 +02:00
Configuration reference
=======================
This page explains the variables found in `` mailu.env `` .
In most cases `` mailu.env `` is setup correctly by the setup utility and can be left as-is.
However, some advanced settings or modifications can be done by modifying this file.
2017-11-01 21:12:17 +02:00
2018-10-11 17:14:37 +02:00
.. _common_cfg:
2017-11-01 21:12:17 +02:00
Common configuration
--------------------
2017-11-02 21:05:12 +02:00
The `` SECRET_KEY `` **must** be changed for every setup and set to a 16 bytes
2017-11-01 21:12:17 +02:00
randomly generated value. It is intended to secure authentication cookies
2018-10-11 17:14:37 +02:00
among other critical uses. This can be generated with a utility such as *pwgen* ,
which can be installed on most Linux systems:
.. code-block :: bash
apt-get install pwgen
pwgen 16 1
2017-11-01 21:12:17 +02:00
2017-11-02 21:05:12 +02:00
The `` DOMAIN `` holds the main e-mail domain for the server. This email domain
2017-11-01 21:12:17 +02:00
is used for bounce emails, for generating the postmaster email and other
technical addresses.
2017-11-02 21:05:12 +02:00
The `` HOSTNAMES `` are all public hostnames for the mail server. Mailu supports
2017-11-01 21:12:17 +02:00
a mail server with multiple hostnames. The first declared hostname is the main
hostname and will be exposed over SMTP, IMAP, etc.
2018-12-03 03:16:53 +02:00
The `` SUBNET `` defines the address range of the docker network used by Mailu.
This should not conflict with any networks to which your system is connected.
(Internal and external!). Normally this does not need to be changed,
unless there is a conflict with existing networks.
2017-11-02 21:05:12 +02:00
The `` POSTMASTER `` is the local part of the postmaster email address. It is
2017-11-01 21:12:17 +02:00
recommended to setup a generic value and later configure a mail alias for that
address.
2022-09-25 10:18:09 +02:00
The `` WILDCARD_SENDERS `` setting is a comma delimited list of user email addresses
2022-07-26 11:33:39 +02:00
that are allowed to send emails from any existing address (spoofing the sender).
2021-08-02 19:18:42 +02:00
2023-02-04 17:46:27 +02:00
The `` AUTH_RATELIMIT_IP `` (default: 5/hour) holds a security setting for fighting
attackers that attempt a password spraying attack. The value defines the limit of
authentication attempts that will be processed on **distinct** non-existing
accounts for a specific IP subnet as defined in
`` AUTH_RATELIMIT_IP_V4_MASK `` (default: /24) and
2023-02-07 10:54:50 +02:00
`` AUTH_RATELIMIT_IP_V6_MASK `` (default: /48).
2021-09-23 18:40:49 +02:00
2023-04-01 11:33:02 +02:00
The `` AUTH_RATELIMIT_USER `` (default: 50/day) holds a security setting for fighting
2021-09-23 18:40:49 +02:00
attackers that attempt to guess a user's password (typically using a password
2023-04-01 11:33:02 +02:00
bruteforce attack). The value defines the limit of distinct authentication attempts
allowed for any given account within a specific timeframe. Multiple attempts for the
same account with the same password only counts for one.
2021-09-23 18:40:49 +02:00
The `` AUTH_RATELIMIT_EXEMPTION_LENGTH `` (default: 86400) is the number of seconds
after a successful login for which a specific IP address is exempted from rate limits.
This ensures that users behind a NAT don't get locked out when a single client is
misconfigured... but also potentially allow for users to attack each-other.
2019-12-16 19:47:21 +02:00
2021-10-16 10:26:38 +02:00
The `` AUTH_RATELIMIT_EXEMPTION `` (default: '') is a comma separated list of network
CIDRs that won't be subject to any form of rate limiting. Specifying `` 0.0.0.0/0, ::/0 ``
there is a good way to disable rate limiting altogether.
2019-01-16 21:01:09 +02:00
The `` TLS_FLAVOR `` sets how Mailu handles TLS connections. Setting this value to
2022-07-26 11:33:39 +02:00
`` notls `` will cause Mailu not to serve any web content! More on :ref: `tls_flavor` .
2019-01-16 21:01:09 +02:00
2022-08-19 19:58:33 +02:00
The `` DEFAULT_SPAM_THRESHOLD `` (default: 80) is the default spam tolerance used when creating a new user.
2017-11-01 21:12:17 +02:00
Mail settings
-------------
2017-11-02 21:05:12 +02:00
The `` MESSAGE_SIZE_LIMIT `` is the maximum size of a single email. It should not
2017-11-01 21:12:17 +02:00
be too low to avoid dropping legitimate emails and should not be too high to
avoid filling the disks with large junk emails.
2021-11-06 11:05:52 +02:00
The `` MESSAGE_RATELIMIT `` (default: 200/day) is the maximum number of messages
a single user can send. `` MESSAGE_RATELIMIT_EXEMPTION `` contains a comma delimited
list of user email addresses that are exempted from any restriction. Those
settings are meant to reduce outbound spam in case of compromised or malicious
account on the server.
2020-02-09 18:38:18 +02:00
2021-11-01 10:24:26 +02:00
The `` RELAYNETS `` (default: unset) is a comma delimited list of network addresses
2021-11-01 10:26:54 +02:00
for which mail is relayed for with no authentication required. This should be
used with great care as misconfigurations may turn your Mailu instance into an
open-relay!
2021-11-01 10:24:26 +02:00
2021-11-01 10:26:54 +02:00
The `` RELAYHOST `` is an optional address to use as a smarthost for all outgoing
mail in following format: `` [HOST]:PORT `` . `` RELAYUSER `` and `` RELAYPASSWORD ``
can be used when authentication is required.
2017-11-01 21:12:17 +02:00
2020-05-02 21:02:53 +02:00
By default postfix uses "opportunistic TLS" for outbound mail. This can be changed
2021-08-30 17:00:12 +02:00
by setting `` OUTBOUND_TLS_LEVEL `` to `` encrypt `` or `` secure `` . This setting is
highly recommended if you are using a relayhost that supports TLS but discouraged
otherwise. `` DEFER_ON_TLS_ERROR `` (default: True) controls whether incomplete
policies (DANE without DNSSEC or "testing" MTA-STS policies) will be taken into
2022-10-19 19:36:13 +02:00
account and whether emails will be deferred if the additional checks enforced by
2021-08-30 17:00:12 +02:00
those policies fail.
2020-05-02 21:02:53 +02:00
2022-10-19 19:36:13 +02:00
Similarly by default nginx uses "opportunistic TLS" for inbound mail. This can be changed
2020-09-01 21:48:09 +02:00
by setting `` INBOUND_TLS_ENFORCE `` to `` True `` . Please note that this is forbidden for
internet facing hosts according to e.g. `RFC 3207`_ , because this prevents MTAs without STARTTLS
support or e.g. mismatching TLS versions to deliver emails to Mailu.
2022-12-19 12:53:05 +02:00
The `` SCAN_MACROS `` (default: True) setting controls whether Mailu will endavour
to reject emails containing documents with malicious macros. Under the hood, it uses
`mraptor from oletools`_ to determine whether a macro is malicious or not.
.. _`mraptor from oletools`: https://github.com/decalage2/oletools/wiki/mraptor
2020-09-01 21:48:09 +02:00
.. _`RFC 3207`: https://tools.ietf.org/html/rfc3207
2020-08-18 20:42:58 +02:00
.. _fetchmail:
2023-01-25 13:20:17 +02:00
When `` FETCHMAIL_ENABLED `` is set to `` True `` , the fetchmail functionality is enabled and
shown in the admin interface. The container itself still needs to be deployed manually.
`` FETCHMAIL_ENABLED `` defaults to `` True `` .
2022-10-20 13:41:35 +02:00
2017-11-02 21:05:12 +02:00
The `` FETCHMAIL_DELAY `` is a delay (in seconds) for the fetchmail service to
2017-11-01 21:12:17 +02:00
go and fetch new email if available. Do not use too short delays if you do not
want to be blacklisted by external services, but not too long delays if you
want to receive your email in time.
2021-10-09 18:58:51 +02:00
The `` RECIPIENT_DELIMITER `` is a list of characters used to delimit localpart
from a custom address part. For instance, if set to `` +- `` , users can use
addresses like `` localpart+custom@example.com `` or `` localpart-custom@example.com ``
to deliver mail to `` localpart@example.com `` .
2017-11-01 21:12:17 +02:00
This is useful to provide external parties with different email addresses and
later classify incoming mail based on the custom part.
2018-01-30 04:23:55 +02:00
The `` DMARC_RUA `` and `` DMARC_RUF `` are DMARC protocol specific values. They hold
2017-11-01 21:12:17 +02:00
the localpart for DMARC rua and ruf email addresses.
2023-10-09 17:38:15 +02:00
The `` FULL_TEXT_SEARCH `` variable (default: 'en') is a comma separated list of
language codes as defined on `fts_languages`_ . This feature can be disabled
(e.g. for performance reasons) by setting the variable to `` off `` .
2020-07-12 21:26:22 +02:00
2023-06-23 14:51:16 +02:00
You can set a global `` DEFAULT_QUOTA `` to be used for mailboxes when the domain has
no specific quota configured.
2023-10-09 17:38:15 +02:00
.. _`fts_languages`: https://doc.dovecot.org/settings/plugin/fts-plugin/#fts-languages
2020-10-05 16:13:07 +02:00
.. _web_settings:
2017-11-01 21:12:17 +02:00
Web settings
------------
2021-11-23 18:13:31 +02:00
- `` WEB_ADMIN `` contains the path to the main admin interface
2020-10-05 16:13:07 +02:00
- `` WEB_WEBMAIL `` contains the path to the Web email client.
2023-01-25 17:26:10 +02:00
- `` WEB_API `` contains the path to the RESTful API.
2020-10-05 16:13:07 +02:00
- `` WEBROOT_REDIRECT `` redirects all non-found queries to the set path.
2022-09-25 10:18:09 +02:00
An empty `` WEBROOT_REDIRECT `` value disables redirecting and enables
2022-07-26 11:33:39 +02:00
classic behavior of a 404 result when not found.
2022-09-25 10:18:09 +02:00
Alternatively, `` WEBROOT_REDIRECT `` can be set to `` none `` if you
2022-07-26 11:33:39 +02:00
are using an Nginx override for `` location / `` .
2020-10-05 16:13:07 +02:00
2023-01-25 17:26:10 +02:00
All four options need a leading slash (`` / `` ) to work.
2019-01-07 12:23:18 +02:00
.. note :: `` WEBROOT_REDIRECT `` has to point to a valid path on the webserver.
This means it cannot point to any services which are not enabled.
For example, don't point it to `` /webmail `` when `` WEBMAIL=none ``
2017-11-01 21:12:17 +02:00
2017-11-02 21:05:12 +02:00
Both `` SITENAME `` and `` WEBSITE `` are customization options for the panel menu
in the admin interface, while `` SITENAME `` is a customization option for
2017-11-01 21:12:17 +02:00
every Web interface.
2022-09-25 10:18:09 +02:00
- `` LOGO_BACKGROUND `` sets a custom background colour for the brand logo
in the topleft of the main admin interface.
2021-09-08 14:30:28 +02:00
For a list of colour codes refer to this page of `w3schools`_ .
2022-09-25 10:18:09 +02:00
- `` LOGO_URL `` sets a URL for a custom logo. This logo replaces the Mailu
2022-07-26 11:33:39 +02:00
logo in the topleft of the main admin interface.
2021-09-08 14:30:28 +02:00
.. _`w3schools`: https://www.w3schools.com/cssref/css_colors.asp
2019-05-21 20:06:25 +02:00
.. _admin_account:
Admin account - automatic creation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For administrative tasks, an admin user account will be needed. You can create it manually,
after deploying the system, or automatically.
To create it manually, follow the specific deployment method documentation.
To have the account created automatically, you just need to define a few environment variables:
2021-12-22 16:00:39 +02:00
- `` INITIAL_ADMIN_ACCOUNT `` : the admin username: The first part of the e-mail address before the @.
- `` INITIAL_ADMIN_DOMAIN `` : the domain appendix: Most probably identical to the `` DOMAIN `` variable.
- `` INITIAL_ADMIN_PW `` : the admin password.
2021-12-22 19:18:15 +02:00
- `` INITIAL_ADMIN_MODE `` : use one of the options below for configuring how the admin account must be created:
2022-08-19 19:58:33 +02:00
2021-12-22 20:38:46 +02:00
- `` create `` : (default) creates a new admin account and raises an exception when it already exists.
2021-12-22 19:18:15 +02:00
- `` ifmissing `` : creates a new admin account when the admin account does not exist.
- `` update `` : creates a new admin account when it does not exist, or update the password of an existing admin account.
2021-12-22 16:00:39 +02:00
2022-09-25 10:18:09 +02:00
Note: It is recommended to set `` INITIAL_ADMIN_MODE `` to either `` update `` or `` ifmissing `` . Leaving it with the
2022-07-26 11:33:39 +02:00
default value will cause an error when the system is restarted.
2019-05-21 20:06:25 +02:00
2021-12-22 16:00:39 +02:00
An example:
2019-05-21 20:06:25 +02:00
2021-12-22 16:00:39 +02:00
.. code-block :: bash
2019-05-21 20:06:25 +02:00
2021-12-22 16:00:39 +02:00
INITIAL_ADMIN_ACCOUNT=me
INITIAL_ADMIN_DOMAIN=example.net
INITIAL_ADMIN_PW=password
INITIAL_ADMIN_MODE=ifmissing
2019-05-21 20:06:25 +02:00
Depending on your particular deployment you most probably will want to change the default.
2022-09-25 10:18:09 +02:00
.. _advanced_settings:
2022-04-26 22:07:50 +02:00
2017-11-01 21:12:17 +02:00
Advanced settings
-----------------
2023-01-25 17:26:10 +02:00
The `` API_TOKEN `` (default: None) configures the authentication token.
This token must be passed as request header to the API as authentication token.
This is a mandatory setting for using the RESTful API.
2022-09-25 10:18:09 +02:00
The `` CREDENTIAL_ROUNDS `` (default: 12) setting is the number of rounds used by the
password hashing scheme. The number of rounds can be reduced in case faster
authentication is needed or increased when additional protection is desired.
Keep in mind that this is a mitigation against offline attacks on password hashes,
2022-07-26 11:33:39 +02:00
aiming to prevent credential stuffing (due to password re-use) on other systems.
2018-01-24 01:55:43 +02:00
2022-09-25 10:18:09 +02:00
The `` SESSION_COOKIE_SECURE `` (default: True) setting controls the secure flag on
the cookies of the administrative interface. It should only be turned off if you
2022-07-26 11:33:39 +02:00
intend to access it over plain HTTP.
2018-01-24 01:55:43 +02:00
2022-09-25 10:18:09 +02:00
`` SESSION_TIMEOUT `` (default: 3600) is the maximum amount of time in seconds between
requests before a session is invalidated. `` PERMANENT_SESSION_LIFETIME `` (default: 108000)
2022-07-26 11:33:39 +02:00
is the maximum amount of time in seconds a session can be kept alive for if it hasn't timed-out.
2021-02-22 22:15:25 +02:00
2019-01-08 00:58:01 +02:00
The `` LOG_LEVEL `` setting is used by the python start-up scripts as a logging threshold.
Log messages equal or higher than this priority will be printed.
Can be one of: CRITICAL, ERROR, WARNING, INFO, DEBUG or NOTSET.
See the `python docs`_ for more information.
.. _`python docs`: https://docs.python.org/3.6/library/logging.html#logging-levels
2022-09-25 10:18:09 +02:00
The `` LETSENCRYPT_SHORTCHAIN `` (default: False) setting controls whether we send the
ISRG Root X1 certificate in TLS handshakes. This is required for `android handsets older than 7.1.1`
2022-07-26 11:33:39 +02:00
but slows down the performance of modern devices.
2021-08-10 12:19:51 +02:00
.. _`android handsets older than 7.1.1`: https://community.letsencrypt.org/t/production-chain-changes/150739
2022-09-14 10:59:38 +02:00
The `` TLS_PERMISSIVE `` (default: true) setting controls whether ciphers and protocols offered on port 25 for STARTTLS are optimized for maximum compatibility. We **strongly recommend** that you do **not** change this setting on the basis that any encryption beats no encryption. If you are subject to compliance requirements and are not afraid of losing emails as a result of artificially reducing compatibility, set it to 'false'. Keep in mind that servers that are running a software stack old enough to not be compatible with the current TLS requirements will either a) deliver in plaintext b) bounce emails c) silently drop emails; moreover, modern servers will benefit from various downgrade protections (DOWNGRD, RFC7507) making the security argument mostly a moot point.
2023-04-22 10:36:03 +02:00
The `` COMPRESSION `` (default: unset) setting controls whether emails are stored compressed at rest on disk. Valid values are `` gz `` , `` bz2 `` or `` zstd `` and additional settings can be configured via `` COMPRESSION_LEVEL `` , see `zlib_save_level`_ for accepted values. If the underlying filesystem supports compression natively you should use it instead of this setting as it will be more efficient and will improve compatibility with 3rd party tools.
.. _`zlib_save_level`: https://doc.dovecot.org/settings/plugin/zlib-plugin/#plugin_setting-zlib-zlib_save_level
2023-04-22 08:24:36 +02:00
2021-11-12 15:30:31 +02:00
.. _reverse_proxy_headers:
2022-09-25 10:18:09 +02:00
The `` REAL_IP_HEADER `` (default: unset) and `` REAL_IP_FROM `` (default: unset) settings
controls whether HTTP headers such as `` X-Forwarded-For `` or `` X-Real-IP `` should be trusted.
The former should be the name of the HTTP header to extract the client IP address from and the
later a comma separated list of IP addresses designating which proxies to trust.
If you are using Mailu behind a reverse proxy, you should set both. Setting the former without
2023-03-27 22:37:09 +02:00
the latter introduces a security vulnerability allowing a potential attacker to spoof their source address.
2021-08-10 12:19:51 +02:00
2021-11-05 15:44:12 +02:00
The `` TZ `` sets the timezone Mailu will use. The timezone naming convention usually uses a `` Region/City `` format. See `TZ database name`_ for a list of valid timezones This defaults to `` Etc/UTC `` . Warning: if you are observing different timestamps in your log files you should change your hosts timezone to UTC instead of changing TZ to your local timezone. Using UTC allows easy log correlation with remote MTAs.
.. _`TZ database name`: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
2023-03-25 17:23:05 +02:00
The `` PROXY_PROTOCOL `` (default: unset) allows the the front container to receive TCP and HTTP connections with
2023-03-27 22:27:08 +02:00
the `PROXY protocol`_ (originally introduced in HAProxy, now also configurable in other proxy servers).
It can be set to:
2023-03-28 17:38:20 +02:00
2023-03-25 17:23:05 +02:00
* `` http `` to accept the `` PROXY `` protocol on nginx's HTTP proxy ports
* `` mail `` to accept the `` PROXY `` protocol on nginx's mail proxy ports
* `` all `` to accept the `` PROXY `` protocol on all nginx's HTTP and mail proxy ports
2023-03-27 22:27:08 +02:00
.. _`PROXY protocol`: https://github.com/haproxy/haproxy/blob/master/doc/proxy-protocol.txt
This requires to have a valid `` REAL_IP_FROM `` (default: unset). Setting `` PROXY_PROTOCOL `` without setting
2023-03-28 17:38:20 +02:00
`` REAL_IP_FROM `` *will not work* . The `` REAL_IP_HEADER `` **must be unset** . Otherwise Mailu will not accept
the IP address from the remote client specified by the proxy. This results in the proxy being rate limited
or even banned (when fail2ban is used).
Make sure to set a `` REAL_IP_FROM `` only pointing to IP addresses or networks
2023-03-27 22:27:08 +02:00
that you trust; accepting the `` PROXY `` protocol from untrusted sources is a serious security vulnerability,
2023-03-27 22:37:09 +02:00
allowing a potential attacker to spoof their source address.
2023-03-25 17:23:05 +02:00
2019-11-19 12:02:00 +02:00
Antivirus settings
------------------
The `` ANTIVIRUS_ACTION `` switches behaviour if a virus is detected. It defaults to 'discard',
so any detected virus is silently discarded. If set to 'reject', rspamd is configured to reject
virus mails during SMTP dialogue, so the sender will receive a reject message.
2018-01-24 01:55:43 +02:00
Infrastructure settings
-----------------------
2022-12-08 13:46:31 +02:00
Various environment variables `` *_ADDRESS `` can be used to run Mailu containers
2018-01-24 01:55:43 +02:00
separately from a supported orchestrator. It is used by the various components
2022-12-08 13:46:31 +02:00
to find the location of the other containers it depends on. Those variables are:
- `` ADMIN_ADDRESS ``
- `` ANTISPAM_ADDRESS ``
- `` ANTIVIRUS_ADDRESS ``
- `` FRONT_ADDRESS ``
- `` IMAP_ADDRESS ``
- `` REDIS_ADDRESS ``
- `` SMTP_ADDRESS ``
- `` WEBDAV_ADDRESS ``
- `` WEBMAIL_ADDRESS ``
These are used for DNS based service discovery with possibly changing services IP addresses.
`` *_ADDRESS `` values must be fully qualified domain names without port numbers.
2018-01-24 01:55:43 +02:00
2021-11-23 18:13:31 +02:00
.. _db_settings:
2021-06-19 09:12:46 +02:00
Database settings
-----------------
2023-03-26 18:55:55 +02:00
Both the admin and roundcube services store their configurations in a SQLite database.
Alternatives hosted options like PostgreSQL and MariaDB/MySQL can be configured using `DB URL`_
but the development team recommends against it. Indeed, there is currently very little data
to be stored and SQLite is deemed both sufficient, simpler and more reliable overall.
2021-06-19 09:12:46 +02:00
2023-05-06 18:59:08 +02:00
- `` SQLALCHEMY_DATABASE_URI `` (default: `` sqlite:////data/main.db `` ): the SQLAlchemy database URL for accessing the database
- `` SQLALCHEMY_DATABASE_URI_ROUNDCUBE `` (default: `` sqlite:////data/roundcube.db `` ): the Roundcube database URL for accessing the Roundcube database
2021-06-19 09:12:46 +02:00
2023-03-26 14:21:00 +02:00
For PostgreSQL use driver postgresql (`` SQLALCHEMY_DATABASE_URI=postgresql://mailu:mailu_secret_password@database/mailu `` ).
2021-06-19 09:12:46 +02:00
2023-05-06 18:59:08 +02:00
For MariaDB/MySQL use driver mysql+mysqlconnector (`` SQLALCHEMY_DATABASE_URI= mysql+mysqlconnector://mailu:mailu_secret_password@database/mailu `` ).
2022-11-15 12:12:27 +02:00
2023-03-26 14:21:00 +02:00
For Roundcube, refer to the `roundcube documentation`_ for the URL specification.
2018-01-31 23:24:54 +02:00
2023-03-26 14:21:00 +02:00
.. _`DB URL`: https://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls
.. _`roundcube documentation`: https://github.com/roundcube/roundcubemail/blob/master/config/defaults.inc.php#L28
2021-11-23 23:46:56 +02:00
2021-12-18 18:43:21 +02:00
Webmail settings
----------------
When using roundcube it is possible to select the plugins to be enabled by setting `` ROUNDCUBE_PLUGINS `` to
a comma separated list of plugin-names. Included plugins are:
- acl (needs configuration)
- additional_message_headers (needs configuration)
- archive
- attachment_reminder
- carddav
- database_attachmentsi
- debug_logger
- emoticons
- enigma
- help
- hide_blockquote
- identicon
- identity_select
- jqueryui
- mailu
- managesieve
- markasjunk
- new_user_dialog
- newmail_notifier
- reconnect
- show_additional_headers (needs configuration)
- subscriptions_option
- vcard_attachments
- zipdownload
If `` ROUNDCUBE_PLUGINS `` is not set the following plugins are enabled by default:
- archive
- carddav
- enigma
- mailu
- managesieve
- markasjunk
- zipdownload
To disable all plugins just set `` ROUNDCUBE_PLUGINS `` to `` mailu `` .
2022-08-22 09:30:15 +02:00
To configure a plugin add php files named `` *.inc.php `` to roundcube's :ref: `override section <override-label>` .
2018-01-31 23:24:54 +02:00
2021-11-23 23:43:00 +02:00
Mail log settings
-----------------
2021-01-23 17:16:07 +02:00
By default, all services log directly to stdout/stderr. Logs can be collected by any docker log processing solution.
2022-09-25 10:18:09 +02:00
Postfix writes the logs to a syslog server which logs to stdout. This is used to filter
out messages from the healthcheck. In some situations, a separate mail log is required
(e.g. for legal reasons). The syslog server can be configured to write log files to a volume.
2022-07-26 11:33:39 +02:00
It can be configured with the following option:
2021-12-01 14:40:28 +02:00
- `` POSTFIX_LOG_FILE `` : The file to log the mail log to. When enabled, the syslog server will also log to stdout.
2021-01-23 17:16:07 +02:00
2022-09-25 10:18:09 +02:00
When `` POSTFIX_LOG_FILE `` is enabled, the logrotate program will automatically rotate the
logs every week and keep 52 logs. To override the logrotate configuration, create the file logrotate.conf
2022-07-26 11:33:39 +02:00
with the desired configuration in the :ref: `Postfix overrides folder<override-label>` .
2022-11-19 18:59:31 +02:00
2023-04-06 11:04:04 +02:00
.. _header_authentication:
2022-11-19 18:59:31 +02:00
Header authentication using an external proxy
---------------------------------------------
The `` PROXY_AUTH_WHITELIST `` (default: unset/disabled) option allows you to configure a comma separated list of CIDRs of proxies to trust for authentication. This list is separate from `` REAL_IP_FROM `` and any entry in `` PROXY_AUTH_WHITELIST `` should also appear in `` REAL_IP_FROM `` .
Use `` PROXY_AUTH_HEADER `` (default: 'X-Auth-Email') to customize which HTTP header the email address of the user to authenticate as should be and `` PROXY_AUTH_CREATE `` (default: False) to control whether non-existing accounts should be auto-created. Please note that Mailu doesn't currently support creating new users for non-existing domains; you do need to create all the domains that may be used manually.
2023-03-15 18:04:30 +02:00
Once configured, any request to /sso/login with the correct headers will be authenticated unless the "noproxyauth" parameter is passed, in which case the "standard" login form will be displayed. Please check issues `1972`_ and `2692`_ for more details.
Requests to:
- "/sso/login" results the user being redirected to the web administration interface after authentication.
- "/admin" (`` WEB_ADMIN=/admin `` ) results the user being redirected to the web administration interface after authentication.
- "/webmail" (`` WEB_WEBMAIL=/webmail `` ) results the user being redirected to the web administration interface after authentication.
2022-11-19 18:59:31 +02:00
2023-03-11 11:15:44 +02:00
Use `` PROXY_AUTH_LOGOUT_URL `` (default: unset) to redirect users to a specific URL after they have been logged out.
2022-11-19 18:59:31 +02:00
.. _`1972`: https://github.com/Mailu/Mailu/issues/1972
2023-03-12 20:40:44 +02:00
.. _`2692`: https://github.com/Mailu/Mailu/issues/2692