# Set to true to ignore issues in a project (defaults to false)
# Set to true to ignore issues in a project (defaults to false)
exemptProjects:false
exemptProjects:true
# Set to true to ignore issues in a milestone (defaults to false)
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones:true
exemptMilestones:true
@ -36,10 +36,14 @@ exemptAssignees: true
staleLabel:status/response_needed
staleLabel:status/response_needed
# Comment to post when marking as stale. Set to `false` to disable
# Comment to post when marking as stale. Set to `false` to disable
markComment:>
markComment:|
This issue has been automatically marked as stale because it has not had
Issues not for bugs, enhancement requests or discussion go stale after 21 days of inactivity. This issue will be automatically closed after 14 days.
recent activity. It will be closed if no further activity occurs. Thank you
For all metrics refer to the [stale.yml file](https://github.com/Mailu/Mailu/blob/master/.github/stale.yml).
for your contributions.
Github issues are not meant for user support. For **user-support questions**, reach out on the [matrix support channel](https://matrix.to/#/#mailu:tedomum.net).
Mark the issue as fresh by simply adding a comment to the issue.
If this issue is safe to close, please do so now.
# Comment to post when removing the stale label.
# Comment to post when removing the stale label.
# unmarkComment: >
# unmarkComment: >
@ -47,9 +51,8 @@ markComment: >
# Comment to post when closing a stale Issue or Pull Request.
# Comment to post when closing a stale Issue or Pull Request.
closeComment:>
closeComment:>
This issue has not seen activity since as it has become stale. It will now be
This issue has not seen activity since as it has become stale.
automatically closed. Please note that this is an automatic action, and not
Stale issues are automatically closed after 14 days.
meant in any offensive way.
# Limit the number of actions per hour, from 1-30. Default is 30
# Limit the number of actions per hour, from 1-30. Default is 30
This is a new automatic release of Mailu. The new version can be seen in the tag name.
The main version X.Y (e.g. 1.8) will always reflect the latest version of the branch. To update your Mailu installation simply pull the latest images `docker-compose pull && docker-compose up -d`.
The pinned version X.Y.Z (e.g. 1.8.1) is not updated. It is pinned to the commit that was used for creating this release. You can use a pinned version to make sure your Mailu installation is not suddenly updated when recreating containers. The pinned version allows the user to manually update. It also allows to go back to a previous pinned version.
To check what was changed:
- Go to https://github.com/Mailu/Mailu/tree/master/towncrier/newsfragments
- Change the branch to the tag of this release.
- Read the news fragment files to check what was changed.
The release notes of the original release can be accessed via menu item 'Release notes' on [mailu.io](https://mailu.io/).
By default Mailu uses a SQLite database. Recently, we have changed the internals of Mailu
By default Mailu uses a SQLite database. We have changed the internals of Mailu
to enable the support of alternative database solutions as postgresql and mysql/mariadb.
to enable the support of alternative database solutions such as PostgreSQL and MySQL/MariaDB.
This functionality should still be considered experimental!
Mailu Postgresql
----------------
Mailu optionally comes with a pre-configured Postgresql image, which as of 1.8, is deprecated
Migrating to a different database back-end
and will be removed in 1.9.
------------------------------------------
This images has the following features:
- Automatic creation of users, db, extensions and password;
From Mailu 1.9, Mailu has a :ref:`cli command (link) <config-export>` for exporting and importing the complete Mailu configuration.
- TCP connections are only allowed from the mailu `SUBNET`;
Using this tool it is very easy to switch what database back-end is used for Mailu.
- Automatic minutely *wal archiving* and weekly `pg_basebackup`;
Unfortunately roundcube does not have a tool for exporting/importing its configuration.
- Automatic cleaning of *wal archives* and *base backups*;
This means it is not possible to switch the database back-end used by roundcube using out of box tools.
Two versions always remain available;
- When `/data` is empty and backups are present, the backups are restored automatically;
Useful in swarm environments, since the /data directory should not be on any network
filesystem (performance).
To make use of this functionality, just select `postgresql` as database flavor.
To switch to a different database back-end:
Don't select the usage of an external database. The ``docker-compose.yml`` and ``mailu.env``
will pull in ``mailu/postgresql``. This image and ``mailu/admin`` contain all the scripts
to automatically setup the database.
After bring up the service, it might be useful to check the logs with:
1. Run config-export to export the configuration. E.g. `docker-compose exec admin flask mailu config-export --secrets --output mail-config.yml`
2. Set up your new database server. Refer to the subsequent sections for tips for creating the database.
3. Modify the database settings (DB_*) in mailu.env. Refer to the :ref:`configuration guide (link) <db_settings>` for the exact settings.
4. Start your Mailu deployment.
5. Run config-import to import the configuration. E.g. `docker exec -i $(docker-compose ps -q admin) flask mailu config-import -v < mail-config.yml`
..code-block:: bash
Mailu has now been switched to the new database back-end. The Mailu configuration has also been migrated.
docker-compose logs -f admin database
..note::
The setup configuration wizard (setup.mailu.io) only supports creating config files for the same database back-end. When creating new config files, select the desired database flavour in the setup and enter dummy values for roundcube.
In the generated mailu.env file, configure all ROUNDCUBE_DB_* environment variables to the old values. For SQLite you can remove all the ROUNDCUBE_DB_* values.
External Postgresql
External MySQL/MariaDB
----------------------
It is also possible to use a MySQL/MariaDB database server, hosted elsewhere.
In this case you'll have to take to create an empty database for Mailu, corresponding user,
password and sufficient privileges on the database to ``CREATE TABLE``, ``DROP`` etc.
Usually making the user owner of the database would be the easiest thing to do.
The following commands can serve as an example on how to set up MySQL/MariaDB for Mailu usage.
Adjust this to your own liking.
..code-block:: sql
mysql> CREATE DATABASE mailu;
mysql> CREATE USER `mailu`@`%` IDENTIFIED WITH mysql_native_password BY `my-strong-password-here`;
mysql> GRANT ALL PRIVILEGES ON mailu.* TO 'mailu'@'%';
mysql> FLUSH PRIVILEGES;
External PostgreSQL
-------------------
-------------------
It is also possible to use a Postgresql database server, hosted elsewhere.
It is also possible to use a PostgreSQL database server, hosted elsewhere.
In this case you'll have to take to create an empty database for Mailu, corresponding user,
In this case you'll have to take to create an empty database for Mailu, corresponding user,
password and sufficient privileges on the database to ``CREATE TABLE``, ``DROP`` etc.
password and sufficient privileges on the database to ``CREATE TABLE``, ``DROP`` etc.
Usually making the user owner of the database would be the easiest thing to do.
Usually making the user owner of the database would be the easiest thing to do.
Don't forget to set ``pg_hba.conf`` accordingly.
Don't forget to set ``pg_hba.conf`` accordingly.
The following commands can serve as an example on how to set up postgresql for Mailu usage.
The following commands can serve as an example on how to set up PostgreSQL for Mailu usage.
Adjust this to your own liking.
Adjust this to your own liking.
..code-block:: bash
..code-block:: bash
@ -72,42 +87,130 @@ In ``pg_hba.conf`` there should be a line like this:
Note that this example is the bare-minimum to get Mailu working. It goes without saying that
Note that this example is the bare-minimum to get Mailu working. It goes without saying that
the database admin will have to setup his own means of backups and TLS encrypted connections.
the database admin will have to setup his own means of backups and TLS encrypted connections.
External MySQL/Mariadb
Nowadays it is recommended to use the official PostgreSQL image from the PostgreSQL community. The repository is located `here <https://hub.docker.com/_/postgres>`_.
----------------------
It is also possible to use a mysql/mariadb database server, hosted elsewhere.
.._migrate_mailu_postgresql:
In this case you'll have to take to create an empty database for Mailu, corresponding user,
password and sufficient privileges on the database to ``CREATE TABLE``, ``DROP`` etc.
Usually making the user owner of the database would be the easiest thing to do.
The following commands can serve as an example on how to set up mysql/mariadb for Mailu usage.
Mailu PostgreSQL
Adjust this to your own liking.
----------------
..code-block:: sql
Mailu optionally came with a pre-configured PostgreSQL image which was deprecated in Mailu 1.8.
Since Mailu 1.9 it is removed from Mailu. The following section describes how to move to a different PostgreSQL image for novice administrators. The official PostgreSQL image (Postgres) will be used.
mysql> CREATE DATABASE mailu;
A Mailu deployment with the Mailu PostgreSQL image, only used PostgreSQL for the Admin container (Web administration interface). Roundcube used SQLite as database back-end.
mysql> CREATE USER 'mailu'@'%' IDENTIFIED BY 'my-strong-password-here';
Mailu uses the following configuration for connecting to the database:
mysql> GRANT ALL PRIVILEGES ON mailu.* TO 'mailu'@'%';
mysql> FLUSH PRIVILEGES;
Note that if you get any errors related to ``caching_sha2_password`` it can be solved by changing the encryption
of the password to ``mysql_native_password`` instead of the latest authentication plugin ``caching_sha2_password``.
..code-block:: sql
- Database host: 'database'
- Database name: 'mailu'
- Database user: 'mailu'
- Database password: See DB_PW in mailu.env.
mysql> SELECT host, user, plugin FROM mysql.user;
..note::
+-----------+-------+-----------------------+
The following instructions assume that
| host | user | plugin |
- project mailu is used. (-p mailu). If a different project (prefix) is used, then a different project can be specified.
+-----------+-------+-----------------------+
- the data folder is /mailu. Change this to a different value in case Mailu makes use of a different data folder.
| % | mailu | caching_sha2_password |
- All commands must be executed as root. On Debian/Ubuntu the sudo command is used to execute commands as root.
+-----------+-------+-----------------------+
Prepare the environment. Mailu must not be in use. Only the database container.
mysql> update mysql.user set plugin = 'mysql_native_password' where user = 'mailu';
mysql> SELECT host, user, plugin FROM mysql.user;
1. Open a terminal.
2. `cd /mailu`
+------+-------+-----------------------+
3. `docker-compose -p mailu down`
| host | user | plugin |
4. `docker-compose -p mailu up -d database`
+------+-------+-----------------------+
| % | mailu | mysql_native_password |
Create the dump SQL file for recreating the database.
The setup configuration wizard (setup.mailu.io) only supports creating config files for the same database back-end. When creating new config files, select PostgreSQL in the setup and enter dummy values for roundcube.
In the generated mailu.env file, remove all ROUNDCUBE_DB_* environment variables.
Now Admin will use PostgreSQL and roundcube will keep using Roundcube.
Roundcube does not offer a migration tool for moving from SQLite to PostgreSQL.