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 80796e5d7..42bdb7aae 100644 --- a/docs/i_u_m/i_u_m_update.de.md +++ b/docs/i_u_m/i_u_m_update.de.md @@ -68,7 +68,7 @@ docker-compose up -d ### Hooks -Sie können sich in den Update-Mechanismus einklinken, indem Sie Skripte namens `pre_commit_hook.sh` und `post_commit_hook.sh` zu Ihrem mailcows-Root-Verzeichnis hinzufügen. Siehe [hier](../manual-guides/update-hooks.de.md) für weitere Details. +Sie können sich in den Update-Mechanismus einklinken, indem Sie Skripte namens `pre_commit_hook.sh` und `post_commit_hook.sh` zu Ihrem mailcows-Root-Verzeichnis hinzufügen. Siehe [hier](../manual-guides/u_e-update-hooks.md) für weitere Details. ## Fußnoten 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 3128c351d..78351c8a7 100644 --- a/docs/i_u_m/i_u_m_update.en.md +++ b/docs/i_u_m/i_u_m_update.en.md @@ -68,7 +68,7 @@ docker-compose up -d ### Hooks -You can hook into the update mechanism by adding scripts called `pre_commit_hook.sh` and `post_commit_hook.sh` to your mailcows root directory. See [this](../manual-guides/update-hooks.en.md) for more details. +You can hook into the update mechanism by adding scripts called `pre_commit_hook.sh` and `post_commit_hook.sh` to your mailcows root directory. See [this](../manual-guides/u_e-update-hooks.md) for more details. ## Footnotes 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 new file mode 100644 index 000000000..0d588f192 --- /dev/null +++ b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.de.md @@ -0,0 +1,17 @@ +Sie müssen die Override-Datei mit den entsprechenden Build-Tags in den mailcow: dockerized Root-Ordner (d.h. `/opt/mailcow-dockerized`) kopieren: + +``` +cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml +``` + +Nehmen Sie Ihre Änderungen in `data/Dockerfiles/$service` vor und erstellen Sie das Image lokal: + +``` +docker build data/Dockerfiles/service -t mailcow/$service +``` + +Nun werden die geänderten Container automatisch neu erstellt: + +``` +docker-compose up -d +``` \ No newline at end of file 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 new file mode 100644 index 000000000..dc3eff729 --- /dev/null +++ b/docs/manual-guides/Docker/u_e-docker-cust_dockerfiles.en.md @@ -0,0 +1,17 @@ +You need to copy the override file with corresponding build tags to the mailcow: dockerized root folder (i.e. `/opt/mailcow-dockerized`): + +``` +cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml +``` + +Make your changes in `data/Dockerfiles/$service` and build the image locally: + +``` +docker build data/Dockerfiles/service -t mailcow/$service +``` + +Now auto-recreate modified containers: + +``` +docker-compose up -d +``` \ No newline at end of file diff --git a/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.de.md b/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.de.md new file mode 100644 index 000000000..1e837a11f --- /dev/null +++ b/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.de.md @@ -0,0 +1,5 @@ +Um eine schöne Bash-Vervollständigung in Ihren Containern zu erhalten, führen Sie einfach das Folgende aus: + +``` +curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose +``` \ No newline at end of file diff --git a/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.en.md b/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.en.md new file mode 100644 index 000000000..8748730a5 --- /dev/null +++ b/docs/manual-guides/Docker/u_e-docker-dc_bash_compl.en.md @@ -0,0 +1,5 @@ +To get some sexy bash completion inside your containers simply execute the following: + +``` +curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose +``` \ No newline at end of file diff --git a/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.de.md b/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.de.md index 03ba0fdac..04d37e972 100644 --- a/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.de.md +++ b/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.de.md @@ -1,7 +1,7 @@ ## Der "neue" Weg !!! warning - Neuere Docker-Versionen scheinen sich über bestehende Volumes zu beschweren. Man kann dies vorübergehend beheben, indem man das bestehende Volume entfernt und mailcow mit der Override-Datei startet. Aber es scheint nach einem Neustart problematisch zu sein (muss bestätigt werden). + Neuere Docker-Versionen scheinen sich über bestehende Volumes zu beschweren. Man kann dies vorübergehend beheben, indem man das bestehende Volume entfernt und mailcow mit der Override-Datei startet. Aber es scheint nach einem Neustart problematisch zu sein (muss bestätigt werden). Ein einfacher, schmutziger, aber stabiler Workaround ist es, mailcow zu stoppen (`docker-compose down`), `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data` zu entfernen und einen neuen Link zu Ihrem entfernten Dateisystem zu erstellen, zum Beispiel: diff --git a/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.en.md b/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.en.md index 65049fcaa..4b270d351 100644 --- a/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.en.md +++ b/docs/manual-guides/Dovecot/u_e-dovecot-vmail-volume.en.md @@ -1,7 +1,7 @@ ## The "new" way !!! warning - Newer Docker versions seem to complain about existing volumes. You can fix this temporarily by removing the existing volume and start mailcow with the override file. But it seems to be problematic after a reboot (needs to be confirmed). + Newer Docker versions seem to complain about existing volumes. You can fix this temporarily by removing the existing volume and start mailcow with the override file. But it seems to be problematic after a reboot (needs to be confirmed). An easy, dirty, yet stable workaround is to stop mailcow (`docker-compose down`), remove `/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data` and create a new link to your remote filesystem location, for example: diff --git a/docs/manual-guides/Nginx/u_e-nginx_custom.de.md b/docs/manual-guides/Nginx/u_e-nginx_custom.de.md new file mode 100644 index 000000000..4c3e7b5f7 --- /dev/null +++ b/docs/manual-guides/Nginx/u_e-nginx_custom.de.md @@ -0,0 +1,120 @@ +## SSL + +Bitte lesen Sie [Erweitertes SSL](../../post_installation/firststeps-ssl.md) und überprüfen Sie explizit `ADDITIONAL_SERVER_NAMES` für die SSL-Konfiguration. + +Bitte fügen Sie ADDITIONAL_SERVER_NAMES nicht hinzu, wenn Sie planen, einen anderen Web-Root zu verwenden. + +## Neue Website + +Um persistente (über Updates) Sites zu erstellen, die von mailcow: dockerized gehostet werden, muss eine neue Site-Konfiguration in `data/conf/nginx/` platziert werden: + +Eine gute Vorlage, um damit zu beginnen: + +``` +nano data/conf/nginx/my_custom_site.conf +``` + +``` hl_lines="16" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; + ssl_ecdh_curve X25519:X448:secp384r1:secp256k1; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + index index.php index.html; + client_max_body_size 0; + # Location: data/web + root /web; + # Location: data/web/mysite.com + #root /web/mysite.com + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name mysite.example.org; + server_tokens off; + + # This allows acme to be validated even with a different web root + location ^~ /.well-known/acme-challenge/ { + default_type "text/plain"; + rewrite /.well-known/acme-challenge/(.*) /$1 break; + root /web/.well-known/acme-challenge/; + } + + if ($scheme = http) { + return 301 https://$server_name$request_uri; + } +} +``` + +## Neue Website mit Proxy zu einem entfernten Location +Ein weiteres Beispiel mit einer Reverse-Proxy-Konfiguration: + +``` +nano data/conf/nginx/my_custom_site.conf +``` + +``` hl_lines="16 28" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; + ssl_ecdh_curve X25519:X448:secp384r1:secp256k1; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + index index.php index.html; + client_max_body_size 0; + root /web; + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name example.domain.tld; + server_tokens off; + + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + + if ($scheme = http) { + return 301 https://$host$request_uri; + } + + location / { + proxy_pass http://service:3000/; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 0; + } +} +``` + +## Konfig-Erweiterung in mailcows Nginx + +Der Dateiname, der für eine neue Site verwendet wird, ist nicht wichtig, solange der Dateiname eine .conf-Erweiterung trägt. + +Es ist auch möglich, die Konfiguration der Standarddatei `site.conf` Datei zu erweitern: + +``` +nano data/conf/nginx/site.my_content.custom +``` + +Dieser Dateiname muss keine ".conf"-Erweiterung haben, sondern folgt dem Muster `site.*.custom`, wobei `*` ein eigener Name ist. + +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 restart nginx-mailcow +docker-compose restart php-fpm-mailcow +``` + +*** Übersetzt mit www.DeepL.com/Translator (kostenlose Version) *** + diff --git a/docs/manual-guides/Nginx/u_e-nginx_custom.en.md b/docs/manual-guides/Nginx/u_e-nginx_custom.en.md new file mode 100644 index 000000000..d36a4f457 --- /dev/null +++ b/docs/manual-guides/Nginx/u_e-nginx_custom.en.md @@ -0,0 +1,118 @@ +## SSL + +Please see [Advanced SSL](../../post_installation/firststeps-ssl.md) and explicitly check `ADDITIONAL_SERVER_NAMES` for SSL configuration. + +Please do not add ADDITIONAL_SERVER_NAMES when you plan to use a different web root. + +## New site + +To create persistent (over updates) sites hosted by mailcow: dockerized, a new site configuration must be placed inside `data/conf/nginx/`: + +A good template to begin with: + +``` +nano data/conf/nginx/my_custom_site.conf +``` + +``` hl_lines="16" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; + ssl_ecdh_curve X25519:X448:secp384r1:secp256k1; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + index index.php index.html; + client_max_body_size 0; + # Location: data/web + root /web; + # Location: data/web/mysite.com + #root /web/mysite.com + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name mysite.example.org; + server_tokens off; + + # This allows acme to be validated even with a different web root + location ^~ /.well-known/acme-challenge/ { + default_type "text/plain"; + rewrite /.well-known/acme-challenge/(.*) /$1 break; + root /web/.well-known/acme-challenge/; + } + + if ($scheme = http) { + return 301 https://$server_name$request_uri; + } +} +``` + +## New site with proxy to a remote location + +Another example with a reverse proxy configuration: + +``` +nano data/conf/nginx/my_custom_site.conf +``` + +``` hl_lines="16 28" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + ssl_protocols TLSv1.2 TLSv1.3; + ssl_prefer_server_ciphers on; + ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305; + ssl_ecdh_curve X25519:X448:secp384r1:secp256k1; + ssl_session_cache shared:SSL:50m; + ssl_session_timeout 1d; + ssl_session_tickets off; + index index.php index.html; + client_max_body_size 0; + root /web; + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name example.domain.tld; + server_tokens off; + + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + + if ($scheme = http) { + return 301 https://$host$request_uri; + } + + location / { + proxy_pass http://service:3000/; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + client_max_body_size 0; + } +} +``` + +## Config expansion in mailcows Nginx + +The filename used for a new site is not important, as long as the filename carries a .conf extension. + +It is also possible to extend the configuration of the default file `site.conf` file: + +``` +nano data/conf/nginx/site.my_content.custom +``` + +This filename does not need to have a ".conf" extension but follows the pattern `site.*.custom`, where `*` is a custom name. + +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 restart nginx-mailcow +docker-compose restart php-fpm-mailcow +``` diff --git a/docs/manual-guides/Nginx/u_e-nginx_webmail-site.de.md b/docs/manual-guides/Nginx/u_e-nginx_webmail-site.de.md new file mode 100644 index 000000000..1985e5e3a --- /dev/null +++ b/docs/manual-guides/Nginx/u_e-nginx_webmail-site.de.md @@ -0,0 +1,38 @@ +**WICHTIG**: Diese Anleitung gilt nur für Konfigurationen, bei denen SNI nicht aktiviert ist. Wenn SNI aktiviert ist, muss der Zertifikatspfad angepasst werden. Etwas wie `ssl_certificate,key /etc/ssl/mail/webmail.example.org/cert.pem,key.pem;` wird genügen. **Aber**: Das Zertifikat sollte **zuerst** bezogen werden und erst wenn das Zertifikat existiert, sollte eine Site Config erstellt werden. Nginx wird nicht starten, wenn es das Zertifikat und den Schlüssel nicht finden kann. + +Um eine Subdomain `webmail.example.org` zu erstellen und sie auf SOGo umzuleiten, müssen Sie eine **neue** Nginx-Site erstellen. Achten Sie dabei auf "CHANGE_TO_MAILCOW_HOSTNAME"! + +**nano data/conf/nginx/webmail.conf** + +``` hl_lines="9 17" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + index index.php index.html; + client_max_body_size 0; + root /web; + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name webmail.example.org; + server_tokens off; + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + + location / { + return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo; + } +} +``` + +Speichern Sie und starten Sie Nginx neu: `docker-compose restart nginx-mailcow`. + +Öffnen Sie nun `mailcow.conf` und suchen Sie `ADDITIONAL_SAN`. +Fügen Sie `webmail.example.org` zu diesem Array hinzu, verwenden Sie keine Anführungszeichen! + +``` +ADDITIONAL_SAN=webmail.example.org +``` + +Führen Sie `docker-compose up -d` aus. Siehe "acme-mailcow" und "nginx-mailcow" Logs, wenn etwas fehlschlägt. \ No newline at end of file diff --git a/docs/manual-guides/Nginx/u_e-nginx_webmail-site.en.md b/docs/manual-guides/Nginx/u_e-nginx_webmail-site.en.md new file mode 100644 index 000000000..aa73e3726 --- /dev/null +++ b/docs/manual-guides/Nginx/u_e-nginx_webmail-site.en.md @@ -0,0 +1,38 @@ +**IMPORTANT**: This guide only applies to non SNI enabled configurations. The certificate path needs to be adjusted if SNI is enabled. Something like `ssl_certificate,key /etc/ssl/mail/webmail.example.org/cert.pem,key.pem;` will do. **But**: The certificate should be acquired **first** and only after the certificate exists a site config should be created. Nginx will fail to start if it cannot find the certificate and key. + +To create a subdomain `webmail.example.org` and redirect it to SOGo, you need to create a **new** Nginx site. Take care of "CHANGE_TO_MAILCOW_HOSTNAME"! + +**nano data/conf/nginx/webmail.conf** + +``` hl_lines="9 17" +server { + ssl_certificate /etc/ssl/mail/cert.pem; + ssl_certificate_key /etc/ssl/mail/key.pem; + index index.php index.html; + client_max_body_size 0; + root /web; + include /etc/nginx/conf.d/listen_plain.active; + include /etc/nginx/conf.d/listen_ssl.active; + server_name webmail.example.org; + server_tokens off; + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + + location / { + return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo; + } +} +``` + +Save and restart Nginx: `docker-compose restart nginx-mailcow`. + +Now open `mailcow.conf` and find `ADDITIONAL_SAN`. +Add `webmail.example.org` to this array, don't use quotes! + +``` +ADDITIONAL_SAN=webmail.example.org +``` + +Run `docker-compose up -d`. See "acme-mailcow" and "nginx-mailcow" logs if anything fails. \ No newline at end of file diff --git a/docs/manual-guides/Redis/u_e-redis.de.md b/docs/manual-guides/Redis/u_e-redis.de.md new file mode 100644 index 000000000..767ed83ee --- /dev/null +++ b/docs/manual-guides/Redis/u_e-redis.de.md @@ -0,0 +1,45 @@ +Redis wird als Key-Value-Speicher für die Einstellungen und Daten von rspamd und (einige von) mailcow verwendet. Wenn Sie mit Redis nicht vertraut sind, lesen Sie bitte die [Einführung in Redis](https://redis.io/topics/introduction) und besuchen Sie gegebenenfalls diese [wunderbare Anleitung](http://try.redis.io/), um zu erfahren, wie man Redis benutzt. + +## Client + +Um sich mit dem redis cli zu verbinden, führen Sie aus: + +``` +docker-compose exec redis-mailcow redis-cli +``` + +### Fehlersuche + +Hier sind einige nützliche Befehle für den redis-cli zur Fehlersuche: + +##### MONITOR + +Überwacht alle vom Server empfangenen Anfragen in Echtzeit: + +``` +# docker-compose exec redis-mailcow redis-cli +127.0.0.1:6379> überwachen +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) + +Ermittelt alle Schlüssel, die dem Muster entsprechen: + +``` +KEYS * +``` + +##### PING + +Testen Sie eine Verbindung: + +``` +127.0.0.1:6379> PING +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 diff --git a/docs/manual-guides/Redis/u_e-redis.en.md b/docs/manual-guides/Redis/u_e-redis.en.md new file mode 100644 index 000000000..a30cc2cd3 --- /dev/null +++ b/docs/manual-guides/Redis/u_e-redis.en.md @@ -0,0 +1,45 @@ +Redis is used as a key-value store for rspamd's and (some of) mailcow's settings and data. If you are unfamiliar with redis please read the [introduction to redis](https://redis.io/topics/introduction) and maybe visit this [wonderful guide](http://try.redis.io/) on how to use it. + +## Client + +To connect to the redis cli execute: + +``` +docker-compose exec redis-mailcow redis-cli +``` + +### Debugging + +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 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 + +Get all keys matching your pattern: + +``` +KEYS * +``` + +##### PING + +Test a connection: + +``` +127.0.0.1:6379> PING +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 diff --git a/docs/manual-guides/Rspamd/u_e-rspamd.de.md b/docs/manual-guides/Rspamd/u_e-rspamd.de.md new file mode 100644 index 000000000..16ad8fd70 --- /dev/null +++ b/docs/manual-guides/Rspamd/u_e-rspamd.de.md @@ -0,0 +1,245 @@ +Rspamd wird für die AV-Verarbeitung, DKIM-Signierung und SPAM-Verarbeitung verwendet. Es ist ein leistungsfähiges und schnelles Filtersystem. Für eine ausführlichere Dokumentation über Rspamd besuchen Sie bitte die [Rspamd Dokumentation] (https://rspamd.com/doc/index.html). + +## Spam & Ham lernen + +Rspamd lernt, ob es sich um Spam oder Ham handelt, wenn Sie eine Nachricht in oder aus dem Junk-Ordner in ein anderes Postfach als den Papierkorb verschieben. +Dies wird durch die Verwendung des Sieve-Plugins "sieve_imapsieve" und Parser-Skripte erreicht. + +Rspamd liest auch automatisch Mails, wenn eine hohe oder niedrige Punktzahl erkannt wird (siehe https://rspamd.com/doc/configuration/statistic.html#autolearning). Wir haben das Plugin so konfiguriert, dass es ein vernünftiges Verhältnis zwischen Spam- und Ham-Learnings beibehält. + +Die Bayes-Statistiken werden in Redis als Schlüssel `BAYES_HAM` und `BAYES_SPAM` gespeichert. + +Neben Bayes wird ein lokaler Fuzzy-Speicher verwendet, um wiederkehrende Muster in Texten oder Bildern zu lernen, die auf Ham oder Spam hinweisen. + +Sie können auch die Web-UI von Rspamd verwenden, um Ham und/oder Spam zu lernen oder bestimmte Einstellungen von Rspamd anzupassen. + +### Spam oder Ham aus bestehendem Verzeichnis lernen + +Sie können einen Einzeiler verwenden, um Mails im Klartextformat (unkomprimiert) zu lernen: + +```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: + +``bash +for file in /data/old_mail/.Junk/cur/*; do rspamc learn_spam < zcat $file; done +``` + +### Gelernte Daten zurücksetzen (Bayes, Neural) + +Sie müssen die Schlüssel in Redis löschen, um die gelernten Daten zurückzusetzen, also erstellen Sie jetzt eine Kopie Ihrer Redis-Datenbank: + +**Backup Datenbank** + +```bash +# Es ist besser, Redis zu stoppen, bevor Sie die Datei kopieren. +cp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/ +``` + +**Bayes-Daten zurücksetzen** + +```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** + +```bash +docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' +``` + +**Fuzzy-Daten zurücksetzen** + +```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** + +Wenn redis-cli sich beschwert über... + +```Text +(error) ERR wrong number of arguments for 'del' command +``` + +...das Schlüsselmuster nicht gefunden wurde und somit keine Daten zum Löschen vorhanden sind - ist es in Ordnung. + +## CLI-Werkzeuge + +``bash +docker-compose exec rspamd-mailcow rspamc --help +docker-compose exec rspamd-mailcow rspamadm --help +``` + +## Greylisting deaktivieren + +Nur Nachrichten mit einer höheren Punktzahl werden als Greylisting betrachtet (soft rejected). Es ist schlechte Praxis, Greylisting zu deaktivieren. + +Sie können Greylisting serverweit durch Editieren deaktivieren: + +`{mailcow-dir}/data/conf/rspamd/local.d/greylist.conf` + +Fügen Sie die Zeile hinzu: + +```cpp +enabled = false; +``` + +Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: `docker-compose restart rspamd-mailcow` + +## Spamfilter-Schwellenwerte (global) + +Jeder Benutzer kann [seine Spam-Bewertung](../mailcow-UI/u_e-mailcow_ui-spamfilter.md) individuell ändern. Um eine neue **serverweite** Grenze zu definieren, editieren Sie `data/conf/rspamd/local.d/actions.conf`: + +```cpp +reject = 15; +add_header = 8; +greylist = 7; +``` + +Speichern Sie die Datei und starten Sie "rspamd-mailcow" neu: `docker-compose restart rspamd-mailcow` + +Bestehende Einstellungen der Benutzer werden nicht überschrieben! + +Um benutzerdefinierte Schwellenwerte zurückzusetzen, führen Sie aus: + +``` +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 + +Die Standard-Spam-Reject-Meldung kann durch Hinzufügen einer neuen Datei `data/conf/rspamd/override.d/worker-proxy.custom.inc` mit dem folgenden Inhalt geändert werden: + +``` +reject_message = "Meine eigene Ablehnungsnachricht"; +``` + +Speichern Sie die Datei und starten Sie Rspamd neu: `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: + +1. Finden Sie das Prefilet-Reject-Symbol, für das Sie die Nachricht ändern wollen, führen Sie dazu aus: `grep -R "SYMBOL_YOU_WANT_TO_ADJUST" /opt/mailcow-dockerized/data/conf/rspamd/` + +2. Fügen Sie Ihre eigene Nachricht als neue Zeile hinzu: + +``` +GLOBAL_RCPT_BL { + Typ = "rcpt"; + map = "${LOCAL_CONFDIR}/custom/global_rcpt_blacklist.map"; + regexp = true; + prefilter = true; + action = "reject"; + message = "Der Versand von E-Mails an diesen Empfänger ist durch postmaster@your.domain verboten"; +} +``` + +3. Speichern Sie die Datei und starten Sie Rspamd neu: `docker-compose restart rspamd-mailcow`. + +## 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.: + +```bash +docker-compose logs clamd-mailcow | grep "FOUND" +``` + +Diese Zeile bestätigt, dass ein solcher identifiziert wurde: + +```text +clamd-mailcow_1 | Sat Sep 28 07:43:24 2019 -> instream(local): PUA.Pdf.Trojan.EmbeddedJavaScript-1(e887d2ac324ce90750768b86b63d0749:363325) FOUND +``` + +Um diese spezielle Signatur auf die Whitelist zu setzen (und den Versand dieses Dateityps im Anhang zu ermöglichen), fügen Sie sie der ClamAV-Signatur-Whitelist-Datei hinzu: + +```bash +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: + +```bash +docker-compose restart clamd-mailcow +``` + +Bereinigen Sie zwischengespeicherte ClamAV-Ergebnisse in Redis: + +``` +# docker-compose exec redis-mailcow /bin/sh +/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL +/data # exit +``` + +## Verwerfen statt zurückweisen + +Wenn Sie eine Nachricht stillschweigend verwerfen wollen, erstellen oder bearbeiten Sie die Datei `data/conf/rspamd/override.d/worker-proxy.custom.inc` und fügen Sie den folgenden Inhalt hinzu: + +``` +discard_on_reject = true; +``` + +Starten Sie Rspamd neu: + +```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 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 exec redis-mailcow sh +``` + +## Erneutes Senden von Quarantäne-Benachrichtigungen auslösen + +Sollte nur zur Fehlersuche verwendet werden! + +``` +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 + +Standardmäßig speichert Rspamd 1000 Elemente in der Historie. + +Die Historie wird komprimiert gespeichert. + +Es wird empfohlen, hier keinen unverhältnismäßig hohen Wert zu verwenden, probieren Sie etwas in der Größenordnung von 5000 oder 10000 und sehen Sie, wie Ihr Server damit umgeht: + +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` + +*** Übersetzt mit www.DeepL.com/Translator (kostenlose Version) *** + + + diff --git a/docs/manual-guides/Rspamd/u_e-rspamd.en.md b/docs/manual-guides/Rspamd/u_e-rspamd.en.md new file mode 100644 index 000000000..5070eb884 --- /dev/null +++ b/docs/manual-guides/Rspamd/u_e-rspamd.en.md @@ -0,0 +1,241 @@ +Rspamd is used for AV handling, DKIM signing and SPAM handling. It's a powerful and fast filter system. For a more in-depth documentation on Rspamd please visit its [own documentation](https://rspamd.com/doc/index.html). + +## Learn Spam & Ham + +Rspamd learns mail as spam or ham when you move a message in or out of the junk folder to any mailbox besides trash. +This is achieved by using the Sieve plugin "sieve_imapsieve" and parser scripts. + +Rspamd also auto-learns mail when a high or low score is detected (see https://rspamd.com/doc/configuration/statistic.html#autolearning). We configured the plugin to keep a sane ratio between spam and ham learns. + +The bayes statistics are written to Redis as keys `BAYES_HAM` and `BAYES_SPAM`. + +Besides bayes, a local fuzzy storage is used to learn recurring patterns in text or images that indicate ham or spam. + +You can also use Rspamd's web UI to learn ham and / or spam or to adjust certain settings of Rspamd. + +### Learn Spam or Ham from existing directory + +You can use a one-liner to learn mail in plain-text (uncompressed) format: + +```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: + +```bash +for file in /data/old_mail/.Junk/cur/*; do rspamc learn_spam < zcat $file; done +``` + +### Reset learned data (Bayes, Neural) + +You need to delete keys in Redis to reset learned data, so create a copy of your Redis database now: + +**Backup database** + +```bash +# It is better to stop Redis before you copy the file. +cp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/ +``` + +**Reset Bayes data** + +```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** + +```bash +docker-compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del' +``` + +**Reset Fuzzy data** + +```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** + +If redis-cli complains about... + +```text +(error) ERR wrong number of arguments for 'del' command +``` + +...the key pattern was not found and thus no data is available to delete - it is fine. + + +## CLI tools + +```bash +docker-compose exec rspamd-mailcow rspamc --help +docker-compose exec rspamd-mailcow rspamadm --help +``` + +## Disable Greylisting + +Only messages with a higher score will be considered to be greylisted (soft rejected). It is bad practice to disable greylisting. + +You can disable greylisting server-wide by editing: + +`{mailcow-dir}/data/conf/rspamd/local.d/greylist.conf` + +Add the line: + +```cpp +enabled = false; +``` + +Save the file and restart "rspamd-mailcow": `docker-compose restart rspamd-mailcow` + +## Spam filter thresholds (global) + +Each user is able to change [their spam rating individually](../mailcow-UI/u_e-mailcow_ui-spamfilter.md). To define a new **server-wide** limit, edit `data/conf/rspamd/local.d/actions.conf`: + +```cpp +reject = 15; +add_header = 8; +greylist = 7; +``` + +Save the file and restart "rspamd-mailcow": `docker-compose restart rspamd-mailcow` + +Existing settings of users will not be overwritten! + +To reset custom defined thresholds, run: + +``` +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';" +``` + +## Custom reject messages + +The default spam reject message can be changed by adding a new file `data/conf/rspamd/override.d/worker-proxy.custom.inc` with the following content: + +``` +reject_message = "My custom reject message"; +``` + +Save the file and restart Rspamd: `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: + +1. Find prefilet reject symbol for which you want change message, to do it run: `grep -R "SYMBOL_YOU_WANT_TO_ADJUST" /opt/mailcow-dockerized/data/conf/rspamd/` + +2. Add your custom message as new line: + +``` +GLOBAL_RCPT_BL { + type = "rcpt"; + map = "${LOCAL_CONFDIR}/custom/global_rcpt_blacklist.map"; + regexp = true; + prefilter = true; + action = "reject"; + message = "Sending mail to this recipient is prohibited by postmaster@your.domain"; +} +``` + +3. Save the file and restart Rspamd: `docker-compose restart rspamd-mailcow`. + +## 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.: + +```bash +docker-compose logs clamd-mailcow | grep "FOUND" +``` + +This line confirms that such was identified: + +```text +clamd-mailcow_1 | Sat Sep 28 07:43:24 2019 -> instream(local): PUA.Pdf.Trojan.EmbeddedJavaScript-1(e887d2ac324ce90750768b86b63d0749:363325) FOUND +``` + +To whitelist this particular signature (and enable sending this type of file attached), add it to the ClamAV signature whitelist file: + +```bash +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: + +```bash +docker-compose restart clamd-mailcow +``` + +Cleanup cached ClamAV results in Redis: + +``` +# docker-compose exec redis-mailcow /bin/sh +/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL +/data # exit +``` + +## Discard instead of reject + +If you want to silently drop a message, create or edit the file `data/conf/rspamd/override.d/worker-proxy.custom.inc` and add the following content: + +``` +discard_on_reject = true; +``` + +Restart Rspamd: + +```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 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: + +```bash +docker-compose exec redis-mailcow sh +``` + +## Trigger a resend of quarantine notifications + +Should be used for debugging only! + +``` +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 + +By default Rspamd keeps 1000 elements in the history. + +The history is stored compressed. + +It is recommended not to use a disproportionate high value here, try something along 5000 or 10000 and see how your server handles it: + +Edit `data/conf/rspamd/local.d/history_redis.conf`: + +``` +nrows = 1000; # change this value +``` + +Restart Rspamd afterwards: `docker-compose restart rspamd-mailcow` diff --git a/docs/manual-guides/SOGo/u_e-sogo.de.md b/docs/manual-guides/SOGo/u_e-sogo.de.md new file mode 100644 index 000000000..c690dd989 --- /dev/null +++ b/docs/manual-guides/SOGo/u_e-sogo.de.md @@ -0,0 +1,111 @@ +SOGo wird verwendet, um über einen Webbrowser auf Ihre Mails zuzugreifen und Ihre Kontakte oder Kalender hinzuzufügen und zu teilen. Für eine ausführlichere Dokumentation zu SOGo besuchen Sie bitte die [eigene Dokumentation] (http://wiki.sogo.nu/). + +## Benutzerdefiniertes SOGo-Thema (CSS) anwenden +mailcow-Builds nach dem 28. Januar 2021 können das CSS-Thema von SOGo ändern, indem sie `data/conf/sogo/custom-theme.js` bearbeiten. +Bitte schauen Sie sich die AngularJS Material [intro](https://material.angularjs.org/latest/Theming/01_introduction) und [documentation](https://material.angularjs.org/latest/Theming/03_configuring_a_theme) sowie die [material style guideline](https://material.io/archive/guidelines/style/color.html#color-color-palette) an, um zu erfahren, wie das funktioniert. + +Sie können die mitgelieferte `custom-theme.js` als Beispiel verwenden, indem Sie die Kommentare entfernen. +Nachdem Sie `data/conf/sogo/custom-theme.js` modifiziert und Änderungen an Ihrem neuen SOGo-Theme vorgenommen haben, müssen Sie + +1. Bearbeiten Sie `data/conf/sogo/sogo.conf` und fügen Sie `SOGoUIxDebugEnabled = YES;` ein. +2. SOGo und Memcached Container neu starten, indem man `docker-compose restart memcached-mailcow sogo-mailcow` ausführt. +3. SOGo im Browser öffnen +4. öffnen Sie die Entwicklerkonsole des Browsers, normalerweise ist die Tastenkombination F12 +5. nur wenn Sie Firefox benutzen: schreiben Sie mit der Hand in die Entwicklerkonsole `allow pasting` und drücken Sie Enter +6. fügen Sie den Java-Script-Schnipsel in die Entwicklungskonsole ein: +``` +copy([].slice.call(document.styleSheets) + .map(e => e.ownerNode) + .filter(e => e.hasAttribute('md-theme-style')) + .map(e => e.textInhalt) + .join('\n') +) +``` +7. Öffnen Sie den Texteditor und fügen Sie die Daten aus der Zwischenablage ein (Strg+V), Sie sollten ein minimiertes CSS erhalten, speichern Sie es +8. kopieren Sie die CSS-Datei auf den Mailcow-Server `data/conf/sogo/custom-theme.css` +9. editiere `data/conf/sogo/sogo.conf` und setze `SOGoUIxDebugEnabled = NO;` +10. Anhängen/Erstellen von `docker-compose.override.yml` mit: +``` +Version: '2.1' + +Dienste: + sogo-mailcow: + volumes: + - ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z +``` +11. führen Sie `docker-compose up -d` aus +12. Ausführen von `docker-compose restart memcached-mailcow` + +## Zurücksetzen auf das SOGo Standardthema +1. checken Sie `data/conf/sogo/custom-theme.js` aus, indem Sie `git fetch ; git checkout origin/master data/conf/sogo/custom-theme.js data/conf/sogo/custom-theme.js` ausführen +2. Suchen Sie in `data/conf/sogo/custom-theme.js`: +``` +// Neue Paletten auf das Standardthema anwenden, einige Farbtöne neu zuordnen + $mdThemingProvider.theme('default') + .primaryPalette('green-cow', { + 'default': '400', // Hintergrundfarbe der oberen Symbolleisten + hue-1': '400', + 'hue-2': '600', // Hintergrundfarbe der Seitenleiste + 'hue-3': 'A700' + }) + .accentPalette('green', { + 'default': '600', // Hintergrundfarbe der Fab-Schaltflächen und des Anmeldebildschirms + hue-1': '300', // Hintergrundfarbe der Symbolleiste der mittleren Liste + hue-2': '300', // Hervorhebungsfarbe für ausgewählte Nachrichten und den aktuellen Tageskalender + hue-3': 'A700' + }) + .backgroundPalette('frost-grey'); +``` +und ersetzen Sie es durch: +``` + $mdThemingProvider.theme('default'); +``` +3. Entfernen Sie aus `docker-compose.override.yml` Volume Mount in `sogo-mailcow`: +``` +- ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z +``` +4. führen Sie `docker-compose up -d` aus +5. Starten Sie `docker-compose restart memcached-mailcow`. + +## Favicon ändern +mailcow-Builds nach dem 31. Januar 2021 können SOGo's Favicon ändern, indem sie `data/conf/sogo/custom-favicon.ico` für SOGo und `data/web/favicon.png` für mailcow UI ersetzen. +**Anmerkung**: Sie können `.png` Favicons für SOGo verwenden, indem Sie sie in `custom-favicon.ico` umbenennen. +Für beide, SOGo und mailcow UI Favicons, müssen Sie eine der Standardgrößen verwenden: 16x16, 32x32, 64x64, 128x128 und 256x256. +Nachdem Sie diese Datei ersetzt haben, müssen Sie SOGo und Memcached Container neu starten, indem Sie `docker-compose restart memcached-mailcow sogo-mailcow` ausführen. + +## Logo ändern +Mailcow-Builds nach dem 21. Dezember 2018 können das SOGo-Logo ändern, indem sie die Datei `data/conf/sogo/sogo-full.svg` ersetzen oder erstellen (falls sie fehlt). +Nachdem Sie diese Datei ersetzt haben, müssen Sie SOGo und Memcached Container neu starten, indem Sie `docker-compose restart memcached-mailcow sogo-mailcow` ausführen. + +## Domains verbinden (untereinander sichtbar machen) +Domains sind normalerweise voneinander isoliert. + +Sie können das ändern, indem Sie `data/conf/sogo/sogo.conf` modifizieren: + +Suche... +``` + // SOGoDomainsVisibility = ( + // (domain1.tld, domain5.tld), + // (domain3.tld, domain2.tld) + // ); +``` +...und ersetzen Sie diese durch - zum Beispiel: + +``` + SOGoDomainsVisibility = ( + (beispiel.org, beispiel.com, beispiel.net) + ); +``` + +SOGo neu starten: `docker-compose restart sogo-mailcow` + +## Deaktivieren Sie die Passwortänderung + +Bearbeiten Sie `data/conf/sogo/sogo.conf` und **ändern** Sie `SOGoPasswordChangeEnabled` auf `NO`. Bitte fügen Sie keinen neuen Parameter hinzu. + +Führen Sie `docker-compose restart memcached-mailcow sogo-mailcow` aus, um die Änderungen zu aktivieren. + +## TOTP zurücksetzen / TOTP deaktivieren + +Führen Sie `docker-compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@domain.tld SOGoTOTPEnabled '{"SOGoTOTPEnabled":0}'` aus dem mailcow Verzeichnis aus. + diff --git a/docs/manual-guides/SOGo/u_e-sogo.en.md b/docs/manual-guides/SOGo/u_e-sogo.en.md new file mode 100644 index 000000000..9cb087831 --- /dev/null +++ b/docs/manual-guides/SOGo/u_e-sogo.en.md @@ -0,0 +1,110 @@ +SOGo is used for accessing your mails via a webbrowser, adding and sharing your contacts or calendars. For a more in-depth documentation on SOGo please visit its [own documentation](http://wiki.sogo.nu/). + +## Apply custom SOGo theme +mailcow builds after 28 January 2021 can change SOGo's theme by editing `data/conf/sogo/custom-theme.js`. +Please check the AngularJS Material [intro](https://material.angularjs.org/latest/Theming/01_introduction) and [documentation](https://material.angularjs.org/latest/Theming/03_configuring_a_theme) as well as the [material style guideline](https://material.io/archive/guidelines/style/color.html#color-color-palette) to learn how this works. + +You can use the provided `custom-theme.js` as an example starting point by removing the comments. +After you modified `data/conf/sogo/custom-theme.js` and made changes to your new SOGo theme you need to + +1. edit `data/conf/sogo/sogo.conf` and append/set `SOGoUIxDebugEnabled = YES;` +2. restart SOGo and Memcached containers by executing `docker-compose restart memcached-mailcow sogo-mailcow`. +3. open SOGo in browser +4. open browser developer console, usually shortcut is F12 +5. only if you use Firefox: write by hands in dev console `allow pasting` and press enter +6. paste java script snipet in dev console: +``` +copy([].slice.call(document.styleSheets) + .map(e => e.ownerNode) + .filter(e => e.hasAttribute('md-theme-style')) + .map(e => e.textContent) + .join('\n') +) +``` +7. open text editor and paste data from clipboard (Ctrl+V), you should get minified CSS, save it +8. copy CSS file to mailcow server `data/conf/sogo/custom-theme.css` +9. edit `data/conf/sogo/sogo.conf` and set `SOGoUIxDebugEnabled = NO;` +10. append/create `docker-compose.override.yml` with: +``` +version: '2.1' + +services: + sogo-mailcow: + volumes: + - ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z +``` +11. run `docker-compose up -d` +12. run `docker-compose restart memcached-mailcow` + +## Reset to SOGo default theme +1. checkout `data/conf/sogo/custom-theme.js` by executing `git fetch ; git checkout origin/master data/conf/sogo/custom-theme.js data/conf/sogo/custom-theme.js` +2. find in `data/conf/sogo/custom-theme.js`: +``` +// Apply new palettes to the default theme, remap some of the hues + $mdThemingProvider.theme('default') + .primaryPalette('green-cow', { + 'default': '400', // background color of top toolbars + 'hue-1': '400', + 'hue-2': '600', // background color of sidebar toolbar + 'hue-3': 'A700' + }) + .accentPalette('green', { + 'default': '600', // background color of fab buttons and login screen + 'hue-1': '300', // background color of center list toolbar + 'hue-2': '300', // highlight color for selected mail and current day calendar + 'hue-3': 'A700' + }) + .backgroundPalette('frost-grey'); +``` +and replace it with: +``` + $mdThemingProvider.theme('default'); +``` +3. remove from `docker-compose.override.yml` volume mount in `sogo-mailcow`: +``` +- ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z +``` +4. run `docker-compose up -d` +5. run `docker-compose restart memcached-mailcow` + +## Change favicon +mailcow builds after 31 January 2021 can change SOGo's favicon by replacing `data/conf/sogo/custom-favicon.ico` for SOGo and `data/web/favicon.png` for mailcow UI. +**Note**: You can use `.png` favicons for SOGo by renaming them to `custom-favicon.ico`. +For both SOGo and mailcow UI favicons you need use one of the standard dimensions: 16x16, 32x32, 64x64, 128x128 and 256x256. +After you replaced said file you need to restart SOGo and Memcached containers by executing `docker-compose restart memcached-mailcow sogo-mailcow`. + +## Change logo +mailcow builds after 21 December 2018 can change SOGo's logo by replacing or creating (if missing) `data/conf/sogo/sogo-full.svg`. +After you replaced said file you need to restart SOGo and Memcached containers by executing `docker-compose restart memcached-mailcow sogo-mailcow`. + +## Connect domains +Domains are usually isolated from eachother. + +You can change that by modifying `data/conf/sogo/sogo.conf`: + +Search... +``` + // SOGoDomainsVisibility = ( + // (domain1.tld, domain5.tld), + // (domain3.tld, domain2.tld) + // ); +``` +...and replace it by - for example: + +``` + SOGoDomainsVisibility = ( + (example.org, example.com, example.net) + ); +``` + +Restart SOGo: `docker-compose restart sogo-mailcow` + +## Disable password changing + +Edit `data/conf/sogo/sogo.conf` and **change** `SOGoPasswordChangeEnabled` to `NO`. Please do not add a new parameter. + +Run `docker-compose restart memcached-mailcow sogo-mailcow` to activate the changes. + +## Reset TOTP / Disable TOTP + +Run `docker-compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@domain.tld SOGoTOTPEnabled '{"SOGoTOTPEnabled":0}'` from within the mailcow directory. \ No newline at end of file diff --git a/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.de.md b/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.de.md new file mode 100644 index 000000000..5ea767f1f --- /dev/null +++ b/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.de.md @@ -0,0 +1,82 @@ +Watchdog verwendet Standardwerte für alle in `docker-compose.yml` definierten Thresholde. + +Die Standardwerte sind für die meisten Konfigurationen geeignet. +Beispiel: +``` +- NGINX_THRESHOLD=${NGINX_THRESHOLD:-5} +- UNBOUND_THRESHOLD=${UNBOUND_THRESHOLD:-5} +- REDIS_THRESHOLD=${REDIS_THRESHOLD:-5} +- MYSQL_THRESHOLD=${MYSQL_THRESHOLD:-5} +- MYSQL_REPLICATION_THRESHOLD=${MYSQL_REPLICATION_THRESHOLD:-1} +- SOGO_THRESHOLD=${SOGO_THRESHOLD:-3} +- POSTFIX_THRESHOLD=${POSTFIX_THRESHOLD:-8} +- CLAMD_THRESHOLD=${CLAMD_THRESHOLD:-15} +- DOVECOT_THRESHOLD=${DOVECOT_THRESHOLD:-12} +- DOVECOT_REPL_THRESHOLD=${DOVECOT_REPL_THRESHOLD:-20} +- PHPFPM_THRESHOLD=${PHPFPM_THRESHOLD:-5} +- RATELIMIT_THRESHOLD=${RATELIMIT_THRESHOLD:-1} +- FAIL2BAN_THRESHOLD=${FAIL2BAN_THRESHOLD:-1} +- ACME_THRESHOLD=${ACME_THRESHOLD:-1} +- RSPAMD_THRESHOLD=${RSPAMD_THRESHOLD:-5} +- OLEFY_THRESHOLD=${OLEFY_THRESHOLD:-5} +- MAILQ_THRESHOLD=${MAILQ_THRESHOLD:-20} +- MAILQ_CRIT=${MAILQ_CRIT:-30} +``` + +Um sie anzupassen, fügen Sie einfach die notwendigen Threshold Variablen (z.B. `MAILQ_THRESHOLD=10`) zu `mailcow.conf` hinzu und führen `docker-compose up -d` aus. + + +### Threshold Beschreibungen + +#### NGINX_THRESHOLD +Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu Nginx auf Port 8081 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde. + +#### UNBOUND_THRESHOLD +Benachrichtigt Administratoren, wenn Unbound externe Domänen/DNSSEC nicht auflösen/überprüfen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### REDIS_THRESHOLD +Benachrichtigt Administratoren, wenn der Watchdog keine Verbindung zu Redis auf Port 6379 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### MYSQL_THRESHOLD +Benachrichtigt Administratoren, wenn watchdog keine Verbindung zu MySQL herstellen kann oder eine Tabelle nicht abfragen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde. + +#### MYSQL_REPLICATION_THRESHOLD +Benachrichtigt Administratoren, wenn die MySQL-Replikation fehlschlägt. + +#### SOGO_THRESHOLD +Benachrichtigt Administratoren, wenn der Watchdog keine Verbindung zu SOGo auf Port 20000 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### POSTFIX_THRESHOLD +Benachrichtigt Administratoren, wenn watchdog keine Testmail über Port 589 senden kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### CLAMD_THRESHOLD +Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu Clamd herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde. + +#### DOVECOT_THRESHOLD +Benachrichtigt Administratoren, wenn watchdog bei verschiedenen Tests mit dem Dovecot-Container fehlschlägt. Der Container wird automatisch neu gestartet, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### DOVECOT_REPL_THRESHOLD +Benachrichtigt Administratoren, wenn die Dovecot-Replikation fehlschlägt. + +#### PHPFPM_THRESHOLD +Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu PHP-FPM auf Port 9001/9002 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### RATELIMIT_THRESHOLD +Benachrichtigt Administratoren, wenn ein Ratelimit erreicht wurde. + +#### FAIL2BAN_THRESHOLD +Benachrichtigt Administratoren, wenn ein fail2ban eine IP gesperrt hat. + +#### ACME_THRESHOLD +Benachrichtigt Administratoren, wenn etwas mit dem acme-mailcow-Container nicht in Ordnung ist. Sie können dessen Logs überprüfen. + +#### RSPAMD_THRESHOLD +Benachrichtigt Administratoren, wenn Watchdog bei verschiedenen Tests mit dem Rspamd-Container fehlschlägt und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde. + +#### OLEFY_THRESHOLD +Benachrichtigt Administratoren, wenn watchdog keine Verbindung zu olefy auf Port 10005 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist. + +#### MAILQ_CRIT und MAILQ_THRESHOLD +Benachrichtigt Administratoren, wenn die Anzahl der E-Mails in der Postfix-Warteschlange größer ist als `MAILQ_CRIT` für einen Zeitraum von `MAILQ_THRESHOLD * (60±30)` Sekunden. +*** Übersetzt mit www.DeepL.com/Translator (kostenlose Version) *** + diff --git a/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.en.md b/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.en.md new file mode 100644 index 000000000..cc9c6e8ff --- /dev/null +++ b/docs/manual-guides/Watchdog/u_e-watchdog-thresholds.en.md @@ -0,0 +1,80 @@ +Watchdog uses default values for all thresholds defined in `docker-compose.yml`. + +The default values will work for most setups. +Example: +``` +- NGINX_THRESHOLD=${NGINX_THRESHOLD:-5} +- UNBOUND_THRESHOLD=${UNBOUND_THRESHOLD:-5} +- REDIS_THRESHOLD=${REDIS_THRESHOLD:-5} +- MYSQL_THRESHOLD=${MYSQL_THRESHOLD:-5} +- MYSQL_REPLICATION_THRESHOLD=${MYSQL_REPLICATION_THRESHOLD:-1} +- SOGO_THRESHOLD=${SOGO_THRESHOLD:-3} +- POSTFIX_THRESHOLD=${POSTFIX_THRESHOLD:-8} +- CLAMD_THRESHOLD=${CLAMD_THRESHOLD:-15} +- DOVECOT_THRESHOLD=${DOVECOT_THRESHOLD:-12} +- DOVECOT_REPL_THRESHOLD=${DOVECOT_REPL_THRESHOLD:-20} +- PHPFPM_THRESHOLD=${PHPFPM_THRESHOLD:-5} +- RATELIMIT_THRESHOLD=${RATELIMIT_THRESHOLD:-1} +- FAIL2BAN_THRESHOLD=${FAIL2BAN_THRESHOLD:-1} +- ACME_THRESHOLD=${ACME_THRESHOLD:-1} +- RSPAMD_THRESHOLD=${RSPAMD_THRESHOLD:-5} +- OLEFY_THRESHOLD=${OLEFY_THRESHOLD:-5} +- MAILQ_THRESHOLD=${MAILQ_THRESHOLD:-20} +- MAILQ_CRIT=${MAILQ_CRIT:-30} +``` + +To adjust them just add necessary threshold variables (e.g. `MAILQ_THRESHOLD=10`) to `mailcow.conf` and run `docker-compose up -d`. + + +### Thresholds descriptions + +#### NGINX_THRESHOLD +Notifies administrators if watchdog can not establish a connection to Nginx on port 8081 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### UNBOUND_THRESHOLD +Notifies administrators if Unbound can not resolve/valide external domains/DNSSEC and it will restart the container automatically when issues were found and the threshold has been reached. + +#### REDIS_THRESHOLD +Notifies administrators if watchdog can not establish a connection to Redis on port 6379 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### MYSQL_THRESHOLD +Notifies administrators if watchdog can not establish a connection to MySQL or can not query a table and it will restart the container automatically when issues were found and the threshold has been reached. + +#### MYSQL_REPLICATION_THRESHOLD +Notifies administrators if the MySQL replication fails. + +#### SOGO_THRESHOLD +Notifies administrators if watchdog can not establish a connection to SOGo on port 20000 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### POSTFIX_THRESHOLD +Notifies administrators if watchdog can not sent a test mail via port 589 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### CLAMD_THRESHOLD +Notifies administrators if watchdog can not establish a connection to Clamd and it will restart the container automatically when issues were found and the threshold has been reached. + +#### DOVECOT_THRESHOLD +Notifies administrators if watchdog fails with various tests with Dovecot container and it will restart the container automatically when issues were found and the threshold has been reached. + +#### DOVECOT_REPL_THRESHOLD +Notifies administrators if the Dovecot replication fails. + +#### PHPFPM_THRESHOLD +Notifies administrators if watchdog can not establish a connection to PHP-FPM on port 9001/9002 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### RATELIMIT_THRESHOLD +Notifies administrators if a ratelimit got hit. + +#### FAIL2BAN_THRESHOLD +Notifies administrators if a fail2ban banned an IP. + +#### ACME_THRESHOLD +Notifies administrators if something is wrong with the acme-mailcow container. You may check its logs. + +#### RSPAMD_THRESHOLD +Notifies administrators if watchdog fails with various tests with Rspamd container and it will restart the container automatically when issues were found and the threshold has been reached. + +#### OLEFY_THRESHOLD +Notifies administrators if watchdog can not establish a connection to olefy on port 10005 and it will restart the container automatically when issues were found and the threshold has been reached. + +#### MAILQ_CRIT and MAILQ_THRESHOLD +Notifies administrators if number of emails in the postfix queue is greater then `MAILQ_CRIT` for period of `MAILQ_THRESHOLD * (60±30)` seconds. \ No newline at end of file diff --git a/docs/manual-guides/u_e-80_to_443.de.md b/docs/manual-guides/u_e-80_to_443.de.md new file mode 100644 index 000000000..2cae26ce8 --- /dev/null +++ b/docs/manual-guides/u_e-80_to_443.de.md @@ -0,0 +1,36 @@ +Seit dem 28. Februar 2017 wird mailcow mit aktivierten Ports 80 und 443 geliefert. + +**Verwenden Sie die untenstehende Konfiguration nicht für Reverse-Proxy-Setups**, bitte lesen Sie dazu unsere [Reverse-Proxy-Anleitung](../post_installation/firststeps-rp.md), die einen Redirect von HTTP zu HTTPS beinhaltet. + +Öffne `mailcow.conf` und setze `HTTP_BIND=` - falls nicht bereits gesetzt. + +Erstellen Sie eine neue Datei `data/conf/nginx/redirect.conf` und fügen Sie die folgende Serverkonfiguration in die Datei ein: + +``` +server { + root /web; + listen 80 default_server; + listen [::]:80 default_server; + include /etc/nginx/conf.d/server_name.active; + if ( $request_uri ~* "%0A|%0D" ) { return 403; } + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + location / { + return 301 https://$host$uri$is_args$args; + } +} +``` + +Falls Sie den Parameter HTTP_BIND geändert haben, erstellen Sie den Container neu: + +``` +docker-compose up -d +``` + +Andernfalls starten Sie Nginx neu: + +``` +docker-compose restart nginx-mailcow +``` \ No newline at end of file diff --git a/docs/manual-guides/u_e-80_to_443.en.md b/docs/manual-guides/u_e-80_to_443.en.md new file mode 100644 index 000000000..2dbcc9fae --- /dev/null +++ b/docs/manual-guides/u_e-80_to_443.en.md @@ -0,0 +1,36 @@ +Since February the 28th 2017 mailcow does come with port 80 and 443 enabled. + +**Do not use the config below for reverse proxy setups**, please see our [reverse proxy guide](../post_installation/firststeps-rp.md) for this, which includes a redirect from HTTP to HTTPS. + +Open `mailcow.conf` and set `HTTP_BIND=` - if not already set. + +Create a new file `data/conf/nginx/redirect.conf` and add the following server config to the file: + +``` +server { + root /web; + listen 80 default_server; + listen [::]:80 default_server; + include /etc/nginx/conf.d/server_name.active; + if ( $request_uri ~* "%0A|%0D" ) { return 403; } + location ^~ /.well-known/acme-challenge/ { + allow all; + default_type "text/plain"; + } + location / { + return 301 https://$host$uri$is_args$args; + } +} +``` + +In case you changed the HTTP_BIND parameter, recreate the container: + +``` +docker-compose up -d +``` + +Otherwise restart Nginx: + +``` +docker-compose restart nginx-mailcow +``` \ No newline at end of file diff --git a/docs/manual-guides/u_e-autodiscover_config.de.md b/docs/manual-guides/u_e-autodiscover_config.de.md new file mode 100644 index 000000000..ffc09441c --- /dev/null +++ b/docs/manual-guides/u_e-autodiscover_config.de.md @@ -0,0 +1,53 @@ +**Sie brauchen diese Datei nicht zu ändern oder zu erstellen, autodiscover funktioniert sofort**. Diese Anleitung ist nur für Anpassungen des Autodiscover- oder Autokonfigurationsprozesses gedacht. + +Neuere Outlook-Clients (insbesondere solche, die mit O365 ausgeliefert werden) führen keine automatische Erkennung von E-Mail-Profilen durch. +Denken Sie daran, dass **ActiveSync NICHT mit einem Desktop-Client** verwendet werden sollte. + +Öffnen/erstellen Sie `data/web/inc/vars.local.inc.php` und fügen Sie Ihre Änderungen in das Konfigurationsfeld ein. + +Die Änderungen werden mit "$autodiscover_config" in `data/web/inc/vars.inc.php` zusammengeführt): + +``` + 'activesync', + // If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows) + // Outlook for Mac does not support ActiveSync + 'useEASforOutlook' => 'yes', + // Please don't use STARTTLS-enabled service ports in the "port" variable. + // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services). + // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable. + 'imap' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('IMAPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('IMAP_PORT'))), + ), + 'pop3' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('POPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('POP_PORT'))), + ), + 'smtp' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('SMTPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('SUBMISSION_PORT'))), + ), + 'activesync' => array( + 'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync', + ), + 'caldav' => array( + 'server' => $mailcow_hostname, + 'port' => $https_port, + ), + 'carddav' => array( + 'server' => $mailcow_hostname, + 'port' => $https_port, + ), +); +``` + +Um immer IMAP und SMTP anstelle von EAS zu verwenden, setzen Sie `'autodiscoverType' => 'imap'`. + +Deaktivieren Sie ActiveSync für Outlook-Desktop-Clients, indem Sie "useEASforOutlook" auf "no" setzen. \ No newline at end of file diff --git a/docs/manual-guides/u_e-autodiscover_config.en.md b/docs/manual-guides/u_e-autodiscover_config.en.md new file mode 100644 index 000000000..ff0f85aa1 --- /dev/null +++ b/docs/manual-guides/u_e-autodiscover_config.en.md @@ -0,0 +1,53 @@ +**You do not need to change or create this file, autodiscover works out of the box**. This guide is only meant for customizations to the autodiscover or autoconfig process. + +Newer Outlook clients (especially those delivered with O365) will not autodiscover mail profiles. +Keep in mind, that **ActiveSync should NOT be used with a desktop client**. + +Open/create `data/web/inc/vars.local.inc.php` and add your changes to the configuration array. + +Changes will be merged with "$autodiscover_config" in `data/web/inc/vars.inc.php`): + +``` + 'activesync', + // If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows) + // Outlook for Mac does not support ActiveSync + 'useEASforOutlook' => 'yes', + // Please don't use STARTTLS-enabled service ports in the "port" variable. + // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services). + // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable. + 'imap' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('IMAPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('IMAP_PORT'))), + ), + 'pop3' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('POPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('POP_PORT'))), + ), + 'smtp' => array( + 'server' => $mailcow_hostname, + 'port' => array_pop(explode(':', getenv('SMTPS_PORT'))), + 'tlsport' => array_pop(explode(':', getenv('SUBMISSION_PORT'))), + ), + 'activesync' => array( + 'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync', + ), + 'caldav' => array( + 'server' => $mailcow_hostname, + 'port' => $https_port, + ), + 'carddav' => array( + 'server' => $mailcow_hostname, + 'port' => $https_port, + ), +); +``` + +To always use IMAP and SMTP instead of EAS, set `'autodiscoverType' => 'imap'`. + +Disable ActiveSync for Outlook desktop clients by setting "useEASforOutlook" to "no". \ No newline at end of file diff --git a/docs/manual-guides/u_e-reeanble-weak-protocols.de.md b/docs/manual-guides/u_e-reeanble-weak-protocols.de.md new file mode 100644 index 000000000..749f7dffd --- /dev/null +++ b/docs/manual-guides/u_e-reeanble-weak-protocols.de.md @@ -0,0 +1,26 @@ +Am 12. Februar 2020 haben wir die veralteten Protokolle TLS 1.0 und 1.1 in Dovecot (POP3, POP3S, IMAP, IMAPS) und Postfix (SMTPS, SUBMISSION) deaktiviert. + +Unauthentifizierte Mails über SMTP an Port 25/tcp akzeptieren weiterhin >= TLS 1.0 . Es ist besser, eine schwache Verschlüsselung zu akzeptieren als gar keine. + +**Wie kann man schwache Protokolle wieder aktivieren?** + +Bearbeiten Sie `data/conf/postfix/extra.cf`: + +``` +submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 +smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 +``` + +Bearbeiten Sie `data/conf/dovecot/extra.conf`: + +``` +ssl_min_protocol = TLSv1 +``` + +Starten Sie die betroffenen Dienste neu: + +``` +docker-compose restart postfix-mailcow dovecot-mailcow +``` + +Tipp: Sie können TLS 1.2 in Windows 7 aktivieren. \ No newline at end of file diff --git a/docs/manual-guides/u_e-reeanble-weak-protocols.en.md b/docs/manual-guides/u_e-reeanble-weak-protocols.en.md new file mode 100644 index 000000000..9151bfb7b --- /dev/null +++ b/docs/manual-guides/u_e-reeanble-weak-protocols.en.md @@ -0,0 +1,26 @@ +On February the 12th 2020 we disabled the deprecated protocols TLS 1.0 and 1.1 in Dovecot (POP3, POP3S, IMAP, IMAPS) and Postfix (SMTPS, SUBMISSION). + +Unauthenticated mail via SMTP on port 25/tcp does still accept >= TLS 1.0 . It is better to accept a weak encryption than none at all. + +**How to re-enable weak protocols?** + +Edit `data/conf/postfix/extra.cf`: + +``` +submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 +smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3 +``` + +Edit `data/conf/dovecot/extra.conf`: + +``` +ssl_min_protocol = TLSv1 +``` + +Restart the affected services: + +``` +docker-compose restart postfix-mailcow dovecot-mailcow +``` + +Hint: You can enable TLS 1.2 in Windows 7. \ No newline at end of file diff --git a/docs/manual-guides/u_e-update-hooks.de.md b/docs/manual-guides/u_e-update-hooks.de.md new file mode 100644 index 000000000..cb0461e37 --- /dev/null +++ b/docs/manual-guides/u_e-update-hooks.de.md @@ -0,0 +1,10 @@ +Es ist möglich, Pre- und Post-Update-Hooks zum `update.sh` Skript hinzuzufügen, das Ihre gesamte mailcow-Installation aktualisiert. + +Um dies zu tun, fügen Sie einfach das entsprechende Bash-Skript in Ihr Mailcow-Root-Verzeichnis ein: + +* `pre_update_hook.sh` für Befehle, die vor dem Update laufen sollen +* `post_update_hook.sh` für Befehle, die nach dem Update ausgeführt werden sollen + +Beachten Sie, dass `pre_update_hook.sh` jedes Mal ausgeführt wird, wenn Sie `update.sh` aufrufen, und `post_update_hook.sh` wird nur ausgeführt, wenn die Aktualisierung erfolgreich war und das Skript nicht erneut ausgeführt werden muss. + +Die Skripte werden von der Bash ausgeführt, ein Interpreter (z.B. `#!/bin/bash`) sowie ein Execute Permission Flag ("+x") sind nicht erforderlich. \ No newline at end of file diff --git a/docs/manual-guides/u_e-update-hooks.en.md b/docs/manual-guides/u_e-update-hooks.en.md new file mode 100644 index 000000000..ff32bd793 --- /dev/null +++ b/docs/manual-guides/u_e-update-hooks.en.md @@ -0,0 +1,10 @@ +It is possible to add pre- and post-update-hooks to the `update.sh` script that upgrades your whole mailcow installation. + +To do so, just add the corresponding bash script into your mailcow root directory: + +* `pre_update_hook.sh` for commands that should run before the update +* `post_update_hook.sh` for commands that should run after the update is completed + +Keep in mind that `pre_update_hook.sh` runs every time you call `update.sh` and `post_update_hook.sh` will only run if the update was successful and the script doesn't have to be re-run. + +The scripts will be run by bash, an interpreter (e.g. `#!/bin/bash`) as well as an execute permission flag ("+x") are not required. \ No newline at end of file diff --git a/docs/manual-guides/u_e-why_unbound.de.md b/docs/manual-guides/u_e-why_unbound.de.md new file mode 100644 index 000000000..15fe2325e --- /dev/null +++ b/docs/manual-guides/u_e-why_unbound.de.md @@ -0,0 +1,6 @@ +Für DNS-Blacklist-Lookups und DNSSEC. + +Die meisten Systeme verwenden entweder einen öffentlichen oder einen lokalen DNS-Auflöser mit Zwischenspeicher. +Das ist eine sehr schlechte Idee, wenn es darum geht, Spam mit DNS-basierten Blackhole-Listen (DNSBL) oder ähnlichen Techniken zu filtern. +Die meisten, wenn nicht alle Anbieter wenden eine Ratenbegrenzung an, die auf dem DNS-Resolver basiert, der für die Abfrage ihres Dienstes verwendet wird. +Wenn Sie einen öffentlichen Resolver wie Google 4x8, OpenDNS oder einen anderen gemeinsam genutzten DNS-Resolver wie den Ihres Internetanbieters verwenden, werden Sie diese Grenze sehr bald erreichen. \ No newline at end of file diff --git a/docs/manual-guides/u_e-why_unbound.en.md b/docs/manual-guides/u_e-why_unbound.en.md new file mode 100644 index 000000000..1cf8028c9 --- /dev/null +++ b/docs/manual-guides/u_e-why_unbound.en.md @@ -0,0 +1,6 @@ +For DNS blacklist lookups and DNSSEC. + +Most systems use either a public or a local caching DNS resolver. +That's a very bad idea when it comes to filter spam using DNS-based black hole lists (DNSBL) or similar technics. +Most if not all providers apply a rate limit based on the DNS resolver that is used to query their service. +Using a public resolver like Googles 4x8, OpenDNS or any other shared DNS resolver like your ISPs will hit that limit very soon. \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 170ef27e1..45552c9fb 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,6 @@ site_name: 'mailcow: dockerized documentation' site_url: https://mailcow.github.io/mailcow-dockerized-docs/ -copyright: "Copyright © 2022 Servercow Team & Community" +copyright: "Copyright © 2022 Servercow Team & Community
Revision: 2" repo_name: mailcow/mailcow-dockerized repo_url: https://github.com/mailcow/mailcow-dockerized edit_uri: ../mailcow-dockerized-docs/edit/master/docs/ @@ -108,21 +108,21 @@ nav: - 'Static master user': 'manual-guides/Dovecot/u_e-dovecot-static_master.md' - 'Vacation replies for catchall addresses': 'manual-guides/Dovecot/u_e-dovecot-catchall_vacation.md' - 'Nginx': - - 'Create subdomain webmail.example.org': 'u_e-webmail-site.md' - - 'Custom sites': 'u_e-nginx.md' + - 'Create subdomain webmail.example.org': 'manual-guides/Nginx/u_e-nginx_webmail-site.md' + - 'Custom sites': 'manual-guides/Nginx/u_e-nginx_custom.md' - 'Watchdog': - - 'Thresholds': 'u_e-watchdog-thresholds.md' - - 'Redis': 'u_e-redis.md' - - 'Rspamd': 'u_e-rspamd.md' - - 'SOGo': 'u_e-sogo.md' + - 'Thresholds': 'manual-guides/Watchdog/u_e-watchdog-thresholds.md' + - 'Redis': 'manual-guides/Redis/u_e-redis.md' + - 'Rspamd': 'manual-guides/Rspamd/u_e-rspamd.md' + - 'SOGo': 'manual-guides/SOGo/u_e-sogo.md' - 'Docker': - - 'Customize Dockerfiles': 'u_e-docker-cust_dockerfiles.md' - - 'Docker Compose Bash Completion': 'u_e-docker-dc_bash_compl.md' - - 'Why unbound?': 'u_e-why_unbound.md' - - 'Autodiscover / Autoconfig': 'u_e-autodiscover_config.md' - - 'Redirect HTTP to HTTPS': 'u_e-80_to_443.md' - - 'Re-enable TLS 1.0 and TLS 1.1': 'u_e-reeanble-weak-protocols.md' - - "Run scripts before and after updates": "u_e-update-hooks.md" + - 'Customize Dockerfiles': 'manual-guides/Docker/u_e-docker-cust_dockerfiles.md' + - 'Docker Compose Bash Completion': 'manual-guides/Docker/u_e-docker-dc_bash_compl.md' + - 'Why unbound?': 'manual-guides/u_e-why_unbound.md' + - 'Autodiscover / Autoconfig': 'manual-guides/u_e-autodiscover_config.md' + - 'Redirect HTTP to HTTPS': 'manual-guides/u_e-80_to_443.md' + - 'Re-enable TLS 1.0 and TLS 1.1': 'manual-guides/u_e-reeanble-weak-protocols.md' + - "Run scripts before and after updates": "manual-guides/u_e-update-hooks.md" - 'Client Configuration': - 'Overview': 'client.md' - 'Android': 'client/client-android.md'