Rewrite for Linked content tabs
Dieser Commit ist enthalten in:
Ursprung
cc5a529823
Commit
460476a091
26 geänderte Dateien mit 831 neuen und 247 gelöschten Zeilen
|
@ -1,8 +1,15 @@
|
|||
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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -44,9 +44,17 @@ 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**:
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
|
|
@ -44,9 +44,17 @@ 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:
|
||||
|
||||
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
``` bash
|
||||
docker compose restart postfix-mailcow
|
||||
```
|
||||
|
||||
=== "docker-compose"
|
||||
|
||||
``` bash
|
||||
docker-compose restart postfix-mailcow
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
``` bash
|
||||
docker compose restart postfix-mailcow
|
||||
```
|
||||
|
||||
=== "docker-compose"
|
||||
|
||||
``` bash
|
||||
docker-compose restart postfix-mailcow
|
||||
```
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
=== "docker-compose"
|
||||
|
||||
``` bash
|
||||
docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access
|
||||
```
|
||||
|
||||
Restart the Postfix container.
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
|
Laden …
In neuem Issue referenzieren