From 460476a09117d3963c5f98f5682522b17ef8e460 Mon Sep 17 00:00:00 2001 From: Peter Date: Wed, 14 Dec 2022 22:09:09 +0100 Subject: [PATCH] Rewrite for Linked content tabs --- docs/i_u_m/i_u_m_deinstall.de.md | 15 +- docs/i_u_m/i_u_m_deinstall.en.md | 13 +- docs/i_u_m/i_u_m_install.de.md | 23 +- docs/i_u_m/i_u_m_install.en.md | 17 +- docs/i_u_m/i_u_m_migration.de.md | 51 +++- docs/i_u_m/i_u_m_migration.en.md | 51 +++- docs/i_u_m/i_u_m_update.de.md | 27 +- docs/i_u_m/i_u_m_update.en.md | 27 +- .../ClamAV/u_e-clamav-additional_dbs.de.md | 30 ++- .../ClamAV/u_e-clamav-additional_dbs.en.md | 30 ++- .../ClamAV/u_e-clamav-whitelist.de.md | 45 +++- .../ClamAV/u_e-clamav-whitelist.en.md | 45 +++- .../Docker/u_e-docker-cust_dockerfiles.de.md | 14 +- .../Docker/u_e-docker-cust_dockerfiles.en.md | 13 +- .../Nginx/u_e-nginx_custom.de.md | 15 +- .../Nginx/u_e-nginx_custom.en.md | 16 +- .../Postfix/u_e-postfix-attachment_size.de.md | 13 +- .../Postfix/u_e-postfix-attachment_size.en.md | 13 +- ...-postfix-disable_sender_verification.de.md | 13 +- ...-postfix-disable_sender_verification.en.md | 15 +- .../Postfix/u_e-postfix-extra_cf.de.md | 14 +- .../Postfix/u_e-postfix-extra_cf.en.md | 14 +- docs/manual-guides/Redis/u_e-redis.de.md | 43 +++- docs/manual-guides/Redis/u_e-redis.en.md | 43 +++- docs/manual-guides/Rspamd/u_e-rspamd.de.md | 241 ++++++++++++++---- docs/manual-guides/Rspamd/u_e-rspamd.en.md | 237 +++++++++++++---- 26 files changed, 831 insertions(+), 247 deletions(-) diff --git a/docs/i_u_m/i_u_m_deinstall.de.md b/docs/i_u_m/i_u_m_deinstall.de.md index d6c5f3603..726fb8855 100644 --- a/docs/i_u_m/i_u_m_deinstall.de.md +++ b/docs/i_u_m/i_u_m_deinstall.de.md @@ -1,11 +1,18 @@ Um mailcow: dockerized mit all seinen Volumes, Images und Containern zu entfernen, tun Sie dies: +=== "docker compose" -``` -docker compose down -v --rmi all --remove-orphans -``` + ``` bash + docker compose down -v --rmi all --remove-orphans + ``` + +=== "docker-compose" + + ``` bash + docker-compose down -v --rmi all --remove-orphans + ``` !!! info - **-v** Entfernt benannte Volumes, die im Abschnitt `volumes` der Compose-Datei deklariert sind, und anonyme Volumes, die an Container angehängt sind. - **--rmi ** Images entfernen. Der Typ muss einer der folgenden sein: `all`: Entfernt alle Images, die von einem beliebigen Dienst verwendet werden. `local`: Entfernt nur Bilder, die kein benutzerdefiniertes Tag haben, das durch das Feld "image" gesetzt wurde. - **--remove-orphans** Entfernt Container für Dienste, die nicht in der Compose-Datei definiert sind. - - Standardmäßig entfernt `docker compose down` nur derzeit aktive Container und Netzwerke, die in der Datei `docker-compose.yml` definiert sind. \ No newline at end of file + - Standardmäßig entfernt `docker compose down` nur derzeit aktive Container und Netzwerke, die in der Datei `docker-compose.yml` definiert sind. diff --git a/docs/i_u_m/i_u_m_deinstall.en.md b/docs/i_u_m/i_u_m_deinstall.en.md index 4399712ed..ad08d0c83 100644 --- a/docs/i_u_m/i_u_m_deinstall.en.md +++ b/docs/i_u_m/i_u_m_deinstall.en.md @@ -1,8 +1,15 @@ To remove mailcow: dockerized with all it's volumes, images and containers do: +=== "docker compose" -``` -docker compose down -v --rmi all --remove-orphans -``` + ``` bash + docker compose down -v --rmi all --remove-orphans + ``` + +=== "docker-compose" + + ``` bash + docker-compose down -v --rmi all --remove-orphans + ``` !!! info - **-v** Remove named volumes declared in the `volumes` section of the Compose file and anonymous volumes attached to containers. diff --git a/docs/i_u_m/i_u_m_install.de.md b/docs/i_u_m/i_u_m_install.de.md index 77e74e24c..07353bca1 100644 --- a/docs/i_u_m/i_u_m_install.de.md +++ b/docs/i_u_m/i_u_m_install.de.md @@ -17,7 +17,7 @@ Bitte verwenden Sie die neueste verfügbare Docker-Engine und nicht die Engine, ### docker compose !!! danger "Achtung" - **mailcow benötigt eine Version von Docker Compose >= v2**. + **mailcow benötigt eine Version von Docker Compose >= v2**.
Sollte die Installation von Docker über das obenstehende Skript erfolgt sein wird das Docker Compose Plugin bereits automatisch in einer Version >=2.0 installiert.
Ist die mailcow Installation älter oder Docker wurde auf einem anderen Weg installiert, muss das Compose Plugin bzw. die Standalone Version von Docker manuell installiert werden. @@ -114,7 +114,7 @@ Möglicherweise müssen Sie einen vorinstallierten MTA stoppen, der Port 25/tcp Einige Updates modifizieren mailcow.conf und fügen neue Parameter hinzu. Es ist schwer, in der Dokumentation den Überblick zu behalten. Bitte überprüfen Sie deren Beschreibung und fragen Sie, wenn Sie unsicher sind, in den bekannten Kanälen nach Rat. -## Problembehandlungen +## Problembehandlungen ### Benutzer mit einer MTU ungleich 1500 (z.B. OpenStack) **Wenn Sie auf Probleme und seltsame Phänomene stoßen, überprüfen Sie bitte Ihre MTU.** @@ -139,10 +139,19 @@ Sollten Sie jedoch kein IPv6-fähiges Netzwerk auf Ihrem Host haben und Sie sich ## mailcow starten Laden Sie die Images herunter und führen Sie die Compose-Datei aus. Der Parameter `-d` wird ihre mailcow dann im Hintergrund starten: -``` -docker compose pull -docker compose up -d -``` +=== "docker compose" + + ``` bash + docker compose pull + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose pull + docker-compose up -d + ``` Geschafft! @@ -153,4 +162,4 @@ Sie können nun auf **https://${MAILCOW_HOSTNAME}** mit den Standard-Zugangsdate Die Datenbank wird sofort initialisiert, nachdem eine Verbindung zu MySQL hergestellt werden kann. -Ihre Daten bleiben in mehreren Docker-Volumes erhalten, die nicht gelöscht werden, wenn Sie Container neu erstellen oder löschen. Führen Sie `docker volume ls` aus, um eine Liste aller Volumes zu sehen. Sie können `docker compose down` sicher ausführen, ohne persistente Daten zu entfernen. \ No newline at end of file +Ihre Daten bleiben in mehreren Docker-Volumes erhalten, die nicht gelöscht werden, wenn Sie Container neu erstellen oder löschen. Führen Sie `docker volume ls` aus, um eine Liste aller Volumes zu sehen. Sie können `docker compose down` sicher ausführen, ohne persistente Daten zu entfernen. diff --git a/docs/i_u_m/i_u_m_install.en.md b/docs/i_u_m/i_u_m_install.en.md index ec71f3335..ffa132eba 100644 --- a/docs/i_u_m/i_u_m_install.en.md +++ b/docs/i_u_m/i_u_m_install.en.md @@ -139,10 +139,19 @@ If you do not have an IPv6 enabled network on your host and you don't care for a ## 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 -``` +=== "docker compose" + + ``` bash + docker compose pull + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose pull + docker-compose up -d + ``` Done! diff --git a/docs/i_u_m/i_u_m_migration.de.md b/docs/i_u_m/i_u_m_migration.de.md index 161ddcd9d..4809d1c34 100644 --- a/docs/i_u_m/i_u_m_migration.de.md +++ b/docs/i_u_m/i_u_m_migration.de.md @@ -20,11 +20,21 @@ rsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine. ``` **4\.** Schalten Sie mailcow ab und stoppen Sie Docker auf dem Quellrechner. -``` -cd /opt/mailcow-dockerized -docker compose down -systemctl stop docker.service -``` +=== "docker compose" + + ``` bash + cd /opt/mailcow-dockerized + docker compose down + systemctl stop docker.service + ``` + +=== "docker-compose" + + ``` bash + cd /opt/mailcow-dockerized + docker-compose down + systemctl stop docker.service + ``` **Wiederholen Sie Schritt 3 mit denselben Befehlen. Dies wird viel schneller gehen als beim ersten Mal. @@ -34,14 +44,31 @@ systemctl start docker.service ``` **7\.** Ziehen Sie nun die mailcow Docker-Images auf den Zielrechner. -``` -cd /opt/mailcow-dockerized -docker compose pull -``` +=== "docker compose" + + ``` bash + cd /opt/mailcow-dockerized + docker compose pull + ``` + +=== "docker-compose" + + ``` bash + cd /opt/mailcow-dockerized + docker-compose pull + ``` **8\.** Starten Sie den gesamten mailcow-Stack und alles sollte fertig sein! -``` -docker compose up -d -``` +=== "docker compose" + + ``` bash + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker compose up -d + ``` **9\.** Zum Schluss ändern Sie Ihre DNS-Einstellungen so, dass sie auf den Zielserver zeigen. diff --git a/docs/i_u_m/i_u_m_migration.en.md b/docs/i_u_m/i_u_m_migration.en.md index 9f8c8ae1e..12f8cbfd9 100644 --- a/docs/i_u_m/i_u_m_migration.en.md +++ b/docs/i_u_m/i_u_m_migration.en.md @@ -20,11 +20,21 @@ rsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine. ``` **4\.** Shut down mailcow and stop Docker on the source machine. -``` -cd /opt/mailcow-dockerized -docker compose down -systemctl stop docker.service -``` +=== "docker compose" + + ``` bash + cd /opt/mailcow-dockerized + docker compose down + systemctl stop docker.service + ``` + +=== "docker-compose" + + ``` bash + 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. @@ -34,14 +44,31 @@ systemctl start docker.service ``` **7\.** Now pull the mailcow Docker images on the target machine. -``` -cd /opt/mailcow-dockerized -docker compose pull -``` +=== "docker compose" + + ``` bash + cd /opt/mailcow-dockerized + docker compose pull + ``` + +=== "docker-compose" + + ``` bash + cd /opt/mailcow-dockerized + docker-compose pull + ``` **8\.** Start the whole mailcow stack and everything should be done! -``` -docker compose up -d -``` +=== "docker compose" + + ``` bash + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker compose up -d + ``` **9\.** Finally, change your DNS settings to point to the target server. diff --git a/docs/i_u_m/i_u_m_update.de.md b/docs/i_u_m/i_u_m_update.de.md index b2de1b2aa..3959061e6 100644 --- a/docs/i_u_m/i_u_m_update.de.md +++ b/docs/i_u_m/i_u_m_update.de.md @@ -64,14 +64,25 @@ Führen Sie `git diff 22cd00b5e28893ef9ddef3c2b5436453cc5223ab` aus, um zu sehen Ja. Siehe das obige Thema, anstelle eines Diffs führen Sie checkout aus: +=== "docker compose" -``` -docker compose down -# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID -git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab -docker compose pull -docker compose up -d -``` + ``` bash + docker compose down + # Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID + git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab + docker compose pull + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose down + # Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID + git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab + docker-compose pull + docker-compose up -d + ``` ### Hooks @@ -114,4 +125,4 @@ Sollte alles problemlos geklappt haben (wofür wir ja auch vorsichtshalber ein B 1. Das [Cold-Standby Skript](../backup_restore/b_n_r-coldstandby.de.md) nutzen um die Maschine **vor** dem Schwenk auf die Nightly Builds auf ein anderes System zu kopieren. 2. Das `update.sh` Skript auf der neuen Maschine mit dem Parameter `--nightly` ausführen und bestätigen. -3. Die Nightly Updates auf der sekundären Maschine erleben/testen. \ No newline at end of file +3. Die Nightly Updates auf der sekundären Maschine erleben/testen. diff --git a/docs/i_u_m/i_u_m_update.en.md b/docs/i_u_m/i_u_m_update.en.md index 4b831f022..8f745f098 100644 --- a/docs/i_u_m/i_u_m_update.en.md +++ b/docs/i_u_m/i_u_m_update.en.md @@ -64,14 +64,25 @@ Run `git diff 22cd00b5e28893ef9ddef3c2b5436453cc5223ab` to see what changed. Yes. See the topic above, instead of a diff, you run checkout: +=== "docker compose" -``` -docker compose down -# Replace commit ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab by your ID -git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab -docker compose pull -docker compose up -d -``` + ``` bash + docker compose down + # Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID + git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab + docker compose pull + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose down + # Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID + git checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab + docker-compose pull + docker-compose up -d + ``` ### Hooks @@ -114,4 +125,4 @@ If everything worked fine (for which we made a backup before) the mailcow UI sho 1. use the [cold standby script](../backup_restore/b_n_r-coldstandby.en.md) to copy the machine **before** the switch to the nightly builds on another system. 2. run the `update.sh` script on the new machine with the parameter `--nightly` and confirm. -3. experience/test the nightly updates on the secondary machine. \ No newline at end of file +3. experience/test the nightly updates on the secondary machine. diff --git a/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.de.md b/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.de.md index 1f9c335e8..e4b50f219 100644 --- a/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.de.md +++ b/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.de.md @@ -44,13 +44,21 @@ MaxScriptNormalize 50M MaxZipTypeRcg 50M ``` 10. Starten Sie den ClamAV Container neu: -```bash -docker compose restart clamd-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` **Bitte beachten Sie**: -- Sie können `ExcludePUA` und `IncludePUA` in der `clamd.conf` nicht gleichzeitig nutzen! Kommentieren Sie bitte `IncludePUA` aus, sollte es nicht auskommentiert sein. +- Sie können `ExcludePUA` und `IncludePUA` in der `clamd.conf` nicht gleichzeitig nutzen! Kommentieren Sie bitte `IncludePUA` aus, sollte es nicht auskommentiert sein. - Die Liste der Datenbanken genutzt in diesem Beispiel sollten für die meisten Fälle passen. SecuriteInfo bietet jedoch noch andere Datenbanken an. Bitte schauen Sie sich das SecuriteInfo FAQ für weitere Informationen an. - Mit den neu eingestellten Datenbanken (und den Standard Datenbanken) ClamAV verbraucht ClamAV etwa 1,3 GB RAM des Servers. - Sollten Sie `message_size_limit` in Postfix verändert haben müssen Sie die `MaxSize` Einstellung in ClamAV auf den selben Wert eintragen. @@ -65,6 +73,14 @@ DatabaseCustomURL http://sigs.interserver.net/shell.ldb DatabaseCustomURL http://sigs.interserver.net/whitelist.fp ``` 2. Starten Sie den ClamAV Container neu: -```bash -docker compose restart clamd-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` diff --git a/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.en.md b/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.en.md index b912ec280..afafac8aa 100644 --- a/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.en.md +++ b/docs/manual-guides/ClamAV/u_e-clamav-additional_dbs.en.md @@ -44,13 +44,21 @@ MaxScriptNormalize 50M MaxZipTypeRcg 50M ``` 10. Restart ClamAV container: -```bash -docker compose restart clamd-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` Please note: -- You can't use `ExcludePUA` and `IncludePUA` in `clamd.conf` simultaneously, so please comment any `IncludePUA` if you uncommented them before. +- You can't use `ExcludePUA` and `IncludePUA` in `clamd.conf` simultaneously, so please comment any `IncludePUA` if you uncommented them before. - List of databases provided in this example fit most use-cases, but SecuriteInfo also provides other databases. Please check SecuriteInfo FAQ for additional information. - With the current DB set (including default DBs) ClamAV will consume about 1.3Gb of RAM on your server. - If you modified `message_size_limit` in Postfix you need to adapt `MaxSize` settings in ClamAV as well. @@ -65,6 +73,14 @@ DatabaseCustomURL http://sigs.interserver.net/shell.ldb DatabaseCustomURL http://sigs.interserver.net/whitelist.fp ``` 2. Restart ClamAV container: -```bash -docker compose restart clamd-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` diff --git a/docs/manual-guides/ClamAV/u_e-clamav-whitelist.de.md b/docs/manual-guides/ClamAV/u_e-clamav-whitelist.de.md index 615c4744b..efa078f2a 100644 --- a/docs/manual-guides/ClamAV/u_e-clamav-whitelist.de.md +++ b/docs/manual-guides/ClamAV/u_e-clamav-whitelist.de.md @@ -1,10 +1,17 @@ ## Whitelist für bestimmte ClamAV-Signaturen Es kann vorkommen, dass legitime (saubere) Mails von ClamAV blockiert werden (Rspamd markiert die Mail mit `VIRUS_FOUND`). So werden beispielsweise interaktive PDF-Formularanhänge standardmäßig blockiert, da der eingebettete Javascript-Code für schädliche Zwecke verwendet werden könnte. Überprüfen Sie dies anhand der clamd-Protokolle, z.B.: +=== "docker compose" -```bash -docker compose logs clamd-mailcow | grep "FOUND" -``` + ``` bash + docker compose logs clamd-mailcow | grep "FOUND" + ``` + +=== "docker-compose" + + ``` bash + docker-compose logs clamd-mailcow | grep "FOUND" + ``` Diese Zeile bestätigt, dass ein solcher identifiziert wurde: @@ -19,15 +26,31 @@ echo 'PUA.Pdf.Trojan.EmbeddedJavaScript-1' >> data/conf/clamav/whitelist.ign2 ``` Dann starten Sie den clamd-mailcow Service Container in der mailcow UI oder mit docker compose neu: +=== "docker compose" -```bash -docker compose restart clamd-mailcow -``` + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` Bereinigen Sie zwischengespeicherte ClamAV-Ergebnisse in Redis: +=== "docker compose" -``` -# docker compose exec redis-mailcow /bin/sh -/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL -/data # exit -``` + ``` bash + docker compose exec redis-mailcow /bin/sh + /data # redis-cli KEYS rs_cl* | xargs redis-cli DEL + /data # exit + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow /bin/sh + /data # redis-cli KEYS rs_cl* | xargs redis-cli DEL + /data # exit + ``` diff --git a/docs/manual-guides/ClamAV/u_e-clamav-whitelist.en.md b/docs/manual-guides/ClamAV/u_e-clamav-whitelist.en.md index 270d4736e..15c46b8b3 100644 --- a/docs/manual-guides/ClamAV/u_e-clamav-whitelist.en.md +++ b/docs/manual-guides/ClamAV/u_e-clamav-whitelist.en.md @@ -1,10 +1,17 @@ ## Whitelist specific ClamAV signatures You may find that legitimate (clean) mail is being blocked by ClamAV (Rspamd will flag the mail with `VIRUS_FOUND`). For instance, interactive PDF form attachments are blocked by default because the embedded Javascript code may be used for nefarious purposes. Confirm by looking at the clamd logs, e.g.: +=== "docker compose" -```bash -docker compose logs clamd-mailcow | grep "FOUND" -``` + ``` bash + docker compose logs clamd-mailcow | grep "FOUND" + ``` + +=== "docker-compose" + + ``` bash + docker-compose logs clamd-mailcow | grep "FOUND" + ``` This line confirms that such was identified: @@ -19,15 +26,31 @@ echo 'PUA.Pdf.Trojan.EmbeddedJavaScript-1' >> data/conf/clamav/whitelist.ign2 ``` Then restart the clamd-mailcow service container in the mailcow UI or using docker compose: +=== "docker compose" -```bash -docker compose restart clamd-mailcow -``` + ``` bash + docker compose restart clamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart clamd-mailcow + ``` Cleanup cached ClamAV results in Redis: +=== "docker compose" -``` -# docker compose exec redis-mailcow /bin/sh -/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL -/data # exit -``` + ``` bash + docker compose exec redis-mailcow /bin/sh + /data # redis-cli KEYS rs_cl* | xargs redis-cli DEL + /data # exit + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow /bin/sh + /data # redis-cli KEYS rs_cl* | xargs redis-cli DEL + /data # exit + ``` diff --git a/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.de.md b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.de.md index f542a193c..6824d75c3 100644 --- a/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.de.md +++ b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.de.md @@ -20,6 +20,14 @@ $service-mailcow: Abschliessend müssen die geänderten Container automatisch neu erstellt werden: -``` -docker compose up -d -``` +=== "docker compose" + + ``` bash + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose up -d + ``` diff --git a/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md index 8ee15a75f..8324d1841 100644 --- a/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md +++ b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md @@ -20,7 +20,14 @@ $service-mailcow: ``` Now auto-recreate modified containers: +=== "docker compose" -``` -docker compose up -d -``` + ``` bash + docker compose up -d + ``` + +=== "docker-compose" + + ``` bash + docker-compose up -d + ``` diff --git a/docs/manual-guides/Nginx/u_e-nginx_custom.de.md b/docs/manual-guides/Nginx/u_e-nginx_custom.de.md index 8398f35c9..73c68cb66 100644 --- a/docs/manual-guides/Nginx/u_e-nginx_custom.de.md +++ b/docs/manual-guides/Nginx/u_e-nginx_custom.de.md @@ -110,9 +110,16 @@ Dieser Dateiname muss keine ".conf"-Erweiterung haben, sondern folgt dem Muster Wenn PHP in eine benutzerdefinierte Site eingebunden werden soll, verwenden Sie bitte den PHP-FPM-Listener auf phpfpm:9002 oder erstellen Sie einen neuen Listener in `data/conf/phpfpm/php-fpm.d/pools.conf`. Starten Sie Nginx neu (und PHP-FPM, falls ein neuer Listener erstellt wurde): +=== "docker compose" -``` -docker compose restart nginx-mailcow -docker compose restart php-fpm-mailcow -``` + ``` bash + docker compose restart nginx-mailcow + docker compose restart php-fpm-mailcow + ``` +=== "docker-compose" + + ``` bash + docker-compose restart nginx-mailcow + docker-compose restart php-fpm-mailcow + ``` diff --git a/docs/manual-guides/Nginx/u_e-nginx_custom.en.md b/docs/manual-guides/Nginx/u_e-nginx_custom.en.md index b44ac57f6..91a688511 100644 --- a/docs/manual-guides/Nginx/u_e-nginx_custom.en.md +++ b/docs/manual-guides/Nginx/u_e-nginx_custom.en.md @@ -111,8 +111,16 @@ This filename does not need to have a ".conf" extension but follows the pattern If PHP is to be included in a custom site, please use the PHP-FPM listener on phpfpm:9002 or create a new listener in `data/conf/phpfpm/php-fpm.d/pools.conf`. Restart Nginx (and PHP-FPM, if a new listener was created): +=== "docker compose" -``` -docker compose restart nginx-mailcow -docker compose restart php-fpm-mailcow -``` + ``` bash + docker compose restart nginx-mailcow + docker compose restart php-fpm-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart nginx-mailcow + docker-compose restart php-fpm-mailcow + ``` diff --git a/docs/manual-guides/Postfix/u_e-postfix-attachment_size.de.md b/docs/manual-guides/Postfix/u_e-postfix-attachment_size.de.md index 0e1d36b62..5a3f4fe19 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-attachment_size.de.md +++ b/docs/manual-guides/Postfix/u_e-postfix-attachment_size.de.md @@ -1,7 +1,14 @@ Öffnen Sie `data/conf/postfix/extra.cf` und setzen Sie das `message_size_limit` entsprechend in Bytes. Siehe `main.cf` für den Standardwert. Starten Sie Postfix neu: +=== "docker compose" -``` -docker compose restart postfix-mailcow -``` \ No newline at end of file + ``` bash + docker compose restart postfix-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart postfix-mailcow + ``` diff --git a/docs/manual-guides/Postfix/u_e-postfix-attachment_size.en.md b/docs/manual-guides/Postfix/u_e-postfix-attachment_size.en.md index 7ab8d2498..7beec05f6 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-attachment_size.en.md +++ b/docs/manual-guides/Postfix/u_e-postfix-attachment_size.en.md @@ -1,7 +1,14 @@ Open `data/conf/postfix/extra.cf` and set the `message_size_limit` accordingly in bytes. See `main.cf` for the default value. Restart Postfix: +=== "docker compose" -``` -docker compose restart postfix-mailcow -``` \ No newline at end of file + ``` bash + docker compose restart postfix-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart postfix-mailcow + ``` diff --git a/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.de.md b/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.de.md index 4c7ddb894..20e877903 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.de.md +++ b/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.de.md @@ -19,9 +19,16 @@ smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_ ``` Postmap auf check_sasl_access ausführen: +=== "docker compose" -``` -docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access -``` + ``` bash + docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access + ``` Starten Sie den Postfix-Container neu. diff --git a/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.en.md b/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.en.md index 12e3233c0..c8bb27255 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.en.md +++ b/docs/manual-guides/Postfix/u_e-postfix-disable_sender_verification.en.md @@ -19,9 +19,16 @@ smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_ ``` Run postmap on check_sasl_access: +=== "docker compose" -``` -docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access -``` + ``` bash + docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access + ``` -Restart the Postfix container. \ No newline at end of file +=== "docker-compose" + + ``` bash + docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access + ``` + +Restart the Postfix container. diff --git a/docs/manual-guides/Postfix/u_e-postfix-extra_cf.de.md b/docs/manual-guides/Postfix/u_e-postfix-extra_cf.de.md index 54ea1bb44..182cd8539 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-extra_cf.de.md +++ b/docs/manual-guides/Postfix/u_e-postfix-extra_cf.de.md @@ -6,6 +6,14 @@ Syslog-ng wurde so konfiguriert, dass es diese Warnungen ausblendet, während Po Starten Sie `postfix-mailcow` neu, um Ihre Änderungen zu übernehmen: -``` -docker compose restart postfix-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart postfix-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart postfix-mailcow + ``` diff --git a/docs/manual-guides/Postfix/u_e-postfix-extra_cf.en.md b/docs/manual-guides/Postfix/u_e-postfix-extra_cf.en.md index 2b1db5c3a..35d8bff16 100644 --- a/docs/manual-guides/Postfix/u_e-postfix-extra_cf.en.md +++ b/docs/manual-guides/Postfix/u_e-postfix-extra_cf.en.md @@ -6,6 +6,14 @@ Syslog-ng was configured to hide those warnings while Postfix is running, to not Restart `postfix-mailcow` to apply your changes: -``` -docker compose restart postfix-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart postfix-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart postfix-mailcow + ``` diff --git a/docs/manual-guides/Redis/u_e-redis.de.md b/docs/manual-guides/Redis/u_e-redis.de.md index 648c55457..a8c71220b 100644 --- a/docs/manual-guides/Redis/u_e-redis.de.md +++ b/docs/manual-guides/Redis/u_e-redis.de.md @@ -3,10 +3,17 @@ Redis wird als Key-Value-Speicher für die Einstellungen und Daten von rspamd un ## Client Um sich mit dem redis cli zu verbinden, führen Sie aus: +=== "docker compose" -``` -docker compose exec redis-mailcow redis-cli -``` + ``` bash + docker compose exec redis-mailcow redis-cli + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow redis-cli + ``` ### Fehlersuche @@ -15,15 +22,27 @@ Hier sind einige nützliche Befehle für den redis-cli zur Fehlersuche: ##### MONITOR Überwacht alle vom Server empfangenen Anfragen in Echtzeit: +=== "docker compose" -``` -# docker compose exec redis-mailcow redis-cli -127.0.0.1:6379> monitor -OK -1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" -1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" -[...] -``` + ``` bash + #docker compose exec redis-mailcow redis-cli + 127.0.0.1:6379> monitor + OK + 1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" + 1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" + [...] + ``` + +=== "docker-compose" + + ``` bash + #docker-compose exec redis-mailcow redis-cli + 127.0.0.1:6379> monitor + OK + 1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" + 1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" + [...] + ``` ##### SCHLÜSSEL (Keys) @@ -42,4 +61,4 @@ Testen Sie eine Verbindung: PONG ``` -Wenn Sie mehr wissen wollen, hier ist ein [Cheat-Sheet](https://www.cheatography.com/tasjaevan/cheat-sheets/redis/). \ No newline at end of file +Wenn Sie mehr wissen wollen, hier ist ein [Cheat-Sheet](https://www.cheatography.com/tasjaevan/cheat-sheets/redis/). diff --git a/docs/manual-guides/Redis/u_e-redis.en.md b/docs/manual-guides/Redis/u_e-redis.en.md index 38a269f25..ef266fa7d 100644 --- a/docs/manual-guides/Redis/u_e-redis.en.md +++ b/docs/manual-guides/Redis/u_e-redis.en.md @@ -3,10 +3,17 @@ Redis is used as a key-value store for rspamd's and (some of) mailcow's settings ## Client To connect to the redis cli execute: +=== "docker compose" -``` -docker compose exec redis-mailcow redis-cli -``` + ``` bash + docker compose exec redis-mailcow redis-cli + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow redis-cli + ``` ### Debugging @@ -15,15 +22,27 @@ Here are some useful commands for the redis-cli for debugging: ##### MONITOR Listens for all requests received by the server in real time: +=== "docker compose" -``` -# docker compose exec redis-mailcow redis-cli -127.0.0.1:6379> monitor -OK -1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" -1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" -[...] -``` + ``` bash + #docker compose exec redis-mailcow redis-cli + 127.0.0.1:6379> monitor + OK + 1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" + 1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" + [...] + ``` + +=== "docker-compose" + + ``` bash + #docker-compose exec redis-mailcow redis-cli + 127.0.0.1:6379> monitor + OK + 1494077286.401963 [0 172.22.1.253:41228] "SMEMBERS" "BAYES_SPAM_keys" + 1494077288.292970 [0 172.22.1.253:41229] "SMEMBERS" "BAYES_SPAM_keys" + [...] + ``` ##### KEYS @@ -42,4 +61,4 @@ Test a connection: PONG ``` -If you want to know more, here is a [cheat sheet](https://www.cheatography.com/tasjaevan/cheat-sheets/redis/). \ No newline at end of file +If you want to know more, here is a [cheat sheet](https://www.cheatography.com/tasjaevan/cheat-sheets/redis/). diff --git a/docs/manual-guides/Rspamd/u_e-rspamd.de.md b/docs/manual-guides/Rspamd/u_e-rspamd.de.md index 4acd3c648..c1c2be4bb 100644 --- a/docs/manual-guides/Rspamd/u_e-rspamd.de.md +++ b/docs/manual-guides/Rspamd/u_e-rspamd.de.md @@ -16,13 +16,23 @@ Sie können auch die Web-UI von Rspamd verwenden, um Ham und/oder Spam zu lernen ### Spam oder Ham aus bestehendem Verzeichnis lernen Sie können einen Einzeiler verwenden, um Mails im Klartextformat (unkomprimiert) zu lernen: +=== "docker compose" -```bash -# Ham -for file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done -# Spam -for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done -``` + ``` bash + # Ham + for file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done + # Spam + for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done + ``` + +=== "docker-compose" + + ``` bash + # Ham + for file in /my/folder/cur/*; do docker exec -i $(docker-compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done + # Spam + for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker-compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done + ``` Erwägen Sie, einen lokalen Ordner als neues Volume an `rspamd-mailcow` in `docker-compose.yml` anzuhängen und die gegebenen Dateien innerhalb des Containers zu lernen. Dies kann als Workaround verwendet werden, um komprimierte Daten mit zcat zu parsen. Beispiel: @@ -42,26 +52,51 @@ cp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/ ``` **Bayes-Daten zurücksetzen** +=== "docker compose" -```bash -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' -``` + ``` bash + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' + ``` **Neurale Daten zurücksetzen** +=== "docker compose" -```bash -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' -``` + ``` bash + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' + ``` **Fuzzy-Daten zurücksetzen** +=== "docker compose" -```bash -# Wir müssen zuerst das redis-cli eingeben: -docker compose exec redis-mailcow redis-cli -# In redis-cli: -127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* -``` + ``` bash + # Wir müssen zuerst das redis-cli eingeben: + docker compose exec redis-mailcow redis-cli + # In redis-cli: + 127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* + ``` + +=== "docker-compose" + + ``` bash + # Wir müssen zuerst das redis-cli eingeben: + docker-compose exec redis-mailcow redis-cli + # In redis-cli: + 127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* + ``` **Info** @@ -74,11 +109,19 @@ Wenn redis-cli sich beschwert über... ...das Schlüsselmuster nicht gefunden wurde und somit keine Daten zum Löschen vorhanden sind - ist es in Ordnung. ## CLI-Werkzeuge +=== "docker compose" -``bash -docker compose exec rspamd-mailcow rspamc --help -docker compose exec rspamd-mailcow rspamadm --help -``` + ``` bash + docker compose exec rspamd-mailcow rspamc --help + docker compose exec rspamd-mailcow rspamadm --help + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec rspamd-mailcow rspamc --help + docker-compose exec rspamd-mailcow rspamadm --help + ``` ## Greylisting deaktivieren @@ -94,7 +137,18 @@ Fügen Sie die Zeile hinzu: enabled = false; ``` -Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: `docker compose restart rspamd-mailcow` +Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Spamfilter-Schwellenwerte (global) @@ -106,18 +160,39 @@ add_header = 8; greylist = 7; ``` -Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: `docker compose restart rspamd-mailcow` +Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` Bestehende Einstellungen der Benutzer werden nicht überschrieben! Um benutzerdefinierte Schwellenwerte zurückzusetzen, führen Sie aus: +=== "docker compose" -``` -source mailcow.conf -docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" -# oder: -# docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';" -``` + ``` bash + source mailcow.conf + docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" + # oder: + docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';" + ``` + +=== "docker-compose" + + ``` bash + source mailcow.conf + docker-compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" + # oder: + docker-compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';" + ``` ## Benutzerdefinierte Ablehnungsnachrichten @@ -127,7 +202,18 @@ Die Standard-Spam-Reject-Meldung kann durch Hinzufügen einer neuen Datei `data/ reject_message = "Meine eigene Ablehnungsnachricht"; ``` -Speichern Sie die Datei und starten Sie Rspamd neu: `docker compose restart rspamd-mailcow`. +Speichern Sie die Datei und starten Sie Rspamd neu: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` Waehrend das oben genannte fuer abgelehnte Mails mit einem hohen Spam-Score funktioniert, ignorieren Prefilter-Aktionen diese Einstellung. Für diese Karten muss das Multimap-Modul in Rspamd angepasst werden: @@ -146,7 +232,18 @@ GLOBAL_RCPT_BL { } ``` -3. Speichern Sie die Datei und starten Sie Rspamd neu: `docker compose restart rspamd-mailcow`. +3. Speichern Sie die Datei und starten Sie Rspamd neu: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Verwerfen statt zurückweisen @@ -157,37 +254,71 @@ discard_on_reject = true; ``` Starten Sie Rspamd neu: +=== "docker compose" -```bash -docker compose restart rspamd-mailcow -``` + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Lösche alle Ratelimit-Schlüssel Wenn Sie das UI nicht verwenden wollen und stattdessen alle Schlüssel in der Redis-Datenbank löschen wollen, können Sie redis-cli für diese Aufgabe verwenden: +=== "docker compose" -``` -docker compose exec redis-mailcow sh -# Unlink (verfügbar in Redis >=4.) löscht im Hintergrund -redis-cli --scan --pattern RL* | xargs redis-cli unlink -``` + ``` bash + docker compose exec redis-mailcow sh + # Unlink (verfügbar in Redis >=4.) löscht im Hintergrund + redis-cli --scan --pattern RL* | xargs redis-cli unlink + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh + # Unlink (verfügbar in Redis >=4.) löscht im Hintergrund + redis-cli --scan --pattern RL* | xargs redis-cli unlink + ``` Starten Sie Rspamd neu: -```bash -docker compose restart rspamd-mailcow -``` +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Erneutes Senden von Quarantäne-Benachrichtigungen auslösen Sollte nur zur Fehlersuche verwendet werden! +=== "docker compose" -``` -docker compose exec dovecot-mailcow bash -mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" -redis-cli -h redis DEL Q_LAST_NOTIFIED -quarantine_notify.py -``` + ``` bash + docker compose exec dovecot-mailcow bash + mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" + redis-cli -h redis DEL Q_LAST_NOTIFIED + quarantine_notify.py + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec dovecot-mailcow bash + mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" + redis-cli -h redis DEL Q_LAST_NOTIFIED + quarantine_notify.py + ``` ## Speicherung der Historie erhöhen @@ -203,7 +334,15 @@ Bearbeiten Sie `data/conf/rspamd/local.d/history_redis.conf`: nrows = 1000; # Ändern Sie diesen Wert ``` -Starten Sie anschließend Rspamd neu: `docker compose restart rspamd-mailcow` +Starten Sie anschließend Rspamd neu: +=== "docker compose" + ``` bash + docker compose restart rspamd-mailcow + ``` +=== "docker-compose" + ``` bash + docker-compose restart rspamd-mailcow + ``` diff --git a/docs/manual-guides/Rspamd/u_e-rspamd.en.md b/docs/manual-guides/Rspamd/u_e-rspamd.en.md index 3e6619196..7dda5aa50 100644 --- a/docs/manual-guides/Rspamd/u_e-rspamd.en.md +++ b/docs/manual-guides/Rspamd/u_e-rspamd.en.md @@ -16,13 +16,23 @@ You can also use Rspamd's web UI to learn ham and / or spam or to adjust certain ### Learn Spam or Ham from existing directory You can use a one-liner to learn mail in plain-text (uncompressed) format: +=== "docker compose" -```bash -# Ham -for file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done -# Spam -for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done -``` + ``` bash + # Ham + for file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done + # Spam + for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done + ``` + +=== "docker-compose" + + ``` bash + # Ham + for file in /my/folder/cur/*; do docker exec -i $(docker-compose ps -q rspamd-mailcow) rspamc learn_ham < $file; done + # Spam + for file in /my/folder/.Junk/cur/*; do docker exec -i $(docker-compose ps -q rspamd-mailcow) rspamc learn_spam < $file; done + ``` Consider attaching a local folder as new volume to `rspamd-mailcow` in `docker-compose.yml` and learn given files inside the container. This can be used as workaround to parse compressed data with zcat. Example: @@ -42,26 +52,51 @@ cp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/ ``` **Reset Bayes data** +=== "docker compose" -```bash -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' -``` + ``` bash + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del' + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del' + ``` **Reset Neural data** +=== "docker compose" -```bash -docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' -``` + ``` bash + docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' + ``` **Reset Fuzzy data** +=== "docker compose" -```bash -# We need to enter the redis-cli first: -docker compose exec redis-mailcow redis-cli -# In redis-cli: -127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* -``` + ``` bash + # We need to enter the redis-cli first: + docker compose exec redis-mailcow redis-cli + # In redis-cli: + 127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* + ``` + +=== "docker-compose" + + ``` bash + # We need to enter the redis-cli first: + docker-compose exec redis-mailcow redis-cli + # In redis-cli: + 127.0.0.1:6379> EVAL "for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end" 0 fuzzy* + ``` **Info** @@ -75,11 +110,19 @@ If redis-cli complains about... ## CLI tools +=== "docker compose" -```bash -docker compose exec rspamd-mailcow rspamc --help -docker compose exec rspamd-mailcow rspamadm --help -``` + ``` bash + docker compose exec rspamd-mailcow rspamc --help + docker compose exec rspamd-mailcow rspamadm --help + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec rspamd-mailcow rspamc --help + docker-compose exec rspamd-mailcow rspamadm --help + ``` ## Disable Greylisting @@ -95,7 +138,18 @@ Add the line: enabled = false; ``` -Save the file and restart "rspamd-mailcow": `docker compose restart rspamd-mailcow` +Save the file and restart "rspamd-mailcow": +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Spam filter thresholds (global) @@ -107,12 +161,39 @@ add_header = 8; greylist = 7; ``` -Save the file and restart "rspamd-mailcow": `docker compose restart rspamd-mailcow` +Save the file and restart "rspamd-mailcow": +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` Existing settings of users will not be overwritten! To reset custom defined thresholds, run: +=== "docker compose" + ``` bash + source mailcow.conf + docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" + # or: + docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';" + ``` + +=== "docker-compose" + + ``` bash + source mailcow.conf + docker-compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" + # or: + docker-compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';" + ``` ``` source mailcow.conf docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e "delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';" @@ -128,7 +209,18 @@ The default spam reject message can be changed by adding a new file `data/conf/r reject_message = "My custom reject message"; ``` -Save the file and restart Rspamd: `docker compose restart rspamd-mailcow`. +Save the file and restart Rspamd: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` While the above works for rejected mails with a high spam score, prefilter reject actions will ignore this setting. For these maps, the multimap module in Rspamd needs to be adjusted: @@ -147,7 +239,18 @@ GLOBAL_RCPT_BL { } ``` -3. Save the file and restart Rspamd: `docker compose restart rspamd-mailcow`. +3. Save the file and restart Rspamd: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Discard instead of reject @@ -158,37 +261,70 @@ discard_on_reject = true; ``` Restart Rspamd: +=== "docker compose" -```bash -docker compose restart rspamd-mailcow -``` + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Wipe all ratelimit keys If you don't want to use the UI and instead wipe all keys in the Redis database, you can use redis-cli for that task: +=== "docker compose" -``` -docker compose exec redis-mailcow sh -# Unlink (available in Redis >=4.) will delete in the backgronud -redis-cli --scan --pattern RL* | xargs redis-cli unlink -``` + ``` bash + docker compose exec redis-mailcow sh + # Unlink (available in Redis >=4.) will delete in the backgronud + redis-cli --scan --pattern RL* | xargs redis-cli unlink + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec redis-mailcow sh + # Unlink (available in Redis >=4.) will delete in the backgronud + redis-cli --scan --pattern RL* | xargs redis-cli unlink + ``` Restart Rspamd: +=== "docker compose" -```bash -docker compose restart rspamd-mailcow -``` + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ``` ## Trigger a resend of quarantine notifications Should be used for debugging only! +=== "docker compose" -``` -docker compose exec dovecot-mailcow bash -mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" -redis-cli -h redis DEL Q_LAST_NOTIFIED -quarantine_notify.py -``` + ``` bash + docker compose exec dovecot-mailcow bash + mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" + redis-cli -h redis DEL Q_LAST_NOTIFIED + quarantine_notify.py + ``` + +=== "docker-compose" + + ``` bash + docker-compose exec dovecot-mailcow bash + mysql -umailcow -p$DBPASS mailcow -e "update quarantine set notified = 0;" + redis-cli -h redis DEL Q_LAST_NOTIFIED + quarantine_notify.py + ``` ## Increase history retention @@ -204,4 +340,15 @@ Edit `data/conf/rspamd/local.d/history_redis.conf`: nrows = 1000; # change this value ``` -Restart Rspamd afterwards: `docker compose restart rspamd-mailcow` +Restart Rspamd afterwards: +=== "docker compose" + + ``` bash + docker compose restart rspamd-mailcow + ``` + +=== "docker-compose" + + ``` bash + docker-compose restart rspamd-mailcow + ```