diff --git a/404.html b/404.html index 7648835cc..908f8afa8 100644 --- a/404.html +++ b/404.html @@ -73,8 +73,9 @@ -

Alle Befehle sind gemäß der Syntax des Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2392,6 +2393,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2482,11 +2483,45 @@

We automatically create daily backups (24h interval starting from running up -d) in /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/.

Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

Copy the file named after the user you want to restore to __MAILCOW_DIRECTORY__/data/conf/sogo.

-

1. Copy the backup: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

-

2. Run docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org

+
    +
  1. +

    Copy the backup: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

    +
  2. +
  3. +

    Run the following command:

    +
    +
    +
    +
    docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
    +
    +
    +
    +
    docker-compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
    +
    +
    +
    +

    Run sogo-tool without parameters to check for possible restore options.

    -

    3. Delete the copied backup by running rm __MAILCOW_DIRECTORY__/data/conf/sogo

    -

    4. Restart SOGo and Memcached: docker compose restart sogo-mailcow memcached-mailcow

    +
  4. +
  5. +

    Delete the copied backup by running rm __MAILCOW_DIRECTORY__/data/conf/sogo

    +
  6. +
  7. +

    Restart SOGo and Memcached:

    +
  8. +
+
+
+
+
docker compose restart sogo-mailcow memcached-mailcow
+
+
+
+
docker-compose restart sogo-mailcow memcached-mailcow
+
+
+
+

Mail

In case of an accidental deletion of a mailbox, you will be able to recover for (by default) 5 days. This depends on the MAILDIR_GC_TIME parameter in mailcow.conf.

A deleted mailbox is copied in its encrypted form to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage.

@@ -2494,16 +2529,27 @@

To restore make sure you are actually restoring to the same mailcow it was deleted from or you use the same encryption keys in crypt-vol-1.

Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

Copy the folders from /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized] back to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user] and resync the folder and recalc the quota:

-
docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
-docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
+
+
+
+
docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
+docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
 
+
+
+
docker-compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
+docker-compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
+
+
+
+

Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2518,6 +2564,8 @@ docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.ne
+ +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2653,7 +2654,21 @@ fi

On the destination (in this case /external_share/backups) you may want to have snapshot capabilities (ZFS, Btrfs etc.). Snapshot daily and keep for n days for a consistent backup. Do not rsync to a Samba share, you need to keep the correct permissions!

-

To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run docker compose pull and docker compose up -d.

+

To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run:

+
+
+
+
docker compose pull
+docker compose up -d
+
+
+
+
docker-compose pull
+docker-compose up -d
+
+
+
+

If you are lucky Redis and MariaDB can automatically fix the inconsistent databases (if they are inconsistent). In case of a corrupted database you'd need to use the helper script to restore the inconsistent elements. If a restore fails, try to extract the backups and copy the files back manually. Keep the file permissions!

@@ -2662,7 +2677,7 @@ In case of a corrupted database you'd need to use the helper script to restore t Last update: - 2022-10-25 14:46:12 + 2023-01-10 12:08:32 @@ -2677,6 +2692,8 @@ In case of a corrupted database you'd need to use the helper script to restore t + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2477,23 +2478,45 @@

Maildir

Backup

-

This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: -

cd /path/to/mailcow-dockerized
-docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
-

+

This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory:

+
+
+
+
cd /path/to/mailcow-dockerized
+docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
+
+
+
+
cd /path/to/mailcow-dockerized
+docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
+
+
+
+

You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. Set the filename backup_vmail.tar.gz to any custom name, but leave the path as it is. Example: [...] tar cvfz /backup/my_own_filename_.tar.gz

Restore

-
cd /path/to/mailcow-dockerized
-docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz
+
+
+
+
cd /path/to/mailcow-dockerized
+docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
 
+
+
+
cd /path/to/mailcow-dockerized
+docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
+
+
+
+

Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2508,6 +2531,8 @@ docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if e
+ +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2477,19 +2478,41 @@

MySQL (mysqldump)

Backup

-
cd /path/to/mailcow-dockerized
-source mailcow.conf
-DATE=$(date +"%Y%m%d_%H%M%S")
-docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
+
+
+
+
cd /path/to/mailcow-dockerized
+source mailcow.conf
+DATE=$(date +"%Y%m%d_%H%M%S")
+docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
 
+
+
+
cd /path/to/mailcow-dockerized
+source mailcow.conf
+DATE=$(date +"%Y%m%d_%H%M%S")
+docker-compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
+
+
+
+

Restore

Warning

+
+
+

You should redirect the SQL dump without docker compose to prevent parsing errors.

-
cd /path/to/mailcow-dockerized
-source mailcow.conf
-docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
+
+

You should redirect the SQL dump without docker-compose to prevent parsing errors.

+
+
+
+
+
cd /path/to/mailcow-dockerized
+source mailcow.conf
+docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
 

@@ -2497,7 +2520,7 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2512,6 +2535,8 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS
+ +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2516,7 +2517,19 @@

To find the paths of your source volumes we use docker inspect and read the destination directory of every volume related to your mailcow compose project. This means we will also transfer volumes you may have added in an override file. Local bind mounts may or may not work.

The script uses rsync with the --delete flag. The destination will be an exact copy of the source.

mariabackup is used to create a consistent copy of the SQL data directory.

-

After rsync'ing the data we will run docker compose pull and remove old image tags from the destination.

+

After rsync'ing the data we will run the command below (depending on your set docker compose type in mailcow.conf) and remove old image tags from the destination:

+
+
+
+
docker compose pull
+
+
+
+
docker-compose pull
+
+
+
+

Your source will not be changed at any time.

You may want to make sure to use the same /etc/docker/daemon.json on the remote target.

You should not run disk snapshots (e.g. via ZFS, LVM etc.) on the target at the very same time as this script is run.

@@ -2564,7 +2577,7 @@ The destination must have Docker and docker compose v2 availabl Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2579,6 +2592,8 @@ The destination must have Docker and docker compose v2 availabl + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2490,6 +2491,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2437,6 +2438,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2547,6 +2548,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2439,6 +2440,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2447,6 +2448,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2557,6 +2558,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2579,6 +2580,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2456,6 +2457,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2440,6 +2441,8 @@ + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

+ @@ -2454,6 +2455,8 @@ Since you accessed this page after logging into your mailcow server, all of the + +

Docker Compose Plugins beschrieben.
- All commands are written according to the Docker Compose Plugin syntax.

+ +

Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

+ @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1333,7 +1334,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2480,30 +2481,75 @@

    Wenn Sie Ihren Fehler innerhalb von ein paar Stunden bemerken, können Sie die Daten des Benutzers wahrscheinlich wiederherstellen.

    SOGo

    Wir erstellen automatisch tägliche Backups (24 Stunden Intervall ab dem Hochfahren -d) in /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/.

    -

    Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrem Mailcow-Backend existiert. Legen Sie diesen neu an, falls nicht mehr existent.

    +

    Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrem mailcow-Backend existiert. Legen Sie diesen neu an, falls nicht mehr existent.

    Kopieren Sie die Datei mit dem Namen des Benutzers, den Sie wiederherstellen wollen, nach __MAILCOW_DIRECTORY__/data/conf/sogo.

    -

    1. Kopieren Sie die Sicherung: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

    -

    2. Starten Sie docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org.

    +
      +
    1. +

      Kopieren Sie die Sicherung: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

      +
    2. +
    3. +

      Führen Sie folgenden Befehl aus:

      +
      +
      +
      +
      docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
      +
      +
      +
      +
      docker-compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
      +
      +
      +
      +

      Führen Sie sogo-tool ohne Parameter aus, um nach möglichen Wiederherstellungsoptionen zu suchen.

      -

      3. Löschen Sie die kopierte Sicherung, indem Sie rm __MAILCOW_DIRECTORY__/data/conf/sogo ausführen

      -

      4. Starten Sie SOGo und Memcached neu: docker compose restart sogo-mailcow memcached-mailcow

      +
    4. +
    5. +

      Löschen Sie die kopierte Sicherung, indem Sie rm __MAILCOW_DIRECTORY__/data/conf/sogo ausführen

      +
    6. +
    7. +

      Starten Sie SOGo und Memcached neu:

      +
      +
      +
      +
      docker compose restart sogo-mailcow memcached-mailcow
      +
      +
      +
      +
      docker-compose restart sogo-mailcow memcached-mailcow
      +
      +
      +
      +
      +
    8. +

    Mail

    Im Falle einer versehentlichen Löschung einer Mailbox, können Sie diese (standardmäßig) 5 Tage lang wiederherstellen. Dies hängt von dem MAILDIR_GC_TIME Parameter in mailcow.conf ab.

    Eine gelöschte Mailbox wird in ihrer verschlüsselten Form nach /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage kopiert.

    Der Ordner innerhalb von _garbage folgt der Struktur [timestamp]_[domain_sanitized][user_sanitized], zum Beispiel 1629109708_exampleorgtest im Falle von test@example.org, das am 1629109708 gelöscht wurde.

    -

    Um die Mailbox wiederherzustellen, stellen Sie sicher, dass Sie tatsächlich auf die gleiche Mailcow wiederherstellen, von der sie gelöscht wurde, oder Sie die gleichen Verschlüsselungsschlüssel in crypt-vol-1 verwenden.

    -

    Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrer Mailcow existiert. Legen Sie diesen neu an, wenn der Benutzer fehlt.

    +

    Um die Mailbox wiederherzustellen, stellen Sie sicher, dass Sie tatsächlich auf die gleiche mailcow wiederherstellen, von der sie gelöscht wurde, oder Sie die gleichen Verschlüsselungsschlüssel in crypt-vol-1 verwenden.

    +

    Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrer mailcow existiert. Legen Sie diesen neu an, wenn der Benutzer fehlt.

    Kopieren Sie die Ordner von /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized] zurück nach /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user] und synchronisieren Sie die Ordner neu und berechnen Sie die Quota (Speicherplatz) neu:

    -
    docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    -docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
    +
    +
    +
    +
    docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    +docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
     
    +
    +
    +
    docker-compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    +docker-compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
    +
    +
    +
    +

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2518,6 +2564,8 @@ docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.ne
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1380,7 +1381,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2653,7 +2654,21 @@ fi

    Am Zielort (in diesem Fall /external_share/backups) möchten Sie vielleicht Snapshot-Möglichkeiten haben (ZFS, Btrfs usw.). Machen Sie täglich einen Snapshot und bewahren Sie ihn für n Tage auf, um ein konsistentes Backup zu erhalten. Führen Sie kein rsync auf eine Samba-Freigabe durch, Sie müssen die richtigen Berechtigungen behalten!

    -

    Zum Wiederherstellen müssen Sie rsync einfach in umgekehrter Richtung ausführen und Docker neu starten, um die Volumes erneut zu lesen. Führen Sie docker compose pull und docker compose up -d aus.

    +

    Zum Wiederherstellen müssen Sie rsync einfach in umgekehrter Richtung ausführen und Docker neu starten, um die Volumes erneut zu lesen. Führen Sie folgende Befehle aus:

    +
    +
    +
    +
    docker compose pull
    +docker compose up -d
    +
    +
    +
    +
    docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    Wenn Sie Glück haben, können Redis und MariaDB die inkonsistenten Datenbanken automatisch reparieren (wenn sie inkonsistent sind). Im Falle einer beschädigten Datenbank müssen Sie das Hilfsskript verwenden, um die inkonsistenten Elemente wiederherzustellen. Wenn die Wiederherstellung fehlschlägt, versuchen Sie, die Sicherungen zu extrahieren und die Dateien manuell zurück zu kopieren. Behalten Sie die Dateiberechtigungen bei!

    @@ -2662,7 +2677,7 @@ Im Falle einer beschädigten Datenbank müssen Sie das Hilfsskript verwenden, um Letztes Update: - 2022-10-25 14:46:12 + 2023-01-10 12:08:32 @@ -2677,6 +2692,8 @@ Im Falle einer beschädigten Datenbank müssen Sie das Hilfsskript verwenden, um + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1333,7 +1334,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2477,23 +2478,45 @@

    Mail-Verzeichnis

    Sicherung

    -

    Diese Zeile sichert das vmail-Verzeichnis in eine Datei backup_vmail.tar.gz im mailcow-Root-Verzeichnis: -

    cd /pfad/zu/mailcow-dockerized
    -docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    -

    +

    Diese Zeile sichert das vmail-Verzeichnis in eine Datei backup_vmail.tar.gz im mailcow-Root-Verzeichnis:

    +
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    +
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    +
    +
    +
    +

    Sie können den Pfad ändern, indem Sie ${PWD} (das dem aktuellen Verzeichnis entspricht) zu einem beliebigen Pfad ändern, auf den Sie Schreibzugriff haben. Setzen Sie den Dateinamen backup_vmail.tar.gz auf einen beliebigen Namen, aber lassen Sie den Pfad so wie er ist. Beispiel: [...] tar cvfz /backup/mein_eigener_dateiname_.tar.gz

    Wiederherstellen

    -
    cd /pfad/zu/mailcow-dockerized
    -docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz
    +
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
     
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
    +
    +
    +
    +

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2508,6 +2531,8 @@ docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if e
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1333,7 +1334,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2477,19 +2478,41 @@

    MySQL (mysqldump)

    Sicherung

    -
    cd /pfad/zu/mailcow-dockerized
    -source mailcow.conf
    -DATE=$(date +"%Y%m%d_%H%M%S")
    -docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
    +
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +source mailcow.conf
    +DATE=$(date +"%Y%m%d_%H%M%S")
    +docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
     
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +source mailcow.conf
    +DATE=$(date +"%Y%m%d_%H%M%S")
    +docker-compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
    +
    +
    +
    +

    Wiederherstellen

    -

    Warning

    +

    Warnung

    +
    +
    +

    Sie sollten den SQL-Dump ohne docker compose umleiten, um Parsing-Fehler zu vermeiden.

    -
    cd /pfad/zu/mailcow-dockerized
    -source mailcow.conf
    -docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
    +
    +

    Sie sollten den SQL-Dump ohne docker-compose umleiten, um Parsing-Fehler zu vermeiden.

    +
    +
    +
    +
    +
    cd /pfad/zu/mailcow-dockerized
    +source mailcow.conf
    +docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
     

    @@ -2497,7 +2520,7 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS Letztes Update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2512,6 +2535,8 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1349,7 +1350,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2512,11 +2513,23 @@

    Das sollten Sie wissen

    Das bereitgestellte Skript funktioniert auf Standardinstallationen.

    Es kann versagen, wenn Sie nicht unterstützte Volume Overrides verwenden. Wir unterstützen das nicht und wir werden keine Hacks einbauen, die das unterstützen. Bitte erstellen und pflegen Sie einen Fork, wenn Sie Ihre Änderungen beibehalten wollen.

    -

    Das Skript wird die gleichen Pfade wie Ihre Standard-Mailcow-Installation verwenden. Das ist das mailcow-Basisverzeichnis - für die meisten Nutzer /opt/mailcow-dockerized - sowie die Mountpoints.

    +

    Das Skript wird die gleichen Pfade wie Ihre Standard-mailcow-Installation verwenden. Das ist das mailcow-Basisverzeichnis - für die meisten Nutzer /opt/mailcow-dockerized - sowie die Mountpoints.

    Um die Pfade Ihrer Quellvolumes zu finden, verwenden wir docker inspect und lesen das Zielverzeichnis jedes Volumes, das mit Ihrem mailcow compose Projekt verbunden ist. Das bedeutet, dass wir auch Volumes übertragen, die Sie in einer Override-Datei hinzugefügt haben. Lokale Bind-Mounts können funktionieren, müssen aber nicht.

    Das Skript verwendet rsync mit dem --delete Flag. Das Ziel wird eine exakte Kopie der Quelle sein.

    mariabackup wird verwendet, um eine konsistente Kopie des SQL-Datenverzeichnisses zu erstellen.

    -

    Nach dem Rsync der Daten führen wir docker compose pull aus und entfernen alte Image-Tags aus dem Ziel.

    +

    Nach dem Rsync der Daten führen wir folgenden Befehl aus (anhand der gesetzten docker compose Version in der mailcow.conf) und entfernen alte Image-Tags aus dem Ziel:

    +
    +
    +
    +
    docker compose pull
    +
    +
    +
    +
    docker-compose pull
    +
    +
    +
    +

    Ihre Quelle wird zu keinem Zeitpunkt verändert.

    Sie sollten sicherstellen, dass Sie die gleiche /etc/docker/daemon.json auf dem entfernten Ziel verwenden.

    Sie sollten keine Festplatten-Snapshots (z. B. über ZFS, LVM usw.) auf dem Ziel ausführen, während dieses Skript ausgeführt wird.

    @@ -2564,7 +2577,7 @@ Das Ziel muss über Docker und docker compose v2 verfügen.

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2579,6 +2592,8 @@ Das Ziel muss über Docker und docker compose v2 verfügen.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1326,7 +1327,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2490,6 +2491,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2437,6 +2438,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2547,6 +2548,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2439,6 +2440,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2447,6 +2448,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2557,6 +2558,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2562,6 +2563,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2456,6 +2457,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2440,6 +2441,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2420,7 +2421,7 @@ Wenn Sie auf diese Seite zugreifen, indem Sie sich bei Ihrem mailcow-Server anme

    Erfolgreich

    -Da Sie diese Seite aufgerufen haben, nachdem Sie sich in Ihren Mailcow-Server eingeloggt haben, wurden alle Anleitungen mit Ihrer E-Mail-Adresse und Ihrem Servernamen personalisiert. +Da Sie diese Seite aufgerufen haben, nachdem Sie sich in Ihren mailcow-Server eingeloggt haben, wurden alle Anleitungen mit Ihrer E-Mail-Adresse und Ihrem Servernamen personalisiert.
    - -
  • @@ -2608,7 +2583,7 @@ -

    Zwei-Faktoren-Authentifizierung

    +

    Zwei-Faktor Authentifizierung

    Bislang sind drei Methoden für die Zwei-Faktor-Authentifizierung implementiert: WebAuthn (ersetzt seit Februar 2022 U2F), Yubi OTP und TOTP

    @@ -2609,6 +2624,20 @@ Den Container hochfahren +
  • + +
  • + + Das Backup Repository initialisieren + + +
  • + +
  • + + Container neustarten + +
  • @@ -2712,7 +2741,7 @@

    Borgmatic Backup

    Einführung

    -

    Borgmatic ist ein großartiger Weg, um Backups auf Ihrem Mailcow-Setup durchzuführen, da es Ihre Daten sicher verschlüsselt und extrem einfach zu +

    Borgmatic ist ein großartiger Weg, um Backups auf Ihrem mailcow-Setup durchzuführen, da es Ihre Daten sicher verschlüsselt und extrem einfach zu einzurichten.

    Aufgrund seiner Deduplizierungsfähigkeiten können Sie eine große Anzahl von Backups speichern, ohne große Mengen an Speicherplatz zu verschwenden. So können Sie Backups in sehr kurzen Abständen durchführen, um einen minimalen Datenverlust zu gewährleisten, wenn die Notwendigkeit besteht @@ -2813,61 +2842,168 @@ nach der vollen Stunde auszuführen und am Ende einige nette Statistiken zu prot oder OpenSSH wird sich weigern, den SSH-Schlüssel zu benutzen.

    Den Container hochfahren

    Für den nächsten Schritt müssen wir den Container in einem konfigurierten Zustand hochfahren und laufen lassen. Um das zu tun, führen Sie aus:

    +
    +
    +
    docker compose up -d
     
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
    +

    Das Backup Repository initialisieren

    +

    Zwar ist Ihr borgmatic-Container jetzt betriebsbereit, aber die Backups schlagen derzeit fehl, da das Repository nicht +initialisiert wurde.

    +

    Um das Repository zu initialisieren, führen Sie folgenden Befehl aus:

    +
    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2
    +
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2
    +
    +
    +
    +
    +

    Sie werden aufgefordert, den SSH-Hostschlüssel Ihres entfernten Repository-Servers zu authentifizieren. Prüfen Sie, ob er übereinstimmt und bestätigen +und bestätigen Sie die Aufforderung mit yes. Das Repository wird mit der Passphrase initialisiert, die Sie zuvor in der Umgebungsvariable BORG_PASSPHRASE gesetzt haben.

    +

    Bei Verwendung einer der repokey-Verschlüsselungsmethoden wird der Verschlüsselungsschlüssel im Repository selbst gespeichert und nicht auf dem +dem Client, so dass in dieser Hinsicht keine weiteren Maßnahmen erforderlich sind. Wenn Sie sich für die Verwendung einer keyfile anstelle von +repokey entscheiden, stellen Sie sicher, dass Sie den Schlüssel exportieren und separat sichern. Lesen Sie den Abschnitt Exportieren von Schlüsseln +um zu erfahren, wie Sie den Schlüssel abrufen können.

    +

    Container neustarten

    +

    Nachdem wir nun die Konfiguration und Initialisierung des Repositorys abgeschlossen haben, starten wir den Container neu, um sicherzustellen, dass er sich in einem definierten +Zustand befindet:

    +
    +
    +
    +
    docker compose restart borgmatic-mailcow
    +
    +
    +
    +
    docker-compose restart borgmatic-mailcow
    +
    +
    +
    +

    Wiederherstellung von einem Backup

    Das Wiederherstellen eines Backups setzt voraus, dass Sie mit einer neuen Installation von mailcow beginnen, und dass Sie derzeit keine keine benutzerdefinierten Daten in ihrem maildir oder ihrer mailcow Datenbank.

    Wiederherstellen von maildir

    -

    Warning

    +

    Warnung

    Dies wird Dateien in Ihrem maildir überschreiben! Führen Sie dies nicht aus, es sei denn, Sie beabsichtigen tatsächlich, Mail Dateien von einem Backup wiederherzustellen.

    Wenn Sie SELinux im Erzwingungsmodus verwenden

    Wenn Sie mailcow auf einem Host mit SELinux im Enforcing-Modus verwenden, müssen Sie es vorübergehend deaktivieren während -während der Extraktion des Archivs vorübergehend deaktivieren, da das Mailcow-Setup das vmail-Volumen als privat kennzeichnet, das ausschließlich dem Dovecot-Container +während der Extraktion des Archivs vorübergehend deaktivieren, da das mailcow-Setup das vmail-Volumen als privat kennzeichnet, das ausschließlich dem Dovecot-Container ausschließlich. SELinux wird (berechtigterweise) jeden anderen Container, wie z.B. den borgmatic Container, daran hindern, auf dieses Volume zu schreiben.

    Bevor Sie eine Wiederherstellung durchführen, müssen Sie das vmail-Volume in docker-compose.override.yml beschreibbar machen, indem Sie das das ro-Flag aus dem Volume entfernen. Dann können Sie den folgenden Befehl verwenden, um das Maildir aus einem Backup wiederherzustellen:

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest
    +
    +
    +
    +

    Alternativ können Sie auch einen beliebigen Archivnamen aus der Liste der Archive angeben (siehe Auflistung aller verfügbaren Archive)

    MySQL wiederherstellen

    -

    Warning

    +

    Warnung

    Die Ausführung dieses Befehls löscht und erstellt die mailcow-Datenbank neu! Führen sie diesen Befehl nicht aus, es sei denn sie beabsichtigen, die mailcow-Datenbank von einem Backup wiederherzustellen.

    Um die MySQL-Datenbank aus dem letzten Archiv wiederherzustellen, verwenden Sie diesen Befehl:

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic restore --archive latest
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic restore --archive latest
    +
    +
    +
    +

    Alternativ können Sie auch einen beliebigen Archivnamen aus der Liste der Archive angeben (siehe Auflistung aller verfügbaren Archive)

    Nach der Wiederherstellung

    -

    Nach der Wiederherstellung müssen Sie mailcow neu starten. Wenn Sie den SELinux-Erzwingungsmodus deaktiviert haben, wäre jetzt ein guter Zeitpunkt, um +

    Nach der Wiederherstellung müssen Sie mailcow neu starten. Wenn Sie SELinux "Erzwingen" deaktiviert haben, wäre jetzt ein guter Zeitpunkt, um ihn wieder zu aktivieren.

    Um mailcow neu zu starten, verwenden Sie den folgenden Befehl:

    +
    +
    +
    docker compose down && docker compose up -d
     
    +
    +
    +
    docker-compose down && docker-compose up -d
    +
    +
    +
    +

    Wenn Sie SELinux verwenden, werden dadurch auch alle Dateien in Ihrem vmail-Volume neu benannt. Seien Sie geduldig, denn dies kann eine Weile dauern kann, wenn Sie viele Dateien haben.

    Nützliche Befehle

    Manueller Archivierungslauf (mit Debugging-Ausgabe)

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic -v 2
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic -v 2
    +
    +
    +
    +

    Auflistung aller verfügbaren Archive

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic list
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic list
    +
    +
    +
    +

    Sperre aufheben

    Wenn borg während eines Archivierungslaufs unterbrochen wird, hinterlässt es eine veraltete Sperre, die gelöscht werden muss, bevor neue Operationen durchgeführt werden können:

    +
    +
    +
    docker compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow
    +
    +
    +
    +

    Wobei user@rsync.net:mailcow die URI zu Ihrem Repository ist.

    Jetzt wäre ein guter Zeitpunkt, einen manuellen Archivierungslauf durchzuführen, um sicherzustellen, dass er erfolgreich durchgeführt werden kann.

    Exportieren von Schlüsseln

    @@ -2876,8 +3012,18 @@ Schlüsseldateien werden erzeugt, wenn Sie das Repository initialisieren. Die

    Beachten Sie, dass Sie in beiden Fällen auch die Passphrase haben müssen, um die Archive zu entschlüsseln.

    Um die keyfile zu holen, führen Sie aus:

    +
    +
    +
    docker compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow
    +
    +
    +
    +

    Wobei user@rsync.net:mailcow die URI zu Ihrem Repository ist.


    @@ -2885,7 +3031,7 @@ Repository, so dass eine manuelle Sicherung nicht so wichtig ist.

    Letztes Update: - 2023-01-02 16:08:29 + 2023-01-13 18:34:22 @@ -2900,6 +3046,8 @@ Repository, so dass eine manuelle Sicherung nicht so wichtig ist.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2514,7 +2515,7 @@

    CheckMK

    -

    Mailcow bietet mittels dem eigenen Update-Script die Möglichkeit zu prüfen ob Updates vorhanden sind.

    +

    mailcow bietet mittels dem eigenen Update-Script die Möglichkeit zu prüfen ob Updates vorhanden sind.

    Sofern mailcow-Updates mittels checkmk abgefragt werden soll, kann man im local-Verzeichnis des checkmk-Agents (normalerweise /usr/lib/check_mk_agent/local/) eine ausführbare Datei mit dem Namen mailcow_update und nachfolgendem Inhalt erstellen:

    #!/bin/bash
     cd /opt/mailcow-dockerized/ && ./update.sh -c >/dev/null
    @@ -2556,7 +2557,7 @@ exit
       
         
           Letztes Update:
    -      2022-11-08 12:01:39
    +      2023-01-13 18:16:08
           
         
       
    @@ -2571,6 +2572,8 @@ exit
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2297,7 +2298,7 @@
  • - Einrichten der Mailcow + Einrichten der mailcow
  • @@ -2475,7 +2476,7 @@
  • - Einrichten der Mailcow + Einrichten der mailcow
  • @@ -2541,31 +2542,31 @@ -

    Einrichten der Mailcow

    -

    Ihre Mailcow muss alle Mails an Ihren personalisierten Exchange Host weiterleiten. Es ist die gleiche Host-Adresse, die wir bereits für den mx Record gesucht haben.

    +

    Einrichten der mailcow

    +

    Ihre mailcow muss alle Mails an Ihren personalisierten Exchange Host weiterleiten. Es ist die gleiche Host-Adresse, die wir bereits für den mx Record gesucht haben.

      -
    1. Fügen Sie die Domain zu Ihrer Mailcow hinzu
    2. +
    3. Fügen Sie die Domain zu Ihrer mailcow hinzu
    4. Fügen Sie Ihre personalisierte Exchange Host Adresse als relayhost hinzu
    5. Fügen Sie Ihre personalisierte Exchange Host Adresse als Weiterleitungshost hinzu, um alle weitergeleiteten Mails von Exchange bedingungslos zu akzeptieren. (Admin > Konfiguration & Details > Konfigurations-Dropdown > Weiterleitungshosts)
    6. Gehen Sie zu den Domäneneinstellungen und wählen Sie den neu hinzugefügten Host in der Dropdown-Liste "Absenderabhängige Transporte" aus. Aktivieren Sie die Weiterleitung, indem Sie die Kontrollkästchen "Diese Domäne weiterleiten", "Alle Empfänger weiterleiten" und "Nur nicht vorhandene Postfächer weiterleiten" aktivieren.

    Info

    -

    Von nun an wird Ihre Mailcow alle Mails akzeptieren, die von Exchange weitergeleitet werden. Die Eingangsfilterung und damit das neuronale Lernen Ihrer Kuh wird nicht mehr funktionieren. Da alle Mails über Exchange geroutet werden, wird der Filterungsprozess dort abgewickelt.

    +

    Von nun an wird Ihre mailcow alle Mails akzeptieren, die von Exchange weitergeleitet werden. Die Eingangsfilterung und damit das neuronale Lernen Ihrer Kuh wird nicht mehr funktionieren. Da alle Mails über Exchange geroutet werden, wird der Filterungsprozess dort abgewickelt.

    Connectors in Exchange einrichten

    -

    Der gesamte Mailverkehr läuft nun über Exchange. Zu diesem Zeitpunkt filtert der Exchange Online-Schutz bereits alle ein- und ausgehenden Mails. Jetzt müssen wir zwei Konnektoren einrichten, um eingehende Mails von unserem Exchange Service an die Mailcow weiterzuleiten und einen weiteren, um Mails zuzulassen, die von der Mailcow an unseren Exchange Service weitergeleitet werden. Sie können der [offiziellen Anleitung von Microsoft] folgen (https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#2-set-up-a-connector-from-microsoft-365-or-office-365-to-your-email-server).

    +

    Der gesamte Mailverkehr läuft nun über Exchange. Zu diesem Zeitpunkt filtert der Exchange Online-Schutz bereits alle ein- und ausgehenden Mails. Jetzt müssen wir zwei Konnektoren einrichten, um eingehende Mails von unserem Exchange Service an die mailcow weiterzuleiten und einen weiteren, um Mails zuzulassen, die von der mailcow an unseren Exchange Service weitergeleitet werden. Sie können der [offiziellen Anleitung von Microsoft] folgen (https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#2-set-up-a-connector-from-microsoft-365-or-office-365-to-your-email-server).

    -

    Warning

    -

    Für den Connector, der die Mails von Ihrer Mailcow zu Exchange weiterleitet, bietet Microsoft zwei Möglichkeiten der Authentifizierung an. Der empfohlene Weg ist die Verwendung eines tls-Zertifikats, das mit einem Subject-Namen konfiguriert ist, der mit einer akzeptierten Domäne in Exchange übereinstimmt. Andernfalls müssen Sie die Authentifizierung mit der statischen IP-Adresse Ihrer Mailcow wählen.

    +

    Warnung

    +

    Für den Connector, der die Mails von Ihrer mailcow zu Exchange weiterleitet, bietet Microsoft zwei Möglichkeiten der Authentifizierung an. Der empfohlene Weg ist die Verwendung eines tls-Zertifikats, das mit einem Subject-Namen konfiguriert ist, der mit einer akzeptierten Domäne in Exchange übereinstimmt. Andernfalls müssen Sie die Authentifizierung mit der statischen IP-Adresse Ihrer mailcow wählen.

    Validierung

    -

    Der einfachste Weg, die hybride Einrichtung zu überprüfen, ist das Senden einer Mail aus dem Internet an eine Mailbox, die nur auf der Mailcow existiert und andersherum.

    +

    Der einfachste Weg, die hybride Einrichtung zu überprüfen, ist das Senden einer Mail aus dem Internet an eine Mailbox, die nur auf der mailcow existiert und andersherum.

    Allgemeine Probleme

      -
    • Die Validierung des Connectors von Exchange zu Ihrer Mailcow schlug fehl mit 550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient test@contoso.com not found by SMTP address lookup
      +
    • Die Validierung des Connectors von Exchange zu Ihrer mailcow schlug fehl mit 550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient test@contoso.com not found by SMTP address lookup
      Mögliche Lösung: Ihre Domäne ist nicht als "internes Relay" eingerichtet. Exchange kann daher den Empfänger nicht finden.
    • -
    • Mails, die von der Mailcow an eine Mailbox im Internet gesendet werden, können nicht zugestellt werden. Non Delivery Report mit Fehler 550 5.7.64 TenantAttribution; Relay Access Denied
      +
    • Mails, die von der mailcow an eine Mailbox im Internet gesendet werden, können nicht zugestellt werden. Non Delivery Report mit Fehler 550 5.7.64 TenantAttribution; Relay Access Denied
      Mögliche Lösung: Die Authentifizierungsmethode ist fehlgeschlagen. Stellen Sie sicher, dass der Betreff des Zertifikats mit einer akzeptierten Domäne in Exchange übereinstimmt. Versuchen Sie stattdessen die Authentifizierung über eine statische IP.

    Microsoft-Anleitung für die Einrichtung des Connectors und zusätzliche Anforderungen: https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#prerequisites-for-your-on-premises-email-environment

    @@ -2575,7 +2576,7 @@ Letztes Update: - 2022-07-17 17:01:03 + 2023-01-13 18:16:08 @@ -2590,6 +2591,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2411,19 +2412,19 @@

    Mit der Fähigkeit von Gitea, sich über SMTP zu authentifizieren, ist es trivial, es mit mailcow zu integrieren. Es sind nur wenige Änderungen erforderlich:

    1. Öffnen Sie docker-compose.override.yml und fügen Sie Gitea hinzu:

    -
    version: '2.1'
    -services:
    +
    version: '2.1'
    +services:
     
    -        gitea-mailcow:
    -            image: gitea/gitea:1
    -            volumes:
    -                - ./data/gitea:/data
    -            networks:
    -                mailcow-network:
    -                    aliases:
    -                        - gitea
    -            ports:
    -                - "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"
    +        gitea-mailcow:
    +            image: gitea/gitea:1
    +            volumes:
    +                - ./data/gitea:/data
    +            networks:
    +                mailcow-network:
    +                    aliases:
    +                        - gitea
    +            ports:
    +                - "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"
     

    2. Erstellen Sie data/conf/nginx/site.gitea.custom, fügen Sie folgendes hinzu:

    location /gitea/ {
    @@ -2433,27 +2434,66 @@ services:
     

    3. Öffne mailcow.conf und definiere den Port Bind, den Gitea für SSH verwenden soll. Beispiel:

    GITEA_SSH_PORT=127.0.0.1:4000
     
    -

    5. Führen Sie docker compose up -d aus, um den Gitea-Container hochzufahren und führen Sie anschließend docker compose restart nginx-mailcow aus.

    -

    6. Wenn Sie mailcow zu https gezwungen haben, führen Sie Schritt 9 aus und starten Sie gitea mit docker compose restart gitea-mailcow neu. Fahren Sie mit Schritt 7 fort (Denken Sie daran, https anstelle von http zu verwenden, https://mx.example.org/gitea/

    +

    5. Führen Sie folgenden Befehl aus, um den Gitea-Container hochzufahren und führen Sie anschließend einen Neustart von NGINX mit dem zweiten Befehl durch:

    +
    +
    +
    +
    docker compose up -d
    +docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d
    +docker-compose restart nginx-mailcow
    +
    +
    +
    +
    +

    6. Wenn Sie mailcow zu https gezwungen haben, führen Sie Schritt 9 aus und starten Sie gitea mit dem folgenden Befehl neu.

    +
    +
    +
    +
    docker compose restart gitea-mailcow
    +
    +
    +
    +
    docker-compose restart gitea-mailcow
    +
    +
    +
    +
    +

    Fahren Sie mit Schritt 7 fort (Denken Sie daran, https anstelle von http zu verwenden, https://mx.example.org/gitea/)

    7. Öffnen Sie http://${MAILCOW_HOSTNAME}/gitea/, zum Beispiel http://mx.example.org/gitea/. Für die Datenbankdetails stellen Sie mysql als Datenbankhost ein. Verwenden Sie den in mailcow.conf gefundenen Wert von DBNAME als Datenbankname, DBUSER als Datenbankbenutzer und DBPASS als Datenbankpasswort.

    8. Sobald die Installation abgeschlossen ist, loggen Sie sich als Administrator ein und setzen Sie "Einstellungen" -> "Autorisierung" -> "SMTP aktivieren". SMTP-Host sollte postfix mit Port 587 sein, setzen Sie Skip TLS Verify, da wir ein nicht gelistetes SAN verwenden ("postfix" ist höchstwahrscheinlich nicht Teil Ihres Zertifikats).

    9. Erstellen Sie data/gitea/gitea/conf/app.ini und setzen Sie die folgenden Werte. Sie können gitea cheat sheet, leider bisher nur in Englisch verfügbar für deren Bedeutung und andere mögliche Werte konsultieren.

    -
    [server]
    -SSH_LISTEN_PORT = 22
    -# Für GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:
    -SSH_DOMAIN = 127.0.0.1
    -SSH_PORT = 4000
    -# Für MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports für HTTPS), setzen:
    -ROOT_URL = https://mx.example.org/gitea/
    +
    [server]
    +SSH_LISTEN_PORT = 22
    +# Für GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:
    +SSH_DOMAIN = 127.0.0.1
    +SSH_PORT = 4000
    +# Für MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports für HTTPS), setzen:
    +ROOT_URL = https://mx.example.org/gitea/
     
    -

    10. Starten Sie gitea neu mit docker compose restart gitea-mailcow. Ihre Nutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten anzumelden.

    +

    10. Starten Sie gitea neu mit dem kommenden Befehl. Ihre Nutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten anzumelden.

    +
    +
    +
    +
    docker compose restart gitea-mailcow
    +
    +
    +
    +
    docker-compose restart gitea-mailcow
    +
    +
    +
    +

    Letztes Update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2468,6 +2508,8 @@ ROOT_URL = https://mx.example.org/gitea/
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    +
    @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1280,7 +1281,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2411,19 +2412,19 @@

    Mit Gogs' Fähigkeit, sich über SMTP zu authentifizieren, ist es einfach, es mit mailcow zu verbinden. Es sind nur wenige Änderungen erforderlich:

    1. Öffne docker-compose.override.yml und füge Gogs hinzu:

    -
    version: '2.1'
    -services:
    +
    version: '2.1'
    +services:
     
    -    gogs-mailcow:
    -      image: gogs/gogs
    -      volumes:
    -        - ./data/gogs:/data
    -      networks:
    -        mailcow-network:
    -          aliases:
    -            - gogs
    -      ports:
    -        - "${GOGS_SSH_PORT:-127.0.0.1:4000}:22"
    +    gogs-mailcow:
    +      image: gogs/gogs
    +      volumes:
    +        - ./data/gogs:/data
    +      networks:
    +        mailcow-network:
    +          aliases:
    +            - gogs
    +      ports:
    +        - "${GOGS_SSH_PORT:-127.0.0.1:4000}:22"
     

    2. Erstelle data/conf/nginx/site.gogs.custom, füge hinzu:

    location /gogs/ {
    @@ -2433,26 +2434,52 @@ services:
     

    3. Öffne mailcow.conf und definiere die Bindung, die Gogs für SSH verwenden soll. Beispiel:

    GOGS_SSH_PORT=127.0.0.1:4000
     
    -

    5. Führen Sie docker compose up -d aus, um den Gogs-Container hochzufahren und führen Sie anschließend docker compose restart nginx-mailcow aus.

    +

    5. Führen Sie folgenden Befehl aus, um den Gogs-Container hochzufahren und führen Sie anschließend einen Neustart von NGINX mit dem zweiten Befehl durch:

    +
    +
    +
    +
    docker compose up -d
    +docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d
    +docker-compose restart nginx-mailcow
    +
    +
    +
    +

    6. Öffnen Sie http://${MAILCOW_HOSTNAME}/gogs/, zum Beispiel http://mx.example.org/gogs/. Für Datenbank-Details setzen Sie mysql als Datenbank-Host. Verwenden Sie den in mailcow.conf gefundenen Wert von DBNAME als Datenbankname, DBUSER als Datenbankbenutzer und DBPASS als Datenbankpasswort.

    7. Sobald die Installation abgeschlossen ist, loggen Sie sich als Administrator ein und setzen Sie "Einstellungen" -> "Autorisierung" -> "SMTP aktivieren". SMTP-Host sollte postfix mit Port 587 sein, setzen Sie Skip TLS Verify, da wir ein nicht gelistetes SAN verwenden ("postfix" ist höchstwahrscheinlich nicht Teil Ihres Zertifikats).

    8. Erstellen Sie data/gogs/gogs/conf/app.ini und setzen Sie die folgenden Werte. Sie können Gogs cheat sheet für ihre Bedeutung und andere mögliche Werte konsultieren.

    -
    [server]
    -SSH_LISTEN_PORT = 22
    -# Für GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:
    -SSH_DOMAIN = 127.0.0.1
    -SSH_PORT = 4000
    -# Für MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports für HTTPS), setzen:
    -ROOT_URL = https://mx.example.org/gogs/
    +
    [server]
    +SSH_LISTEN_PORT = 22
    +# Für GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:
    +SSH_DOMAIN = 127.0.0.1
    +SSH_PORT = 4000
    +# Für MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports für HTTPS), setzen:
    +ROOT_URL = https://mx.example.org/gogs/
     
    -

    9. Starten Sie Gogs neu mit docker compose restart gogs-mailcow. Ihre Benutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten einzuloggen.

    +

    9. Starten Sie Gogs neu mit dem kommenden Befehl. Ihre Nutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten anzumelden.

    +
    +
    +
    +
    docker compose restart gogs-mailcow
    +
    +
    +
    +
    docker-compose restart gogs-mailcow
    +
    +
    +
    +

    Letztes Update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2467,6 +2494,8 @@ ROOT_URL = https://mx.example.org/gogs/
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    +
    @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2400,7 +2401,7 @@
  • - Mailcow konfigurieren + mailcow konfigurieren
  • @@ -2680,7 +2681,7 @@
  • - Mailcow konfigurieren + mailcow konfigurieren
  • @@ -2822,7 +2823,7 @@

    Diese Anleitung ist eine Kopie von dockerized-mailcow-mailman. Bitte posten Sie Probleme, Fragen und Verbesserungen in den issue tracker dort.

    -

    Warning

    +

    Warnung

    mailcow ist nicht verantwortlich für Datenverlust, Hardwareschäden oder kaputte Tastaturen. Diese Anleitung kommt ohne jegliche Garantie. Macht Backups bevor ihr anfangt, Kein Backup kein Mitleid!

    Einleitung

    @@ -2880,8 +2881,8 @@ certbot certonly -d MAILMAN_DOMAIN

    Installieren Sie mailcow mit Mailman Integration

    Installieren Sie mailcow

    -

    Folgen Sie der mailcow installation. Schritt 5 auslassen und nicht mit docker compose starten!

    -

    Mailcow konfigurieren

    +

    Folgen Sie der mailcow installation. Schritt 5 auslassen und nicht mit starten!

    +

    mailcow konfigurieren

    Dies ist auch Schritt 4 in der offiziellen mailcow-Installation (nano mailcow.conf). Passen Sie also Ihre Bedürfnisse an und ändern Sie die folgenden Variablen:

    HTTP_PORT=18080 # verwenden Sie nicht 8080, da mailman es braucht
     HTTP_BIND=127.0.0.1 #
    @@ -3018,25 +3019,56 @@ DEBUG = False
     Sie können LANGUAGE_CODE und SOCIALACCOUNT_PROVIDERS an Ihre Bedürfnisse anpassen.

    🏃 Ausführen

    Ausführen (als root oder sudo)

    -
    a2ensite mailcow.conf
    -a2ensite mailman.conf
    -systemctl restart apache2
    +
    +
    +
    +
    a2ensite mailcow.conf
    +a2ensite mailman.conf
    +systemctl restart apache2
     
    -cd /opt/docker-mailman
    -docker compose pull
    -docker compose up -d
    +cd /opt/docker-mailman
    +docker compose pull
    +docker compose up -d
     
    -cd /opt/mailcow-dockerized/
    -docker compose pull
    +cd /opt/mailcow-dockerized/
    +docker compose pull
     ./renew-ssl.sh
     
    +
    +
    +
    a2ensite mailcow.conf
    +a2ensite mailman.conf
    +systemctl restart apache2
    +
    +cd /opt/docker-mailman
    +docker-compose pull
    +docker-compose up -d
    +
    +cd /opt/mailcow-dockerized/
    +docker-compose pull
    +./renew-ssl.sh
    +
    +
    +
    +

    Warten Sie ein paar Minuten! Die Container müssen ihre Datenbanken und Konfigurationsdateien erstellen. Dies kann bis zu 1 Minute und mehr dauern.

    Bemerkungen

    Neue Listen werden von Postfix nicht sofort erkannt

    Wenn man eine neue Liste anlegt und versucht, sofort eine E-Mail zu versenden, antwortet postfix mit Benutzer existiert nicht, weil postfix die Liste noch nicht an Mailman übergeben hat. Die Konfiguration unter /opt/mailman/core/var/data/postfix_lmtp wird nicht sofort aktualisiert. Wenn Sie die Liste sofort benötigen, starten Sie postifx manuell neu:

    -
    cd /opt/mailcow-dockerized
    -docker compose restart postfix-mailcow
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose restart postfix-mailcow
     
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose restart postfix-mailcow
    +
    +
    +
    +

    Update

    mailcow hat sein eigenes Update-Skript in /opt/mailcow-dockerized/update.sh, siehe die Dokumentation.

    Für Mailman holen Sie sich einfach die neueste Version aus dem github repository.

    @@ -3057,7 +3089,7 @@ docker compose restart postfix-mailcow Letztes Update: - 2022-10-20 15:33:23 + 2023-01-13 18:16:08 @@ -3072,6 +3104,8 @@ docker compose restart postfix-mailcow
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2546,7 +2547,7 @@
  • Ein mailcow API-Schlüssel (Nur-Lesen funktioniert): Konfiguration & Details - Zugang - Nur-Lesen-Zugang. Vergessen Sie nicht, den API-Zugang von Ihrer mailpiler IP zu erlauben.
  • -

    Warning

    +

    Warnung

    Da mailpiler sich gegenüber mailcow, unserem IMAP-Server, authentifiziert, können fehlgeschlagene Logins von Nutzern oder Bots eine Sperre für Ihre mailpiler-Instanz auslösen. Daher sollten Sie in Erwägung ziehen, die IP-Adresse der mailpiler-Instanz innerhalb von mailcow auf eine Whitelist zu setzen: Konfiguration & Details - Konfiguration - Fail2ban-Parameter - Whitelisted networks/hosts.

    Einrichtung

    @@ -2579,7 +2580,7 @@ Letztes Update: - 2022-07-17 17:01:03 + 2023-01-13 18:16:08 @@ -2594,6 +2595,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2520,32 +2521,83 @@

    Nextcloud kann mit dem helper script, das in mailcow enthalten ist, eingerichtet (Parameter -i) und entfernt (Parameter -p) werden. Um Nextcloud zu installieren, navigieren Sie einfach zu Ihrem mailcow-dockerized Root-Ordner und führen Sie das Helper-Skript wie folgt aus:

    ./helper-scripts/nextcloud.sh -i

    Für den Fall, dass Sie das Passwort (z.B. für admin) vergessen haben und kein neues anfordern können [über den Passwort-Reset-Link auf dem Login-Bildschirm] (https://docs.nextcloud.com/server/20/admin_manual/configuration_user/reset_admin_password.html?highlight=reset), können Sie durch den Aufruf des Helper-Skripts mit -r als Parameter ein neues Passwort setzen. Verwenden Sie diese Option nur, wenn Ihre Nextcloud nicht so konfiguriert ist, dass Sie mailcow zur Authentifizierung verwendet, wie im nächsten Abschnitt beschrieben.

    -

    Damit mailcow ein Zertifikat für die Nextcloud Domain generieren kann, muss die Domain unter welcher die Nextcloud später erreichbar sein soll als ADDITIONAL_SAN in die mailcow.conf hinzufügt werden und docker compose up -d zur Übernahme ausgeführt werden. Für weitere Informationen siehe: Erweitertes SSL.

    +

    Damit mailcow ein Zertifikat für die Nextcloud Domain generieren kann, muss die Domain unter welcher die Nextcloud später erreichbar sein soll als ADDITIONAL_SAN in die mailcow.conf hinzufügt werden und folgender Befehl zur Übernahme ausgeführt werden.

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
    +

    Für weitere Informationen siehe: Erweitertes SSL.

    Hintergrund-Aufgaben

    Zur Verwendung der empfohlenen Einstellung (Cron) zur Verarbeitung der Hintergrund-Aufgaben müssen in der docker-compose.override.yml folgende Zeilen hinzugefügt werden:

    -
    version: '2.1'
    -services:
    -  php-fpm-mailcow:
    -    labels:
    -      ofelia.enabled: "true"
    -      ofelia.job-exec.nextcloud-cron.schedule: "@every 5m"
    -      ofelia.job-exec.nextcloud-cron.command: "su www-data -s /bin/bash -c \"/usr/local/bin/php -f /web/nextcloud/cron.php\""
    +
    version: '2.1'
    +services:
    +  php-fpm-mailcow:
    +    labels:
    +      ofelia.enabled: "true"
    +      ofelia.job-exec.nextcloud-cron.schedule: "@every 5m"
    +      ofelia.job-exec.nextcloud-cron.command: "su www-data -s /bin/bash -c \"/usr/local/bin/php -f /web/nextcloud/cron.php\""
     
    -

    Nachdem diese Zeilen hinzugefügt wurden muss docker compose up -d ausgeführt werden, um das Docker Image mit den entsprechenden Labels zu versehen. Danach muss - zudem der docker scheduler neu gestartet werden, um den neuen Job zu registrieren. Dazu wird docker compose restart ofelia-mailcow ausgeführt. Zur - Überprüfung, ob die ofelia Konfiguration korrekt ist geladen wurde, kann mittels docker compose logs ofelia-mailcow nach einer Zeile mit dem Inhalt - New job registered "nextcloud-cron" - ... gesucht werden.

    +

    Nachdem diese Zeilen hinzugefügt wurden muss der folgende Befehl ausgeführt werden, um das Docker Image mit den entsprechenden Labels zu versehen.

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
    +

    Danach muss zudem der docker scheduler neu gestartet werden, um den neuen Job zu registrieren. Dazu wird der folgende Befehl ausgeführt.

    +
    +
    +
    +
    docker compose restart ofelia-mailcow
    +
    +
    +
    +
    docker-compose restart ofelia-mailcow
    +
    +
    +
    +
    +

    Zur Überprüfung, ob die ofelia Konfiguration korrekt ist geladen wurde, kann mittels dem untenstehenden Befehl nach einer Zeile mit dem Inhalt + New job registered "nextcloud-cron" - ... gesucht werden:

    +
    +
    +
    +
    docker compose logs ofelia-mailcow
    +
    +
    +
    +
    docker-compose logs ofelia-mailcow
    +
    +
    +
    +

    Hierdurch wird alle 5 Minuten die Hintergrundverarbeitung gestartet. Da die Ausführung selbst keine Ausgabe liefert, kann die korrekte Funktionsweise in den Grundeinstellungen von Nextcloud überprüft werden. Hier wird automatisch mit der ersten Ausführung die Hintergrund-Aufgaben Verarbeitung auf (X) Cron gesetzt und der Zeitstempel Letzte Aufgabe ausgeführt aktualisiert.

    Konfigurieren Sie Nextcloud, um mailcow für die Authentifizierung zu verwenden

    Im Folgenden wird beschrieben, wie die Authentifizierung über mailcow unter Verwendung des OAuth2-Protokolls eingerichtet wird. Wir nehmen nur an, dass Sie Nextcloud bereits unter cloud.example.com eingerichtet haben und dass Ihre mailcow unter mail.example.com läuft. Es spielt keine Rolle, wenn Ihre Nextcloud auf einem anderen Server läuft, Sie können immer noch mailcow für die Authentifizierung verwenden.

    1. Melden Sie sich bei mailcow als Administrator an.

    -

    2. Scrollen Sie nach unten zu OAuth2 Apps und klicken Sie auf die Schaltfläche Hinzufügen. Geben Sie die Redirect URI als https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/Mailcow an und klicken Sie auf Hinzufügen. Speichern Sie die Client-ID und das Geheimnis für später.

    +

    2. Klicken Sie im Dropdown Menü (oben rechts) auf Konfiguration.

    +

    3. Wählen Sie dann im Reiter "Zugang" den Dropdown Punkt OAuth2 aus.

    +

    4. Scrollen Sie nach unten und klicken Sie auf die Schaltfläche Füge OAuth2 Client hinzu. Geben Sie die Redirect URI als https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/mailcow an und klicken Sie auf Hinzufügen. Speichern Sie die Client-ID und das Geheimnis für später.

    Info

    -

    Einige Installationen, einschließlich derer, die mit dem Helper-Skript von mailcow eingerichtet wurden, müssen index.php/ aus der URL entfernen, um einen erfolgreichen Redirect zu erhalten: https://cloud.example.com/apps/sociallogin/custom_oauth2/Mailcow

    +

    Einige Installationen, einschließlich derer, die mit dem Helper-Skript von mailcow eingerichtet wurden, müssen index.php/ aus der URL entfernen, um einen erfolgreichen Redirect zu erhalten: https://cloud.example.com/apps/sociallogin/custom_oauth2/mailcow

    3. Melden Sie sich bei Nextcloud als Administrator an.

    4. Klicken Sie auf die Schaltfläche in der oberen rechten Ecke und wählen Sie Apps. Klicken Sie auf die Schaltfläche "Suchen" in der Symbolleiste, suchen Sie nach dem Plugin Social Login und klicken Sie daneben auf Herunterladen und aktivieren.

    @@ -2568,8 +2620,8 @@ services:

    8. Scrollen Sie nach unten zu Custom OAuth2 und klicken Sie auf die Schaltfläche +. 9. Konfigurieren Sie die Parameter wie folgt:

      -
    • Interner Name: Mailcow
    • -
    • Titel: Mailcow
    • +
    • Interner Name: mailcow
    • +
    • Titel: mailcow
    • API Basis-URL: https://mail.example.com
    • Autorisierungs-URL: https://mail.example.com/oauth/authorize
    • Token-URL: https://mail.example.com/oauth/token
    • @@ -2582,41 +2634,76 @@ services:

      Klicken Sie auf die Schaltfläche Speichern ganz unten auf der Seite.


      Wenn Sie bisher Nextcloud mit mailcow-Authentifizierung über user_external/IMAP verwendet haben, müssen Sie einige zusätzliche Schritte durchführen, um Ihre bestehenden Benutzerkonten mit OAuth2 zu verknüpfen.

      -

      1. Klicken Sie auf die Schaltfläche in der oberen rechten Ecke und wählen Sie Apps. Scrollen Sie nach unten zur App Externe Benutzerauthentifizierung und klicken Sie daneben auf Entfernen. -2. Führen Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, können Sie source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME ausführen): -

      INSERT INTO nc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM nc_users_external;
      -INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("Mailcow-", uid) FROM nc_users_external;
      -

      +

      1. Klicken Sie auf die Schaltfläche in der oberen rechten Ecke und wählen Sie Apps. Scrollen Sie nach unten zur App Externe Benutzerauthentifizierung und klicken Sie daneben auf Entfernen.

      +

      2. Führen Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, können Sie folgenden Befehl nutzen um in den Container zu gelangen)

      +
      +
      +
      +
      source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
      +
      +
      +
      +
      source mailcow.conf && docker-compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
      +
      +
      +
      +
      +
      INSERT INTO oc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM oc_users_external;
      +INSERT INTO oc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("mailcow-", uid) FROM oc_users_external;
      +

      Wenn Sie Nextcloud bisher ohne mailcow-Authentifizierung, aber mit den gleichen Benutzernamen wie mailcow genutzt haben, können Sie Ihre bestehenden Benutzerkonten auch mit OAuth2 verknüpfen.

      -

      1. Führen Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, können Sie source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME ausführen): -

      INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("Mailcow-", uid) FROM nc_users;
      -

      +

      1. Führen Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, können Sie folgenden Befehl nutzen um in den Container zu gelangen):

      +
      +
      +
      +
      source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
      +
      +
      +
      +
      source mailcow.conf && docker-compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
      +
      +
      +
      +
      +
      INSERT INTO oc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("mailcow-", uid) FROM oc_users;
      +

      Aktualisieren

      Die Nextcloud-Instanz kann einfach mit dem Web-Update-Mechanismus aktualisiert werden. Bei größeren Updates können nach dem Update weitere Änderungen vorgenommen werden. Nachdem die Nextcloud-Instanz geprüft wurde, werden Probleme angezeigt. Dies können z.B. fehlende Indizes in der DB oder ähnliches sein. Es wird angezeigt, welche Befehle ausgeführt werden müssen, diese müssen im php-fpm-mailcow Container platziert werden.

      -

      Führen Sie z.B. folgenden Befehl aus, um die fehlenden Indizes hinzuzufügen -docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "php /web/nextcloud/occ db:add-missing-indices"

      +

      Führen Sie z.B. folgenden Befehl aus, um die fehlenden Indizes hinzuzufügen:

      +

      docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c "php /web/nextcloud/occ db:add-missing-indices"


      Fehlersuche und Fehlerbehebung

      Es kann vorkommen, dass Sie die Nextcloud-Instanz von Ihrem Netzwerk aus nicht erreichen können. Dies kann daran liegen, dass der Eintrag Ihres Subnetzes im Array 'trusted_proxies' fehlt. Sie können Änderungen in der Nextcloud config.php in data/web/nextcloud/config/* vornehmen.

      -
      'trusted_proxies' =>
      -  array (
      -    0 => 'fd4d:6169:6c63:6f77::/64',
      -    1 => '172.22.1.0/24',
      -    2 => 'NewSubnet/24',
      -  ),
      +
      'trusted_proxies' =>
      +  array (
      +    0 => 'fd4d:6169:6c63:6f77::/64',
      +    1 => '172.22.1.0/24',
      +    2 => 'NewSubnet/24',
      +  ),
       
      -

      Nachdem die Änderungen vorgenommen wurden, muss der nginx-Container neu gestartet werden. -docker compose restart nginx-mailcow

      +

      Nachdem die Änderungen vorgenommen wurden, muss der nginx-Container neu gestartet werden.

      +
      +
      +
      +
      docker compose restart nginx-mailcow
      +
      +
      +
      +
      docker-compose restart nginx-mailcow
      +
      +
      +
      +

      Letztes Update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2631,6 +2718,8 @@ Es wird angezeigt, welche Befehle ausgeführt werden müssen, diese müssen im p
      + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1285,7 +1286,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2462,21 +2463,21 @@

    Um Portainer zu aktivieren, müssen die docker-compose.yml und site.conf für Nginx geändert werden.

    1. Erstellen Sie eine neue Datei docker-compose.override.yml im mailcow-dockerized Stammverzeichnis und fügen Sie die folgende Konfiguration ein -

    version: '2.1'
    -services:
    -    portainer-mailcow:
    -      image: portainer/portainer-ce
    -      volumes:
    -        - /var/run/docker.sock:/var/run/docker.sock
    -        - ./data/conf/portainer:/data
    -      restart: always
    -      dns:
    -        - 172.22.1.254
    -      dns_search: mailcow-network
    -      networks:
    -        mailcow-network:
    -          aliases:
    -            - portainer
    +
    version: '2.1'
    +services:
    +    portainer-mailcow:
    +      image: portainer/portainer-ce
    +      volumes:
    +        - /var/run/docker.sock:/var/run/docker.sock
    +        - ./data/conf/portainer:/data
    +      restart: always
    +      dns:
    +        - 172.22.1.254
    +      dns_search: mailcow-network
    +      networks:
    +        mailcow-network:
    +          aliases:
    +            - portainer
     
    2a. Erstelle data/conf/nginx/portainer.conf:
    upstream portainer {
    @@ -2488,7 +2489,7 @@ map $http_upgrade $connection_upgrade {
       '' close;
     }
     

    -

    2b. Fügen Sie einen neuen Standort für die Standard-Mailcow-Site ein, indem Sie die Datei data/conf/nginx/site.portainer.custom erstellen: +

    2b. Fügen Sie einen neuen Standort für die Standard-mailcow-Site ein, indem Sie die Datei data/conf/nginx/site.portainer.custom erstellen:

      location /portainer/ {
         proxy_http_version 1.1;
         proxy_set_header Host              $http_host;   # required for docker client's sake
    @@ -2509,9 +2510,19 @@ map $http_upgrade $connection_upgrade {
         proxy_pass http://portainer/api/websocket/;
       }
     

    -

    3. Übernehmen Sie Ihre Änderungen: -

    docker compose up -d && docker compose restart nginx-mailcow
    -

    +

    3. Übernehmen Sie Ihre Änderungen:

    +
    +
    +
    +
    docker compose up -d && docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d && docker-compose restart nginx-mailcow
    +
    +
    +
    +

    Nun können Sie einfach zu https://${MAILCOW_HOSTNAME}/portainer/ navigieren, um Ihre Portainer-Container-Überwachungsseite anzuzeigen. Sie werden dann aufgefordert, ein neues Passwort für den admin Account anzugeben. Nachdem Sie Ihr Passwort eingegeben haben, können Sie sich mit der Portainer UI verbinden.


    Reverse Proxy

    @@ -2531,7 +2542,7 @@ map $http_upgrade $connection_upgrade { Letztes Update: - 2022-10-12 18:19:33 + 2023-01-13 18:16:08 @@ -2546,6 +2557,8 @@ map $http_upgrade $connection_upgrade {
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -594,7 +595,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1283,7 +1284,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2530,113 +2531,113 @@

    Installation von Roundcube

    Laden Sie Roundcube 1.6.x in das Web htdocs Verzeichnis herunter und entpacken Sie es (hier rc/): -

    # Prüfen Sie, ob eine neuere Version vorliegt!
    -cd daten/web
    -wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    +
    # Prüfen Sie, ob eine neuere Version vorliegt!
    +cd data/web
    +wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
     
    -# Ändern Sie den Ordnernamen
    -mv roundcubemail-1.6.0 rc
    +# Ändern Sie den Ordnernamen
    +mv roundcubemail-1.6.0 rc
     
    -# Berechtigungen ändern
    -chown -R root: rc/
    +# Berechtigungen ändern
    +chown -R root: rc/
     

    Wenn Sie eine Rechtschreibprüfung benötigen, erstellen Sie eine Datei data/hooks/phpfpm/aspell.sh mit folgendem Inhalt und geben Sie dann chmod +x data/hooks/phpfpm/aspell.sh ein. Dadurch wird eine lokale Rechtschreibprüfung installiert. Beachten Sie, dass die meisten modernen Webbrowser eine eingebaute Rechtschreibprüfung haben, so dass Sie diese vielleicht nicht benötigen. -

    #!/bin/bash
    -apk update
    -apk add aspell-de # oder jede andere Sprache
    +
    #!/bin/bash
    +apk update
    +apk add aspell-de # oder jede andere Sprache
     

    Erstellen Sie eine Datei data/web/rc/config/config.inc.php mit dem folgenden Inhalt. - Ändern Sie den Parameter des_key auf einen Zufallswert. Er wird verwendet, um Ihr IMAP-Passwort vorübergehend zu speichern. - Der db_prefix ist optional, wird aber empfohlen. - Wenn Sie die Rechtschreibprüfung im obigen Schritt nicht installiert haben, entfernen Sie den Parameter spellcheck_engine und ersetzen ihn durch $config['enable_spellcheck'] = false;. -

    <?php
    -error_reporting(0);
    -if (!file_exists('/tmp/mime.types')) {
    -file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
    -}
    -$config = array();
    -$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
    -$config['imap_host'] = 'tls://dovecot:143';
    -$config['smtp_host'] = 'tls://postfix:587';
    -$config['smtp_user'] = '%u';
    -$config['smtp_pass'] = '%p';
    -$config['support_url'] = '';
    -$config['product_name'] = 'Roundcube Webmail';
    -$config['des_key'] = 'yourrandomstring_changeme';
    -$config['log_dir'] = '/dev/null';
    -$config['temp_dir'] = '/tmp';
    -$config['plugins'] = array(
    -  'archive',
    -  'managesieve'
    -);
    -$config['spellcheck_engine'] = 'aspell';
    -$config['mime_types'] = '/tmp/mime.types';
    -$config['imap_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -$config['enable_installer'] = true;
    -$config['smtp_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -$config['db_prefix'] = 'mailcow_rc1';
    +
    <?php
    +error_reporting(0);
    +if (!file_exists('/tmp/mime.types')) {
    +file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
    +}
    +$config = array();
    +$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
    +$config['imap_host'] = 'tls://dovecot:143';
    +$config['smtp_host'] = 'tls://postfix:587';
    +$config['smtp_user'] = '%u';
    +$config['smtp_pass'] = '%p';
    +$config['support_url'] = '';
    +$config['product_name'] = 'Roundcube Webmail';
    +$config['des_key'] = 'yourrandomstring_changeme';
    +$config['log_dir'] = '/dev/null';
    +$config['temp_dir'] = '/tmp';
    +$config['plugins'] = array(
    +  'archive',
    +  'managesieve'
    +);
    +$config['spellcheck_engine'] = 'aspell';
    +$config['mime_types'] = '/tmp/mime.types';
    +$config['imap_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +$config['enable_installer'] = true;
    +$config['smtp_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +$config['db_prefix'] = 'mailcow_rc1';
     

    Richten Sie Ihren Browser auf https://myserver/rc/installer und folgen Sie den Anweisungen. Initialisiere die Datenbank und verlasse das Installationsprogramm.

    Löschen Sie das Verzeichnis data/web/rc/installer nach einer erfolgreichen Installation!

    Konfigurieren Sie die ManageSieve-Filterung

    Öffnen Sie data/web/rc/config/config.inc.php und ändern Sie die folgenden Parameter (oder fügen Sie sie am Ende der Datei hinzu): -

    $config['managesieve_host'] = 'tls://dovecot:4190';
    -$config['managesieve_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -// Aktiviert separate Verwaltungsschnittstelle für Urlaubsantworten (außer Haus)
    -// 0 - kein separater Abschnitt (Standard),
    -// 1 - Abschnitt "Urlaub" hinzufügen,
    -// 2 - Abschnitt "Urlaub" hinzufügen, aber Abschnitt "Filter" ausblenden
    -$config['managesieve_vacation'] = 1;
    +
    $config['managesieve_host'] = 'tls://dovecot:4190';
    +$config['managesieve_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +// Aktiviert separate Verwaltungsschnittstelle für Urlaubsantworten (außer Haus)
    +// 0 - kein separater Abschnitt (Standard),
    +// 1 - Abschnitt "Urlaub" hinzufügen,
    +// 2 - Abschnitt "Urlaub" hinzufügen, aber Abschnitt "Filter" ausblenden
    +$config['managesieve_vacation'] = 1;
     

    Aktivieren Sie die Funktion "Passwort ändern" in Roundcube

    Öffnen Sie data/web/rc/config/config.inc.php und aktivieren Sie das Passwort-Plugin:

    -
    [...]
    -$config['plugins'] = array(
    -    'archive',
    -    'password',
    -);
    -[...]
    +
    [...]
    +$config['plugins'] = array(
    +    'archive',
    +    'password',
    +);
    +[...]
     

    Öffnen Sie data/web/rc/plugins/password/password.php, suchen Sie nach case 'ssha': und fügen Sie oben hinzu:

    -
            case 'ssha256':
    -            $salt = rcube_utils::random_bytes(8);
    -            $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
    -            $prefix  = '{SSHA256}';
    -            break;
    +
            case 'ssha256':
    +            $salt = rcube_utils::random_bytes(8);
    +            $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
    +            $prefix  = '{SSHA256}';
    +            break;
     

    Öffnen Sie data/web/rc/plugins/password/config.inc.php und ändern Sie die folgenden Parameter (oder fügen Sie sie am Ende der Datei hinzu):

    -
    $config['password_driver'] = 'sql';
    -$config['password_algorithm'] = 'ssha256';
    -$config['password_algorithm_prefix'] = '{SSHA256}';
    -$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
    +
    $config['password_driver'] = 'sql';
    +$config['password_algorithm'] = 'ssha256';
    +$config['password_algorithm_prefix'] = '{SSHA256}';
    +$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
     

    CardDAV Adressbücher in Roundcube einbinden

    Laden Sie die neueste Version von RCMCardDAV in das Roundcube Plugin Verzeichnis und entpacken Sie es (hier rc/plugins): -

    cd data/web/rc/plugins
    -wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -
    -chown -R root: carddav/
    +
    cd data/web/rc/plugins
    +wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -
    +chown -R root: carddav/
     

    Kopieren Sie die Datei config.inc.php.dist nach config.inc.php (hier in rc/plugins/carddav) und fügen Sie die folgende Voreinstellung an das Ende der Datei an - vergessen Sie nicht, mx.example.org durch Ihren eigenen Hostnamen zu ersetzen: -

    $prefs['SOGo'] = array(
    -    'name'         =>  'SOGo',
    -    'username'     =>  '%u',
    -    'password'     =>  '%p',
    -    'url'          =>  'https://mx.example.org/SOGo/dav/%u/',
    -    'carddav_name_only' => true,
    -    'use_categories' => true,
    -    'active'       =>  true,
    -    'readonly'     =>  false,
    -    'refresh_time' => '02:00:00',
    -    'fixed'        =>  array( 'active', 'name', 'username', 'password', 'refresh_time' ),
    -    'hide'        =>  false,
    -);
    +
    $prefs['SOGo'] = array(
    +    'name'         =>  'SOGo',
    +    'username'     =>  '%u',
    +    'password'     =>  '%p',
    +    'url'          =>  'https://mx.example.org/SOGo/dav/%u/',
    +    'carddav_name_only' => true,
    +    'use_categories' => true,
    +    'active'       =>  true,
    +    'readonly'     =>  false,
    +    'refresh_time' => '02:00:00',
    +    'fixed'        =>  array( 'active', 'name', 'username', 'password', 'refresh_time' ),
    +    'hide'        =>  false,
    +);
     
    Bitte beachten Sie, dass dieses Preset nur das Standard-Adressbuch integriert (dasjenige, das den Namen "Persönliches Adressbuch" trägt und nicht gelöscht werden kann). Weitere Adressbücher werden derzeit nicht automatisch erkannt, können aber manuell in den Roundcube-Einstellungen hinzugefügt werden.

    Aktivieren Sie das Plugin, indem Sie carddav zu $config['plugins'] in rc/config/config.inc.php hinzufügen.

    @@ -2645,54 +2646,54 @@ Bitte beachten Sie, dass dieses Preset nur das Standard-Adressbuch integriert (d

    Optional können Sie Roundcube's Link zu der mailcow Apps Liste hinzufügen. Um dies zu tun, öffnen oder erstellen Sie data/web/inc/vars.local.inc.php und fügen Sie den folgenden Code-Block hinzu:

    HINWEIS: Vergessen Sie nicht, das <?php Trennzeichen in der ersten Zeile einzufügen

    -
    ...
    -$MAILCOW_APPS = array(
    -  array(
    -    'name' => 'SOGo',
    -    'link' => '/SOGo/'
    -  ),
    -  array(
    -    'name' => 'Roundcube',
    -    'link' => '/rc/'
    -   )
    -);
    -...
    +
    ...
    +$MAILCOW_APPS = array(
    +  array(
    +    'name' => 'SOGo',
    +    'link' => '/SOGo/'
    +  ),
    +  array(
    +    'name' => 'Roundcube',
    +    'link' => '/rc/'
    +   )
    +);
    +...
     

    Aktualisierung von Roundcube

    Ein Upgrade von Roundcube ist recht einfach: Gehen Sie auf die Github releases Seite für Roundcube und holen Sie sich den Link für die "complete.tar.gz" Datei für die gewünschte Version. Dann folgen Sie den untenstehenden Befehlen und ändern Sie die URL und den Namen des Roundcube-Ordners, falls nötig.

    -
    # Starten Sie eine Bash-Sitzung des mailcow PHP-Containers
    -docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
    +
    # Starten Sie eine Bash-Sitzung des mailcow PHP-Containers
    +docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
     
    -# Installieren Sie die erforderliche Upgrade-Abhängigkeit, dann aktualisieren Sie Roundcube auf die gewünschte Version
    -apk add rsync
    -cd /tmp
    -wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    -cd roundcubemail-1.6.0
    -bin/installto.sh /web/rc
    +# Installieren Sie die erforderliche Upgrade-Abhängigkeit, dann aktualisieren Sie Roundcube auf die gewünschte Version
    +apk add rsync
    +cd /tmp
    +wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    +cd roundcubemail-1.6.0
    +bin/installto.sh /web/rc
     
    -# Geben Sie 'Y' ein und drücken Sie die Eingabetaste, um Ihre Installation von Roundcube zu aktualisieren.
    -# Geben Sie 'N' ein, wenn folgender Dialog erscheint: "Do you want me to fix your local configuration".
    +# Geben Sie 'Y' ein und drücken Sie die Eingabetaste, um Ihre Installation von Roundcube zu aktualisieren.
    +# Geben Sie 'N' ein, wenn folgender Dialog erscheint: "Do you want me to fix your local configuration".
     
    -# Sollte im Output eine Notice kommen "NOTICE: Update dependencies by running php composer.phar update --no-dev"  sollte an kurzerhand composer.phar downloaden und die updates durchführen:
    -cd /web/rc
    -wget https://getcomposer.org/download/2.4.2/composer.phar
    -php composer.phar update --no-dev
    -# Auf die Frage "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " bitte mit y antworten.
    +# Sollte im Output eine Notice kommen "NOTICE: Update dependencies by running php composer.phar update --no-dev"  sollte an kurzerhand composer.phar downloaden und die updates durchführen:
    +cd /web/rc
    +wget https://getcomposer.org/download/2.4.2/composer.phar
    +php composer.phar update --no-dev
    +# Auf die Frage "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " bitte mit y antworten.
     
    -# Entfernen Sie übrig gebliebene Dateien
    -cd /tmp
    -rm -rf roundcube*
    +# Entfernen Sie übrig gebliebene Dateien
    +cd /tmp
    +rm -rf roundcube*
     
    -# Falls Sie von Version 1.5 auf 1.6 updaten, dann führen Sie folgende Befehle aus, um die Konfigurationsdatei anzupassen:`
    -sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
    -sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
    -sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
    +# Falls Sie von Version 1.5 auf 1.6 updaten, dann führen Sie folgende Befehle aus, um die Konfigurationsdatei anzupassen:`
    +sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
    +sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
    +sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
     

    Administratoren ohne Passwort in Roundcube einloggen lassen

    -

    Installieren Sie zunächst das Plugin [dovecot_impersonate] (https://github.com/corbosman/dovecot_impersonate/) und fügen Sie Roundcube als App hinzu (siehe oben).

    +

    Installieren Sie zunächst das Plugin dovecot_impersonate und fügen Sie Roundcube als App hinzu (siehe oben).

    Editieren Sie mailcow.conf und fügen Sie folgendes hinzu:

    # Erlaube Admins, sich in Roundcube als Email-Benutzer einzuloggen (ohne Passwort)
     # Roundcube mit Plugin dovecot_impersonate muss zuerst installiert werden
    @@ -2714,7 +2715,7 @@ services:
     

    Bearbeiten Sie data/web/mailbox.php und fügen Sie diese Zeile zum Array $template_data hinzu:

      'allow_admin_email_login_roundcube' => (preg_match("/^(yes|y)+$/i", $_ENV["ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE"])) ? 'true' : 'false',
     
    -

    Bearbeiten Sie data/web/templates/mailbox.twig und fügen Sie diesen Code am Ende des [javascript-Abschnitts] ein (https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/templates/mailbox.twig#L49-L57):

    +

    Bearbeiten Sie data/web/templates/mailbox.twig und fügen Sie diesen Code am Ende des javascript-Abschnitts ein:

      var ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE = {{ allow_admin_email_login_roundcube }};
     

    Kopieren Sie den Inhalt der folgenden Dateien aus diesem Snippet:

    @@ -2723,16 +2724,27 @@ services:
  • data/web/rc-auth.php
  • Starten Sie schließlich mailcow neu

    -
    docker compose down
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +docker compose up -d
     
    +
    +
    +
    docker-compose down    
    +docker-compose up -d
    +
    +
    +
    +

    Letztes Update: - 2022-12-31 11:38:24 + 2023-01-13 18:16:08 @@ -2747,6 +2759,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    +
    @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1338,7 +1339,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2495,9 +2496,19 @@ Dazu wird ein zusätzlicher Link zu SOGo in der Mailbox-Liste (mailcow UI) angez

    Die Funktion ist standardmäßig deaktiviert. Es kann in der mailcow.conf durch Setzen aktiviert werden:

    ALLOW_ADMIN_EMAIL_LOGIN=y
     
    -und die betroffenen Container neu erstellen mit -
    docker compose up -d
    -

    +und die betroffenen Container neu erstellen mit

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Nachteile bei Aktivierung

    • Jeder SOGo-Seiten-Load und jede Active-Sync-Anfrage verursacht eine zusätzliche Ausführung eines internen PHP-Skripts. @@ -2517,7 +2528,7 @@ In den meisten Fällen sollte dies nicht spürbar sein, aber Sie sollten es im H x-webobjects-remote-user, Authorization und x-webobjects-auth-type.

    • -

      Wenn kein basic_auth-Header vorhanden ist, wird das Skript nach einer aktiven Mailcow-Admin-Sitzung für den angeforderten E-Mail-Benutzer suchen und die gleichen Header bereitstellen, aber mit dem Dovecot-Master-Passwort, das im Authorization-Header verwendet wird.

      +

      Wenn kein basic_auth-Header vorhanden ist, wird das Skript nach einer aktiven mailcow-Admin-Sitzung für den angeforderten E-Mail-Benutzer suchen und die gleichen Header bereitstellen, aber mit dem Dovecot-Master-Passwort, das im Authorization-Header verwendet wird.

    • Wenn beides fehlschlägt, werden die Header leer gesetzt, was SOGo dazu bringt, seine Standard-Authentifizierungsmethoden zu verwenden.

      @@ -2530,7 +2541,7 @@ In den meisten Fällen sollte dies nicht spürbar sein, aber Sie sollten es im H Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2545,6 +2556,8 @@ In den meisten Fällen sollte dies nicht spürbar sein, aber Sie sollten es im H
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    +
    @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1364,7 +1365,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2542,17 +2543,48 @@

    Anhängen eines Containers an Ihre Shell

    Um einen Container an Ihre Shell anzuhängen, können Sie einfach folgendes ausführen

    -
    docker compose exec $Dienst_Name /bin/bash
    +
    +
    +
    +
    docker compose exec $Dienst_Name /bin/bash
     
    +
    +
    +
    docker-compose exec $Dienst_Name /bin/bash
    +
    +
    +
    +

    Verbindung zu Diensten herstellen

    Wenn Sie sich direkt mit einem Dienst / einer Anwendung verbinden wollen, ist es immer eine gute Idee, source mailcow.conf zu benutzen, um alle relevanten Variablen in Ihre Umgebung zu bekommen.

    MySQL

    -
    Quelle mailcow.conf
    -docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +
    +
    +
    +
    source mailcow.conf
    +docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
     
    +
    +
    +
    source mailcow.conf
    +docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +
    +
    +
    +

    Redis

    -
    docker compose exec redis-mailcow redis-cli
    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli
     
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli
    +
    +
    +
    +

    Dienstbeschreibungen

    Hier ist eine kurze Übersicht, welcher Container / Dienst was macht:

    @@ -2635,7 +2667,7 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} Letztes Update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2650,6 +2682,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1380,7 +1381,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2654,6 +2655,8 @@ key.pem + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1290,7 +1291,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2410,14 +2411,39 @@
    -

    Warning

    +

    Warnung

    Dieser Abschnitt gilt nur für Docker's Standard-Logging-Treiber (JSON).

    -

    Um die Logs aller mailcow: dockerized bezogenen Container zu sehen, können Sie docker compose logs innerhalb Ihres mailcow-dockerized Ordners verwenden, der Ihre mailcow.conf enthält. Dies ist normalerweise ein bisschen viel, aber Sie können die Ausgabe mit --tail=100 auf die letzten 100 Zeilen pro Container kürzen, oder ein -f hinzufügen, um die Live-Ausgabe aller Ihrer Dienste zu verfolgen.

    -

    Um die Logs eines bestimmten Dienstes zu sehen, kann man docker compose logs [options] $service_name verwenden

    +

    Um die Logs aller mailcow: dockerized bezogenen Container zu sehen, können Sie den folgenden Befehl innerhalb Ihres mailcow-dockerized Ordners verwenden, der Ihre mailcow.conf enthält:

    +
    +
    +
    +
    docker compose logs
    +
    +
    +
    +
    docker-compose logs
    +
    +
    +
    +
    +

    Dies ist normalerweise ein bisschen viel, aber Sie können die Ausgabe mit --tail=100 auf die letzten 100 Zeilen pro Container kürzen, oder ein -f hinzufügen, um die Live-Ausgabe aller Ihrer Dienste zu verfolgen.

    +

    Um die Logs eines bestimmten Dienstes zu sehen, kann man folgendes verwenden:

    +
    +
    +
    +
    docker compose logs [options] $service_name
    +
    +
    +
    +
    docker-compose logs [options] $service_name
    +
    +
    +
    +

    Info

    -

    Die verfügbaren Optionen für den Befehl docker compose logs sind:

    +

    Die verfügbaren Optionen für den Befehl obrigen Befehlsind:

    • -no-color: Erzeugt eine einfarbige Ausgabe.
    • -f: Der Log-Ausgabe folgen.
    • @@ -2431,7 +2457,7 @@ Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2446,6 +2472,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1324,7 +1325,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2462,27 +2463,77 @@

    MariaDB: Aria-Wiederherstellung nach Absturz

    Wenn Ihr Server abgestürzt ist und MariaDB eine Fehlermeldung ähnlich [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files, können Sie Folgendes versuchen, um die Datenbank in einen gesunden Zustand zu bringen:

    -

    Starten Sie den Stack und warten Sie, bis mysql-mailcow beginnt, einen Neustart zu melden. Überprüfen Sie dies, indem Sie docker compose ps ausführen.

    -

    Führen Sie nun die folgenden Befehle aus:

    -
    # Stoppe den Stack, führe nicht "down" aus
    -docker compose stop
    -# Führen Sie eine Bash in dem gestoppten Container als Benutzer mysql aus
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    -# cd in das SQL-Datenverzeichnis
    -cd /var/lib/mysql
    -# aria_chk ausführen
    -aria_chk --check --force */*.MAI
    -# Löschen der aria-Logdateien
    -rm aria_log.*
    +

    Starten Sie den Stack und warten Sie, bis mysql-mailcow beginnt, einen Neustart zu melden. Überprüfen Sie dies, indem Sie den folgenden Befehl ausführen:

    +
    +
    +
    +
    docker compose ps
     
    -

    Führen Sie nun docker compose down gefolgt von docker compose up -d aus.

    +
    +
    +
    docker-compose ps
    +
    +
    +
    +
    +

    Führen Sie nun die folgenden Befehle aus:

    +

    Stoppen Sie den Stack, nicht "down" ausführen

    +
    +
    +
    +
    docker compose stop
    +
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +
    +

    Führen Sie eine Bash in dem gestoppten Container als Benutzer mysql aus

    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    +

    cd in das SQL-Datenverzeichnis +

    cd /var/lib/mysql
    +

    +

    aria_chk ausführen +

    aria_chk --check --force */*.MAI
    +
    +Löschen der aria-Logdateien +
    rm aria_log.*
    +

    +

    Führen Sie nun einen kompletten Stack neustart durch:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2497,6 +2548,8 @@ rm aria_log.*
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1324,7 +1325,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2462,9 +2463,20 @@

    Führen Sie ein manuelles mysql_upgrade durch.

    Dieser Schritt ist normalerweise nicht notwendig.

    -
    docker compose stop mysql-mailcow watchdog-mailcow
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker compose stop mysql-mailcow watchdog-mailcow
    +docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
     
    +
    +
    +
    docker-compose stop mysql-mailcow watchdog-mailcow
    +docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +

    Sobald die SQL-Shell gestartet wurde, führen Sie mysql_upgrade aus und verlassen den Container:

    mysql_upgrade
     exit
    @@ -2475,7 +2487,7 @@ exit
       
         
           Letztes Update:
    -      2022-08-31 14:45:46
    +      2023-01-13 18:16:08
           
         
       
    @@ -2490,6 +2502,8 @@ exit
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -596,7 +597,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1398,7 +1399,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2614,24 +2615,67 @@ ./helper-scripts/mailcow-reset-admin.sh

    MySQL-Passwörter zurücksetzen

    -

    Stoppen Sie den Stack, indem Sie docker compose stop ausführen.

    +

    Stoppen Sie den Stack, indem Sie den folgenden Befehl ausführen:

    +
    +
    +
    +
    docker compose stop
    +
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +

    Wenn die Container heruntergefahren sind, führen Sie diesen Befehl aus:

    -
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
     
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +

    1. Datenbank-Name finden

    -
    # source mailcow.conf
    -# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    -MariaDB [(none)]> show databases;
    +
    +
    +
    +
    # source mailcow.conf
    +# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +MariaDB [(none)]> show databases;
     +--------------------+
    -| Database |
    +| Database |
     +--------------------+
    -| information_schema |
    -| mailcow_database | <=====
    -| mysql |
    -| performance_schema |
    +| information_schema |
    +| mailcow_database | <=====
    +| mysql |
    +| performance_schema |
     +--------------------+
    -4 rows in set (0.00 sec)
    +4 rows in set (0.00 sec)
     
    +
    +
    +
    # source mailcow.conf
    +# docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +MariaDB [(none)]> show databases;
    ++--------------------+
    +| Database |
    ++--------------------+
    +| information_schema |
    +| mailcow_database | <=====
    +| mysql |
    +| performance_schema |
    ++--------------------+
    +4 rows in set (0.00 sec)
    +
    +
    +
    +

    2. Einen oder mehrere Benutzer zurücksetzen

    2.1 Maria DB < 10.4 (ältere mailcow-Installationen)

    Sowohl "password" als auch "authentication_string" existieren. Derzeit wird "password" verwendet, aber besser ist es, beide zu setzen.

    @@ -2668,19 +2712,40 @@ MariaDB [(none)]> FLUSH PRIVILEGES;

    Zwei-Faktor-Authentifizierung entfernen

    Für mailcow WebUI:

    Dies funktioniert ähnlich wie das Zurücksetzen eines MySQL-Passworts, jetzt machen wir es vom Host aus, ohne uns mit dem MySQL CLI zu verbinden:

    -
    Quelle mailcow.conf
    -docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM tfa WHERE username='YOUR_USERNAME';"
    +
    +
    +
    +
    source mailcow.conf
    +docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM tfa WHERE username='YOUR_USERNAME';"
     
    +
    +
    +
    source mailcow.conf
    +docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM tfa WHERE username='YOUR_USERNAME';"
    +
    +
    +
    +

    Für SOGo:

    -
    docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{"SOGoGoogleAuthenticatorEnabled":0}'
    +
    +
    +
    +
    docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{"SOGoGoogleAuthenticatorEnabled":0}'
     
    +
    +
    +
    docker-compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{"SOGoGoogleAuthenticatorEnabled":0}'
    +
    +
    +
    +

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2695,6 +2760,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e &qu
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    +
    @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1290,7 +1291,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2442,6 +2443,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1290,7 +1291,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2421,14 +2422,26 @@
  • Entfernen Sie das Volume rspamd-vol-1, um alle Rspamd-Daten zu entfernen.
  • Entfernen Sie Volume crypt-vol-1, um alle Crypto-Daten zu entfernen. Dies wird alle Mails unlesbar machen.
  • -

    Alternativ dazu wird die Ausführung von docker compose down -v alle mailcow: dockerized volumes zerstören und alle zugehörigen Container und Netzwerke löschen.

    +

    Alternativ dazu wird die Ausführung des folgenden Befehles alle mailcow: dockerized volumes zerstören und alle zugehörigen Container und Netzwerke löschen:

    +
    +
    +
    +
    docker compose down -v
    +
    +
    +
    +
    docker-compose down -v
    +
    +
    +
    +

    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2443,6 +2456,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1290,7 +1291,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2410,32 +2411,92 @@

    Eine kurze Anleitung, um einen schlecht funktionierenden Rspamd tiefgehend zu analysieren.

    -
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
     
    -if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    -  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    -fi
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
     
    -apt-get update ; apt-get upgrade rspamd
    +apt-get update ; apt-get upgrade rspamd
     
    -nano /docker-entrypoint.sh
    +nano /docker-entrypoint.sh
     
    -# Fügen Sie vor "exec "$@"" die folgenden Zeilen ein:
    +# Fügen Sie vor "exec "$@"" die folgenden Zeilen ein:
     
    -export G_SLICE=always-malloc
    -export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
     
    -

    Starten Sie Rspamd neu: docker compose restart rspamd-mailcow

    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
    +
    +apt-get update ; apt-get upgrade rspamd
    +
    +nano /docker-entrypoint.sh
    +
    +# Fügen Sie vor "exec "$@"" die folgenden Zeilen ein:
    +
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +
    +
    +
    +
    +

    Starten Sie Rspamd neu:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +

    Ihr Speicherverbrauch wird stark ansteigen, er wird auch stetig wachsen, was nicht mit einem möglichen Memory Leak zusammenhängt, nach dem Sie suchen.

    -

    Lassen Sie den Container für ein paar Minuten, Stunden oder Tage laufen (es sollte die Zeit sein, die Sie normalerweise warten, bis der Memory Leak "passiert") und starten Sie ihn neu: docker compose restart rspamd-mailcow.

    -

    Betreten Sie nun den Container, indem Sie docker compose exec rspamd-mailcow bash ausführen, wechseln Sie das Verzeichnis zu /tmp und kopieren Sie die asan-Dateien an den gewünschten Ort oder laden Sie sie über termbin.com hoch (cat /tmp/rspamd-asan.* | nc termbin.com 9999).

    +

    Lassen Sie den Container für ein paar Minuten, Stunden oder Tage laufen (es sollte die Zeit sein, die Sie normalerweise warten, bis der Memory Leak "passiert") und starten Sie ihn neu:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +
    +

    Betreten Sie nun den Container, indem Sie den folgenden Befehl ausführen:

    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +
    +
    +
    +

    Wechseln Sie das Verzeichnis zu /tmp und kopieren Sie die asan-Dateien an den gewünschten Ort oder laden Sie sie über termbin.com hoch (cat /tmp/rspamd-asan.* | nc termbin.com 9999).


    Letztes Update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2450,6 +2511,8 @@ export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violati
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugin und der Standalone Variante anwählbar.

    + @@ -591,7 +592,7 @@
  • - Migration von Sync-Jobs + Migration mit Sync Jobs
  • @@ -1290,7 +1291,7 @@
  • - Zwei-Faktoren-Authentifizierung + Zwei-Faktor Authentifizierung
  • @@ -2440,6 +2441,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2482,11 +2483,45 @@

    We automatically create daily backups (24h interval starting from running up -d) in /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/.

    Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

    Copy the file named after the user you want to restore to __MAILCOW_DIRECTORY__/data/conf/sogo.

    -

    1. Copy the backup: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

    -

    2. Run docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org

    +
      +
    1. +

      Copy the backup: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

      +
    2. +
    3. +

      Run the following command:

      +
      +
      +
      +
      docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
      +
      +
      +
      +
      docker-compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org
      +
      +
      +
      +

      Run sogo-tool without parameters to check for possible restore options.

      -

      3. Delete the copied backup by running rm __MAILCOW_DIRECTORY__/data/conf/sogo

      -

      4. Restart SOGo and Memcached: docker compose restart sogo-mailcow memcached-mailcow

      +
    4. +
    5. +

      Delete the copied backup by running rm __MAILCOW_DIRECTORY__/data/conf/sogo

      +
    6. +
    7. +

      Restart SOGo and Memcached:

      +
    8. +
    +
    +
    +
    +
    docker compose restart sogo-mailcow memcached-mailcow
    +
    +
    +
    +
    docker-compose restart sogo-mailcow memcached-mailcow
    +
    +
    +
    +

    Mail

    In case of an accidental deletion of a mailbox, you will be able to recover for (by default) 5 days. This depends on the MAILDIR_GC_TIME parameter in mailcow.conf.

    A deleted mailbox is copied in its encrypted form to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage.

    @@ -2494,16 +2529,27 @@

    To restore make sure you are actually restoring to the same mailcow it was deleted from or you use the same encryption keys in crypt-vol-1.

    Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

    Copy the folders from /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized] back to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user] and resync the folder and recalc the quota:

    -
    docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    -docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
    +
    +
    +
    +
    docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    +docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
     
    +
    +
    +
    docker-compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'
    +docker-compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2518,6 +2564,8 @@ docker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.ne
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2653,7 +2654,21 @@ fi

    On the destination (in this case /external_share/backups) you may want to have snapshot capabilities (ZFS, Btrfs etc.). Snapshot daily and keep for n days for a consistent backup. Do not rsync to a Samba share, you need to keep the correct permissions!

    -

    To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run docker compose pull and docker compose up -d.

    +

    To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run:

    +
    +
    +
    +
    docker compose pull
    +docker compose up -d
    +
    +
    +
    +
    docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    If you are lucky Redis and MariaDB can automatically fix the inconsistent databases (if they are inconsistent). In case of a corrupted database you'd need to use the helper script to restore the inconsistent elements. If a restore fails, try to extract the backups and copy the files back manually. Keep the file permissions!

    @@ -2662,7 +2677,7 @@ In case of a corrupted database you'd need to use the helper script to restore t Last update: - 2022-10-25 14:46:12 + 2023-01-10 12:08:32 @@ -2677,6 +2692,8 @@ In case of a corrupted database you'd need to use the helper script to restore t + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2477,23 +2478,45 @@

    Maildir

    Backup

    -

    This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: -

    cd /path/to/mailcow-dockerized
    -docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    -

    +

    This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory:

    +
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    +
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +docker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar cvfz /backup/backup_vmail.tar.gz /vmail
    +
    +
    +
    +

    You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. Set the filename backup_vmail.tar.gz to any custom name, but leave the path as it is. Example: [...] tar cvfz /backup/my_own_filename_.tar.gz

    Restore

    -
    cd /path/to/mailcow-dockerized
    -docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz
    +
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
     
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination "/var/vmail" }}{{ .Name }}{{ end }}{{ end }}' $(docker-compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:bullseye-slim tar xvfz /backup/backup_vmail.tar.gz
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2508,6 +2531,8 @@ docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if e
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2477,19 +2478,41 @@

    MySQL (mysqldump)

    Backup

    -
    cd /path/to/mailcow-dockerized
    -source mailcow.conf
    -DATE=$(date +"%Y%m%d_%H%M%S")
    -docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
    +
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +source mailcow.conf
    +DATE=$(date +"%Y%m%d_%H%M%S")
    +docker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
     
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +source mailcow.conf
    +DATE=$(date +"%Y%m%d_%H%M%S")
    +docker-compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
    +
    +
    +
    +

    Restore

    Warning

    +
    +
    +

    You should redirect the SQL dump without docker compose to prevent parsing errors.

    -
    cd /path/to/mailcow-dockerized
    -source mailcow.conf
    -docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
    +
    +

    You should redirect the SQL dump without docker-compose to prevent parsing errors.

    +
    +
    +
    +
    +
    cd /path/to/mailcow-dockerized
    +source mailcow.conf
    +docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
     

    @@ -2497,7 +2520,7 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2512,6 +2535,8 @@ docker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPAS
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2516,7 +2517,19 @@

    To find the paths of your source volumes we use docker inspect and read the destination directory of every volume related to your mailcow compose project. This means we will also transfer volumes you may have added in an override file. Local bind mounts may or may not work.

    The script uses rsync with the --delete flag. The destination will be an exact copy of the source.

    mariabackup is used to create a consistent copy of the SQL data directory.

    -

    After rsync'ing the data we will run docker compose pull and remove old image tags from the destination.

    +

    After rsync'ing the data we will run the command below (depending on your set docker compose type in mailcow.conf) and remove old image tags from the destination:

    +
    +
    +
    +
    docker compose pull
    +
    +
    +
    +
    docker-compose pull
    +
    +
    +
    +

    Your source will not be changed at any time.

    You may want to make sure to use the same /etc/docker/daemon.json on the remote target.

    You should not run disk snapshots (e.g. via ZFS, LVM etc.) on the target at the very same time as this script is run.

    @@ -2564,7 +2577,7 @@ The destination must have Docker and docker compose v2 availabl Last update: - 2022-08-31 14:45:46 + 2023-01-10 12:08:32 @@ -2579,6 +2592,8 @@ The destination must have Docker and docker compose v2 availabl + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2490,6 +2491,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2437,6 +2438,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2547,6 +2548,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2439,6 +2440,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2447,6 +2448,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2557,6 +2558,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2579,6 +2580,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2456,6 +2457,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2440,6 +2441,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2454,6 +2455,8 @@ Since you accessed this page after logging into your mailcow server, all of the + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2410,8 +2411,18 @@

    To remove mailcow: dockerized with all it's volumes, images and containers do:

    -
    docker compose down -v --rmi all --remove-orphans
    +
    +
    +
    +
    docker compose down -v --rmi all --remove-orphans
     
    +
    +
    +
    docker-compose down -v --rmi all --remove-orphans
    +
    +
    +
    +

    Info

      @@ -2427,7 +2438,7 @@ Last update: - 2022-09-01 09:33:47 + 2022-12-15 15:31:09 @@ -2442,6 +2453,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2688,7 +2689,7 @@ yum install docker-compose-plugin

    Info

    This installation is the old familiar way. It installs Docker Compose as a standalone program and does not rely on the Docker installation way.

    -
    curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
    +
    LATEST=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/docker/compose/releases/latest) && LATEST=${LATEST##*/} && curl -L https://github.com/docker/compose/releases/download/$LATEST/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
     chmod +x /usr/local/bin/docker-compose
     
    @@ -2752,10 +2753,21 @@ Add the new driver_opts parameter like this:

    Please don't turn off IPv6, even if you don't like it. IPv6 is the future and should not be ignored.

    If you do not have an IPv6 enabled network on your host and you don't care for a better internet (thehe), it is recommended to disable IPv6 for the mailcow network to prevent unforeseen issues.

    Start mailcow

    -

    Pull the images and run the compose file. The parameter -d will start mailcow: dockerized detached: -

    docker compose pull
    -docker compose up -d
    -

    +

    Pull the images and run the compose file. The parameter -d will start mailcow: dockerized detached:

    +
    +
    +
    +
    docker compose pull
    +docker compose up -d
    +
    +
    +
    +
    docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    Done!

    You can now access https://${MAILCOW_HOSTNAME} with the default credentials admin + password moohoo.

    @@ -2770,7 +2782,7 @@ docker compose up -d Last update: - 2022-10-18 11:55:11 + 2022-12-16 19:22:13 @@ -2785,6 +2797,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2427,22 +2428,55 @@ systemctl status docker.service
    rsync -aHhP --numeric-ids --delete /opt/mailcow-dockerized/ root@target-machine.example.com:/opt/mailcow-dockerized
     rsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine.example.com:/var/lib/docker/volumes
     

    -

    4. Shut down mailcow and stop Docker on the source machine. -

    cd /opt/mailcow-dockerized
    -docker compose down
    -systemctl stop docker.service
    -

    +

    4. Shut down mailcow and stop Docker on the source machine.

    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose down
    +systemctl stop docker.service
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose down
    +systemctl stop docker.service
    +
    +
    +
    +

    5. Repeat step 3 with the same commands. This will be much quicker than the first time.

    6. Switch over to the target machine and start Docker.

    systemctl start docker.service
     

    -

    7. Now pull the mailcow Docker images on the target machine. -

    cd /opt/mailcow-dockerized
    -docker compose pull
    -

    -

    8. Start the whole mailcow stack and everything should be done! -

    docker compose up -d
    -

    +

    7. Now pull the mailcow Docker images on the target machine.

    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose pull
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose pull
    +
    +
    +
    +
    +

    8. Start the whole mailcow stack and everything should be done!

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +

    9. Finally, change your DNS settings to point to the target server. Also check the SNAT_TO_SOURCE variable in your mailcow.conf file if you have changed your public IP address, otherwise SOGo may not work.


    @@ -2450,7 +2484,7 @@ docker compose pull Last update: - 2022-12-31 04:35:23 + 2023-01-13 18:34:22 @@ -2465,6 +2499,8 @@ docker compose pull + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2674,17 +2675,31 @@ dacd4fb9b51e9e1c8a37d84485b92ffaf6c59353 Before update on 2020-08-07_13_31_31

    Can I roll back?

    Yes.

    See the topic above, instead of a diff, you run checkout:

    -
    docker compose down
    -# Replace commit ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab by your ID
    -git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    -docker compose pull
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID
    +git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    +docker compose pull
    +docker compose up -d
     
    +
    +
    +
    docker-compose down
    +# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID
    +git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    +docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    Hooks

    You can hook into the update mechanism by adding scripts called pre_commit_hook.sh and post_commit_hook.sh to your mailcows root directory. See this for more details.

    Update Cycle

      -
    • We schedule a monthly release cycle for a major update at the first tuesday of the month.
    • +
    • We schedule a monthly release cycle for a major update.
    • The releases are numbered like this: YYYY-MM (e.g. 2022-05)
    • Fixes for a main Update will be stated as "Revisions" like a,b,c (e.g. 2022-05a, 2022-05b etc.)
    @@ -2721,7 +2736,7 @@ docker compose up -d Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:17:09 @@ -2736,6 +2751,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2668,6 +2669,8 @@ Each container represents a single application.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2561,13 +2562,23 @@ MaxScriptNormalize 50M MaxZipTypeRcg 50M

    -
  • Restart ClamAV container: -
    docker compose restart clamd-mailcow
    -
  • +
  • Restart ClamAV container:
  • +
    +
    +
    +
    docker compose restart clamd-mailcow
    +
    +
    +
    +
    docker-compose restart clamd-mailcow
    +
    +
    +
    +

    Please note:

    - -
  • @@ -2548,14 +2536,6 @@ Disable unofficial supported Fido Security Keys - -
  • - - - -
  • @@ -2671,23 +2646,39 @@ Finally, enter your current account password and, after selecting the Touc

    Disable unofficial supported Fido Security Keys

    With WebAuthn there is the possibility to use only official Fido Security Keys (from the big brands like: Yubico, Apple, Nitro, Google, Huawei, Microsoft, etc.).

    This is primarily for security purposes, as it allows administrators to ensure that only official hardware can be used in their environment.

    -

    To enable this feature, change the value WEBAUTHN_ONLY_TRUSTED_VENDORS in mailcow.conf from n to y and restart the affected containers with docker compose up -d.

    +

    To enable this feature, change the value WEBAUTHN_ONLY_TRUSTED_VENDORS in mailcow.conf from n to y and restart the affected containers with the following command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The mailcow will now use the Vendor Certificates located in your mailcow directory under data/web/inc/lib/WebAuthn/rootCertificates.

    -
    Example:
    +
    +

    Example

    If you want to limit the official Vendor devices to Apple only you only need the Apple Vendor Certificate inside the data/web/inc/lib/WebAuthn/rootCertificates. After you deleted all other certs you now only can activate WebAuthn 2FA with Apple devices.

    -

    That´s for every vendor the same, so choose what you like (if you want to).

    -

    Use own certificates for WebAuthn

    +

    Every vendor (listed there) behaves the same, so choose what you like (if you want to).

    +
    +

    Use own certificates for WebAuthn

    If you have a valid certificate from the vendor of your key you can also add it to your mailcow!

    Just copy the certificate into the data/web/inc/lib/WebAuthn/rootCertificates folder and restart your mailcow.

    Now you should be able to register this device as well, even though the verification for the vendor certificates is enabled, since you just added the certificate manually.

    -

    Is it dangerous to keep the Vendor Check disabled?

    +

    Is it dangerous to keep the Vendor Check disabled?

    No, it isn´t! These vendor certificates are only used to verify original hardware, not to secure the registration process.

    -

    As you can read in these articles, the deactivation is not software security related: -- https://developers.yubico.com/U2F/Attestation_and_Metadata/ -- https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651 -- https://medium.com/webauthnworks/sorting-fido-ctap-webauthn-terminology-7d32067c0b01

    +

    As you can read in these articles, the deactivation is not software security related:

    +

    In the end, however, it is of course your decision to leave this check disabled or enabled.


    TOTP

    @@ -2704,7 +2695,7 @@ These vendor certificates are only used to verify original hardware, not to secu Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2719,6 +2710,8 @@ These vendor certificates are only used to verify original hardware, not to secu + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2429,18 +2430,38 @@ }

    In case you changed the HTTP_BIND parameter, recreate the container:

    -
    docker compose up -d
    +
    +
    +
    +
    docker compose up -d
     
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +

    Otherwise restart Nginx:

    -
    docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker compose restart
     
    +
    +
    +
    docker compose restart
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2455,6 +2476,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2476,6 +2477,8 @@ $autodiscover_config = array( + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2420,8 +2421,18 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    ssl_min_protocol = TLSv1
     

    Restart the affected services:

    -
    docker compose restart postfix-mailcow dovecot-mailcow
    +
    +
    +
    +
    docker compose restart postfix-mailcow dovecot-mailcow
     
    +
    +
    +
    docker-compose restart postfix-mailcow dovecot-mailcow
    +
    +
    +
    +

    Hint: You can enable TLS 1.2 in Windows 7.


    @@ -2429,7 +2440,7 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2444,6 +2455,8 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2438,6 +2439,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2435,6 +2436,8 @@ Using a public resolver like Googles 4x8, OpenDNS or any other shared DNS resolv + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2449,6 +2450,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2517,14 +2518,26 @@ With SOGo disabled, all hashing methods below will be able to be read by mailcow

    I changed the password hashes in the "mailbox" SQL table and cannot login.

    -

    A "view" needs to be updated. You can trigger this by restarting sogo-mailcow: docker compose restart sogo-mailcow

    +

    A "view" needs to be updated. You can trigger this by restarting sogo-mailcow:

    +
    +
    +
    +
    docker compose restart sogo-mailcow
    +
    +
    +
    +
    docker-compose restart sogo-mailcow
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2539,6 +2552,8 @@ With SOGo disabled, all hashing methods below will be able to be read by mailcow
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2513,6 +2514,8 @@ needs to grant you access as described above.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2439,9 +2440,20 @@ services: entrypoint: ["echo", "ipv6nat disabled in compose.override.yml"]

    For these changes to be effective, you need to fully stop and then restart the stack, so containers and networks are recreated:

    -
    docker compose down
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +docker compose up -d
     
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    3. Disable IPv6 in unbound-mailcow

    Edit data/conf/unbound/unbound.conf and set do-ip6 to "no":

    server:
    @@ -2450,16 +2462,36 @@ docker compose up -d
       [...]
     

    Restart Unbound:

    -
    docker compose restart unbound-mailcow
    +
    +
    +
    +
    docker compose restart unbound-mailcow
     
    +
    +
    +
    docker-compose restart unbound-mailcow
    +
    +
    +
    +

    4. Disable IPv6 in postfix-mailcow

    Create data/conf/postfix/extra.cf and set smtp_address_preference to ipv4:

    smtp_address_preference = ipv4
     inet_protocols = ipv4
     

    Restart Postfix:

    -
    docker compose restart postfix-mailcow
    +
    +
    +
    +
    docker compose restart postfix-mailcow
     
    +
    +
    +
    docker-compose restart postfix-mailcow
    +
    +
    +
    +

    5. If your docker daemon completly disabled IPv6:

    Fix the following NGINX, Dovecot and php-fpm config files

    sed -i '/::/d' data/conf/nginx/listen_*
    @@ -2474,7 +2506,7 @@ sed -i 's/\[::\]://g' data/conf/phpfpm/php-fpm.d/pools.conf
       
         
           Last update:
    -      2022-10-19 15:29:13
    +      2023-01-09 15:44:30
           
         
       
    @@ -2489,6 +2521,8 @@ sed -i 's/\[::\]://g' data/conf/phpfpm/php-fpm.d/pools.conf
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2568,7 +2569,19 @@ services: depends_on: - rspamd-mailcow -

    Run docker compose up -d

    +

    Start the mailcow stack with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Send a copy reports to yourself

    To receive a hidden copy of reports generated by Rspamd you can set a bcc_addrs list in the reporting config section of data/conf/rspamd/local.d/dmarc.conf:

    reporting {
    @@ -2585,21 +2598,70 @@ services:
     
     

    Troubleshooting

    Check when the report schedule last ran:

    -
    docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +
    docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
     
    +
    +
    +
    docker-compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +

    See the latest report output:

    -
    docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +
    docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
     
    +
    +
    +
    docker-compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +

    Manually trigger a DMARC report:

    -
    docker compose exec rspamd-mailcow rspamadm dmarc_report
    +
    +
    +
    +
    docker compose exec rspamd-mailcow rspamadm dmarc_report
     
    -

    Validate that Rspamd has recorded data in Redis: -Change 20220428 to date which you interested in.

    -

    docker compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    docker-compose exec rspamd-mailcow rspamadm dmarc_report
     
    -Take one of the lines from output you interested in and request it, f.e.: -
    docker compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    -

    +
    +
    +
    +

    Validate that Rspamd has recorded data in Redis: Change 20220428 to date which you interested in.

    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    +
    +

    Take one of the lines from output you interested in and request it, f.e.:

    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    +
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    +
    +
    +
    +

    Change DMARC reporting frequency

    In the example above reports are sent once every 24 hours and send reports for yesterday. This will be okay for most setups.

    If you have a large mail volume and want to run the DMARC reporting more than once a day you need create second schedule and run it with dmarc_report $(date '+%Y%m%d') to process the current day. You have to make sure that the first run on each day also processes the last report from the day before, so it needs to be started twice, one time with $(date --date yesterday '+%Y%m%d') at 0 5 0 * * * (00:05 AM) and then with $(date '+%Y%m%d') with desired interval.

    @@ -2626,10 +2688,34 @@ services:
    1. -

      Run docker compose up -d

      +

      Restart the desired containers with:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +
    2. -

      Run docker compose restart ofelia-mailcow

      +

      Restart the ofelia container only:

      +
      +
      +
      +
      docker compose restart ofelia-mailcow
      +
      +
      +
      +
      docker-compose restart ofelia-mailcow
      +
      +
      +
      +

    Disable DMARC Reporting

    @@ -2642,7 +2728,19 @@ services:

    Revert changes done in docker-compose.override.yml to rspamd-mailcow and ofelia-mailcow

  • -

    Run docker compose up -d

    +

    Restart the desired containers with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
  • @@ -2651,7 +2749,7 @@ services: Last update: - 2022-11-09 01:01:48 + 2023-01-09 15:44:30 @@ -2666,6 +2764,8 @@ services: + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2506,7 +2507,21 @@ DOVEADM_PORT=127.0.0.1:19991 SQL_PORT=127.0.0.1:13306 SOLR_PORT=127.0.0.1:18983
    -

    To apply your changes, run docker compose down followed by docker compose up -d.

    +

    To apply your changes, run:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    IPv6 binding

    Changing IPv6 bindings is different from IPv4. Again, this has a technical background.

    A docker-compose.override.yml file will be used instead of editing the docker-compose.yml file directly. This is to maintain updatability, as the docker-compose.yml file gets updated regularly and your changes will most likely be overwritten.

    @@ -2534,14 +2549,28 @@ services: - '[2001:db8:dead:beef::123]:80:80' - '[2001:db8:dead:beef::123]:443:443'
    -

    To apply your changes, run docker compose down followed by docker compose up -d.

    +

    To apply your changes, run the commands below:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-09-01 09:33:47 + 2023-01-09 15:44:30 @@ -2556,6 +2585,8 @@ services:
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2445,6 +2446,8 @@ Relaying over this interface is necessary (instead of - for example - relaying d + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2556,7 +2557,19 @@

    Logging in mailcow: dockerized consists of multiple stages, but is, after all, much more flexible and easier to integrate into a logging daemon than before.

    In Docker the containerized application (PID 1) writes its output to stdout. For real one-application containers this works just fine. -Run docker compose logs --help to learn more.

    +Run the command below to learn more:

    +
    +
    +
    +
    docker compose logs --help
    +
    +
    +
    +
    docker-compose logs --help
    +
    +
    +
    +

    Some containers log or stream to multiple destinations.

    No container will keep persistent logs in it. Containers are transient items!

    In the end, every line of logs will reach the Docker daemon - unfiltered.

    @@ -2637,7 +2650,21 @@ input(type="imudp" port="514") ... }
    -

    Restart the Docker daemon and run docker compose down && docker compose up -d to recreate the containers with the new logging driver.

    +

    Restart the Docker daemon and run the commands below to recreate the containers with the new logging driver:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Log rotation

    As those logs can get quite big, it is a good idea to use logrotate to compress and delete them after a certain time period.

    Create /etc/logrotate.d/mailcow with the following content:

    @@ -2661,7 +2688,7 @@ input(type="imudp" port="514") Last update: - 2022-09-01 09:33:47 + 2023-01-09 15:44:30 @@ -2676,6 +2703,8 @@ input(type="imudp" port="514") + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2554,7 +2555,19 @@ mailcow: dockerized trusts the default gateway IP 172.22.1.1 as proxy.

    This will also change the bindings inside the Nginx container! This is important, if you decide to use a proxy within Docker.

    IMPORTANT: Do not use port 8081, 9081 or 65510!

    -

    Recreate affected containers by running docker compose up -d.

    +

    Recreate affected containers by running the command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Important information, please read them carefully!

    Info

    @@ -2705,7 +2718,19 @@ backend mailcow

    Important: This config only covers the "reverseproxing" of the webpannel (nginx-mailcow) using Traefik v2, if you also want to reverseproxy the mail services such as dovecot, postfix... you'll just need to adapt the following config to each container and create an EntryPoint on your traefik.toml or traefik.yml (depending which config you use) for each port.

    For this section we'll assume you have your Traefik 2 [certificatesresolvers] properly configured on your traefik configuration file, and also using acme, also, the following example uses Lets Encrypt, but feel free to change it to your own cert resolver. You can find a basic Traefik 2 toml config file with all the above implemented which can be used for this example here traefik.toml if you need one, or a hint on how to adapt your config.

    So, first of all, we are going to disable the acme-mailcow container since we'll use the certs that traefik will provide us. -For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow.conf, and run docker compose up -d to apply the changes.

    +For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow.conf, and run the following command to apply the changes:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Then we'll create a docker-compose.override.yml file in order to override the main docker-compose.yml found in your mailcow root folder.

    version: '2.1'
     
    @@ -2761,10 +2786,22 @@ For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow
         # Name of the external docker volume which contains Traefik's `acme.json' file
         name: traefik_acme
     
    -

    Start the new containers with docker compose up -d.

    +

    Start the new containers with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Now, there's only one thing left to do, which is setup the certs so that the mail services can use them as well, since Traefik 2 uses an acme v2 format to save ALL the license from all the domains we have, we'll need to find a way to dump the certs, lucky we have this tiny container which grabs the acme.json file trough a volume, and a variable DOMAIN=example.org, and with these, the container will output the cert.pem and key.pem files, for this we'll simply run the traefik-certs-dumper container binding the /traefik volume to the folder where our acme.json is saved, bind the /output volume to our mailcow data/assets/ssl/ folder, and set up the DOMAIN=example.org variable to the domain we want the certs dumped from.

    This container will watch over the acme.json file for any changes, and regenerate the cert.pem and key.pem files directly into data/assets/ssl/ being the path binded to the container's /output path.

    -

    You can use the command line to run it, or use the docker compose shown here.

    +

    You can use the command line to run it, or use the docker-compose.yml shown here.

    After we have the certs dumped, we'll have to reload the configs from our postfix and dovecot containers, and check the certs, you can see how here.

    Aaand that should be it 😊, you can check if the Traefik router works fine trough Traefik's dashboard / traefik logs / accessing the setted domain trough https, or / and check HTTPS, SMTP and IMAP trough the commands shown on the page linked before.

    Caddy v2 (supported by the community)

    @@ -2834,14 +2871,26 @@ docker restart ${postfix_c} ${dovecot_c} ${nginx_c}

    If you plan to use a server name that is not MAILCOW_HOSTNAME in your reverse proxy, make sure to populate that name in mailcow.conf via ADDITIONAL_SERVER_NAMES first. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond to your reverse proxy with an incorrect site.

    ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld
     
    -

    Run docker compose up -d to apply.

    +

    Run the following command to apply:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-11-03 16:35:20 + 2023-01-13 18:16:08 @@ -2856,6 +2905,8 @@ docker restart ${postfix_c} ${dovecot_c} ${nginx_c}
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2438,6 +2439,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2418,16 +2419,40 @@ SNAT_TO_SOURCE=1.2.3.4 # Use this IPv6 for outgoing connections (SNAT) SNAT6_TO_SOURCE=dead:beef
    -

    Run docker compose up -d.

    +

    Run the command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The values are read by netfilter-mailcow. netfilter-mailcow will make sure, the post-routing rules are on position 1 in the netfilter table. It does automatically delete and re-create them if they are found on another position than 1.

    -

    Check the output of docker compose logs --tail=200 netfilter-mailcow to ensure the SNAT settings have been applied.

    +

    Check the output with the following command to ensure the SNAT settings have been applied:

    +
    +
    +
    +
    docker compose logs --tail=200 netfilter-mailcow
    +
    +
    +
    +
    docker-compose logs --tail=200 netfilter-mailcow
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2442,6 +2467,8 @@ SNAT6_TO_SOURCE=dead:beef
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2648,7 +2649,32 @@

    For each domain you add, it will try to resolve autodiscover.ADDED_MAIL_DOMAIN and autoconfig.ADDED_MAIL_DOMAIN to its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address. If it succeeds, a name will be added as SAN to the certificate request.

    Only names that can be validated, will be added as SAN.

    For every domain you remove, the certificate will be moved and a new certificate will be requested. It is not possible to keep domains in a certificate, when we are not able validate the challenge for those.

    -

    If you want to re-run the ACME client, use docker compose restart acme-mailcow and monitor its logs with docker compose logs --tail=200 -f acme-mailcow.

    +

    If you want to re-run the ACME client, use the following command:

    +
    +
    +
    +
    docker compose restart acme-mailcow
    +
    +
    +
    +
    docker-compose restart acme-mailcow
    +
    +
    +
    +
    +

    Monitor its logs with:

    +
    +
    +
    +
    docker compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +
    docker-compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +

    Additional domain names

    Edit "mailcow.conf" and add a parameter ADDITIONAL_SAN like this:

    Do not use quotes (") and do not use spaces between the names!

    @@ -2656,7 +2682,19 @@

    Each name will be validated against its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address.

    A wildcard name like smtp.* will try to obtain a smtp.DOMAIN_NAME SAN for each domain added to mailcow.

    -

    Run docker compose up -d to recreate affected containers automatically.

    +

    Run the following command to recreate affected containers automatically:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Info

    Using names other name MAILCOW_HOSTNAME to access the mailcow UI may need further configuration.

    @@ -2664,26 +2702,88 @@

    If you plan to use a server name that is not MAILCOW_HOSTNAME to access the mailcow UI (for example by adding mail.* to ADDITIONAL_SAN make sure to populate that name in mailcow.conf via ADDITIONAL_SERVER_NAMES. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond with an incorrect site.

    ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld
     
    -

    Run docker compose up -d to apply.

    +

    Run the command below to apply:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Force renewal

    To force a renewal, you need to create a file named force_renew and restart the acme-mailcow container:

    -
    cd /opt/mailcow-dockerized
    -touch data/assets/ssl/force_renew
    -docker compose restart acme-mailcow
    -# Now check the logs for a renewal
    -docker compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +touch data/assets/ssl/force_renew
    +docker compose restart acme-mailcow
    +# Now check the logs for a renewal
    +docker compose logs --tail=200 -f acme-mailcow
     
    +
    +
    +
    cd /opt/mailcow-dockerized
    +touch data/assets/ssl/force_renew
    +docker-compose restart acme-mailcow
    +# Now check the logs for a renewal
    +docker-compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +

    The file will be deleted automatically.

    Validation errors and how to skip validation

    You can skip the IP verification by setting SKIP_IP_CHECK=y in mailcow.conf (no quotes). Be warned that a misconfiguration will get you ratelimited by Let's Encrypt! This is primarily useful for multi-IP setups where the IP check would return the incorrect source IP address. Due to using dynamic IPs for acme-mailcow, source NAT is not consistent over restarts.

    -

    If you encounter problems with "HTTP validation", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from br-mailcow to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow (docker compose down), stop the firewall service, flush the chains and restart Docker.

    +

    If you encounter problems with "HTTP validation", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from br-mailcow to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow, stop the firewall service, flush the chains and restart Docker.

    You can also skip this validation method by setting SKIP_HTTP_VERIFICATION=y in "mailcow.conf". Be warned that this is discouraged. In most cases, the HTTP verification is skipped to workaround unknown NAT reflection issues, which are not resolved by ignoring this specific network misconfiguration. If you encounter problems generating TLSA records in the DNS overview within mailcow, you are most likely having issues with NAT reflection you should fix.

    -

    If you changed a SKIP_* parameter, run docker compose up -d to apply your changes.

    +

    If you changed a SKIP_* parameter, run the command below to apply your changes:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Disable Let's Encrypt

    Disable Let's Encrypt completely

    -

    Set SKIP_LETS_ENCRYPT=y in "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Set SKIP_LETS_ENCRYPT=y in "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Skip all names but ${MAILCOW_HOSTNAME}

    -

    Add ONLY_MAILCOW_HOSTNAME=y to "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Add ONLY_MAILCOW_HOSTNAME=y to "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The Let's Encrypt subjectAltName limit of 100 domains

    Let's Encrypt currently has a limit of 100 Domain Names per Certificate.

    By default, "acme-mailcow" will create a single SAN certificate for all validated domains @@ -2696,7 +2796,19 @@ This provides best compatibility but means the Let's Encrypt limit exceeds if yo

  • Limitations: A certificate name ADDITIONAL_SAN=test.example.com will be added as SAN to the main certificate. A separate certificate/key pair will not be generated for this format.
  • Postfix, Dovecot and Nginx will then serve these certificates with SNI.

    -

    Set ENABLE_SSL_SNI=y in "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Set ENABLE_SSL_SNI=y in "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Warning

    Not all clients support SNI, see Dovecot documentation or Wikipedia. @@ -2706,7 +2818,7 @@ You should make sure these clients use the MAILCOW_HOSTNAME for sec

    • MAILCOW_HOSTNAME=server.email.tld
    • ADDITIONAL_SAN=webmail.email.tld,mail.*
    • -
    • Mailcow email domains: "domain1.tld" and "domain2.tld"
    • +
    • mailcow email domains: "domain1.tld" and "domain2.tld"

    The following certificates will be generated:

      @@ -2726,15 +2838,51 @@ docker restart $(docker ps -qaf name=dovecot-mailcow)

      See Post-hook script for non-mailcow ACME clients for a full example script.

      Test against staging ACME directory

      Edit mailcow.conf and add LE_STAGING=y.

      -

      Run docker compose up -d to activate your changes.

      +

      Run the command below to activate your changes:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +

      Custom directory URL

      Edit mailcow.conf and add the corresponding directory URL to the new variable DIRECTORY_URL:

      DIRECTORY_URL=https://acme-custom-v9000.api.letsencrypt.org/directory
       

      You cannot use LE_STAGING with DIRECTORY_URL. If both are set, only LE_STAGING is used.

      -

      Run docker compose up -d to activate your changes.

      +

      Run the command below to activate your changes:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +

      Check your configuration

      -

      Run docker compose logs acme-mailcow to find out why a validation fails.

      +

      Run the command below to find out why a validation fails:

      +
      +
      +
      +
      docker compose logs --tail=200 acme-mailcow
      +
      +
      +
      +
      docker-compose logs --tail=200 acme-mailcow
      +
      +
      +
      +

      To check if nginx serves the correct certificate, simply use a browser of your choice and check the displayed certificate.

      To check the certificate served by Postfix, Dovecot and Nginx we will use openssl:

      # Connect via SMTP STARTTLS (587)
      @@ -2751,8 +2899,8 @@ openssl s_client -connect MAILCOW_HOSTNAME:993 | openssl x509 -noout -text
       openssl s_client -connect MAILCOW_HOSTNAME:443 | openssl x509 -noout -text
       

      To validate the expiry dates as returned by openssl against MAILCOW_HOSTNAME, you are able to use our helper script:

      -
      cd /opt/mailcow-dockerized
      -bash helper-scripts/expiry-dates.sh
      +
      cd /opt/mailcow-dockerized
      +bash helper-scripts/expiry-dates.sh
       

      @@ -2760,7 +2908,7 @@ bash helper-scripts/expiry-dates.sh Last update: - 2023-01-07 13:22:32 + 2023-01-13 18:34:22 @@ -2775,6 +2923,8 @@ bash helper-scripts/expiry-dates.sh
      + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2514,6 +2515,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2725,6 +2726,8 @@ Details: + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2878,6 +2879,8 @@ You may want to + - + diff --git a/en/third_party/borgmatic/third_party-borgmatic/index.html b/en/third_party/borgmatic/third_party-borgmatic/index.html index 76c40eb99..79bb52baa 100644 --- a/en/third_party/borgmatic/third_party-borgmatic/index.html +++ b/en/third_party/borgmatic/third_party-borgmatic/index.html @@ -84,8 +84,9 @@ -

    Alle Befehle sind gemäß der Syntax des Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2740,7 +2741,7 @@

    Borgmatic Backup

    Introduction

    -

    Borgmatic is a great way to run backups on your Mailcow setup as it securely encrypts your data and is extremely easy to +

    Borgmatic is a great way to run backups on your mailcow setup as it securely encrypts your data and is extremely easy to set up.

    Due to it's deduplication capabilities you can store a great number of backups without wasting large amounts of disk space. This allows you to run backups in very short intervals to ensure minimal data loss when the need arises to @@ -2841,14 +2842,34 @@ usual id_rsa, id_ed25519 or similar to be in this dire or OpenSSH will refuse to use the SSH key.

    Bring up the container

    For the next step we need the container to be up and running in a configured state. To do that run:

    +
    +
    +
    docker compose up -d
     
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Initialize the repository

    By now your borgmatic container is up and running, but the backups will currently fail due to the repository not being initialized.

    To initialize the repository run:

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2
    +
    +
    +
    +

    You will be asked you to authenticate the SSH host key of your remote repository server. See if it matches and confirm the prompt by entering yes. The repository will be initialized with the passphrase you set in the BORG_PASSPHRASE environment variable earlier.

    @@ -2859,8 +2880,18 @@ for how to retrieve the key.

    Restart container

    Now that we finished configuring and initializing the repository restart the container to ensure it is in a defined state:

    +
    +
    +
    docker compose restart borgmatic-mailcow
     
    +
    +
    +
    docker-compose restart borgmatic-mailcow
    +
    +
    +
    +

    Restoring from a backup

    Restoring a backup assumes you are starting off with a fresh installation of mailcow, and you currently do not have any custom data in your maildir or your mailcow database.

    @@ -2880,8 +2911,18 @@ this volume.

    Before running a restore you must make the vmail volume writeable in docker-compose.override.yml by removing the ro flag from the volume. Then you can use the following command to restore the maildir from a backup:

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest
    +
    +
    +
    +

    Alternatively you can specify any archive name from the list of archives (see Listing all available archives)

    Restore MySQL

    @@ -2891,30 +2932,80 @@ Then you can use the following command to restore the maildir from a backup:

    intend to recover the mailcow database from a backup.

    To restore the MySQL database from the latest archive use this command:

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic restore --archive latest
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic restore --archive latest
    +
    +
    +
    +

    Alternatively you can specify any archive name from the list of archives (see Listing all available archives)

    After restoring

    After restoring you need to restart mailcow. If you disabled SELinux enforcing mode now would be a good time to re-enable it.

    To restart mailcow use the follwing command:

    +
    +
    +
    docker compose down && docker compose up -d
     
    +
    +
    +
    docker-compose down && docker-compose up -d
    +
    +
    +
    +

    If you use SELinux this will also trigger the re-labeling of all files in your vmail volume. Be patient, as this may take a while if you have lots of files.

    Useful commands

    Manual archiving run (with debugging output)

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic -v 2
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic -v 2
    +
    +
    +
    +

    Listing all available archives

    +
    +
    +
    docker compose exec borgmatic-mailcow borgmatic list
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borgmatic list
    +
    +
    +
    +

    Break lock

    When borg is interrupted during an archiving run it will leave behind a stale lock that needs to be cleared before any new operations can be performed:

    +
    +
    +
    docker compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow
    +
    +
    +
    +

    Where user@rsync.net:mailcow is the URI to your repository.

    Now would be a good time to do a manual archiving run to ensure it can be successfully performed.

    Exporting keys

    @@ -2923,8 +3014,18 @@ key files are generated when you initialize the repository. The repokey

    Note that in either case you also must have the passphrase to decrypt any archives.

    To fetch the keyfile run:

    +
    +
    +
    docker compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow
     
    +
    +
    +
    docker-compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow
    +
    +
    +
    +

    Where user@rsync.net:mailcow is the URI to your repository.


    @@ -2932,7 +3033,7 @@ repository, so a manual backup isn't as essential.

    Last update: - 2023-01-02 16:08:29 + 2023-01-13 18:34:22 @@ -2947,6 +3048,8 @@ repository, so a manual backup isn't as essential.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2514,7 +2515,7 @@

    CheckMK

    -

    Mailcow provides the ability to check for updates using its own update script.

    +

    mailcow provides the ability to check for updates using its own update script.

    If you want to check for mailcow updates using checkmk, you can create an executable file in the local directory of the checkmk agent (typically /usr/lib/check_mk_agent/local/) with the name mailcow_update and the following content:

    #!/bin/bash
     cd /opt/mailcow-dockerized/ && ./update.sh -c >/dev/null
    @@ -2556,7 +2557,7 @@ exit
       
         
           Last update:
    -      2022-11-04 21:38:16
    +      2023-01-13 18:16:08
           
         
       
    @@ -2571,6 +2572,8 @@ exit
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2590,6 +2591,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2411,19 +2412,19 @@

    With Gitea' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:

    1. Open docker-compose.override.yml and add gitea:

    -
    version: '2.1'
    -services:
    +
    version: '2.1'
    +services:
     
    -        gitea-mailcow:
    -            image: gitea/gitea:1
    -            volumes:
    -                - ./data/gitea:/data
    -            networks:
    -                mailcow-network:
    -                    aliases:
    -                        - gitea
    -            ports:
    -                - "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"
    +        gitea-mailcow:
    +            image: gitea/gitea:1
    +            volumes:
    +                - ./data/gitea:/data
    +            networks:
    +                mailcow-network:
    +                    aliases:
    +                        - gitea
    +            ports:
    +                - "${GITEA_SSH_PORT:-127.0.0.1:4000}:22"
     

    2. Create data/conf/nginx/site.gitea.custom, add:

    location /gitea/ {
    @@ -2433,27 +2434,66 @@ services:
     

    3. Open mailcow.conf and define the binding you want gitea to use for SSH. Example:

    GITEA_SSH_PORT=127.0.0.1:4000
     
    -

    5. Run docker compose up -d to bring up the gitea container and run docker compose restart nginx-mailcow afterwards.

    -

    6. If you forced mailcow to https, execute step 9 and restart gitea with docker compose restart gitea-mailcow . Go head with step 7 (Remember to use https instead of http, https://mx.example.org/gitea/

    +

    5. Run the commands to bring up the gitea container and restart the nginx-mailcow container afterwards:

    +
    +
    +
    +
    docker compose up -d
    +docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d
    +docker-compose restart nginx-mailcow
    +
    +
    +
    +
    +

    6. If you forced mailcow to https, execute step 9 and restart gitea with the following command:

    +
    +
    +
    +
    docker compose restart gitea-mailcow
    +
    +
    +
    +
    docker-compose restart gitea-mailcow
    +
    +
    +
    +
    +

    Go head with step 7 (Remember to use https instead of http, https://mx.example.org/gitea/)

    7. Open http://${MAILCOW_HOSTNAME}/gitea/, for example http://mx.example.org/gitea/. For database details set mysql as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.

    8. Once the installation is complete, login as admin and set "settings" -> "authorization" -> "enable SMTP". SMTP Host should be postfix with port 587, set Skip TLS Verify as we are using an unlisted SAN ("postfix" is most likely not part of your certificate).

    9. Create data/gitea/gitea/conf/app.ini and set following values. You can consult gitea cheat sheet for their meaning and other possible values.

    -
    [server]
    -SSH_LISTEN_PORT = 22
    -# For GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:
    -SSH_DOMAIN = 127.0.0.1
    -SSH_PORT = 4000
    -# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:
    -ROOT_URL = https://mx.example.org/gitea/
    +
    [server]
    +SSH_LISTEN_PORT = 22
    +# For GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:
    +SSH_DOMAIN = 127.0.0.1
    +SSH_PORT = 4000
    +# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:
    +ROOT_URL = https://mx.example.org/gitea/
     
    -

    10. Restart gitea with docker compose restart gitea-mailcow. Your users should be able to login with mailcow managed accounts.

    +

    10. Restart gitea with the following command. Your users should be able to login with mailcow managed accounts.

    +
    +
    +
    +
    docker compose restart gitea-mailcow
    +
    +
    +
    +
    docker-compose restart gitea-mailcow
    +
    +
    +
    +

    Last update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2468,6 +2508,8 @@ ROOT_URL = https://mx.example.org/gitea/
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2411,19 +2412,19 @@

    With Gogs' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:

    1. Open docker-compose.override.yml and add Gogs:

    -
    version: '2.1'
    -services:
    +
    version: '2.1'
    +services:
     
    -    gogs-mailcow:
    -      image: gogs/gogs
    -      volumes:
    -        - ./data/gogs:/data
    -      networks:
    -        mailcow-network:
    -          aliases:
    -            - gogs
    -      ports:
    -        - "${GOGS_SSH_PORT:-127.0.0.1:4000}:22"
    +    gogs-mailcow:
    +      image: gogs/gogs
    +      volumes:
    +        - ./data/gogs:/data
    +      networks:
    +        mailcow-network:
    +          aliases:
    +            - gogs
    +      ports:
    +        - "${GOGS_SSH_PORT:-127.0.0.1:4000}:22"
     

    2. Create data/conf/nginx/site.gogs.custom, add:

    location /gogs/ {
    @@ -2433,26 +2434,52 @@ services:
     

    3. Open mailcow.conf and define the binding you want Gogs to use for SSH. Example:

    GOGS_SSH_PORT=127.0.0.1:4000
     
    -

    5. Run docker compose up -d to bring up the Gogs container and run docker compose restart nginx-mailcow afterwards.

    +

    5. Run the commands to bring up the Gogs container and restart the nginx-mailcow container afterwards:

    +
    +
    +
    +
    docker compose up -d
    +docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d
    +docker-compose restart nginx-mailcow
    +
    +
    +
    +

    6. Open http://${MAILCOW_HOSTNAME}/gogs/, for example http://mx.example.org/gogs/. For database details set mysql as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.

    7. Once the installation is complete, login as admin and set "settings" -> "authorization" -> "enable SMTP". SMTP Host should be postfix with port 587, set Skip TLS Verify as we are using an unlisted SAN ("postfix" is most likely not part of your certificate).

    8. Create data/gogs/gogs/conf/app.ini and set following values. You can consult Gogs cheat sheet for their meaning and other possible values.

    -
    [server]
    -SSH_LISTEN_PORT = 22
    -# For GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:
    -SSH_DOMAIN = 127.0.0.1
    -SSH_PORT = 4000
    -# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:
    -ROOT_URL = https://mx.example.org/gogs/
    +
    [server]
    +SSH_LISTEN_PORT = 22
    +# For GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:
    +SSH_DOMAIN = 127.0.0.1
    +SSH_PORT = 4000
    +# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:
    +ROOT_URL = https://mx.example.org/gogs/
     
    -

    9. Restart Gogs with docker compose restart gogs-mailcow. Your users should be able to login with mailcow managed accounts.

    +

    9. Restart Gogs with the following command. Your users should be able to login with mailcow managed accounts.

    +
    +
    +
    +
    docker compose restart gogs-mailcow
    +
    +
    +
    +
    docker-compose restart gogs-mailcow
    +
    +
    +
    +

    Last update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2467,6 +2494,8 @@ ROOT_URL = https://mx.example.org/gogs/
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2880,7 +2881,7 @@ certbot certonly -d MAILMAN_DOMAIN

    Install mailcow with Mailman integration

    Install mailcow

    -

    Follow the mailcow installation. Omit step 5 and do not pull and up with docker compose!

    +

    Follow the mailcow installation. Omit step 5 and do not pull and start!

    Configure mailcow

    This is also Step 4 in the official mailcow installation (nano mailcow.conf). So change to your needs and alter the following variables:

    HTTP_PORT=18080            # don't use 8080 as mailman needs it
    @@ -3018,25 +3019,56 @@ DEBUG = False
     You can change LANGUAGE_CODE and SOCIALACCOUNT_PROVIDERS to your needs.

    🏃 Run

    Run (as root or sudo)

    -
    a2ensite mailcow.conf
    -a2ensite mailman.conf
    -systemctl restart apache2
    +
    +
    +
    +
    a2ensite mailcow.conf
    +a2ensite mailman.conf
    +systemctl restart apache2
     
    -cd /opt/docker-mailman
    -docker compose pull
    -docker compose up -d
    +cd /opt/docker-mailman
    +docker compose pull
    +docker compose up -d
     
    -cd /opt/mailcow-dockerized/
    -docker compose pull
    +cd /opt/mailcow-dockerized/
    +docker compose pull
     ./renew-ssl.sh
     
    +
    +
    +
    a2ensite mailcow.conf
    +a2ensite mailman.conf
    +systemctl restart apache2
    +
    +cd /opt/docker-mailman
    +docker-compose pull
    +docker-compose up -d
    +
    +cd /opt/mailcow-dockerized/
    +docker-compose pull
    +./renew-ssl.sh
    +
    +
    +
    +

    Wait a few minutes! The containers have to create there databases and config files. This can last up to 1 minute and more.

    Remarks

    New lists aren't recognized by postfix instantly

    When you create a new list and try to immediately send an e-mail, postfix responses with User doesn't exist, because postfix won't deliver it to Mailman yet. The configuration at /opt/mailman/core/var/data/postfix_lmtp is not instantly updated. If you need the list instantly, restart postifx manually:

    -
    cd /opt/mailcow-dockerized
    -docker compose restart postfix-mailcow
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose restart postfix-mailcow
     
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose restart postfix-mailcow
    +
    +
    +
    +

    Update

    mailcow has it's own update script in /opt/mailcow-dockerized/update.sh, see the docs.

    For Mailman just fetch the newest version from the github repository.

    @@ -3057,7 +3089,7 @@ docker compose restart postfix-mailcow Last update: - 2022-10-20 15:33:23 + 2023-01-13 18:16:08 @@ -3072,6 +3104,8 @@ docker compose restart postfix-mailcow
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2594,6 +2595,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2520,35 +2521,87 @@

    Nextcloud can be set up (parameter -i) and removed (parameter -p) with the helper script included with mailcow. In order to install Nextcloud simply navigate to your mailcow-dockerized root folder and run the helper script as follows:

    ./helper-scripts/nextcloud.sh -i

    In case you have forgotten the password (e.g. for admin) and can't request a new one via the password reset link on the login screen calling the helper script with -r as parameter allows you to set a new password. Only use this option if your Nextcloud isn't configured to use mailcow for authentication as described in the next section.

    -

    In order for mailcow to generate a a certificate for the nextcloud domain you need to add "nextcloud.domain.tld" to ADDITIONAL_SAN in mailcow.conf and run docker compose up -d to apply. For more informaton refer to: Advanced SSL.

    +

    In order for mailcow to generate a a certificate for the nextcloud domain you need to add "nextcloud.domain.tld" to ADDITIONAL_SAN in mailcow.conf and runthe following to apply:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
    +

    For more informaton refer to: Advanced SSL.

    Background jobs

    To use the recommended setting (cron) to execute the background jobs following lines need to be added to the docker-compose.override.yml:

    -
    version: '2.1'
    -services:
    -  php-fpm-mailcow:
    -    labels:
    -      ofelia.enabled: "true"
    -      ofelia.job-exec.nextcloud-cron.schedule: "@every 5m"
    -      ofelia.job-exec.nextcloud-cron.command: "su www-data -s /bin/bash -c \"/usr/local/bin/php -f /web/nextcloud/cron.php\""
    +
    version: '2.1'
    +services:
    +  php-fpm-mailcow:
    +    labels:
    +      ofelia.enabled: "true"
    +      ofelia.job-exec.nextcloud-cron.schedule: "@every 5m"
    +      ofelia.job-exec.nextcloud-cron.command: "su www-data -s /bin/bash -c \"/usr/local/bin/php -f /web/nextcloud/cron.php\""
     
    -

    After adding these lines the docker compose up -d command must be executed to update the docker image and also the docker scheduler image must be restarted to - pick up the new job definition by executing docker compose restart ofelia-mailcow. To check if the job was successfully picked up by ofelia the command - docker compose logs ofelia-mailcow will contain a line similar to New job registered "nextcloud-cron" - ....

    +

    After adding these lines the following command must be executed to update the docker image:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
    +

    And also the docker scheduler image must be restarted to pick up the new job definition by executing:

    +
    +
    +
    +
    docker compose restart ofelia-mailcow
    +
    +
    +
    +
    docker-compose restart ofelia-mailcow
    +
    +
    +
    +
    +

    To check if the job was successfully picked up by ofelia the command:

    +
    +
    +
    +
    docker compose logs ofelia-mailcow
    +
    +
    +
    +
    docker-compose logs ofelia-mailcow
    +
    +
    +
    +
    +

    It should contain a line similar to New job registered "nextcloud-cron" - ....

    By adding these lines the background jobs will be executed every 5 minutes. To verify that the execution works correctly, the only way is to see it in the basic settings when logged in as an admin in Nextcloud. If everything is correct the first scheduled execution will change the background jobs processing setting to (X) Cron and the timestamp after Last job ran will be updated every 5 minutes.

    Configure Nextcloud to use mailcow for authentication

    The following describes how set up authentication via mailcow using the OAuth2 protocol. We will only assume that you have already set up Nextcloud at cloud.example.com and that your mailcow is running at mail.example.com. It does not matter if your Nextcloud is running on a different server, you can still use mailcow for authentication.

    1. Log into mailcow as administrator.

    -

    2. Scroll down to OAuth2 Apps and click the Add button. Specify the redirect URI as https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/Mailcow and click Add. Save the client ID and secret for later.

    +

    2. Click Configuration in the drop-down menu (top right).

    +

    3. Then, in the "Access" tab, select the OAuth2 drop-down item.

    +

    4. Scroll down and click the Add OAuth2 client button. Specify the redirect URI as https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/mailcow and click Add. Save the client ID and secret for later.

    Info

    -

    Some installations, including those setup using the helper script of mailcow, need to remove index.php/ from the URL to get a successful redirect: https://cloud.example.com/apps/sociallogin/custom_oauth2/Mailcow

    +

    Some installations, including those setup using the helper script of mailcow, need to remove index.php/ from the URL to get a successful redirect: https://cloud.example.com/apps/sociallogin/custom_oauth2/mailcow

    -

    3. Log into Nextcloud as administrator.

    -

    4. Click the button in the top right corner and select Apps. Click the search button in the toolbar, search for the Social Login plugin and click Download and enable next to it.

    -

    5. Click the button in the top right corner and select Settings. Scroll down to the Administration section on the left and click Social login.

    -

    6. Uncheck the following items:

    +

    5. Log into Nextcloud as administrator.

    +

    6. Click the button in the top right corner and select Apps. Click the search button in the toolbar, search for the Social Login plugin and click Download and enable next to it.

    +

    7. Click the button in the top right corner and select Settings. Scroll down to the Administration section on the left and click Social login.

    +

    8. Uncheck the following items:

    • "Disable auto create new users"
    • "Allow users to connect social logins with their accounts"
    • @@ -2566,8 +2619,8 @@ services:

      8. Scroll down to Custom OAuth2 and click the + button. 9. Configure the parameters as follows:

        -
      • Internal name: Mailcow
      • -
      • Title: Mailcow
      • +
      • Internal name: mailcow
      • +
      • Title: mailcow
      • API Base URL: https://mail.example.com
      • Authorize URL: https://mail.example.com/oauth/authorize
      • Token URL: https://mail.example.com/oauth/token
      • @@ -2581,15 +2634,39 @@ services:

        If you have previously used Nextcloud with mailcow authentication via user_external/IMAP, you need to perform some additional steps to link your existing user accounts with OAuth2.

        1. Click the button in the top right corner and select Apps. Scroll down to the External user authentication app and click Remove next to it. -2. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME): -

        INSERT INTO nc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM nc_users_external;
        -INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("Mailcow-", uid) FROM nc_users_external;
        -

        +2. Run the following queries in your Nextcloud database (if you set up Nextcloud with the script from mailcow, you can use the following command to get into the container):

        +
        +
        +
        +
        source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
        +
        +
        +
        +
        source mailcow.conf && docker-compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
        +
        +
        +
        +
        +
        INSERT INTO oc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM oc_users_external;
        +INSERT INTO oc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("mailcow-", uid) FROM oc_users_external;
        +

        If you have previously used Nextcloud without mailcow authentication, but with the same usernames as mailcow, you can also link your existing user accounts with OAuth2.

        -

        1. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME): -

        INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("Mailcow-", uid) FROM nc_users;
        -

        +

        1. Run the following queries in your Nextcloud database (if you set up Nextcloud with the script from mailcow, you can use the following command to get into the container):

        +
        +
        +
        +
        source mailcow.conf && docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
        +
        +
        +
        +
        source mailcow.conf && docker-compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME
        +
        +
        +
        +
        +
        INSERT INTO oc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT("mailcow-", uid) FROM oc_users;
        +

        Update

        The Nextcloud instance can be updated easily with the web update mechanism. In the case of larger updates, there may be further changes to be made after the update. After the Nextcloud instance has been checked, problems are shown. This can be e.g. missing indices in the DB or similar. @@ -2606,15 +2683,26 @@ It shows which commands have to be executed, these have to be placed in the php- 2 => 'NewSubnet/24', ),

    -

    After the changes have been made, the nginx container must be restarted. -docker compose restart nginx-mailcow

    +

    After the changes have been made, the nginx container must be restarted.

    +
    +
    +
    +
    docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose restart nginx-mailcow
    +
    +
    +
    +

    Last update: - 2022-09-01 09:33:47 + 2023-01-13 18:16:08 @@ -2629,6 +2717,8 @@ It shows which commands have to be executed, these have to be placed in the php-
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2462,21 +2463,21 @@

    In order to enable Portainer, the docker-compose.yml and site.conf for Nginx must be modified.

    1. Create a new file docker-compose.override.yml in the mailcow-dockerized root folder and insert the following configuration -

    version: '2.1'
    -services:
    -    portainer-mailcow:
    -      image: portainer/portainer-ce
    -      volumes:
    -        - /var/run/docker.sock:/var/run/docker.sock
    -        - ./data/conf/portainer:/data
    -      restart: always
    -      dns:
    -        - 172.22.1.254
    -      dns_search: mailcow-network
    -      networks:
    -        mailcow-network:
    -          aliases:
    -            - portainer
    +
    version: '2.1'
    +services:
    +    portainer-mailcow:
    +      image: portainer/portainer-ce
    +      volumes:
    +        - /var/run/docker.sock:/var/run/docker.sock
    +        - ./data/conf/portainer:/data
    +      restart: always
    +      dns:
    +        - 172.22.1.254
    +      dns_search: mailcow-network
    +      networks:
    +        mailcow-network:
    +          aliases:
    +            - portainer
     
    2a. Create data/conf/nginx/portainer.conf:
    upstream portainer {
    @@ -2509,9 +2510,19 @@ map $http_upgrade $connection_upgrade {
         proxy_pass http://portainer/api/websocket/;
       }
     

    -

    3. Apply your changes: -

    docker compose up -d && docker compose restart nginx-mailcow
    -

    +

    3. Apply your changes:

    +
    +
    +
    +
    docker compose up -d && docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker-compose up -d && docker-compose restart nginx-mailcow
    +
    +
    +
    +

    Now you can simply navigate to https://${MAILCOW_HOSTNAME}/portainer/ to view your Portainer container monitoring page. You’ll then be prompted to specify a new password for the admin account. After specifying your password, you’ll then be able to connect to the Portainer UI.


    Reverse Proxy

    @@ -2531,7 +2542,7 @@ map $http_upgrade $connection_upgrade { Last update: - 2022-10-12 18:19:33 + 2023-01-13 18:16:08 @@ -2546,6 +2557,8 @@ map $http_upgrade $connection_upgrade {
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2530,113 +2531,113 @@

    Installing Roundcube

    Download Roundcube 1.6.x to the web htdocs directory and extract it (here rc/): -

    # Check for a newer release!
    -cd data/web
    -wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    +
    # Check for a newer release!
    +cd data/web
    +wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
     
    -# Change folder name
    -mv roundcubemail-1.6.0 rc
    +# Change folder name
    +mv roundcubemail-1.6.0 rc
     
    -# Change permissions
    -chown -R root: rc/
    +# Change permissions
    +chown -R root: rc/
     

    If you need spell check features, create a file data/hooks/phpfpm/aspell.sh with the following content, then chmod +x data/hooks/phpfpm/aspell.sh. This installs a local spell check engine. Note, most modern web browsers have built in spell check, so you may not want/need this. -

    #!/bin/bash
    -apk update
    -apk add aspell-en # or any other language
    +
    #!/bin/bash
    +apk update
    +apk add aspell-en # or any other language
     

    Create a file data/web/rc/config/config.inc.php with the following content. - Change the des_key parameter to a random value. It is used to temporarily store your IMAP password. - The db_prefix is optional but recommended. - If you didn't install spell check in the above step, remove spellcheck_engine parameter and replace it with $config['enable_spellcheck'] = false;. -

    <?php
    -error_reporting(0);
    -if (!file_exists('/tmp/mime.types')) {
    -file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
    -}
    -$config = array();
    -$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
    -$config['imap_host'] = 'tls://dovecot:143';
    -$config['smtp_host'] = 'tls://postfix:587';
    -$config['smtp_user'] = '%u';
    -$config['smtp_pass'] = '%p';
    -$config['support_url'] = '';
    -$config['product_name'] = 'Roundcube Webmail';
    -$config['des_key'] = 'yourrandomstring_changeme';
    -$config['log_dir'] = '/dev/null';
    -$config['temp_dir'] = '/tmp';
    -$config['plugins'] = array(
    -  'archive',
    -  'managesieve'
    -);
    -$config['spellcheck_engine'] = 'aspell';
    -$config['mime_types'] = '/tmp/mime.types';
    -$config['imap_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -$config['enable_installer'] = true;
    -$config['smtp_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -$config['db_prefix'] = 'mailcow_rc1';
    +
    <?php
    +error_reporting(0);
    +if (!file_exists('/tmp/mime.types')) {
    +file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
    +}
    +$config = array();
    +$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
    +$config['imap_host'] = 'tls://dovecot:143';
    +$config['smtp_host'] = 'tls://postfix:587';
    +$config['smtp_user'] = '%u';
    +$config['smtp_pass'] = '%p';
    +$config['support_url'] = '';
    +$config['product_name'] = 'Roundcube Webmail';
    +$config['des_key'] = 'yourrandomstring_changeme';
    +$config['log_dir'] = '/dev/null';
    +$config['temp_dir'] = '/tmp';
    +$config['plugins'] = array(
    +  'archive',
    +  'managesieve'
    +);
    +$config['spellcheck_engine'] = 'aspell';
    +$config['mime_types'] = '/tmp/mime.types';
    +$config['imap_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +$config['enable_installer'] = true;
    +$config['smtp_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +$config['db_prefix'] = 'mailcow_rc1';
     

    Point your browser to https://myserver/rc/installer and follow the instructions. Initialize the database and leave the installer.

    Delete the directory data/web/rc/installer after a successful installation!

    Configure ManageSieve filtering

    Open data/web/rc/config/config.inc.php and change the following parameters (or add them at the bottom of that file): -

    $config['managesieve_host'] = 'tls://dovecot:4190';
    -$config['managesieve_conn_options'] = array(
    -  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    -);
    -// Enables separate management interface for vacation responses (out-of-office)
    -// 0 - no separate section (default),
    -// 1 - add Vacation section,
    -// 2 - add Vacation section, but hide Filters section
    -$config['managesieve_vacation'] = 1;
    +
    $config['managesieve_host'] = 'tls://dovecot:4190';
    +$config['managesieve_conn_options'] = array(
    +  'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
    +);
    +// Enables separate management interface for vacation responses (out-of-office)
    +// 0 - no separate section (default),
    +// 1 - add Vacation section,
    +// 2 - add Vacation section, but hide Filters section
    +$config['managesieve_vacation'] = 1;
     

    Enable change password function in Roundcube

    Open data/web/rc/config/config.inc.php and enable the password plugin:

    -
    ...
    -$config['plugins'] = array(
    -    'archive',
    -    'password',
    -);
    -...
    +
    ...
    +$config['plugins'] = array(
    +    'archive',
    +    'password',
    +);
    +...
     

    Open data/web/rc/plugins/password/password.php, search for case 'ssha': and add above:

    -
            case 'ssha256':
    -            $salt = rcube_utils::random_bytes(8);
    -            $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
    -            $prefix  = '{SSHA256}';
    -            break;
    +
            case 'ssha256':
    +            $salt = rcube_utils::random_bytes(8);
    +            $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
    +            $prefix  = '{SSHA256}';
    +            break;
     

    Open data/web/rc/plugins/password/config.inc.php and change the following parameters (or add them at the bottom of that file):

    -
    $config['password_driver'] = 'sql';
    -$config['password_algorithm'] = 'ssha256';
    -$config['password_algorithm_prefix'] = '{SSHA256}';
    -$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
    +
    $config['password_driver'] = 'sql';
    +$config['password_algorithm'] = 'ssha256';
    +$config['password_algorithm_prefix'] = '{SSHA256}';
    +$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
     

    Integrate CardDAV addressbooks in Roundcube

    Download the latest release of RCMCardDAV to the Roundcube plugin directory and extract it (here rc/plugins): -

    cd data/web/rc/plugins
    -wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz  | tar xfvz -
    -chown -R root: carddav/
    +
    cd data/web/rc/plugins
    +wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz  | tar xfvz -
    +chown -R root: carddav/
     

    Copy the file config.inc.php.dist to config.inc.php (here in rc/plugins/carddav) and append the following preset to the end of the file - don't forget to replace mx.example.org with your own hostname: -

    $prefs['SOGo'] = array(
    -    'name'         =>  'SOGo',
    -    'username'     =>  '%u',
    -    'password'     =>  '%p',
    -    'url'          =>  'https://mx.example.org/SOGo/dav/%u/',
    -    'carddav_name_only' => true,
    -    'use_categories' => true,
    -    'active'       =>  true,
    -    'readonly'     =>  false,
    -    'refresh_time' => '02:00:00',
    -    'fixed'        =>  array( 'active', 'name', 'username', 'password', 'refresh_time' ),
    -    'hide'        =>  false,
    -);
    +
    $prefs['SOGo'] = array(
    +    'name'         =>  'SOGo',
    +    'username'     =>  '%u',
    +    'password'     =>  '%p',
    +    'url'          =>  'https://mx.example.org/SOGo/dav/%u/',
    +    'carddav_name_only' => true,
    +    'use_categories' => true,
    +    'active'       =>  true,
    +    'readonly'     =>  false,
    +    'refresh_time' => '02:00:00',
    +    'fixed'        =>  array( 'active', 'name', 'username', 'password', 'refresh_time' ),
    +    'hide'        =>  false,
    +);
     
    Please note, that this preset only integrates the default addressbook (the one that's named "Personal Address Book" and can't be deleted). Additional addressbooks are currently not automatically detected but can be manually added within the roundecube settings.

    Enable the plugin by adding carddav to $config['plugins'] in rc/config/config.inc.php.

    @@ -2645,52 +2646,52 @@ Please note, that this preset only integrates the default addressbook (the one t

    Optionally, you can add Roundcube's link to the mailcow Apps list. To do this, open or create data/web/inc/vars.local.inc.php and add the following code-block:

    NOTE: Don't forget to add the <?php delimiter on the first line

    -
    ...
    -$MAILCOW_APPS = array(
    -  array(
    -    'name' => 'SOGo',
    -    'link' => '/SOGo/'
    -  ),
    -  array(
    -    'name' => 'Roundcube',
    -    'link' => '/rc/'
    -   )
    -);
    -...
    +
    ...
    +$MAILCOW_APPS = array(
    +  array(
    +    'name' => 'SOGo',
    +    'link' => '/SOGo/'
    +  ),
    +  array(
    +    'name' => 'Roundcube',
    +    'link' => '/rc/'
    +   )
    +);
    +...
     

    Upgrading Roundcube

    Upgrading Roundcube is rather simple, go to the Github releases page for Roundcube and get the link for the "complete.tar.gz" file for the wanted release. Then follow the below commands and change the URL and Roundcube folder name if needed.

    -
    # Enter a bash session of the mailcow PHP container
    -docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
    +
    # Enter a bash session of the mailcow PHP container
    +docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
     
    -# Install required upgrade dependency, then upgrade Roundcube to wanted release
    -apk add rsync
    -cd /tmp
    -wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    -cd roundcubemail-1.6.0
    -bin/installto.sh /web/rc
    +# Install required upgrade dependency, then upgrade Roundcube to wanted release
    +apk add rsync
    +cd /tmp
    +wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -
    +cd roundcubemail-1.6.0
    +bin/installto.sh /web/rc
     
    -# Type 'Y' and press enter to upgrade your install of Roundcube
    -# Type 'N' to "Do you want me to fix your local configuration" if prompted
    +# Type 'Y' and press enter to upgrade your install of Roundcube
    +# Type 'N' to "Do you want me to fix your local configuration" if prompted
     
    -# If you see  "NOTICE: Update dependencies by running php composer.phar update --no-dev" just download composer.phar and run it:
    -cd /web/rc
    -wget https://getcomposer.org/download/2.4.2/composer.phar
    -php composer.phar update --no-dev
    -# When asked "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " hit y and continue.
    +# If you see  "NOTICE: Update dependencies by running php composer.phar update --no-dev" just download composer.phar and run it:
    +cd /web/rc
    +wget https://getcomposer.org/download/2.4.2/composer.phar
    +php composer.phar update --no-dev
    +# When asked "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " hit y and continue.
     
     
    -# Remove leftover files
    -cd /tmp
    -rm -rf roundcube*
    +# Remove leftover files
    +cd /tmp
    +rm -rf roundcube*
     
    -# If you're going from 1.5 to 1.6 please run the config file changes below
    -sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
    -sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
    -sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
    -sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
    +# If you're going from 1.5 to 1.6 please run the config file changes below
    +sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
    +sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
    +sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
    +sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
     

    Let admins log into Roundcube without password

    First, install plugin dovecot_impersonate and add Roundcube as an app (see above).

    @@ -2724,16 +2725,27 @@ services:
  • data/web/rc-auth.php
  • Finally, restart mailcow

    -
    docker compose down
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +docker compose up -d
     
    +
    +
    +
    docker-compose down    
    +docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-12-31 11:38:24 + 2023-01-13 18:16:08 @@ -2748,6 +2760,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2496,9 +2497,19 @@ log into SOGo as a mailbox user, without knowing the users password.

    The feature is disabled by default. It can be enabled in the mailcow.conf by setting:

    ALLOW_ADMIN_EMAIL_LOGIN=y
     
    -and recreating the affected containers with -
    docker compose up -d
    -

    +and recreating the affected containers with

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Drawbacks when enabled

    • Each SOGo page-load and each Active-Sync request will cause an additional execution of an internal PHP script. @@ -2531,7 +2542,7 @@ In most cases, this should not be noticeable but should be kept in mind if you f Last update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2546,6 +2557,8 @@ In most cases, this should not be noticeable but should be kept in mind if you f
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2542,17 +2543,48 @@

    Attaching a Container to your Shell

    To attach a container to your shell you can simply run

    -
    docker compose exec $Service_Name /bin/bash
    +
    +
    +
    +
    docker compose exec $Dienst_Name /bin/bash
     
    +
    +
    +
    docker-compose exec $Dienst_Name /bin/bash
    +
    +
    +
    +

    Connecting to Services

    If you want to connect to a service / application directly it is always a good idea to source mailcow.conf to get all relevant variables into your environment.

    MySQL

    -
    source mailcow.conf
    -docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +
    +
    +
    +
    source mailcow.conf
    +docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
     
    +
    +
    +
    source mailcow.conf
    +docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    +
    +
    +
    +

    Redis

    -
    docker compose exec redis-mailcow redis-cli
    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli
     
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli
    +
    +
    +
    +

    Service Descriptions

    Here is a brief overview of what container / service does what:

    @@ -2635,7 +2667,7 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} Last update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2650,6 +2682,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2654,6 +2655,8 @@ key.pem + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2413,11 +2414,36 @@

    Warning

    This section only applies for Dockers default logging driver (JSON).

    -

    To view the logs of all mailcow: dockerized related containers, you can use docker compose logs inside your mailcow-dockerized folder that contains your mailcow.conf. This is usually a bit much, but you could trim the output with --tail=100 to the last 100 lines per container, or add a -f to follow the live output of all your services.

    -

    To view the logs of a specific service you can use docker compose logs [options] $service_name

    +

    To view the logs of all mailcow: dockerized related containers, you can use the following command inside your mailcow-dockerized folder that contains your mailcow.conf.

    +
    +
    +
    +
    docker compose logs
    +
    +
    +
    +
    docker-compose logs
    +
    +
    +
    +
    +

    This is usually a bit much, but you could trim the output with --tail=100 to the last 100 lines per container, or add a -f to follow the live output of all your services.

    +

    To view the logs of a specific service you can use the following:

    +
    +
    +
    +
    docker compose logs [options] $service_name
    +
    +
    +
    +
    docker-compose logs [options] $service_name
    +
    +
    +
    +

    Info

    -

    The available options for the command docker compose logs are:

    +

    The available options for the previous commands are:

    • --no-color: Produce monochrome output.
    • -f: Follow the log output.
    • @@ -2431,7 +2457,7 @@ Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2446,6 +2472,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2462,27 +2463,77 @@

    MariaDB: Aria recovery after crash

    If your server crashed and MariaDB logs an error similar to [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files you may want to try the following to recover the database to a healthy state:

    -

    Start the stack and wait until mysql-mailcow begins to report a restarting state. Check by running docker compose ps.

    -

    Now run the following commands:

    -
    # Stop the stack, don't run "down"
    -docker compose stop
    -# Run a bash in the stopped container as user mysql
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    -# cd to the SQL data directory
    -cd /var/lib/mysql
    -# Run aria_chk
    -aria_chk --check --force */*.MAI
    -# Delete aria log files
    -rm aria_log.*
    +

    Start the stack and wait until mysql-mailcow begins to report a restart. Check this with the following command:

    +
    +
    +
    +
    docker compose ps
     
    -

    Now run docker compose down followed by docker compose up -d.

    +
    +
    +
    docker-compose ps
    +
    +
    +
    +
    +

    Now exec the following commands:

    +

    Stop the stack, don't run "down"

    +
    +
    +
    +
    docker compose stop
    +
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +
    +

    Run a bash in the stopped container as user mysql

    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    +

    cd to the SQL data directory

    +
    cd /var/lib/mysql
    +
    +

    Run aria_chk

    +
    aria_chk --check --force */*.MAI
    +
    +

    Delete aria log files

    +
    rm aria_log.*
    +
    +

    Execute a complete stack restart using the following commands:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2497,6 +2548,8 @@ rm aria_log.*
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2462,9 +2463,20 @@

    Run a manual mysql_upgrade

    This step is usually not necessary.

    -
    docker compose stop mysql-mailcow watchdog-mailcow
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker compose stop mysql-mailcow watchdog-mailcow
    +docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
     
    +
    +
    +
    docker-compose stop mysql-mailcow watchdog-mailcow
    +docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +

    As soon as the SQL shell spawned, run mysql_upgrade and exit the container:

    mysql_upgrade
     exit
    @@ -2475,7 +2487,7 @@ exit
       
         
           Last update:
    -      2022-08-31 14:45:46
    +      2023-01-13 18:16:08
           
         
       
    @@ -2490,6 +2502,8 @@ exit
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2614,10 +2615,32 @@ ./helper-scripts/mailcow-reset-admin.sh

    Reset MySQL Passwords

    -

    Stop the stack by running docker compose stop.

    -

    When the containers came to a stop, run this command:

    -
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +

    Stop the stack by running:

    +
    +
    +
    +
    docker compose stop
     
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +
    +

    When the containers came to a stop, run this command:

    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +

    1. Find database name

    # source mailcow.conf
     # docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    @@ -2680,7 +2703,7 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e &qu
       
         
           Last update:
    -      2022-08-31 14:45:46
    +      2023-01-13 18:16:08
           
         
       
    @@ -2695,6 +2718,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e &qu
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2442,6 +2443,8 @@ docker compose up -d + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2421,14 +2422,26 @@
  • Remove volume rspamd-vol-1 to remove all Rspamd data.
  • Remove volume crypt-vol-1 to remove all crypto data. This will render all mails unreadable.
  • -

    Alternatively, running docker compose down -v will destroy all mailcow: dockerized volumes and delete any related containers and networks.

    +

    Alternatively, running the following command will destroy all mailcow: dockerized volumes and delete any related containers and networks:

    +
    +
    +
    +
    docker compose down -v
    +
    +
    +
    +
    docker-compose down -v
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2443,6 +2456,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2410,32 +2411,92 @@

    A quick guide to deeply analyze a malfunctioning Rspamd.

    -
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
     
    -if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    -  sed -i 's/apt-stable/apt-stable-asan/i' /etc/apt/sources.list.d/rspamd.list
    -fi
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
     
    -apt-get update ; apt-get upgrade rspamd
    +apt-get update ; apt-get upgrade rspamd
     
    -nano /docker-entrypoint.sh
    +nano /docker-entrypoint.sh
     
    -# Before "exec "$@"" add the following lines:
    +# Add this in front of "exec "$@"":
     
    -export G_SLICE=always-malloc
    -export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
     
    -

    Restart Rspamd: docker compose restart rspamd-mailcow

    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
    +
    +apt-get update ; apt-get upgrade rspamd
    +
    +nano /docker-entrypoint.sh
    +
    +# Add this in front of "exec "$@"":
    +
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +
    +
    +
    +
    +

    Restart Rspamd:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +

    Your memory consumption will increase by a lot, it will also steadily grow, which is not related to a possible memory leak you are looking for.

    -

    Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to "happen") and restart it: docker compose restart rspamd-mailcow.

    -

    Now enter the container by running docker compose exec rspamd-mailcow bash, change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (cat /tmp/rspamd-asan.* | nc termbin.com 9999).

    +

    Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to "happen") and restart it:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +
    +

    Now enter the container by running the command:

    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +
    +
    +
    +

    Change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (cat /tmp/rspamd-asan.* | nc termbin.com 9999).


    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2450,6 +2511,8 @@ export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violati
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2440,6 +2441,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2410,8 +2411,18 @@

    To remove mailcow: dockerized with all it's volumes, images and containers do:

    -
    docker compose down -v --rmi all --remove-orphans
    +
    +
    +
    +
    docker compose down -v --rmi all --remove-orphans
     
    +
    +
    +
    docker-compose down -v --rmi all --remove-orphans
    +
    +
    +
    +

    Info

      @@ -2427,7 +2438,7 @@ Last update: - 2022-09-01 09:33:47 + 2022-12-15 15:31:09 @@ -2442,6 +2453,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2688,7 +2689,7 @@ yum install docker-compose-plugin

    Info

    This installation is the old familiar way. It installs Docker Compose as a standalone program and does not rely on the Docker installation way.

    -
    curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
    +
    LATEST=$(curl -Ls -w %{url_effective} -o /dev/null https://github.com/docker/compose/releases/latest) && LATEST=${LATEST##*/} && curl -L https://github.com/docker/compose/releases/download/$LATEST/docker-compose-$(uname -s)-$(uname -m) > /usr/local/bin/docker-compose
     chmod +x /usr/local/bin/docker-compose
     
    @@ -2752,10 +2753,21 @@ Add the new driver_opts parameter like this:

    Please don't turn off IPv6, even if you don't like it. IPv6 is the future and should not be ignored.

    If you do not have an IPv6 enabled network on your host and you don't care for a better internet (thehe), it is recommended to disable IPv6 for the mailcow network to prevent unforeseen issues.

    Start mailcow

    -

    Pull the images and run the compose file. The parameter -d will start mailcow: dockerized detached: -

    docker compose pull
    -docker compose up -d
    -

    +

    Pull the images and run the compose file. The parameter -d will start mailcow: dockerized detached:

    +
    +
    +
    +
    docker compose pull
    +docker compose up -d
    +
    +
    +
    +
    docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    Done!

    You can now access https://${MAILCOW_HOSTNAME} with the default credentials admin + password moohoo.

    @@ -2770,7 +2782,7 @@ docker compose up -d Last update: - 2022-10-18 11:55:11 + 2022-12-16 19:22:13 @@ -2785,6 +2797,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2427,22 +2428,55 @@ systemctl status docker.service
    rsync -aHhP --numeric-ids --delete /opt/mailcow-dockerized/ root@target-machine.example.com:/opt/mailcow-dockerized
     rsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine.example.com:/var/lib/docker/volumes
     

    -

    4. Shut down mailcow and stop Docker on the source machine. -

    cd /opt/mailcow-dockerized
    -docker compose down
    -systemctl stop docker.service
    -

    +

    4. Shut down mailcow and stop Docker on the source machine.

    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose down
    +systemctl stop docker.service
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose down
    +systemctl stop docker.service
    +
    +
    +
    +

    5. Repeat step 3 with the same commands. This will be much quicker than the first time.

    6. Switch over to the target machine and start Docker.

    systemctl start docker.service
     

    -

    7. Now pull the mailcow Docker images on the target machine. -

    cd /opt/mailcow-dockerized
    -docker compose pull
    -

    -

    8. Start the whole mailcow stack and everything should be done! -

    docker compose up -d
    -

    +

    7. Now pull the mailcow Docker images on the target machine.

    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker compose pull
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +docker-compose pull
    +
    +
    +
    +
    +

    8. Start the whole mailcow stack and everything should be done!

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +

    9. Finally, change your DNS settings to point to the target server. Also check the SNAT_TO_SOURCE variable in your mailcow.conf file if you have changed your public IP address, otherwise SOGo may not work.


    @@ -2450,7 +2484,7 @@ docker compose pull Last update: - 2022-12-31 04:35:23 + 2023-01-13 18:34:22 @@ -2465,6 +2499,8 @@ docker compose pull + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2674,17 +2675,31 @@ dacd4fb9b51e9e1c8a37d84485b92ffaf6c59353 Before update on 2020-08-07_13_31_31

    Can I roll back?

    Yes.

    See the topic above, instead of a diff, you run checkout:

    -
    docker compose down
    -# Replace commit ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab by your ID
    -git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    -docker compose pull
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID
    +git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    +docker compose pull
    +docker compose up -d
     
    +
    +
    +
    docker-compose down
    +# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID
    +git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab
    +docker-compose pull
    +docker-compose up -d
    +
    +
    +
    +

    Hooks

    You can hook into the update mechanism by adding scripts called pre_commit_hook.sh and post_commit_hook.sh to your mailcows root directory. See this for more details.

    Update Cycle

      -
    • We schedule a monthly release cycle for a major update at the first tuesday of the month.
    • +
    • We schedule a monthly release cycle for a major update.
    • The releases are numbered like this: YYYY-MM (e.g. 2022-05)
    • Fixes for a main Update will be stated as "Revisions" like a,b,c (e.g. 2022-05a, 2022-05b etc.)
    @@ -2721,7 +2736,7 @@ docker compose up -d Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:17:09 @@ -2736,6 +2751,8 @@ docker compose up -d
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2668,6 +2669,8 @@ Each container represents a single application.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2561,13 +2562,23 @@ MaxScriptNormalize 50M MaxZipTypeRcg 50M

    -
  • Restart ClamAV container: -
    docker compose restart clamd-mailcow
    -
  • +
  • Restart ClamAV container:
  • +
    +
    +
    +
    docker compose restart clamd-mailcow
    +
    +
    +
    +
    docker-compose restart clamd-mailcow
    +
    +
    +
    +

    Please note:

    - -
  • @@ -2548,14 +2536,6 @@ Disable unofficial supported Fido Security Keys - -
  • - - - -
  • @@ -2671,23 +2646,39 @@ Finally, enter your current account password and, after selecting the Touc

    Disable unofficial supported Fido Security Keys

    With WebAuthn there is the possibility to use only official Fido Security Keys (from the big brands like: Yubico, Apple, Nitro, Google, Huawei, Microsoft, etc.).

    This is primarily for security purposes, as it allows administrators to ensure that only official hardware can be used in their environment.

    -

    To enable this feature, change the value WEBAUTHN_ONLY_TRUSTED_VENDORS in mailcow.conf from n to y and restart the affected containers with docker compose up -d.

    +

    To enable this feature, change the value WEBAUTHN_ONLY_TRUSTED_VENDORS in mailcow.conf from n to y and restart the affected containers with the following command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The mailcow will now use the Vendor Certificates located in your mailcow directory under data/web/inc/lib/WebAuthn/rootCertificates.

    -
    Example:
    +
    +

    Example

    If you want to limit the official Vendor devices to Apple only you only need the Apple Vendor Certificate inside the data/web/inc/lib/WebAuthn/rootCertificates. After you deleted all other certs you now only can activate WebAuthn 2FA with Apple devices.

    -

    That´s for every vendor the same, so choose what you like (if you want to).

    -

    Use own certificates for WebAuthn

    +

    Every vendor (listed there) behaves the same, so choose what you like (if you want to).

    +
    +

    Use own certificates for WebAuthn

    If you have a valid certificate from the vendor of your key you can also add it to your mailcow!

    Just copy the certificate into the data/web/inc/lib/WebAuthn/rootCertificates folder and restart your mailcow.

    Now you should be able to register this device as well, even though the verification for the vendor certificates is enabled, since you just added the certificate manually.

    -

    Is it dangerous to keep the Vendor Check disabled?

    +

    Is it dangerous to keep the Vendor Check disabled?

    No, it isn´t! These vendor certificates are only used to verify original hardware, not to secure the registration process.

    -

    As you can read in these articles, the deactivation is not software security related: -- https://developers.yubico.com/U2F/Attestation_and_Metadata/ -- https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651 -- https://medium.com/webauthnworks/sorting-fido-ctap-webauthn-terminology-7d32067c0b01

    +

    As you can read in these articles, the deactivation is not software security related:

    +

    In the end, however, it is of course your decision to leave this check disabled or enabled.


    TOTP

    @@ -2704,7 +2695,7 @@ These vendor certificates are only used to verify original hardware, not to secu Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2719,6 +2710,8 @@ These vendor certificates are only used to verify original hardware, not to secu + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2429,18 +2430,38 @@ }

    In case you changed the HTTP_BIND parameter, recreate the container:

    -
    docker compose up -d
    +
    +
    +
    +
    docker compose up -d
     
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +

    Otherwise restart Nginx:

    -
    docker compose restart nginx-mailcow
    +
    +
    +
    +
    docker compose restart
     
    +
    +
    +
    docker compose restart
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2455,6 +2476,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2476,6 +2477,8 @@ $autodiscover_config = array( + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2420,8 +2421,18 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    ssl_min_protocol = TLSv1
     

    Restart the affected services:

    -
    docker compose restart postfix-mailcow dovecot-mailcow
    +
    +
    +
    +
    docker compose restart postfix-mailcow dovecot-mailcow
     
    +
    +
    +
    docker-compose restart postfix-mailcow dovecot-mailcow
    +
    +
    +
    +

    Hint: You can enable TLS 1.2 in Windows 7.


    @@ -2429,7 +2440,7 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2444,6 +2455,8 @@ smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2438,6 +2439,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2435,6 +2436,8 @@ Using a public resolver like Googles 4x8, OpenDNS or any other shared DNS resolv + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2449,6 +2450,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2517,14 +2518,26 @@ With SOGo disabled, all hashing methods below will be able to be read by mailcow

    I changed the password hashes in the "mailbox" SQL table and cannot login.

    -

    A "view" needs to be updated. You can trigger this by restarting sogo-mailcow: docker compose restart sogo-mailcow

    +

    A "view" needs to be updated. You can trigger this by restarting sogo-mailcow:

    +
    +
    +
    +
    docker compose restart sogo-mailcow
    +
    +
    +
    +
    docker-compose restart sogo-mailcow
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2539,6 +2552,8 @@ With SOGo disabled, all hashing methods below will be able to be read by mailcow
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2513,6 +2514,8 @@ needs to grant you access as described above.

    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2439,9 +2440,20 @@ services: entrypoint: ["echo", "ipv6nat disabled in compose.override.yml"]

    For these changes to be effective, you need to fully stop and then restart the stack, so containers and networks are recreated:

    -
    docker compose down
    -docker compose up -d
    +
    +
    +
    +
    docker compose down
    +docker compose up -d
     
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    3. Disable IPv6 in unbound-mailcow

    Edit data/conf/unbound/unbound.conf and set do-ip6 to "no":

    server:
    @@ -2450,16 +2462,36 @@ docker compose up -d
       [...]
     

    Restart Unbound:

    -
    docker compose restart unbound-mailcow
    +
    +
    +
    +
    docker compose restart unbound-mailcow
     
    +
    +
    +
    docker-compose restart unbound-mailcow
    +
    +
    +
    +

    4. Disable IPv6 in postfix-mailcow

    Create data/conf/postfix/extra.cf and set smtp_address_preference to ipv4:

    smtp_address_preference = ipv4
     inet_protocols = ipv4
     

    Restart Postfix:

    -
    docker compose restart postfix-mailcow
    +
    +
    +
    +
    docker compose restart postfix-mailcow
     
    +
    +
    +
    docker-compose restart postfix-mailcow
    +
    +
    +
    +

    5. If your docker daemon completly disabled IPv6:

    Fix the following NGINX, Dovecot and php-fpm config files

    sed -i '/::/d' data/conf/nginx/listen_*
    @@ -2474,7 +2506,7 @@ sed -i 's/\[::\]://g' data/conf/phpfpm/php-fpm.d/pools.conf
       
         
           Last update:
    -      2022-10-19 15:29:13
    +      2023-01-09 15:44:30
           
         
       
    @@ -2489,6 +2521,8 @@ sed -i 's/\[::\]://g' data/conf/phpfpm/php-fpm.d/pools.conf
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2568,7 +2569,19 @@ services: depends_on: - rspamd-mailcow -

    Run docker compose up -d

    +

    Start the mailcow stack with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Send a copy reports to yourself

    To receive a hidden copy of reports generated by Rspamd you can set a bcc_addrs list in the reporting config section of data/conf/rspamd/local.d/dmarc.conf:

    reporting {
    @@ -2585,21 +2598,70 @@ services:
     
     

    Troubleshooting

    Check when the report schedule last ran:

    -
    docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +
    docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
     
    +
    +
    +
    docker-compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +

    See the latest report output:

    -
    docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +
    docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
     
    +
    +
    +
    docker-compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
    +
    +
    +
    +

    Manually trigger a DMARC report:

    -
    docker compose exec rspamd-mailcow rspamadm dmarc_report
    +
    +
    +
    +
    docker compose exec rspamd-mailcow rspamadm dmarc_report
     
    -

    Validate that Rspamd has recorded data in Redis: -Change 20220428 to date which you interested in.

    -

    docker compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    docker-compose exec rspamd-mailcow rspamadm dmarc_report
     
    -Take one of the lines from output you interested in and request it, f.e.: -
    docker compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    -

    +
    +
    +
    +

    Validate that Rspamd has recorded data in Redis: Change 20220428 to date which you interested in.

    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli SMEMBERS "dmarc_idx;20220428"
    +
    +
    +
    +
    +

    Take one of the lines from output you interested in and request it, f.e.:

    +
    +
    +
    +
    docker compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    +
    +
    +
    +
    docker-compose exec redis-mailcow redis-cli ZRANGE "dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428" 0 49
    +
    +
    +
    +

    Change DMARC reporting frequency

    In the example above reports are sent once every 24 hours and send reports for yesterday. This will be okay for most setups.

    If you have a large mail volume and want to run the DMARC reporting more than once a day you need create second schedule and run it with dmarc_report $(date '+%Y%m%d') to process the current day. You have to make sure that the first run on each day also processes the last report from the day before, so it needs to be started twice, one time with $(date --date yesterday '+%Y%m%d') at 0 5 0 * * * (00:05 AM) and then with $(date '+%Y%m%d') with desired interval.

    @@ -2626,10 +2688,34 @@ services:
    1. -

      Run docker compose up -d

      +

      Restart the desired containers with:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +
    2. -

      Run docker compose restart ofelia-mailcow

      +

      Restart the ofelia container only:

      +
      +
      +
      +
      docker compose restart ofelia-mailcow
      +
      +
      +
      +
      docker-compose restart ofelia-mailcow
      +
      +
      +
      +

    Disable DMARC Reporting

    @@ -2642,7 +2728,19 @@ services:

    Revert changes done in docker-compose.override.yml to rspamd-mailcow and ofelia-mailcow

  • -

    Run docker compose up -d

    +

    Restart the desired containers with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +
  • @@ -2651,7 +2749,7 @@ services: Last update: - 2022-11-09 01:01:48 + 2023-01-09 15:44:30 @@ -2666,6 +2764,8 @@ services: + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2506,7 +2507,21 @@ DOVEADM_PORT=127.0.0.1:19991 SQL_PORT=127.0.0.1:13306 SOLR_PORT=127.0.0.1:18983
    -

    To apply your changes, run docker compose down followed by docker compose up -d.

    +

    To apply your changes, run:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    IPv6 binding

    Changing IPv6 bindings is different from IPv4. Again, this has a technical background.

    A docker-compose.override.yml file will be used instead of editing the docker-compose.yml file directly. This is to maintain updatability, as the docker-compose.yml file gets updated regularly and your changes will most likely be overwritten.

    @@ -2534,14 +2549,28 @@ services: - '[2001:db8:dead:beef::123]:80:80' - '[2001:db8:dead:beef::123]:443:443'
    -

    To apply your changes, run docker compose down followed by docker compose up -d.

    +

    To apply your changes, run the commands below:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-09-01 09:33:47 + 2023-01-09 15:44:30 @@ -2556,6 +2585,8 @@ services:
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2445,6 +2446,8 @@ Relaying over this interface is necessary (instead of - for example - relaying d + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2556,7 +2557,19 @@

    Logging in mailcow: dockerized consists of multiple stages, but is, after all, much more flexible and easier to integrate into a logging daemon than before.

    In Docker the containerized application (PID 1) writes its output to stdout. For real one-application containers this works just fine. -Run docker compose logs --help to learn more.

    +Run the command below to learn more:

    +
    +
    +
    +
    docker compose logs --help
    +
    +
    +
    +
    docker-compose logs --help
    +
    +
    +
    +

    Some containers log or stream to multiple destinations.

    No container will keep persistent logs in it. Containers are transient items!

    In the end, every line of logs will reach the Docker daemon - unfiltered.

    @@ -2637,7 +2650,21 @@ input(type="imudp" port="514") ... }
    -

    Restart the Docker daemon and run docker compose down && docker compose up -d to recreate the containers with the new logging driver.

    +

    Restart the Docker daemon and run the commands below to recreate the containers with the new logging driver:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Log rotation

    As those logs can get quite big, it is a good idea to use logrotate to compress and delete them after a certain time period.

    Create /etc/logrotate.d/mailcow with the following content:

    @@ -2661,7 +2688,7 @@ input(type="imudp" port="514") Last update: - 2022-09-01 09:33:47 + 2023-01-09 15:44:30 @@ -2676,6 +2703,8 @@ input(type="imudp" port="514") + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2554,7 +2555,19 @@ mailcow: dockerized trusts the default gateway IP 172.22.1.1 as proxy.

    This will also change the bindings inside the Nginx container! This is important, if you decide to use a proxy within Docker.

    IMPORTANT: Do not use port 8081, 9081 or 65510!

    -

    Recreate affected containers by running docker compose up -d.

    +

    Recreate affected containers by running the command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Important information, please read them carefully!

    Info

    @@ -2705,7 +2718,19 @@ backend mailcow

    Important: This config only covers the "reverseproxing" of the webpannel (nginx-mailcow) using Traefik v2, if you also want to reverseproxy the mail services such as dovecot, postfix... you'll just need to adapt the following config to each container and create an EntryPoint on your traefik.toml or traefik.yml (depending which config you use) for each port.

    For this section we'll assume you have your Traefik 2 [certificatesresolvers] properly configured on your traefik configuration file, and also using acme, also, the following example uses Lets Encrypt, but feel free to change it to your own cert resolver. You can find a basic Traefik 2 toml config file with all the above implemented which can be used for this example here traefik.toml if you need one, or a hint on how to adapt your config.

    So, first of all, we are going to disable the acme-mailcow container since we'll use the certs that traefik will provide us. -For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow.conf, and run docker compose up -d to apply the changes.

    +For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow.conf, and run the following command to apply the changes:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Then we'll create a docker-compose.override.yml file in order to override the main docker-compose.yml found in your mailcow root folder.

    version: '2.1'
     
    @@ -2761,10 +2786,22 @@ For this we'll have to set SKIP_LETS_ENCRYPT=y on our mailcow
         # Name of the external docker volume which contains Traefik's `acme.json' file
         name: traefik_acme
     
    -

    Start the new containers with docker compose up -d.

    +

    Start the new containers with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Now, there's only one thing left to do, which is setup the certs so that the mail services can use them as well, since Traefik 2 uses an acme v2 format to save ALL the license from all the domains we have, we'll need to find a way to dump the certs, lucky we have this tiny container which grabs the acme.json file trough a volume, and a variable DOMAIN=example.org, and with these, the container will output the cert.pem and key.pem files, for this we'll simply run the traefik-certs-dumper container binding the /traefik volume to the folder where our acme.json is saved, bind the /output volume to our mailcow data/assets/ssl/ folder, and set up the DOMAIN=example.org variable to the domain we want the certs dumped from.

    This container will watch over the acme.json file for any changes, and regenerate the cert.pem and key.pem files directly into data/assets/ssl/ being the path binded to the container's /output path.

    -

    You can use the command line to run it, or use the docker compose shown here.

    +

    You can use the command line to run it, or use the docker-compose.yml shown here.

    After we have the certs dumped, we'll have to reload the configs from our postfix and dovecot containers, and check the certs, you can see how here.

    Aaand that should be it 😊, you can check if the Traefik router works fine trough Traefik's dashboard / traefik logs / accessing the setted domain trough https, or / and check HTTPS, SMTP and IMAP trough the commands shown on the page linked before.

    Caddy v2 (supported by the community)

    @@ -2834,14 +2871,26 @@ docker restart ${postfix_c} ${dovecot_c} ${nginx_c}

    If you plan to use a server name that is not MAILCOW_HOSTNAME in your reverse proxy, make sure to populate that name in mailcow.conf via ADDITIONAL_SERVER_NAMES first. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond to your reverse proxy with an incorrect site.

    ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld
     
    -

    Run docker compose up -d to apply.

    +

    Run the following command to apply:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-11-03 16:35:20 + 2023-01-13 18:16:08 @@ -2856,6 +2905,8 @@ docker restart ${postfix_c} ${dovecot_c} ${nginx_c}
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2438,6 +2439,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2418,16 +2419,40 @@ SNAT_TO_SOURCE=1.2.3.4 # Use this IPv6 for outgoing connections (SNAT) SNAT6_TO_SOURCE=dead:beef
    -

    Run docker compose up -d.

    +

    Run the command:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The values are read by netfilter-mailcow. netfilter-mailcow will make sure, the post-routing rules are on position 1 in the netfilter table. It does automatically delete and re-create them if they are found on another position than 1.

    -

    Check the output of docker compose logs --tail=200 netfilter-mailcow to ensure the SNAT settings have been applied.

    +

    Check the output with the following command to ensure the SNAT settings have been applied:

    +
    +
    +
    +
    docker compose logs --tail=200 netfilter-mailcow
    +
    +
    +
    +
    docker-compose logs --tail=200 netfilter-mailcow
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2442,6 +2467,8 @@ SNAT6_TO_SOURCE=dead:beef
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2648,7 +2649,32 @@

    For each domain you add, it will try to resolve autodiscover.ADDED_MAIL_DOMAIN and autoconfig.ADDED_MAIL_DOMAIN to its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address. If it succeeds, a name will be added as SAN to the certificate request.

    Only names that can be validated, will be added as SAN.

    For every domain you remove, the certificate will be moved and a new certificate will be requested. It is not possible to keep domains in a certificate, when we are not able validate the challenge for those.

    -

    If you want to re-run the ACME client, use docker compose restart acme-mailcow and monitor its logs with docker compose logs --tail=200 -f acme-mailcow.

    +

    If you want to re-run the ACME client, use the following command:

    +
    +
    +
    +
    docker compose restart acme-mailcow
    +
    +
    +
    +
    docker-compose restart acme-mailcow
    +
    +
    +
    +
    +

    Monitor its logs with:

    +
    +
    +
    +
    docker compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +
    docker-compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +

    Additional domain names

    Edit "mailcow.conf" and add a parameter ADDITIONAL_SAN like this:

    Do not use quotes (") and do not use spaces between the names!

    @@ -2656,7 +2682,19 @@

    Each name will be validated against its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address.

    A wildcard name like smtp.* will try to obtain a smtp.DOMAIN_NAME SAN for each domain added to mailcow.

    -

    Run docker compose up -d to recreate affected containers automatically.

    +

    Run the following command to recreate affected containers automatically:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Info

    Using names other name MAILCOW_HOSTNAME to access the mailcow UI may need further configuration.

    @@ -2664,26 +2702,88 @@

    If you plan to use a server name that is not MAILCOW_HOSTNAME to access the mailcow UI (for example by adding mail.* to ADDITIONAL_SAN make sure to populate that name in mailcow.conf via ADDITIONAL_SERVER_NAMES. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond with an incorrect site.

    ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld
     
    -

    Run docker compose up -d to apply.

    +

    Run the command below to apply:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Force renewal

    To force a renewal, you need to create a file named force_renew and restart the acme-mailcow container:

    -
    cd /opt/mailcow-dockerized
    -touch data/assets/ssl/force_renew
    -docker compose restart acme-mailcow
    -# Now check the logs for a renewal
    -docker compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +
    cd /opt/mailcow-dockerized
    +touch data/assets/ssl/force_renew
    +docker compose restart acme-mailcow
    +# Now check the logs for a renewal
    +docker compose logs --tail=200 -f acme-mailcow
     
    +
    +
    +
    cd /opt/mailcow-dockerized
    +touch data/assets/ssl/force_renew
    +docker-compose restart acme-mailcow
    +# Now check the logs for a renewal
    +docker-compose logs --tail=200 -f acme-mailcow
    +
    +
    +
    +

    The file will be deleted automatically.

    Validation errors and how to skip validation

    You can skip the IP verification by setting SKIP_IP_CHECK=y in mailcow.conf (no quotes). Be warned that a misconfiguration will get you ratelimited by Let's Encrypt! This is primarily useful for multi-IP setups where the IP check would return the incorrect source IP address. Due to using dynamic IPs for acme-mailcow, source NAT is not consistent over restarts.

    -

    If you encounter problems with "HTTP validation", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from br-mailcow to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow (docker compose down), stop the firewall service, flush the chains and restart Docker.

    +

    If you encounter problems with "HTTP validation", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from br-mailcow to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow, stop the firewall service, flush the chains and restart Docker.

    You can also skip this validation method by setting SKIP_HTTP_VERIFICATION=y in "mailcow.conf". Be warned that this is discouraged. In most cases, the HTTP verification is skipped to workaround unknown NAT reflection issues, which are not resolved by ignoring this specific network misconfiguration. If you encounter problems generating TLSA records in the DNS overview within mailcow, you are most likely having issues with NAT reflection you should fix.

    -

    If you changed a SKIP_* parameter, run docker compose up -d to apply your changes.

    +

    If you changed a SKIP_* parameter, run the command below to apply your changes:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Disable Let's Encrypt

    Disable Let's Encrypt completely

    -

    Set SKIP_LETS_ENCRYPT=y in "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Set SKIP_LETS_ENCRYPT=y in "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Skip all names but ${MAILCOW_HOSTNAME}

    -

    Add ONLY_MAILCOW_HOSTNAME=y to "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Add ONLY_MAILCOW_HOSTNAME=y to "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    The Let's Encrypt subjectAltName limit of 100 domains

    Let's Encrypt currently has a limit of 100 Domain Names per Certificate.

    By default, "acme-mailcow" will create a single SAN certificate for all validated domains @@ -2696,7 +2796,19 @@ This provides best compatibility but means the Let's Encrypt limit exceeds if yo

  • Limitations: A certificate name ADDITIONAL_SAN=test.example.com will be added as SAN to the main certificate. A separate certificate/key pair will not be generated for this format.
  • Postfix, Dovecot and Nginx will then serve these certificates with SNI.

    -

    Set ENABLE_SSL_SNI=y in "mailcow.conf" and recreate "acme-mailcow" by running docker compose up -d.

    +

    Set ENABLE_SSL_SNI=y in "mailcow.conf" and recreate "acme-mailcow" with:

    +
    +
    +
    +
    docker compose up -d
    +
    +
    +
    +
    docker-compose up -d
    +
    +
    +
    +

    Warning

    Not all clients support SNI, see Dovecot documentation or Wikipedia. @@ -2706,7 +2818,7 @@ You should make sure these clients use the MAILCOW_HOSTNAME for sec

    • MAILCOW_HOSTNAME=server.email.tld
    • ADDITIONAL_SAN=webmail.email.tld,mail.*
    • -
    • Mailcow email domains: "domain1.tld" and "domain2.tld"
    • +
    • mailcow email domains: "domain1.tld" and "domain2.tld"

    The following certificates will be generated:

      @@ -2726,15 +2838,51 @@ docker restart $(docker ps -qaf name=dovecot-mailcow)

      See Post-hook script for non-mailcow ACME clients for a full example script.

      Test against staging ACME directory

      Edit mailcow.conf and add LE_STAGING=y.

      -

      Run docker compose up -d to activate your changes.

      +

      Run the command below to activate your changes:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +

      Custom directory URL

      Edit mailcow.conf and add the corresponding directory URL to the new variable DIRECTORY_URL:

      DIRECTORY_URL=https://acme-custom-v9000.api.letsencrypt.org/directory
       

      You cannot use LE_STAGING with DIRECTORY_URL. If both are set, only LE_STAGING is used.

      -

      Run docker compose up -d to activate your changes.

      +

      Run the command below to activate your changes:

      +
      +
      +
      +
      docker compose up -d
      +
      +
      +
      +
      docker-compose up -d
      +
      +
      +
      +

      Check your configuration

      -

      Run docker compose logs acme-mailcow to find out why a validation fails.

      +

      Run the command below to find out why a validation fails:

      +
      +
      +
      +
      docker compose logs --tail=200 acme-mailcow
      +
      +
      +
      +
      docker-compose logs --tail=200 acme-mailcow
      +
      +
      +
      +

      To check if nginx serves the correct certificate, simply use a browser of your choice and check the displayed certificate.

      To check the certificate served by Postfix, Dovecot and Nginx we will use openssl:

      # Connect via SMTP STARTTLS (587)
      @@ -2751,8 +2899,8 @@ openssl s_client -connect MAILCOW_HOSTNAME:993 | openssl x509 -noout -text
       openssl s_client -connect MAILCOW_HOSTNAME:443 | openssl x509 -noout -text
       

      To validate the expiry dates as returned by openssl against MAILCOW_HOSTNAME, you are able to use our helper script:

      -
      cd /opt/mailcow-dockerized
      -bash helper-scripts/expiry-dates.sh
      +
      cd /opt/mailcow-dockerized
      +bash helper-scripts/expiry-dates.sh
       

      @@ -2760,7 +2908,7 @@ bash helper-scripts/expiry-dates.sh Last update: - 2023-01-07 13:22:32 + 2023-01-13 18:34:22 @@ -2775,6 +2923,8 @@ bash helper-scripts/expiry-dates.sh
      + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    +
    @@ -2514,6 +2515,8 @@ + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2725,6 +2726,8 @@ Details: + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2878,6 +2879,8 @@ You may want to + - + diff --git a/search/search_index.json b/search/search_index.json index 005da8288..62c091c61 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en","de"],"separator":"[\\s\\-,:!=\\[\\]()\"/]+|(?!\\b)(?=[A-Z][a-z])|\\.(?!\\d)|&[lg]t;","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"\ud83d\udc2e + \ud83d\udc0b = \ud83d\udc95","text":""},{"location":"#help-mailcow","title":"Help mailcow","text":"

    Please consider a support contract for a small monthly fee at Servercow EN to support further development. We support you while you support us. :)

    If you are super awesome and would like to support without a contract, you can get a SAL license that confirms your awesomeness (a flexible one-time payment) at Servercow EN.

    "},{"location":"#get-support","title":"Get support","text":"

    There are two ways to achieve support for your mailcow installation.

    "},{"location":"#commercial-support","title":"Commercial support","text":"

    For professional and prioritized commercial support you can sign a basic support subscription at Servercow EN. For custom inquiries or questions please contact us at info@servercow.de instead.

    Furthermore we do also provide a fully featured and managed mailcow here. This way we take care about the technical magic underneath and you can enjoy your whole mail experience in a hassle-free way.

    "},{"location":"#community-support-and-chat","title":"Community support and chat","text":"

    The other alternative is our free community-support on our various channels below. Please notice, that this support is driven by our awesome community around mailcow. This kind of support is best-effort, voluntary and there is no guarantee for anything.

    • Our mailcow community @ community.mailcow.email

    • Telegram (Support) @ t.me/mailcow.

    • Telegram (Off-Topic) @ t.me/mailcowOfftopic.

    • Twitter @mailcow_email

    Telegram desktop clients are available for multiple platforms. You can search the groups history for keywords.

    For bug tracking, feature requests and code contributions only:

    • GitHub @ mailcow/mailcow-dockerized
    "},{"location":"#demos","title":"Demos","text":"

    Since September 2022 we\u00b4re providing two seperate Demo instances:

    • demo.mailcow.email is the classic Demo based on the stable releases.
    • nightly-demo.mailcow.email is the new nightly demo based on unreleased testing features. (So especially interesting for those who have no possibility to create a test instance themselves.)

    Use the following credentials to login on both demos:

    • Administrator: admin / moohoo
    • Domain-Administrator: department / moohoo
    • Mailbox: demo@440044.xyz / moohoo

    Success

    The demo instances get the latest updates directly after releases from GitHub. Fully automatic, without any downtime!

    "},{"location":"#overview","title":"Overview","text":"

    The integrated mailcow UI allows administrative work on your mail server instance as well as separated domain administrator and mailbox user access:

    • DKIM and ARC support
    • Black- and whitelists per domain and per user
    • Spam score management per-user (reject spam, mark spam, greylist)
    • Allow mailbox users to create temporary spam aliases
    • Prepend mail tags to subject or move mail to sub folder (per-user)
    • Allow mailbox users to toggle incoming and outgoing TLS enforcement
    • Allow users to reset SOGo ActiveSync device caches
    • imapsync to migrate or pull remote mailboxes regularly
    • TFA: Yubikey OTP and U2F USB (Google Chrome and derivatives only), TOTP
    • Add domains, mailboxes, aliases, domain aliases and SOGo resources
    • Add whitelisted hosts to forward mail to mailcow
    • Fail2ban-like integration
    • Quarantine system
    • Antivirus scanning incl. macro scanning in office documents
    • Integrated basic monitoring
    • A lot more...

    mailcow: dockerized comes with multiple containers linked in one bridged network. Each container represents a single application.

    • ACME
    • ClamAV (optional)
    • Dovecot
    • MariaDB
    • Memcached
    • Netfilter (Fail2ban-like integration by @mkuron)
    • Nginx
    • Oletools via Olefy
    • PHP
    • Postfix
    • Redis
    • Rspamd
    • SOGo
    • Solr (optional)
    • Unbound
    • A Watchdog to provide basic monitoring

    Warning

    Mails are stored compressed and encrypted. The key pair can be found in crypt-vol-1. Be sure to backup this volume!

    Docker volumes to keep dynamic data - take care of them!

    • clamd-db-vol-1
    • crypt-vol-1
    • mysql-socket-vol-1
    • mysql-vol-1
    • postfix-vol-1
    • redis-vol-1
    • rspamd-vol-1
    • sogo-userdata-backup-vol-1
    • sogo-web-vol-1
    • solr-vol-1
    • vmail-index-vol-1
    • vmail-vol-1
    "},{"location":"backup_restore/b_n_r-accidental_deletion/","title":"Recover accidentally deleted data","text":"

    So you deleted a mailbox and have no backups, he?

    If you noticed your mistake within a few hours, you can probably recover the users data.

    "},{"location":"backup_restore/b_n_r-accidental_deletion/#sogo","title":"SOGo","text":"

    We automatically create daily backups (24h interval starting from running up -d) in /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/.

    Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

    Copy the file named after the user you want to restore to __MAILCOW_DIRECTORY__/data/conf/sogo.

    1. Copy the backup: cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo

    2. Run docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org

    Run sogo-tool without parameters to check for possible restore options.

    3. Delete the copied backup by running rm __MAILCOW_DIRECTORY__/data/conf/sogo

    4. Restart SOGo and Memcached: docker compose restart sogo-mailcow memcached-mailcow

    "},{"location":"backup_restore/b_n_r-accidental_deletion/#mail","title":"Mail","text":"

    In case of an accidental deletion of a mailbox, you will be able to recover for (by default) 5 days. This depends on the MAILDIR_GC_TIME parameter in mailcow.conf.

    A deleted mailbox is copied in its encrypted form to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage.

    The folder inside _garbage follows the structure [timestamp]_[domain_sanitized][user_sanitized], for example 1629109708_exampleorgtest in case of test@example.org deleted on 1629109708.

    To restore make sure you are actually restoring to the same mailcow it was deleted from or you use the same encryption keys in crypt-vol-1.

    Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.

    Copy the folders from /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized] back to /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user] and resync the folder and recalc the quota:

    docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'\ndocker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net\n
    "},{"location":"backup_restore/b_n_r-backup/","title":"Backup","text":""},{"location":"backup_restore/b_n_r-backup/#backup","title":"Backup","text":""},{"location":"backup_restore/b_n_r-backup/#manual","title":"Manual","text":"

    You can use the provided script helper-scripts/backup_and_restore.sh to backup mailcow automatically.

    Please do not copy this script to another location.

    To run a backup, write \"backup\" as first parameter and either one or more components to backup as following parameters. You can also use \"all\" as second parameter to backup all components. Append --delete-days n to delete backups older than n days.

    # Syntax:\n# ./helper-scripts/backup_and_restore.sh backup (vmail|crypt|redis|rspamd|postfix|mysql|all|--delete-days)\n\n# Backup all, delete backups older than 3 days\n./helper-scripts/backup_and_restore.sh backup all --delete-days 3\n\n# Backup vmail, crypt and mysql data, delete backups older than 30 days\n./helper-scripts/backup_and_restore.sh backup vmail crypt mysql --delete-days 30\n\n# Backup vmail\n./helper-scripts/backup_and_restore.sh backup vmail\n
    "},{"location":"backup_restore/b_n_r-backup/#variables-for-backuprestore-script","title":"Variables for backup/restore script","text":""},{"location":"backup_restore/b_n_r-backup/#multithreading","title":"Multithreading","text":"

    With the 2022-10 update it is possible to run the script with multithreading support. This can be used for backups as well as for restores.

    To start the backup/restore with multithreading you have to add THREADS as an environment variable in front of the command to execute the script.

    THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n
    The number after the = character indicates the number of threads. Please keep your core count -2 to leave enough CPU power for mailcow itself.

    "},{"location":"backup_restore/b_n_r-backup/#backup-path","title":"Backup path","text":"

    The script will ask you for a backup location. Inside of this location it will create folders in the format \"mailcow_DATE\". You should not rename those folders to not break the restore process.

    To run a backup unattended, define MAILCOW_BACKUP_LOCATION as environment variable before starting the script:

    MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n

    Tip

    Both variables mentioned above can also be combined! Ex:

    MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n

    "},{"location":"backup_restore/b_n_r-backup/#cronjob","title":"Cronjob","text":"

    You can run the backup script regularly via cronjob. Make sure BACKUP_LOCATION exists:

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n

    Per default cron sends the full result of each backup operation by email. If you want cron to only mail on error (non-zero exit code) you may want to use the following snippet. Pathes need to be modified according to your setup (this script is a user contribution).

    This following script may be placed in /etc/cron.daily/mailcow-backup - do not forget to mark it as executable via chmod +x:

    #!/bin/sh\n\n# Backup mailcow data\n# https://mailcow.github.io/mailcow-dockerized-docs/backup_restore/b_n_r-backup/\n\nset -e\n\nOUT=\"$(mktemp)\"\nexport MAILCOW_BACKUP_LOCATION=\"/opt/backup\"\nSCRIPT=\"/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh\"\nPARAMETERS=\"backup all\"\nOPTIONS=\"--delete-days 30\"\n\n# run command\nset +e\n\"${SCRIPT}\" ${PARAMETERS} ${OPTIONS} 2>&1 > \"$OUT\"\nRESULT=$?\n\nif [ $RESULT -ne 0 ]\n    then\n            echo \"${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:\"\n            echo \"RESULT=$RESULT\"\n            echo \"STDOUT / STDERR:\"\n            cat \"$OUT\"\nfi\n
    "},{"location":"backup_restore/b_n_r-backup/#backup-strategy-with-rsync-and-mailcow-backup-script","title":"Backup strategy with rsync and mailcow backup script","text":"

    Create the destination directory for mailcows helper script:

    mkdir -p /external_share/backups/backup_script\n

    Create cronjobs:

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n25 1 * * * rsync -aH --delete /opt/mailcow-dockerized /external_share/backups/mailcow-dockerized\n40 2 * * * rsync -aH --delete /var/lib/docker/volumes /external_share/backups/var_lib_docker_volumes\n5 4 * * * cd /opt/mailcow-dockerized/; BACKUP_LOCATION=/external_share/backups/backup_script /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n# If you want to, use the acl util to backup permissions of some/all folders/files: getfacl -Rn /path\n

    On the destination (in this case /external_share/backups) you may want to have snapshot capabilities (ZFS, Btrfs etc.). Snapshot daily and keep for n days for a consistent backup. Do not rsync to a Samba share, you need to keep the correct permissions!

    To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run docker compose pull and docker compose up -d.

    If you are lucky Redis and MariaDB can automatically fix the inconsistent databases (if they are inconsistent). In case of a corrupted database you'd need to use the helper script to restore the inconsistent elements. If a restore fails, try to extract the backups and copy the files back manually. Keep the file permissions!

    "},{"location":"backup_restore/b_n_r-backup_restore-maildir/","title":"Maildir","text":""},{"location":"backup_restore/b_n_r-backup_restore-maildir/#backup","title":"Backup","text":"

    This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory:

    cd /path/to/mailcow-dockerized\ndocker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail\n

    You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. Set the filename backup_vmail.tar.gz to any custom name, but leave the path as it is. Example: [...] tar cvfz /backup/my_own_filename_.tar.gz

    "},{"location":"backup_restore/b_n_r-backup_restore-maildir/#restore","title":"Restore","text":"
    cd /path/to/mailcow-dockerized\ndocker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz\n
    "},{"location":"backup_restore/b_n_r-backup_restore-mysql/","title":"MySQL (mysqldump)","text":""},{"location":"backup_restore/b_n_r-backup_restore-mysql/#backup","title":"Backup","text":"
    cd /path/to/mailcow-dockerized\nsource mailcow.conf\nDATE=$(date +\"%Y%m%d_%H%M%S\")\ndocker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql\n
    "},{"location":"backup_restore/b_n_r-backup_restore-mysql/#restore","title":"Restore","text":"

    Warning

    You should redirect the SQL dump without docker compose to prevent parsing errors.

    cd /path/to/mailcow-dockerized\nsource mailcow.conf\ndocker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql\n
    "},{"location":"backup_restore/b_n_r-coldstandby/","title":"Cold-standby backup","text":"

    mailcow offers an easy way to create a consistent copy of itself to be rsync'ed to a remote location without downtime.

    This may also be used to transfer your mailcow to a new server.

    "},{"location":"backup_restore/b_n_r-coldstandby/#you-should-know","title":"You should know","text":"

    The provided script will work on default installations.

    It may break when you use unsupported volume overrides. We don't support that and we will not include hacks to support that. Please run and maintain a fork if you plan to keep your changes.

    The script will use the same paths as your default mailcow installation. That is the mailcow base directory - for most users /opt/mailcow-dockerized - as well as the mountpoints.

    To find the paths of your source volumes we use docker inspect and read the destination directory of every volume related to your mailcow compose project. This means we will also transfer volumes you may have added in an override file. Local bind mounts may or may not work.

    The script uses rsync with the --delete flag. The destination will be an exact copy of the source.

    mariabackup is used to create a consistent copy of the SQL data directory.

    After rsync'ing the data we will run docker compose pull and remove old image tags from the destination.

    Your source will not be changed at any time.

    You may want to make sure to use the same /etc/docker/daemon.json on the remote target.

    You should not run disk snapshots (e.g. via ZFS, LVM etc.) on the target at the very same time as this script is run.

    Versioning is not part of this script, we rely on the destination (snapshots or backups). You may also want to use any other tool for that.

    "},{"location":"backup_restore/b_n_r-coldstandby/#prepare","title":"Prepare","text":"

    You will need an SSH-enabled destination and a keyfile to connect to said destination. The key should not be protected by a password for the script to work unattended.

    In your mailcow base directory, e.g. /opt/mailcow-dockerized you will find a file create_cold_standby.sh.

    Edit this file and change the exported variables:

    export REMOTE_SSH_KEY=/path/to/keyfile\nexport REMOTE_SSH_PORT=22\nexport REMOTE_SSH_HOST=mailcow-backup.host.name\n

    The key must be owned and readable by root only.

    Both the source and destination require rsync >= v3.1.0. The destination must have Docker and docker compose v2 available.

    The script will detect errors automatically and exit.

    You may want to test the connection by running ssh mailcow-backup.host.name -p22 -i /path/to/keyfile.

    "},{"location":"backup_restore/b_n_r-coldstandby/#backup-and-refresh-the-cold-standby","title":"Backup and refresh the cold-standby","text":"

    Run the first backup, this may take a while depending on the connection:

    bash /opt/mailcow-dockerized/create_cold_standby.sh\n

    That was easy, wasn't it?

    Updating your cold-standby is just as easy:

    bash /opt/mailcow-dockerized/create_cold_standby.sh\n

    It's the same command.

    "},{"location":"backup_restore/b_n_r-coldstandby/#automated-backups-with-cron","title":"Automated backups with cron","text":"

    First make sure that the cron service is enabled and running:

    systemctl enable cron.service && systemctl start cron.service\n

    To automate the backups to the cold-standby server you can use a cron job. To edit the cron jobs for the root user run:

    crontab -e\n

    Add the following lines to synchronize the cold standby server daily at 03:00. In this example errors of the last execution are logged into a file.

    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n0 3 * * * bash /opt/mailcow-dockerized/create_cold_standby.sh 2> /var/log/mailcow-coldstandby-sync.log\n

    If saved correctly, the cron job should be shown by typing:

    crontab -l\n
    "},{"location":"backup_restore/b_n_r-restore/","title":"Restore","text":""},{"location":"backup_restore/b_n_r-restore/#restore","title":"Restore","text":"

    Please do not copy this script to another location.

    To run a restore, start mailcow, use the script with \"restore\" as first parameter.

    # Syntax:\n# ./helper-scripts/backup_and_restore.sh restore\n

    The script will ask you for a backup location containing the mailcow_DATE folders.

    "},{"location":"client/client-android/","title":"Android","text":"
    1. Open the Email app.
    2. If this is your first email account, tap Add Account; if not, tap More and Settings and then Add account.
    3. Select Microsoft Exchange ActiveSync.
    4. Enter your email address () and password.
    5. Tap Sign in.
    "},{"location":"client/client-apple/","title":"Apple macOS / iOS","text":""},{"location":"client/client-apple/#method-1-via-mobileconfig","title":"Method 1 via Mobileconfig","text":"

    Email, contacts and calendars can be configured automatically on Apple devices by installing a profile. To download a profile you must login to the mailcow UI first.

    "},{"location":"client/client-apple/#method-11-imap-smtp-and-calcarddav","title":"Method 1.1: IMAP, SMTP and Cal/CardDAV","text":"

    This method configures IMAP, CardDAV and CalDAV.

    1. Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.phpmailcow.mobileconfig.
    2. Enter the unlock code (iPhone) or computer password (Mac).
    3. Enter your email password three times when prompted.
    "},{"location":"client/client-apple/#method-12-imap-smtp-no-dav","title":"Method 1.2: IMAP, SMTP (no DAV)","text":"

    This method configures IMAP and SMTP only.

    1. Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.php?only_emailmailcow.mobileconfig.
    2. Enter the unlock code (iPhone) or computer password (Mac).
    3. Enter your email password when prompted.
    "},{"location":"client/client-apple/#method-2-exchange-activesync-emulation","title":"Method 2 (Exchange ActiveSync emulation)","text":"

    On iOS, Exchange ActiveSync is also supported as an alternative to the procedure above. It has the advantage of supporting push email (i.e. you are immediately notified of incoming messages), but has some limitations, e.g. it does not support more than three email addresses per contact in your address book. Follow the steps below if you decide to use Exchange instead.

    1. Open the Settings app, tap Mail, tap Accounts, tap Add Acccount, select Exchange.
    2. Enter your email address () and tap Next.
    3. Enter your password, tap Next again.
    4. Finally, tap Save.
    "},{"location":"client/client-emclient/","title":"eM Client","text":"
    1. Launch eM Client.
    2. If this is the first time you launched eM Client, it asks you to set up your account. Proceed to step 4.
    3. Go to Menu at the top, select Tools and Accounts.
    4. Enter your email address () and click Start Now.
    5. Enter your password and click Continue.
    6. Enter your name () and click Next.
    7. Click Finish.
    "},{"location":"client/client-kontact/","title":"KDE Kontact","text":"
    1. Launch Kontact.
    2. If this is the first time you launched Kontact or KMail, it asks you to set up your account. Proceed to step 4.
    3. Go to Mail in the sidebar. Go to the Tools menu and select Account Wizard.
    4. Enter your name (), email address () and your password. Click Next.
    5. Click Create Account. If prompted, re-enter your password and click OK.
    6. Close the window by clicking Finish.
    7. Go to Calendar in the sidebar.
    8. Go to the Settings menu and select Configure KOrganizer.
    9. Go to the Calendars tab and click the Add button.
    10. Choose DAV groupware resource and click OK.
    11. Enter your email address () and your password. Click Next.
    12. Select ScalableOGo from the dropdown menu and click Next.
    13. Enter your mailcow hostname into the Host field and click Next.
    14. Click Test Connection and then Finish. Finally, click OK twice.

    Once you have set up Kontact, you can also use KMail, KOrganizer and KAddressBook individually.

    "},{"location":"client/client-manual/","title":"Manual configuration","text":"

    These instructions are valid for unchanged port bindings only!

    "},{"location":"client/client-manual/#email","title":"Email","text":"Service Encryption Host Port IMAP STARTTLS mailcow hostname 143 IMAPS SSL mailcow hostname 993 POP3 STARTTLS mailcow hostname 110 POP3S SSL mailcow hostname 995 SMTP STARTTLS mailcow hostname 587 SMTPS SSL mailcow hostname 465

    Please use the \"plain\" password setting as the authentication mechanism. Contrary to what the name implies, the password will not be transferred to the server in plain text as no authentication is allowed to take place without TLS.

    "},{"location":"client/client-manual/#contacts-and-calendars","title":"Contacts and calendars","text":"

    SOGos default calendar (CalDAV) and contacts (CardDAV) URLs:

    1. CalDAV https://mail.example.com/SOGo/dav/user@example.com/Calendar/personal/https:///SOGo/dav//Calendar/personal/

    2. CardDAV https://mail.example.com/SOGo/dav/user@example.com/Contacts/personal/https:///SOGo/dav//Contacts/personal/

    Some applications may require you to use https://mail.example.com/SOGo/dav/https:///SOGo/dav/ or the full path to your calendar, which can be found and copied from within SOGo.

    "},{"location":"client/client-outlook/","title":"Microsoft Outlook","text":""},{"location":"client/client-outlook/#outlook-2016-or-higher-from-office-365-on-windows","title":"Outlook 2016 or higher from Office 365 on Windows","text":"

    This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.

    Outlook 2016 has an issue with autodiscover. Only Outlook from Office 365 is affected. If you installed Outlook from another source, please follow the guide for Outlook 2013 or higher.

    For EAS you must use the old assistant by launching C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OLCFG.EXE. If this application opens, you can go to step 4 of the guide for Outlook 2013 below.

    If it does not open, you can completely disable the new account creation wizard and follow the guide for Outlook 2013 below.

    "},{"location":"client/client-outlook/#outlook-2007-or-2010-on-windows","title":"Outlook 2007 or 2010 on Windows","text":""},{"location":"client/client-outlook/#outlook-2007-or-higher-on-windows-calendercontacts-via-caldav-synchronizer","title":"Outlook 2007 or higher on Windows (Calender/Contacts via CalDav Synchronizer)","text":"
    1. Download and install Outlook CalDav Synchronizer.
    2. Launch Outlook.
    3. If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 5.
    4. Go to the File menu and click Add Account.
    5. Enter your name (), email address () and your password. Click Next.
    6. Click Finish.
    7. Go to the CalDav Synchronizer ribbon and click Synchronization Profiles.
    8. Click the second button at top (Add multiple profiles), select Sogo, click Ok.
    9. Click the Get IMAP/POP3 account settings button.
    10. Click Discover resources and assign to Outlook folders.
    11. In the Select Resource window that pops up, select your main calendar (usually Personal Calendar), click the ... button, assign it to Calendar, and click OK. Go to the Address Books and Tasks tabs and repeat repeat the process accordingly. Do not assign multiple calendars, address books or task lists!
    12. Close all windows with the OK buttons.
    "},{"location":"client/client-outlook/#outlook-2013-or-higher-on-windows-active-sync-not-recommended","title":"Outlook 2013 or higher on Windows (Active Sync - not recommended)","text":"

    This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.

    1. Launch Outlook.
    2. If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 4.
    3. Go to the File menu and click Add Account.
    4. Enter your name (), email address () and your password. Click Next.
    5. When prompted, enter your password again, check Remember my credentials and click OK.
    6. Click the Allow button.
    7. Click Finish.
    "},{"location":"client/client-outlook/#outlook-2011-or-higher-on-macos","title":"Outlook 2011 or higher on macOS","text":"

    The Mac version of Outlook does not synchronize calendars and contacts and therefore is not supported.

    "},{"location":"client/client-thunderbird/","title":"Mozilla Thunderbird","text":"
    1. Launch Thunderbird.
    2. If this is the first time you launched Thunderbird, it asks you whether you would like a new email address. Click Skip this and use my existing email and proceed to step 4.
    3. Go to the File menu and select New, Existing Mail Account....
    4. Enter your name (), email address () and your password. Make sure the Remember password checkbox is selected and click Continue.
    5. Once the configuration has been automatically detected, make sure IMAP is selected and click Done.
    6. To use your contacts from the server, click on the arrow next to \"Address Books\" and click the Connect button on each address book you would like to use.
    7. To use your calendars from the server, click on the arrow next to \"Calendars\" and click the Connect button on each calendar you would like to use.
    8. Click Finish to close the Account Setup window."},{"location":"client/client-windows/","title":"Windows Mail","text":"

      Windows 8 and higher support email, contacts and calendar via Exchange ActiveSync.

      1. Open the Mail app.
      2. If you have not previously used Mail, you can click Add Account in the main window. Proceed to step 4.
      3. Click Accounts in the sidebar on the left, then click Add Account on the far right.
      4. Select Exchange.
      5. Enter your email address () and click Next.
      6. Enter your password and click Log in.

      Once you have set up the Mail app, you can also use the People and Calendar apps.

      "},{"location":"client/client/","title":"Overview","text":"

      mailcow supports a variety of email clients, both on desktop computers and on smartphones. Below, you can find a number of configuration guides that explain how to configure your mailcow account.

      Tip

      If you access this page by logging into your mailcow server and clicking the \"Show configuration guides for email clients and smartphones\" link, all of the guides will be personalized with your email address and server name.

      Success

      Since you accessed this page after logging into your mailcow server, all of the guides have been personalized with your email address and server name.
      • Android
      • Apple iOS / macOS
      • eM Client
      • KDE Kontact / KMail
      • Microsoft Outlook
      • Mozilla Thunderbird
      • Windows Mail
      • Manual configuration
      "},{"location":"i_u_m/i_u_m_deinstall/","title":"Deinstallation","text":"

      To remove mailcow: dockerized with all it's volumes, images and containers do:

      docker compose down -v --rmi all --remove-orphans\n

      Info

    @@ -2635,7 +2667,7 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} Last update: - 2022-08-31 14:45:46 + 2023-01-09 15:44:30 @@ -2650,6 +2682,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2654,6 +2655,8 @@ key.pem + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2413,11 +2414,36 @@

    Warning

    This section only applies for Dockers default logging driver (JSON).

    -

    To view the logs of all mailcow: dockerized related containers, you can use docker compose logs inside your mailcow-dockerized folder that contains your mailcow.conf. This is usually a bit much, but you could trim the output with --tail=100 to the last 100 lines per container, or add a -f to follow the live output of all your services.

    -

    To view the logs of a specific service you can use docker compose logs [options] $service_name

    +

    To view the logs of all mailcow: dockerized related containers, you can use the following command inside your mailcow-dockerized folder that contains your mailcow.conf.

    +
    +
    +
    +
    docker compose logs
    +
    +
    +
    +
    docker-compose logs
    +
    +
    +
    +
    +

    This is usually a bit much, but you could trim the output with --tail=100 to the last 100 lines per container, or add a -f to follow the live output of all your services.

    +

    To view the logs of a specific service you can use the following:

    +
    +
    +
    +
    docker compose logs [options] $service_name
    +
    +
    +
    +
    docker-compose logs [options] $service_name
    +
    +
    +
    +

    Info

    -

    The available options for the command docker compose logs are:

    +

    The available options for the previous commands are:

    • --no-color: Produce monochrome output.
    • -f: Follow the log output.
    • @@ -2431,7 +2457,7 @@ Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2446,6 +2472,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2462,27 +2463,77 @@

    MariaDB: Aria recovery after crash

    If your server crashed and MariaDB logs an error similar to [ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files you may want to try the following to recover the database to a healthy state:

    -

    Start the stack and wait until mysql-mailcow begins to report a restarting state. Check by running docker compose ps.

    -

    Now run the following commands:

    -
    # Stop the stack, don't run "down"
    -docker compose stop
    -# Run a bash in the stopped container as user mysql
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    -# cd to the SQL data directory
    -cd /var/lib/mysql
    -# Run aria_chk
    -aria_chk --check --force */*.MAI
    -# Delete aria log files
    -rm aria_log.*
    +

    Start the stack and wait until mysql-mailcow begins to report a restart. Check this with the following command:

    +
    +
    +
    +
    docker compose ps
     
    -

    Now run docker compose down followed by docker compose up -d.

    +
    +
    +
    docker-compose ps
    +
    +
    +
    +
    +

    Now exec the following commands:

    +

    Stop the stack, don't run "down"

    +
    +
    +
    +
    docker compose stop
    +
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +
    +

    Run a bash in the stopped container as user mysql

    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql bash"' mysql-mailcow
    +
    +
    +
    +
    +

    cd to the SQL data directory

    +
    cd /var/lib/mysql
    +
    +

    Run aria_chk

    +
    aria_chk --check --force */*.MAI
    +
    +

    Delete aria log files

    +
    rm aria_log.*
    +
    +

    Execute a complete stack restart using the following commands:

    +
    +
    +
    +
    docker compose down
    +docker compose up -d
    +
    +
    +
    +
    docker-compose down
    +docker-compose up -d
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2497,6 +2548,8 @@ rm aria_log.*
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2462,9 +2463,20 @@

    Run a manual mysql_upgrade

    This step is usually not necessary.

    -
    docker compose stop mysql-mailcow watchdog-mailcow
    -docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker compose stop mysql-mailcow watchdog-mailcow
    +docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
     
    +
    +
    +
    docker-compose stop mysql-mailcow watchdog-mailcow
    +docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && bash && exit 0"' mysql-mailcow
    +
    +
    +
    +

    As soon as the SQL shell spawned, run mysql_upgrade and exit the container:

    mysql_upgrade
     exit
    @@ -2475,7 +2487,7 @@ exit
       
         
           Last update:
    -      2022-08-31 14:45:46
    +      2023-01-13 18:16:08
           
         
       
    @@ -2490,6 +2502,8 @@ exit
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2614,10 +2615,32 @@ ./helper-scripts/mailcow-reset-admin.sh

    Reset MySQL Passwords

    -

    Stop the stack by running docker compose stop.

    -

    When the containers came to a stop, run this command:

    -
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +

    Stop the stack by running:

    +
    +
    +
    +
    docker compose stop
     
    +
    +
    +
    docker-compose stop
    +
    +
    +
    +
    +

    When the containers came to a stop, run this command:

    +
    +
    +
    +
    docker compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +
    docker-compose run --rm --entrypoint '/bin/sh -c "gosu mysql mysqld --skip-grant-tables & sleep 10 && mysql -hlocalhost -uroot && exit 0"' mysql-mailcow
    +
    +
    +
    +

    1. Find database name

    # source mailcow.conf
     # docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
    @@ -2680,7 +2703,7 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e &qu
       
         
           Last update:
    -      2022-08-31 14:45:46
    +      2023-01-13 18:16:08
           
         
       
    @@ -2695,6 +2718,8 @@ docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e &qu
                 
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2442,6 +2443,8 @@ docker compose up -d + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2421,14 +2422,26 @@
  • Remove volume rspamd-vol-1 to remove all Rspamd data.
  • Remove volume crypt-vol-1 to remove all crypto data. This will render all mails unreadable.
  • -

    Alternatively, running docker compose down -v will destroy all mailcow: dockerized volumes and delete any related containers and networks.

    +

    Alternatively, running the following command will destroy all mailcow: dockerized volumes and delete any related containers and networks:

    +
    +
    +
    +
    docker compose down -v
    +
    +
    +
    +
    docker-compose down -v
    +
    +
    +
    +

    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2443,6 +2456,8 @@
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2410,32 +2411,92 @@

    A quick guide to deeply analyze a malfunctioning Rspamd.

    -
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
     
    -if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    -  sed -i 's/apt-stable/apt-stable-asan/i' /etc/apt/sources.list.d/rspamd.list
    -fi
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
     
    -apt-get update ; apt-get upgrade rspamd
    +apt-get update ; apt-get upgrade rspamd
     
    -nano /docker-entrypoint.sh
    +nano /docker-entrypoint.sh
     
    -# Before "exec "$@"" add the following lines:
    +# Add this in front of "exec "$@"":
     
    -export G_SLICE=always-malloc
    -export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
     
    -

    Restart Rspamd: docker compose restart rspamd-mailcow

    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +if ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then
    +  sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list
    +fi
    +
    +apt-get update ; apt-get upgrade rspamd
    +
    +nano /docker-entrypoint.sh
    +
    +# Add this in front of "exec "$@"":
    +
    +export G_SLICE=always-malloc
    +export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0
    +
    +
    +
    +
    +

    Restart Rspamd:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +

    Your memory consumption will increase by a lot, it will also steadily grow, which is not related to a possible memory leak you are looking for.

    -

    Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to "happen") and restart it: docker compose restart rspamd-mailcow.

    -

    Now enter the container by running docker compose exec rspamd-mailcow bash, change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (cat /tmp/rspamd-asan.* | nc termbin.com 9999).

    +

    Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to "happen") and restart it:

    +
    +
    +
    +
    docker compose restart rspamd-mailcow
    +
    +
    +
    +
    docker-compose restart rspamd-mailcow
    +
    +
    +
    +
    +

    Now enter the container by running the command:

    +
    +
    +
    +
    docker compose exec rspamd-mailcow bash
    +
    +
    +
    +
    docker-compose exec rspamd-mailcow bash
    +
    +
    +
    +
    +

    Change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (cat /tmp/rspamd-asan.* | nc termbin.com 9999).


    Last update: - 2022-08-31 14:45:46 + 2023-01-13 18:16:08 @@ -2450,6 +2511,8 @@ export ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violati
    + +

    Docker Compose Plugins beschrieben.
    - All commands are written according to the Docker Compose Plugin syntax.

    + +

    All Commands are available according to the Docker Compose Plugin and the Standalone Version syntax

    + @@ -2440,6 +2441,8 @@ + +