Update roundcube install instructions (#571)
* Update roundcube install instructions Main changes: - Use separate database for roundcube - Download mime.types once and not on every container start - Use mailcow API for password change from roundcube instead of direct database access - Use non-TLS connection instead of TLS with disabled certificate check - Upgrade CardDAV instructions to use RCMCardDAV v5 which also includes rediscovery of new/removed server-side addressbooks - Instructions for forwarding client IP to dovecot (main benefit: netfilter container acts on excessive failed logins) * Improvements to roundcube setup - Change tarball extraction command, since the transform flag also messed up symlink targets - Slight change in database creation (aligned with roundcube INSTALL docs) - Change roundcube cipher_method to a stronger than the default one, and allow some symbols in the generated passphrase - Expose only the public_html subdirectory of roundcube - Include update of the composer dependencies in the installation steps - Create scheduled job for database housekeeping - Uninstall instructions * Add missing escapes * Another syntax fix * Roundcube: Avoid access to PHP scripts in sensitive directories The sensitive directories should not contain PHP scripts in the first place, but just as a safeguard we disable access to nginx on a filesystem level. (NGINX and PHPFPM run under different UIDs in mailcow). * Roundcube: Migration instructions * Update third_party-roundcube.en.md * Address review findings * Adress review findings and translate to German * Fix typos
Dieser Commit ist enthalten in:
Ursprung
2e6d5a87e1
Commit
1a10dd53c8
2 geänderte Dateien mit 1097 neuen und 348 gelöschten Zeilen
740
docs/third_party/roundcube/third_party-roundcube.de.md
gevendort
740
docs/third_party/roundcube/third_party-roundcube.de.md
gevendort
|
@ -1,206 +1,375 @@
|
|||
## Installation von Roundcube
|
||||
|
||||
Laden Sie Roundcube 1.6.x in das Web htdocs Verzeichnis herunter und entpacken Sie es (hier `rc/`):
|
||||
```bash
|
||||
# PrĂĽfen Sie, ob eine neuere Version vorliegt!
|
||||
cd data/web
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
Sofern nicht abweichend angegeben wird fĂĽr alle aufgefĂĽhrten Kommandos angenommen, dass diese im mailcow
|
||||
Installationsverzeichnis ausgeführt werden, d. h. dem Verzeichnis, welches `mailcow.conf` usw. enthält. Bitte führen Sie
|
||||
die Kommandos nicht blind aus, sondern verstehen Sie was diese bewirken. Keines der Kommandos sollte einen Fehler
|
||||
ausgeben; sollten Sie dennoch auf einen Fehler stoĂźen, beheben Sie diesen sofern notwendig bevor Sie mit den
|
||||
nachfolgenden Kommandos fortfahren.
|
||||
|
||||
# Ă„ndern Sie den Ordnernamen
|
||||
mv roundcubemail-1.6.1 rc
|
||||
### Hinweise zur Verwendung von composer
|
||||
|
||||
# Berechtigungen ändern
|
||||
chown -R root: rc/
|
||||
Diese Anweisungen verwenden das Programm composer zur Aktualisierung der Abhängigkeiten von Roundcube und um
|
||||
Roundcube-Plugins zu installieren bzw. zu aktualisieren.
|
||||
|
||||
Das roundcube-plugin-installer composer Plugin hat eine [Design-Schwäche](https://github.com/roundcube/plugin-installer/issues/38),
|
||||
die dazu führen kann, dass composer bei Operationen fehlschlägt, im Rahmen derer Pakete aktualisiert oder deinstalliert
|
||||
werden.
|
||||
|
||||
Die Fehlermeldung in diesem Falle besagt, dass eine `require`-Anweisung in `autoload_real.php` fehlgeschlagen ist, weil
|
||||
eine Datei nicht gefunden werden konnte. Beispiel:
|
||||
|
||||
```
|
||||
In autoload_real.php line 43:
|
||||
require(/web/rc/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory
|
||||
```
|
||||
|
||||
Wenn Sie eine Rechtschreibprüfung benötigen, erstellen Sie eine Datei `data/hooks/phpfpm/aspell.sh` mit folgendem Inhalt und geben Sie dann `chmod +x data/hooks/phpfpm/aspell.sh` ein. Dadurch wird eine lokale Rechtschreibprüfung installiert. Beachten Sie, dass die meisten modernen Webbrowser eine eingebaute Rechtschreibprüfung haben, so dass Sie diese vielleicht nicht benötigen.
|
||||
Leider treten diese Fehler relativ häufig auf, sie lassen sich jedoch leicht beheben indem der Autoloader aktualisiert
|
||||
wird und das fehlgeschlagene Kommando im Anschluss erneut ausgefĂĽhrt wird:
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer dump-autoload -o
|
||||
# Nun das fehlgeschlagene Kommando erneut ausfĂĽhren
|
||||
```
|
||||
|
||||
### Vorbereitung
|
||||
|
||||
Zunächst laden wir `mailcow.conf` um Zugriff auf die mailcow-Einstellungen innerhalb der nachfolgenden Kommandos zu
|
||||
erhalten.
|
||||
|
||||
```bash
|
||||
source mailcow.conf
|
||||
```
|
||||
|
||||
Laden Sie Roundcube 1.6.x (prĂĽfen Sie das aktuellste Release und passen Sie die URL entsprechend an) in das web
|
||||
Verzeichnis herunter und entpacken Sie es (hier `rc/`):
|
||||
|
||||
```bash
|
||||
mkdir -m 755 data/web/rc
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar -xvz --no-same-owner -C data/web/rc --strip-components=1 -f -
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown www-data:www-data /web/rc/logs /web/rc/temp
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown root:www-data /web/rc/config
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chmod 750 /web/rc/logs /web/rc/temp /web/rc/config
|
||||
```
|
||||
|
||||
### Optional: RechtschreibprĂĽfung
|
||||
Wenn Sie eine Rechtschreibprüfung benötigen, erstellen Sie eine Datei `data/hooks/phpfpm/aspell.sh` mit folgendem Inhalt
|
||||
und geben Sie dann `chmod +x data/hooks/phpfpm/aspell.sh` ein. Dadurch wird eine lokale RechtschreibprĂĽfung installiert.
|
||||
Beachten Sie, dass die meisten modernen Webbrowser eine eingebaute RechtschreibprĂĽfung haben, so dass Sie diese
|
||||
vielleicht nicht benötigen.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
apk update
|
||||
apk add aspell-de # oder jede andere Sprache
|
||||
```
|
||||
|
||||
### Installation des MIME-Typ-Verzeichnisses
|
||||
Laden Sie die `mime.types` Datei herunter, da diese nicht im `php-fpm`-Container enthalten ist.
|
||||
|
||||
```bash
|
||||
wget -O data/web/rc/config/mime.types http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
||||
```
|
||||
|
||||
### Anlegen der Roundcube-Datenbank
|
||||
Erstellen Sie eine Datenbank fĂĽr Roundcube im mailcow mysql Container. Dies erstellt einen neuen `roundcube`
|
||||
Datenbank-Benutzer mit einem Zufallspasswort, welches in die Shell ausgegeben wird und in einer Shell-Variable fĂĽr die
|
||||
Verwendung durch die nachfolgenden Kommandos gespeichert wird. Beachten Sie, dass Sie die `DBROUNDCUBE`-Shell-Variable
|
||||
manuell auf das ausgegebene Passwort setzen müssen, falls sie den Installationsprozess unterbrechen und später in einer
|
||||
neuen Shell fortsetzen sollten.
|
||||
|
||||
```bash
|
||||
DBROUNDCUBE=$(LC_ALL=C </dev/urandom tr -dc A-Za-z0-9 2> /dev/null | head -c 28)
|
||||
echo Das Datenbank-Password fĂĽr den Benutzer roundcube lautet $DBROUNDCUBE
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE DATABASE roundcubemail CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE USER 'roundcube'@'%' IDENTIFIED BY '${DBROUNDCUBE}';"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'%';"
|
||||
```
|
||||
|
||||
### Roundcube-Konfigurationsdatei
|
||||
|
||||
Erstellen Sie eine Datei `data/web/rc/config/config.inc.php` mit dem folgenden Inhalt.
|
||||
- **Ă„ndern Sie den Parameter `des_key` auf einen Zufallswert.** Er wird verwendet, um Ihr IMAP-Passwort vorĂĽbergehend zu speichern.
|
||||
- Der `db_prefix` ist optional, wird aber empfohlen.
|
||||
- Wenn Sie die RechtschreibprĂĽfung im obigen Schritt nicht installiert haben, entfernen Sie den Parameter `spellcheck_engine` und ersetzen ihn durch `$config['enable_spellcheck'] = false;`.
|
||||
```php
|
||||
- Die `des_key`-Einstellung wird auf einen Zufallswert gesetzt. Sie wird u. a. zur VerschlĂĽsselung vorĂĽbergehend
|
||||
gespeicherter IMAP-Passwörter verwendet.
|
||||
- Die Liste der Plugins kann nach Belieben angepasst werden. Die folgende Liste enthält eine Liste von
|
||||
Standard-Plugins, welche ich als allgemein nĂĽtzlich empfinde und die gut mit mailcow zusammenspielen:
|
||||
- Das archive-Plugin fügt einen Archiv-Button hinzu, der ausgewählte E-Mails in ein konfigurierbares
|
||||
Archiv-Verzeichnis verschiebt.
|
||||
- Das managesieve-Plugin bietet eine benutzerfreundliche Oberfläche zur Verwaltung serverseitiger E-Mail-Filter und
|
||||
Abwesenheits-Benachrichtigungen.
|
||||
- Das acl-Plugin ermöglicht die Verwaltung von Zugriffskontroll-Listen auf IMAP-Verzeichnissen, mit der Möglichkeit
|
||||
IMAP-Verzeichnisse mit anderen Benutzern zu teilen.
|
||||
- Das markasjunk-Plugin fügt Buttons hinzu, um ausgewählte E-Mails als Spam (oder E-Mails im Junk-Verzeichnis nicht
|
||||
als Spam) zu markieren und diese in das Junk-Verzeichnis (oder zurĂĽck in den Posteingang) zu verschieben. Die in
|
||||
mailcow enthaltenen Sieve-Filter lösen automatisch die zugehörige Lern-Operation in rspamd aus, so dass keine
|
||||
weitere Konfiguration des Plugins erforderlich ist.
|
||||
- Das zipdownload-Plugin erlaubt es, mehrere E-Mail-Anhänge oder E-Mails als ZIP-Archiv herunterzuladen.
|
||||
- Wenn Sie die RechtschreibprĂĽfung im obigen Schritt nicht installiert haben, entfernen Sie den Parameter
|
||||
`spellcheck_engine`.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/config/config.inc.php
|
||||
<?php
|
||||
error_reporting(0);
|
||||
if (!file_exists('/tmp/mime.types')) {
|
||||
file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
|
||||
\$config['db_dsnw'] = 'mysql://roundcube:${DBROUNDCUBE}@mysql/roundcubemail';
|
||||
\$config['imap_host'] = 'dovecot:143';
|
||||
\$config['smtp_host'] = 'postfix:588';
|
||||
\$config['smtp_user'] = '%u';
|
||||
\$config['smtp_pass'] = '%p';
|
||||
\$config['support_url'] = '';
|
||||
\$config['product_name'] = 'Roundcube Webmail';
|
||||
\$config['cipher_method'] = 'chacha20-poly1305';
|
||||
\$config['des_key'] = '$(LC_ALL=C </dev/urandom tr -dc "A-Za-z0-9 !#$%&()*+,-./:;<=>?@[\\]^_{|}~" 2> /dev/null | head -c 32)';
|
||||
\$config['plugins'] = [
|
||||
'archive',
|
||||
'managesieve',
|
||||
'acl',
|
||||
'markasjunk',
|
||||
'zipdownload',
|
||||
];
|
||||
\$config['spellcheck_engine'] = 'aspell';
|
||||
\$config['mime_types'] = '/web/rc/config/mime.types';
|
||||
\$config['enable_installer'] = true;
|
||||
|
||||
\$config['managesieve_host'] = 'dovecot:4190';
|
||||
// Enables separate management interface for vacation responses (out-of-office)
|
||||
// 0 - no separate section (default); 1 - add Vacation section; 2 - add Vacation section, but hide Filters section
|
||||
\$config['managesieve_vacation'] = 1;
|
||||
EOCONFIG
|
||||
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown root:www-data /web/rc/config/config.inc.php
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chmod 640 /web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Initialisierung der Datenbank
|
||||
Richten Sie Ihren Browser auf `https://myserver/rc/installer`. PrĂĽfen Sie, dass die Webseite in keinem der Schritte "NOT
|
||||
OK"-Testergebnisse zeigt. Einige "NOT AVAILABLE"-Testergebnisse sind bzgl. der verschiedenen Datenbank-Erweiterungen
|
||||
erwartet, von denen nur MySQL benötigt wird.
|
||||
|
||||
Initialisieren Sie die Datenbank und verlassen Sie das Installationsprogramm. Es ist nicht notwendig, die
|
||||
Konfigurationsdatei mit der heruntergeladenen Datei zu aktualisieren, sofern Sie keine Ă„nderungen an den Einstellungen
|
||||
innerhalb des Installationsprogramms durchgeführt habe, die Sie übernehmen möchten.
|
||||
|
||||
### Webserver-Konfiguration
|
||||
|
||||
Das Roundcube-Verzeichnis enthält einige Inhalte, die nicht an Web-Nutzer ausgeliefert werden sollen. Wir erstellen
|
||||
daher eine Konfigurations-Ergänzung für nginx, um nur die öffentlichen Teile von Roundcube im Web zu exponieren:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location /rc/ {
|
||||
alias /web/rc/public_html/;
|
||||
}
|
||||
$config = array();
|
||||
$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
|
||||
$config['imap_host'] = 'tls://dovecot:143';
|
||||
$config['smtp_host'] = 'tls://postfix:587';
|
||||
$config['smtp_user'] = '%u';
|
||||
$config['smtp_pass'] = '%p';
|
||||
$config['support_url'] = '';
|
||||
$config['product_name'] = 'Roundcube Webmail';
|
||||
$config['des_key'] = 'yourrandomstring_changeme';
|
||||
$config['log_dir'] = '/dev/null';
|
||||
$config['temp_dir'] = '/tmp';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Deaktivieren und entfernen des Installationsprogramms
|
||||
|
||||
Löschen Sie das Verzeichnis `data/web/rc/installer` nach einer erfolgreichen Installation, und setzen Sie die
|
||||
`enable_installer`-Option in `data/web/rc/config/config.inc.php` auf `false`:
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc/installer
|
||||
sed -i -e "s/\(\$config\['enable_installer'\].* = \)true/\1false/" data/web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Aktualisierung der Roundcube-Abhängigkeiten
|
||||
|
||||
Dieser Schritt ist nicht unbedingt notwendig, aber zumindest zum Zeitpunkt der Erstellung dieser Anweisungen enthielten
|
||||
die mit Roundcube ausgelieferten Abhängigkeiten Versionen mit Sicherheitslücken, daher könnte es eine gute Idee sein,
|
||||
die Abhängigkeiten auf die neusten Versionen zu aktualisieren. Aus demselben Grund sollte composer update hin und wieder
|
||||
ausgefĂĽhrt werden.
|
||||
|
||||
```bash
|
||||
cp -n data/web/rc/composer.json-dist data/web/rc/composer.json
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer update --no-dev -o
|
||||
```
|
||||
|
||||
Sie können außerdem `composer audit` verwenden, um bekannte Sicherheitslücken in den installierten composer-Paketen
|
||||
anzuzeigen.
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer audit
|
||||
```
|
||||
|
||||
### Ermöglichen der Klartext-Authentifizierung für den php-fpm-Container ohne die Verwendung von TLS
|
||||
|
||||
Wir mĂĽssen die Verwendung von Klartext-Authentifizierung ĂĽber nicht verschlĂĽsselte Verbindungen (innerhalb der
|
||||
Container-Netzwerks) in Dovecot zulassen, was in der Standard-Installation von mailcow nur fĂĽr den SOGo-Container
|
||||
zum gleichen Zweck möglich ist. Danach starten Sie den Dovecot-Container neu, damit die Änderung wirksam wird.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/conf/dovecot/extra.conf
|
||||
remote ${IPV4_NETWORK}.0/24 {
|
||||
disable_plaintext_auth = no
|
||||
}
|
||||
remote ${IPV6_NETWORK} {
|
||||
disable_plaintext_auth = no
|
||||
}
|
||||
EOCONFIG
|
||||
|
||||
docker compose restart dovecot-mailcow
|
||||
```
|
||||
|
||||
### Ofelia-Job für Roundcube-Aufräumtätigkeiten
|
||||
|
||||
Roundcube muss regelmässig die Datenbank von nicht mehr benötigter Information befreien. Wir legen einen Ofelia-Job an,
|
||||
der das Roundcube `cleandb.sh`-Skript regelmässig ausführt.
|
||||
|
||||
Um dies zu tun, fĂĽgen Sie folgendes zu `docker-compose.override.yml` hinzu (falls Sie bereits einige Anpassungen fĂĽr den
|
||||
php-fpm-Container durchgefĂĽhrt haben, fĂĽgen Sie die Label dem bestehenden Abschnitt hinzu):
|
||||
|
||||
```yml
|
||||
version: '2.1'
|
||||
services:
|
||||
php-fpm-mailcow:
|
||||
labels:
|
||||
ofelia.enabled: "true"
|
||||
ofelia.job-exec.roundcube_cleandb.schedule: "@every 168h"
|
||||
ofelia.job-exec.roundcube_cleandb.user: "www-data"
|
||||
ofelia.job-exec.roundcube_cleandb.command: "/bin/bash -c \"[ -f /web/rc/bin/cleandb.sh ] && /web/rc/bin/cleandb.sh\""
|
||||
```
|
||||
|
||||
## Optionale Zusatz-Funktionalitäten
|
||||
|
||||
## Aktivieren der Funktion "Passwort ändern" in Roundcube
|
||||
|
||||
Das Ändern des mailcow Passworts aus der Roundcube-Benutzeroberfläche wird durch das password-Plugin ermöglicht. Wir
|
||||
konfigurieren dieses zur Verwendung der mailcow-API zur Passwort-Aktualisierung, was es zunächst erfordert, die API zu
|
||||
aktivieren und den API-SchlĂĽssel zu ermitteln (Lese-/Schreib-Zugriff notwendig). Die API kann in der
|
||||
mailcow-Administrationsoberfläche aktiviert werden, wo Sie auch den API-Schlüssel finden.
|
||||
|
||||
Ă–ffnen Sie `data/web/rc/config/config.inc.php` und aktivieren Sie das Passwort-Plugin, indem Sie es dem
|
||||
`$config['plugins']`-Array hinzufĂĽgen, zum Beispiel:
|
||||
|
||||
```php
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'managesieve'
|
||||
'managesieve',
|
||||
'acl',
|
||||
'markasjunk',
|
||||
'zipdownload',
|
||||
'password',
|
||||
);
|
||||
$config['spellcheck_engine'] = 'aspell';
|
||||
$config['mime_types'] = '/tmp/mime.types';
|
||||
$config['imap_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
$config['enable_installer'] = true;
|
||||
$config['smtp_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
$config['db_prefix'] = 'mailcow_rc1';
|
||||
```
|
||||
|
||||
Richten Sie Ihren Browser auf `https://myserver/rc/installer` und folgen Sie den Anweisungen.
|
||||
Initialisiere die Datenbank und verlasse das Installationsprogramm.
|
||||
Konfigurieren Sie das password-Plugin (stellen Sie sicher, __\*\*API_KEY\*\*__ auf Ihren mailcow Lese-/Schreib-API-SchlĂĽssel
|
||||
anzupassen):
|
||||
|
||||
**Löschen Sie das Verzeichnis `data/web/rc/installer` nach einer erfolgreichen Installation!**
|
||||
|
||||
## Konfigurieren Sie die ManageSieve-Filterung
|
||||
|
||||
Öffnen Sie `data/web/rc/config/config.inc.php` und ändern Sie die folgenden Parameter (oder fügen Sie sie am Ende der Datei hinzu):
|
||||
```php
|
||||
$config['managesieve_host'] = 'tls://dovecot:4190';
|
||||
$config['managesieve_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
// Aktiviert separate Verwaltungsschnittstelle fĂĽr Urlaubsantworten (auĂźer Haus)
|
||||
// 0 - kein separater Abschnitt (Standard),
|
||||
// 1 - Abschnitt "Urlaub" hinzufĂĽgen,
|
||||
// 2 - Abschnitt "Urlaub" hinzufĂĽgen, aber Abschnitt "Filter" ausblenden
|
||||
$config['managesieve_vacation'] = 1;
|
||||
```
|
||||
|
||||
## Aktivieren Sie die Funktion "Passwort ändern" in Roundcube
|
||||
|
||||
Ă–ffnen Sie `data/web/rc/config/config.inc.php` und aktivieren Sie das Passwort-Plugin:
|
||||
|
||||
```php
|
||||
[...]
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'password',
|
||||
);
|
||||
[...]
|
||||
```
|
||||
|
||||
Ă–ffnen Sie `data/web/rc/plugins/password/password.php`, suchen Sie nach `case 'ssha':` und fĂĽgen Sie oben hinzu:
|
||||
|
||||
```php
|
||||
case 'ssha256':
|
||||
$salt = rcube_utils::random_bytes(8);
|
||||
$crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
|
||||
$prefix = '{SSHA256}';
|
||||
break;
|
||||
```
|
||||
|
||||
Öffnen Sie `data/web/rc/plugins/password/config.inc.php` und ändern Sie die folgenden Parameter (oder fügen Sie sie am Ende der Datei hinzu):
|
||||
|
||||
```php
|
||||
$config['password_driver'] = 'sql';
|
||||
$config['password_algorithm'] = 'ssha256';
|
||||
$config['password_algorithm_prefix'] = '{SSHA256}';
|
||||
$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
|
||||
```
|
||||
|
||||
## CardDAV AdressbĂĽcher in Roundcube einbinden
|
||||
|
||||
Laden Sie die neueste Version von [RCMCardDAV](https://github.com/mstilkerich/rcmcarddav) in das Roundcube Plugin Verzeichnis und entpacken Sie es (hier `rc/plugins`):
|
||||
```bash
|
||||
cd data/web/rc/plugins
|
||||
wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -
|
||||
chown -R root: carddav/
|
||||
cat <<EOCONFIG >data/web/rc/plugins/password/config.inc.php
|
||||
<?php
|
||||
\$config['password_driver'] = 'mailcow';
|
||||
\$config['password_confirm_current'] = true;
|
||||
\$config['password_mailcow_api_host'] = 'http://nginx';
|
||||
\$config['password_mailcow_api_token'] = '**API_KEY**';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
Kopieren Sie die Datei `config.inc.php.dist` nach `config.inc.php` (hier in `rc/plugins/carddav`) und fĂĽgen Sie die folgende Voreinstellung an das Ende der Datei an - vergessen Sie nicht, `mx.example.org` durch Ihren eigenen Hostnamen zu ersetzen:
|
||||
```php
|
||||
$prefs['SOGo'] = array(
|
||||
'name' => 'SOGo',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'url' => 'https://mx.example.org/SOGo/dav/%u/',
|
||||
'carddav_name_only' => true,
|
||||
|
||||
Hinweis: Sollten Sie die mailcow nginx-Konfiguration so angepasst haben, dass http-Anfragen auf https umgeleitet werden
|
||||
(wie z. B. [hier](https://docs.mailcow.email/manual-guides/u_e-80_to_443/) beschrieben), dann wird die direkte
|
||||
Verbindung zum nginx-Container via HTTP nicht funktionieren, da nginx kein im Zertifikat enthaltener Hostname ist. In
|
||||
solchen Fällen setzen Sie `password_mailcow_api_host` stattdessen auf die öffentliche URI:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/plugins/password/config.inc.php
|
||||
<?php
|
||||
\$config['password_driver'] = 'mailcow';
|
||||
\$config['password_confirm_current'] = true;
|
||||
\$config['password_mailcow_api_host'] = 'https://${MAILCOW_HOSTNAME}';
|
||||
\$config['password_mailcow_api_token'] = '**API_KEY**';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
## CardDAV-AdressbĂĽcher in Roundcube einbinden
|
||||
|
||||
Installieren Sie die neuste v5-Version (die untenstehende Konfiguration ist kompatibel zu v5-Releases) mit composer.
|
||||
Antworten Sie `Y`, wenn Sie gefragt werden, ob Sie das Plugin aktivieren möchten.
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer require --update-no-dev -o "roundcube/carddav:~5"
|
||||
```
|
||||
|
||||
Editieren Sie die Datei `data/web/rc/plugins/carddav/config.inc.php` und fĂĽgen Sie folgenden Inhalt hinzu:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/plugins/carddav/config.inc.php
|
||||
<?php
|
||||
\$prefs['_GLOBAL']['pwstore_scheme'] = 'des_key';
|
||||
|
||||
\$prefs['SOGo'] = [
|
||||
'accountname' => 'SOGo',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'discovery_url' => 'http://sogo:20000/SOGo/dav/',
|
||||
'name' => '%N',
|
||||
'use_categories' => true,
|
||||
'active' => true,
|
||||
'readonly' => false,
|
||||
'refresh_time' => '02:00:00',
|
||||
'fixed' => array( 'active', 'name', 'username', 'password', 'refresh_time' ),
|
||||
'hide' => false,
|
||||
);
|
||||
```
|
||||
Bitte beachten Sie, dass dieses Preset nur das Standard-Adressbuch integriert (dasjenige, das den Namen "Persönliches Adressbuch" trägt und nicht gelöscht werden kann). Weitere Adressbücher werden derzeit nicht automatisch erkannt, können aber manuell in den Roundcube-Einstellungen hinzugefügt werden.
|
||||
|
||||
Aktivieren Sie das Plugin, indem Sie `carddav` zu `$config['plugins']` in `rc/config/config.inc.php` hinzufĂĽgen.
|
||||
|
||||
Wenn Sie die Standard-Adressbücher (die in der Roundcube-Datenbank gespeichert sind) entfernen möchten, so dass nur die CardDAV-Adressbücher zugänglich sind, fügen Sie `$config['address_book_type'] = '';` in die Konfigurationsdatei `data/web/rc/config/config.inc.php` ein.
|
||||
|
||||
---
|
||||
|
||||
Optional können Sie Roundcube's Link zu der mailcow Apps Liste hinzufügen.
|
||||
Um dies zu tun, öffnen oder erstellen Sie `data/web/inc/vars.local.inc.php` und fügen Sie den folgenden Code-Block hinzu:
|
||||
|
||||
*HINWEIS: Vergessen Sie nicht, das `<?php` Trennzeichen in der ersten Zeile einzufĂĽgen*
|
||||
|
||||
```php
|
||||
...
|
||||
$MAILCOW_APPS = array(
|
||||
array(
|
||||
'name' => 'SOGo',
|
||||
'link' => '/SOGo/'
|
||||
),
|
||||
array(
|
||||
'name' => 'Roundcube',
|
||||
'link' => '/rc/'
|
||||
)
|
||||
);
|
||||
...
|
||||
'fixed' => ['username', 'password'],
|
||||
];
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
## Aktualisierung von Roundcube
|
||||
RCMCardDAV legt alle AdressbĂĽcher des Benutzers beim Login in Roundcube an, einschlieĂźlich __abonnierten__ AdressbĂĽchern
|
||||
die mit dem Benutzers von anderen Benutzern geteilt werden.
|
||||
|
||||
Ein Upgrade von Roundcube ist recht einfach: Gehen Sie auf die [Github releases](https://github.com/roundcube/roundcubemail/releases) Seite für Roundcube und holen Sie sich den Link für die "complete.tar.gz" Datei für die gewünschte Version. Dann folgen Sie den untenstehenden Befehlen und ändern Sie die URL und den Namen des Roundcube-Ordners, falls nötig.
|
||||
Wenn Sie das Standard-Adressbuch (gespeichert in der Roundcube-Datenbank) entfernen möchten, so dass nur
|
||||
CardDAV-Adressbücher verwendet werden können, fügen Sie der Konfigurationsdatei `data/web/rc/config/config.inc.php` die
|
||||
Option `$config['address_book_type'] = '';` hinzu.
|
||||
|
||||
Hinweis: RCMCardDAV verwendet zusätzliche Datenbank-Tabellen. Nach der Installation (oder Aktualisierung) von RCMCardDAV
|
||||
ist es notwendig, sich in Roundcube neu anzumelden (melden Sie sich vorher ab, wenn Sie bereits eingeloggt sind), da die
|
||||
Erzeugung der Datenbank-Tabellen bzw. Ă„nderungen nur bei der Anmeldung in Roundcube durchgefĂĽhrt werden.
|
||||
|
||||
### Ăśbermittlung der Client-Netzwerkadresse an Dovecot
|
||||
|
||||
Normalerweise sieht der IMAP-Server Dovecot die Netzwerkadresse des php-fpm-Containers wenn Roundcube zu diesem
|
||||
Verbindungen aufbaut. Durch Verwendung einer IMAP-Erweiterung und dem `roundcube-dovecot_client_ip` Roundcube-Plugin ist
|
||||
es möglich, dass Roundcube Dovecot die Client-Netzwerkadresse übermittelt, so dass in den Log-Dateien die
|
||||
Client-Netzwerkadresse erscheint. Dies fĂĽhrt dazu, dass Login-Versuche an Roundcube in den Dovecot-Logs genauso wie
|
||||
direkte Client-Verbindungen zu Dovecot aufgezeichnet werden, und fehlgeschlagene Login-Versuche an Roundcube
|
||||
analog zu fehlgeschlagenen direkten IMAP-Logins durch den netfilter-Container oder andere ggf. verfĂĽgbare Mechanismen
|
||||
zur Behandlung von Bruteforce-Attacken auf den IMAP-Server aufgegriffen werden und z. B. zu einer Blockierung des
|
||||
Clients fĂĽhren.
|
||||
|
||||
Hierzu muss das Roundcube-Plugin installiert werden:
|
||||
|
||||
```bash
|
||||
# Starten Sie eine Bash-Sitzung des mailcow PHP-Containers
|
||||
docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
|
||||
|
||||
# Installieren Sie die erforderliche Upgrade-Abhängigkeit, dann aktualisieren Sie Roundcube auf die gewünschte Version
|
||||
apk add rsync
|
||||
cd /tmp
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
cd roundcubemail-1.6.1
|
||||
bin/installto.sh /web/rc
|
||||
|
||||
# Geben Sie 'Y' ein und drĂĽcken Sie die Eingabetaste, um Ihre Installation von Roundcube zu aktualisieren.
|
||||
# Geben Sie 'N' ein, wenn folgender Dialog erscheint: "Do you want me to fix your local configuration".
|
||||
|
||||
# Sollte im Output eine Notice kommen "NOTICE: Update dependencies by running php composer.phar update --no-dev" sollte an kurzerhand composer.phar downloaden und die updates durchfĂĽhren:
|
||||
cd /web/rc
|
||||
wget https://getcomposer.org/download/2.4.2/composer.phar
|
||||
php composer.phar update --no-dev
|
||||
# Auf die Frage "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " bitte mit y antworten.
|
||||
|
||||
# Entfernen Sie ĂĽbrig gebliebene Dateien
|
||||
cd /tmp
|
||||
rm -rf roundcube*
|
||||
|
||||
# Falls Sie von Version 1.5 auf 1.6 updaten, dann fĂĽhren Sie folgende Befehle aus, um die Konfigurationsdatei anzupassen:`
|
||||
sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer require --update-no-dev -o "takerukoushirou/roundcube-dovecot_client_ip:~1"
|
||||
```
|
||||
|
||||
## Administratoren ohne Passwort in Roundcube einloggen lassen
|
||||
Weiterhin mĂĽssen wir Dovecot konfigurieren, so dass der php-fpm-Container als Teil eines vertrauenswĂĽrdigen Netzwerks
|
||||
betrachtet wird und somit die Client-Netzwerkadresse innerhalb einer IMAP-Sitzung ĂĽberschreiben darf. Beachten Sie, dass
|
||||
dies auch die Klartext-Authentifizierung fĂĽr die aufgefĂĽhrten Netzwerkbereiche erlaubt, so dass das explizite
|
||||
Ăśberschreiben von `disable_plaintext_auth` weiter oben in diesem Fall nicht notwendig ist.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/conf/dovecot/extra.conf
|
||||
login_trusted_networks = ${IPV4_NETWORK}.0/24 ${IPV6_NETWORK}
|
||||
EOCONFIG
|
||||
|
||||
docker compose restart dovecot-mailcow
|
||||
```
|
||||
|
||||
### Roundcube zur mailcow Apps-Liste hinzufĂĽgen
|
||||
|
||||
Optional können Sie Roundcubes Link zu der mailcow Apps Liste hinzufügen.
|
||||
Um dies zu tun, öffnen oder erstellen Sie `data/web/inc/vars.local.inc.php` und stellen Sie sicher, dass es den
|
||||
folgenden Konfigurationsblock beinhaltet:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$MAILCOW_APPS = [
|
||||
[
|
||||
'name' => 'SOGo',
|
||||
'link' => '/SOGo/'
|
||||
],
|
||||
[
|
||||
'name' => 'Roundcube',
|
||||
'link' => '/rc/'
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
### Administratoren ohne Passwort in Roundcube einloggen lassen
|
||||
|
||||
Installieren Sie zunächst das Plugin [dovecot_impersonate](https://github.com/corbosman/dovecot_impersonate/) und fügen Sie Roundcube als App hinzu (siehe oben).
|
||||
|
||||
|
@ -223,7 +392,6 @@ services:
|
|||
- ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=${ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE:-n}
|
||||
```
|
||||
|
||||
|
||||
Bearbeiten Sie `data/web/js/site/mailbox.js` und den folgenden Code nach [`if (ALLOW_ADMIN_EMAIL_LOGIN) { ... }`](https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/js/site/mailbox.js#L485-L487)
|
||||
|
||||
```js
|
||||
|
@ -238,7 +406,7 @@ Bearbeiten Sie `data/web/mailbox.php` und fĂĽgen Sie diese Zeile zum Array [`$te
|
|||
'allow_admin_email_login_roundcube' => (preg_match("/^(yes|y)+$/i", $_ENV["ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE"])) ? 'true' : 'false',
|
||||
```
|
||||
|
||||
Bearbeiten Sie `data/web/templates/mailbox.twig` und fĂĽgen Sie diesen Code am Ende des [javascript-Abschnitts](https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/templates/mailbox.twig#L49-L57) ein:
|
||||
Bearbeiten Sie `data/web/templates/mailbox.twig` und fĂĽgen Sie diesen Code am Ende des [Javascript-Abschnitts](https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/templates/mailbox.twig#L49-L57) ein:
|
||||
|
||||
```js
|
||||
var ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE = {{ allow_admin_email_login_roundcube }};
|
||||
|
@ -249,6 +417,7 @@ Kopieren Sie den Inhalt der folgenden Dateien aus diesem [Snippet](https://gitla
|
|||
* `data/web/inc/lib/RoundcubeAutoLogin.php`
|
||||
* `data/web/rc-auth.php`
|
||||
|
||||
## Abschluss der Installation
|
||||
Starten Sie schlieĂźlich mailcow neu
|
||||
|
||||
=== "docker compose (Plugin)"
|
||||
|
@ -261,10 +430,233 @@ Starten Sie schlieĂźlich mailcow neu
|
|||
=== "docker-compose (Standalone)"
|
||||
|
||||
``` bash
|
||||
docker-compose down
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
|
||||
## Aktualisierung von Roundcube
|
||||
|
||||
Ein Upgrade von Roundcube ist recht einfach: Gehen Sie auf die
|
||||
[GitHub releases](https://github.com/roundcube/roundcubemail/releases) Seite fĂĽr Roundcube und holen Sie sich den Link
|
||||
für die "complete.tar.gz" Datei für die gewünschte Version. Dann folgen Sie den untenstehenden Befehlen und ändern Sie
|
||||
die URL und den Namen des Roundcube-Ordners, falls nötig.
|
||||
|
||||
```bash
|
||||
# Starten Sie eine Bash-Sitzung des mailcow PHP-Containers
|
||||
docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
|
||||
|
||||
# Installieren Sie die erforderliche Upgrade-Abhängigkeit, dann aktualisieren Sie Roundcube auf die gewünschte Version
|
||||
apk add rsync
|
||||
cd /tmp
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
cd roundcubemail-1.6.1
|
||||
bin/installto.sh /web/rc
|
||||
|
||||
# Geben Sie 'Y' ein und drĂĽcken Sie die Eingabetaste, um Ihre Installation von Roundcube zu aktualisieren.
|
||||
# Geben Sie 'N' ein, wenn folgender Dialog erscheint: "Do you want me to fix your local configuration".
|
||||
|
||||
# Sollte im Output eine Notice kommen "NOTICE: Update dependencies by running php composer.phar update --no-dev" fĂĽhren
|
||||
Sie composer aus:
|
||||
cd /web/rc
|
||||
composer update --no-dev -o
|
||||
# Auf die Frage "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " bitte mit y antworten.
|
||||
|
||||
# Entfernen Sie ĂĽbrig gebliebene Dateien
|
||||
rm -rf /tmp/roundcube*
|
||||
|
||||
# Falls Sie von Version 1.5 auf 1.6 updaten, dann fĂĽhren Sie folgende Befehle aus, um die Konfigurationsdatei anzupassen:`
|
||||
sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'dovecot:143'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'postfix:588'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'dovecot:4190'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Aktualisierung von composer-Plugins
|
||||
|
||||
Um Roundcube-Plugins und -Abhängigkeiten zu aktualisieren, die mit composer installiert wurden (z. B.
|
||||
RCMCardDAV-Plugin), fĂĽhren Sie einfach composer im Container aus:
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer update --no-dev -o
|
||||
```
|
||||
|
||||
### Aktualisierung des MIME-Typ-Verzeichnisses
|
||||
|
||||
Um das MIME-Typ-Verzeichnis zu aktualisieren, laden Sie dieses erneut mit dem Kommando aus den
|
||||
[Installations-Anweisungen](#Installation-des-MIME-Typ-Verzeichnisses) herunter.
|
||||
|
||||
## Deinstallation von Roundcube
|
||||
|
||||
FĂĽr die Deinstallation wird ebenfalls angenommen, dass die Kommandos im mailcow-Installationsverzeichnis ausgefĂĽhrt
|
||||
werden und dass `mailcow.conf` in die Shell geladen wurde, siehe Abschnitt [Vorbereitung](#Vorbereitung) oben.
|
||||
|
||||
### Entfernen des Web-Verzeichnisses
|
||||
|
||||
Dies entfernt die Roundcube-Installation mit allen Plugins und Abhängigkeiten die Sie ggf. installiert haben,
|
||||
einschlieĂźlich solcher, die mit composer installiert wurden.
|
||||
|
||||
Hinweis: Dies entfernt auch alle angepassten Konfigurationen die Sie ggf. in Roundcube durchgefĂĽhrt haben. Sollten Sie
|
||||
diese erhalten wollen, verschieben Sie das Verzeichnis an einen anderen Ort statt es zu entfernen.
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc
|
||||
```
|
||||
|
||||
### Entfernen der Datenbank
|
||||
|
||||
Hinweis: Dies löscht alle Daten, die Roundcube abgespeichert hat. Wenn Sie diese erhalten möchten, können Sie
|
||||
`mysqldump` ausführen, bevor Sie die Datenbank löschen, oder die Datenbank einfach nicht löschen.
|
||||
|
||||
```bash
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "DROP USER 'roundcube'@'%';"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "DROP DATABASE roundcubemail;"
|
||||
```
|
||||
|
||||
### Entfernen der Konfigurationsanpassungen fĂĽr mailcow
|
||||
|
||||
Um die Dateien zu ermitteln, lesen Sie bitte die Installationsanweisungen und machen Sie die Schritte, die Sie dort
|
||||
zuvor durchgeführt haben, rückgängig.
|
||||
|
||||
## Migration von einer älteren mailcow-Roundcube-Installation
|
||||
|
||||
Ältere Versionen dieser Anleitung verwendeten die mailcow-Datenbank auch für Roundcube, mit einem konfigurierten Präfix
|
||||
`mailcow_rc1` fĂĽr alle Roundcube-Tabellen.
|
||||
|
||||
Zur Migration wird ebenfalls angenommen, dass alle Kommandos im mailcow-Installationsverzeichnis ausgefĂĽhrt werden und
|
||||
`mailcow.conf` in die Shell geladen wurde, siehe [Vorbereitung](#Vorbereitung) oben. Dies Kommandos der verschiedenen
|
||||
Schritte bauen aufeinander auf und mĂĽssen innerhalb derselben Shell ausgefĂĽhrt werden. Insbesondere setzen einige
|
||||
Schritte Shell-Variablen (besonders die `DBROUNDCUBE`-Variable mit dem Datenbank-Passwort fĂĽr den
|
||||
roundcube-Datenbankbenutzer), die in späteren Schritten verwendet werden.
|
||||
|
||||
### Anlegen eines neuen roundcube-Datenbankbenutzers und der Datenbank
|
||||
|
||||
Folgen Sie den [Anweisungen oben](#Anlegen-der-Roundcube-Datenbank) um den roundcube-Datenbankbenutzer und die getrennte
|
||||
Datenbank anzulegen.
|
||||
|
||||
### Migration der Roundcube-Daten aus der mailcow-Datenbank
|
||||
|
||||
Bevor wir mit der Migration starten, deaktivieren wir Roundcube, um weitere Ă„nderungen an dessen Datenbank-Tabellen zu
|
||||
vermeiden.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location ^~ /rc/ {
|
||||
return 503;
|
||||
}
|
||||
EOCONFIG
|
||||
docker compose exec nginx-mailcow nginx -s reload
|
||||
```
|
||||
|
||||
Nun kopieren wir die Roundcube-Daten in die neue Datenbank. Wir entfernen das Datenbank-Tabellen-Präfix in diesem
|
||||
Schritt, welches Sie ggf. anpassen müssen, wenn Sie ein anderes Präfix als `mailcow_rc1` verwendet haben. Es ist auch
|
||||
möglich, das Präfix beizubehalten (in diesem Fall behalten Sie auch die zugehörige Roundcube-Einstellung `db_prefix`
|
||||
bei).
|
||||
|
||||
```bash
|
||||
RCTABLES=$(docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -sN mailcow -e "show tables like 'mailcow_rc1%';" | tr '\n\r' ' ')
|
||||
docker exec $(docker ps -f name=mysql-mailcow -q) /bin/bash -c "mysqldump -uroot -p${DBROOT} mailcow $RCTABLES | sed 's/mailcow_rc1//' | mysql -uroot -p${DBROOT} roundcubemail"
|
||||
```
|
||||
|
||||
### Aktualisierung der Roundcube-Konfiguration
|
||||
|
||||
FĂĽhren Sie folgende Kommandos aus, um die nicht mehr notwendige `db_prefix` Option zu entfernen. Wir aktivieren auĂźerdem
|
||||
das Logging in Roundcube, indem wir die Einstellungen `log_dir` und `temp_dir` entfernen, welche Teil der alten
|
||||
Anweisungen waren.
|
||||
|
||||
```bash
|
||||
sed -i "/\$config\['db_prefix'\].*$/d" data/web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['log_dir'\].*$/d" data/web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['temp_dir'\].*$/d" data/web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
Wir müssen die nginx-Konfiguration anpassen, so dass nicht-öffentliche Verzeichnisse von Roundcube nicht exponiert
|
||||
werden, insbesondere die Verzeichnisse, welche Log-Dateien und temporäre Dateien enthalten:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location /rc/ {
|
||||
alias /web/rc/public_html/;
|
||||
}
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
Wir können auch die `cipher_method`-Einstellung auf eine sicherere Einstellung ändern, aber beachten Sie, dass mit der
|
||||
alten Methode verschlüsselte Daten danach nicht mehr entschlüsselt werden können. Dies betrifft insbesondere
|
||||
CardDAV-Passwörter, sofern Sie RCMCardDAV verwenden und Ihre Nutzer benutzerdefinierte Adressbücher hinzugefügt haben
|
||||
(die Admin-Voreinstellungen für die SOGo-Adressbücher werden automatisch beim nächsten Login für den jeweiligen Nutzer
|
||||
korrigiert). Wenn Sie die `cipher_method` ändern wollen, führen Sie folgendes Kommando aus:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/web/rc/config/config.inc.php
|
||||
\$config['cipher_method'] = 'chacha20-poly1305';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Umstellung des RCMCardDAV-Plugins auf die Installation mittels composer
|
||||
|
||||
Dieser Schritt ist optional, aber er gleicht Ihre Installation an die aktuelle Fassung der Anweisungen an und ermöglicht
|
||||
die Aktualisierung von RCMCardDAV mittels composer. Dies wird einfach dadurch erreicht, dass das carddav-Plugin aus dem
|
||||
Installationsverzeichnis gelöscht und entsprechend der [Anweisungen oben](#CardDAV-Adressbücher-in-Roundcube-einbinden)
|
||||
installiert wird, einschlieĂźlich der Erstellung einer neuen RCMCardDAV v5-Konfiguration. Falls Sie das RCMCardDAV
|
||||
angepasst haben, sollten Sie dieses sichern, bevor Sie das Plugin löschen, und Ihre Anpassungen später in die neue
|
||||
Konfigurationsdatei ĂĽbernehmen.
|
||||
|
||||
Um das carddav-Plugin zu löschen, führen Sie folgendes Kommando aus, danach befolgen Sie zur Neuinstallation die
|
||||
[Anweisungen oben](#CardDAV-AdressbĂĽcher-in-Roundcube-einbinden):
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc/plugins/carddav
|
||||
```
|
||||
|
||||
### Umschalten von Roundcube auf die neue Datenbank
|
||||
|
||||
Zunächst passen wir die Roundcube-Konfiguration an, so dass die neue Datenbank verwendet wird.
|
||||
```bash
|
||||
sed -i "/\$config\['db_dsnw'\].*$/d" data/web/rc/config/config.inc.php
|
||||
cat <<EOCONFIG >>data/web/rc/config/config.inc.php
|
||||
\$config['db_dsnw'] = 'mysql://roundcube:${DBROUNDCUBE}@mysql/roundcubemail';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Roundcube Web-Zugriff reaktivieren
|
||||
|
||||
FĂĽhren Sie chown und chmod auf den sensitiven Roundcube-Verzeichnissen, welche in [Vorbereitung](#Vorbereitung)
|
||||
aufgefĂĽhrt sind aus, um sicherzustellen, dass der nginx-Webserver nicht auf Dateien zugreifen darf, die er nicht
|
||||
ausliefern soll.
|
||||
|
||||
Dann reaktivieren Sie den Web-Zugriff für Roundcube, indem Sie die temporäre Roundcube-Konfigurations-Erweiterung für
|
||||
nginx durch die [oben](#Webserver-Konfiguration) beschriebene ersetzen, und laden anschlieĂźend die nginx-Konfiguration
|
||||
neu:
|
||||
|
||||
```bash
|
||||
docker compose exec nginx-mailcow nginx -s reload
|
||||
```
|
||||
|
||||
### Andere Anpassungen
|
||||
|
||||
Sie mĂĽssen auch die Konfiguration des Roundcube password-Plugins entsprechend dieser Anweisungen anpassen, sofern Sie
|
||||
diese Funktionalität aktiviert haben, da die alten Anweisungen das Passwort direkt in der mailcow-Datenbank änderten,
|
||||
wohingegen diese Fassung der Anweisungen die mailcow-API zur Passwort-Ă„nderung verwendet.
|
||||
|
||||
Bezüglich weiterer Anpassungen und Neuerungen (z. B. roundcube-dovecot\_client\_ip Plugin) können Sie die aktuellen
|
||||
Anweisungen durchgehen und Ihre Konfiguration entsprechend anpassen bzw. die genannten Installationsschritte fĂĽr neue
|
||||
Funktionalitäten ausführen.
|
||||
|
||||
Insbesondere beachten Sie folgende Abschnitte:
|
||||
|
||||
- [Ofelia-Job für Roundcube-Aufräumtätigkeiten](#Ofelia-Job-für-Roundcube-Aufräumtätigkeiten)
|
||||
- [Ermöglichen der Klartext-Authentifizierung für den php-fpm-Container ohne die Verwendung von TLS](#Ermöglichen-der-Klartext-Authentifizierung-für-den-php-fpm-Container-ohne-die-Verwendung-von-TLS)
|
||||
- [Ăśbermittlung der Client-Netzwerkadresse an Dovecot](#Ăśbermittlung-der-Client-Netzwerkadresse-an-Dovecot)
|
||||
|
||||
### Entfernen der Roundcube-Tabellen aus der mailcow-Datenbank
|
||||
|
||||
Nachdem Sie sichergestellt haben, dass die Migration erfolgreich durchgefĂĽhrt wurde und Roundcube mit der getrennten
|
||||
Datenbank funktioniert, können Sie die Roundcube-Tabellen aus der mailcow-Datenbank mit dem folgenden Kommando
|
||||
entfernen:
|
||||
|
||||
```bash
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -sN mailcow -e "SET SESSION foreign_key_checks = 0; DROP TABLE IF EXISTS $(echo $RCTABLES | sed -e 's/ \+/,/g');"
|
||||
```
|
||||
|
|
705
docs/third_party/roundcube/third_party-roundcube.en.md
gevendort
705
docs/third_party/roundcube/third_party-roundcube.en.md
gevendort
|
@ -1,207 +1,352 @@
|
|||
## Installing Roundcube
|
||||
|
||||
Download Roundcube 1.6.x to the web htdocs directory and extract it (here `rc/`):
|
||||
```bash
|
||||
# Check for a newer release!
|
||||
cd data/web
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
Unless otherwise stated, all of the given commands are expected to be executed in the mailcow installation directory,
|
||||
i.e., the directory containing `mailcow.conf` etc. Please do not blindly execute the commands but understand what they
|
||||
do. None of the commands is supposed to produce an error, so if you encounter an error, fix it if necessary before
|
||||
continuing with the subsequent commands.
|
||||
|
||||
# Change folder name
|
||||
mv roundcubemail-1.6.1 rc
|
||||
### Note on composer usage
|
||||
|
||||
# Change permissions
|
||||
chown -R root: rc/
|
||||
This guide uses composer to update roundcube dependencies or install / update roundcube plugins.
|
||||
|
||||
The roundcube-plugin-installer composer plugin has a [design issue](https://github.com/roundcube/plugin-installer/issues/38)
|
||||
that can lead to composer errors when packages are upgraded or uninstalled in the composer execution.
|
||||
|
||||
The error message will typically tell you that a `require` in `autoload_real.php` failed because a file could not be
|
||||
opened. Example:
|
||||
|
||||
```
|
||||
In autoload_real.php line 43:
|
||||
require(/web/rc/vendor/composer/../guzzlehttp/promises/src/functions_include.php): Failed to open stream: No such file or directory
|
||||
```
|
||||
|
||||
If you need spell check features, create a file `data/hooks/phpfpm/aspell.sh` with the following content, then `chmod +x data/hooks/phpfpm/aspell.sh`. This installs a local spell check engine. Note, most modern web browsers have built in spell check, so you may not want/need this.
|
||||
Unfortunately these occur quite frequently, but they can be worked around by updating the autoloader and re-running the
|
||||
failed command:
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer dump-autoload -o
|
||||
# Now execute the command that failed again
|
||||
```
|
||||
|
||||
### Preparation
|
||||
First we load `mailcow.conf` so we have access to the mailcow configuration settings for the following commands.
|
||||
|
||||
```bash
|
||||
source mailcow.conf
|
||||
```
|
||||
|
||||
Download Roundcube 1.6.x (check for latest release and adapt URL) to the web directory and extract it (here `rc/`):
|
||||
|
||||
```bash
|
||||
mkdir -m 755 data/web/rc
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar -xvz --no-same-owner -C data/web/rc --strip-components=1 -f -
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown www-data:www-data /web/rc/logs /web/rc/temp
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown root:www-data /web/rc/config
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chmod 750 /web/rc/logs /web/rc/temp /web/rc/config
|
||||
```
|
||||
|
||||
### Optional: Spellchecking
|
||||
If you need spell check features, create a file `data/hooks/phpfpm/aspell.sh` with the following content, then
|
||||
`chmod +x data/hooks/phpfpm/aspell.sh`. This installs a local spell check engine. Note, most modern web browsers have
|
||||
built in spell check, so you may not want/need this.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
apk update
|
||||
apk add aspell-en # or any other language
|
||||
```
|
||||
|
||||
### Install mime type mappings
|
||||
Download the `mime.types` file as it is not included in the php-fpm container.
|
||||
|
||||
```bash
|
||||
wget -O data/web/rc/config/mime.types http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
|
||||
```
|
||||
|
||||
### Create roundcube database
|
||||
Create a database for roundcube in the mailcow MySQL container. This creates a new `roundcube` database user
|
||||
with a random password, which will be echoed to the shell and stored in a shell variable for use by later
|
||||
commands. Note that when you interrupt the process and continue in a new shell, you must set the `DBROUNDCUBE`
|
||||
shell variable manually to the password output by the following commands.
|
||||
|
||||
```bash
|
||||
DBROUNDCUBE=$(LC_ALL=C </dev/urandom tr -dc A-Za-z0-9 2> /dev/null | head -c 28)
|
||||
echo Database password for user roundcube is $DBROUNDCUBE
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE DATABASE roundcubemail CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "CREATE USER 'roundcube'@'%' IDENTIFIED BY '${DBROUNDCUBE}';"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'%';"
|
||||
```
|
||||
|
||||
### Roundcube configuration
|
||||
Create a file `data/web/rc/config/config.inc.php` with the following content.
|
||||
- **Change the `des_key` parameter to a random value.** It is used to temporarily store your IMAP password.
|
||||
- The `db_prefix` is optional but recommended.
|
||||
- If you didn't install spell check in the above step, remove `spellcheck_engine` parameter and replace it with `$config['enable_spellcheck'] = false;`.
|
||||
```php
|
||||
- The `des_key` option is set to a random value. It is used to temporarily store your IMAP password.
|
||||
- The plugins list can be adapted to your preference. I added a set of standard plugins that I consider of common
|
||||
usefulness and which work well together with mailcow:
|
||||
- The archive plugin adds an archive button that moves selected messages to a user-configurable archive folder.
|
||||
- The managesieve plugin provides a user-friendly interface to manage server-side mail filtering and vacation / out
|
||||
of office notification.
|
||||
- The acl plugin allows to manage access control lists on IMAP folders, including the ability to share IMAP folders
|
||||
to other users.
|
||||
- The markasjunk plugin adds buttons to mark selected messages as junk (or messages in the junk folder not as junk)
|
||||
and moves them to the junk folder or back to the inbox. The sieve filters included with mailcow will take care
|
||||
that action triggers a learn as spam/ham action in rspamd, so no further configuration of the plugin is needed.
|
||||
- The zipdownload plugin allows to download multiple message attachments or messages as a zip file.
|
||||
- If you didn't install spell check in the above step, remove `spellcheck_engine` parameter.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/config/config.inc.php
|
||||
<?php
|
||||
error_reporting(0);
|
||||
if (!file_exists('/tmp/mime.types')) {
|
||||
file_put_contents("/tmp/mime.types", fopen("http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types", 'r'));
|
||||
\$config['db_dsnw'] = 'mysql://roundcube:${DBROUNDCUBE}@mysql/roundcubemail';
|
||||
\$config['imap_host'] = 'dovecot:143';
|
||||
\$config['smtp_host'] = 'postfix:588';
|
||||
\$config['smtp_user'] = '%u';
|
||||
\$config['smtp_pass'] = '%p';
|
||||
\$config['support_url'] = '';
|
||||
\$config['product_name'] = 'Roundcube Webmail';
|
||||
\$config['cipher_method'] = 'chacha20-poly1305';
|
||||
\$config['des_key'] = '$(LC_ALL=C </dev/urandom tr -dc "A-Za-z0-9 !#$%&()*+,-./:;<=>?@[\\]^_{|}~" 2> /dev/null | head -c 32)';
|
||||
\$config['plugins'] = [
|
||||
'archive',
|
||||
'managesieve',
|
||||
'acl',
|
||||
'markasjunk',
|
||||
'zipdownload',
|
||||
];
|
||||
\$config['spellcheck_engine'] = 'aspell';
|
||||
\$config['mime_types'] = '/web/rc/config/mime.types';
|
||||
\$config['enable_installer'] = true;
|
||||
|
||||
\$config['managesieve_host'] = 'dovecot:4190';
|
||||
// Enables separate management interface for vacation responses (out-of-office)
|
||||
// 0 - no separate section (default); 1 - add Vacation section; 2 - add Vacation section, but hide Filters section
|
||||
\$config['managesieve_vacation'] = 1;
|
||||
EOCONFIG
|
||||
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chown root:www-data /web/rc/config/config.inc.php
|
||||
docker exec -it $(docker ps -f name=php-fpm-mailcow -q) chmod 640 /web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Initialize database
|
||||
Point your browser to `https://myserver/rc/installer`. Check that the website shows no "NOT OK" check results on
|
||||
any of the steps, some "NOT AVAILABLE" are expected regarding different database extensions of which we only need MySQL.
|
||||
Initialize the database and leave the installer. It is not necessary to update the configuration with
|
||||
the downloaded one, unless you made some settings in the installer you would like to take over.
|
||||
|
||||
### Webserver configuration
|
||||
|
||||
The roundcube directory includes some locations that we do not want to serve to web users. We add a configuration
|
||||
extension to nginx to only expose the public directory of roundcube.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location /rc/ {
|
||||
alias /web/rc/public_html/;
|
||||
}
|
||||
$config = array();
|
||||
$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');
|
||||
$config['imap_host'] = 'tls://dovecot:143';
|
||||
$config['smtp_host'] = 'tls://postfix:587';
|
||||
$config['smtp_user'] = '%u';
|
||||
$config['smtp_pass'] = '%p';
|
||||
$config['support_url'] = '';
|
||||
$config['product_name'] = 'Roundcube Webmail';
|
||||
$config['des_key'] = 'yourrandomstring_changeme';
|
||||
$config['log_dir'] = '/dev/null';
|
||||
$config['temp_dir'] = '/tmp';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Disable and remove installer
|
||||
|
||||
Delete the directory `data/web/rc/installer` after a successful installation, and set the `enable_installer` option
|
||||
to false in `data/web/rc/config/config.inc.php`:
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc/installer
|
||||
sed -i -e "s/\(\$config\['enable_installer'\].* = \)true/\1false/" data/web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Update roundcube dependencies
|
||||
|
||||
This step is not strictly necessary, but at least at the time of this writing the dependencies shipped with roundcube
|
||||
included versions with security vulnerabilities, so it may be a good idea to update the dependencies to the latest
|
||||
versions. For the same reason, it may be a good idea to run the composer update once in a while.
|
||||
|
||||
```bash
|
||||
cp -n data/web/rc/composer.json-dist data/web/rc/composer.json
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer update --no-dev -o
|
||||
```
|
||||
|
||||
You can also use `composer audit` to check for any reported security issues with the installed set of composer packages:
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer audit
|
||||
```
|
||||
|
||||
### Allow plaintext authentication for the php-fpm container without using TLS
|
||||
|
||||
We need to allow plaintext authentication in dovecot over unencrypted connection (inside the container network), which
|
||||
is per default mailcow installation only possible for the SOGo container for the very same purpose. Afterwards restart
|
||||
the dovecot container so the change becomes effective.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/conf/dovecot/extra.conf
|
||||
remote ${IPV4_NETWORK}.0/24 {
|
||||
disable_plaintext_auth = no
|
||||
}
|
||||
remote ${IPV6_NETWORK} {
|
||||
disable_plaintext_auth = no
|
||||
}
|
||||
EOCONFIG
|
||||
|
||||
docker compose restart dovecot-mailcow
|
||||
```
|
||||
|
||||
### Ofelia job for roundcube housekeeping
|
||||
|
||||
Roundcube needs to clean some stale information from the database every once in a while,
|
||||
for which we will create an ofelia job that runs the roundcube `cleandb.sh` script.
|
||||
|
||||
To do this, add the following to `docker-compose.override.yml` (if you already have some
|
||||
adaptations for the php-fpm container, add the labels to the existing section):
|
||||
|
||||
```yml
|
||||
version: '2.1'
|
||||
services:
|
||||
php-fpm-mailcow:
|
||||
labels:
|
||||
ofelia.enabled: "true"
|
||||
ofelia.job-exec.roundcube_cleandb.schedule: "@every 168h"
|
||||
ofelia.job-exec.roundcube_cleandb.user: "www-data"
|
||||
ofelia.job-exec.roundcube_cleandb.command: "/bin/bash -c \"[ -f /web/rc/bin/cleandb.sh ] && /web/rc/bin/cleandb.sh\""
|
||||
```
|
||||
|
||||
## Optional extra functionality
|
||||
|
||||
### Enable change password function in Roundcube
|
||||
|
||||
Changing the mailcow password from the roundcube UI is supported via the password plugin. We will configure it to use
|
||||
the mailcow API to update the password, which requires to enable the API first and to get the API key (read/write API
|
||||
access required). The API can be enabled in the mailcow admin interface, where you can also find the API key.
|
||||
|
||||
Open `data/web/rc/config/config.inc.php` and enable the password plugin by adding it to the `$config['plugins']` array,
|
||||
for example:
|
||||
|
||||
```php
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'managesieve'
|
||||
'managesieve',
|
||||
'acl',
|
||||
'markasjunk',
|
||||
'zipdownload',
|
||||
'password',
|
||||
);
|
||||
$config['spellcheck_engine'] = 'aspell';
|
||||
$config['mime_types'] = '/tmp/mime.types';
|
||||
$config['imap_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
$config['enable_installer'] = true;
|
||||
$config['smtp_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
$config['db_prefix'] = 'mailcow_rc1';
|
||||
```
|
||||
|
||||
Point your browser to `https://myserver/rc/installer` and follow the instructions.
|
||||
Initialize the database and leave the installer.
|
||||
Configure the password plugin (be sure to adapt __\*\*API_KEY\*\*__ to you mailcow read/write API key):
|
||||
|
||||
**Delete the directory `data/web/rc/installer` after a successful installation!**
|
||||
|
||||
## Configure ManageSieve filtering
|
||||
|
||||
Open `data/web/rc/config/config.inc.php` and change the following parameters (or add them at the bottom of that file):
|
||||
```php
|
||||
$config['managesieve_host'] = 'tls://dovecot:4190';
|
||||
$config['managesieve_conn_options'] = array(
|
||||
'ssl' => array('verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true)
|
||||
);
|
||||
// Enables separate management interface for vacation responses (out-of-office)
|
||||
// 0 - no separate section (default),
|
||||
// 1 - add Vacation section,
|
||||
// 2 - add Vacation section, but hide Filters section
|
||||
$config['managesieve_vacation'] = 1;
|
||||
```
|
||||
|
||||
## Enable change password function in Roundcube
|
||||
|
||||
Open `data/web/rc/config/config.inc.php` and enable the password plugin:
|
||||
|
||||
```php
|
||||
...
|
||||
$config['plugins'] = array(
|
||||
'archive',
|
||||
'password',
|
||||
);
|
||||
...
|
||||
```
|
||||
|
||||
Open `data/web/rc/plugins/password/password.php`, search for `case 'ssha':` and add above:
|
||||
|
||||
```php
|
||||
case 'ssha256':
|
||||
$salt = rcube_utils::random_bytes(8);
|
||||
$crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );
|
||||
$prefix = '{SSHA256}';
|
||||
break;
|
||||
```
|
||||
|
||||
Open `data/web/rc/plugins/password/config.inc.php` and change the following parameters (or add them at the bottom of that file):
|
||||
|
||||
```php
|
||||
$config['password_driver'] = 'sql';
|
||||
$config['password_algorithm'] = 'ssha256';
|
||||
$config['password_algorithm_prefix'] = '{SSHA256}';
|
||||
$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
|
||||
```
|
||||
|
||||
## Integrate CardDAV addressbooks in Roundcube
|
||||
|
||||
Download the latest release of [RCMCardDAV](https://github.com/mstilkerich/rcmcarddav) to the Roundcube plugin directory and extract it (here `rc/plugins`):
|
||||
```bash
|
||||
cd data/web/rc/plugins
|
||||
wget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -
|
||||
chown -R root: carddav/
|
||||
cat <<EOCONFIG >data/web/rc/plugins/password/config.inc.php
|
||||
<?php
|
||||
\$config['password_driver'] = 'mailcow';
|
||||
\$config['password_confirm_current'] = true;
|
||||
\$config['password_mailcow_api_host'] = 'http://nginx';
|
||||
\$config['password_mailcow_api_token'] = '**API_KEY**';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
Copy the file `config.inc.php.dist` to `config.inc.php` (here in `rc/plugins/carddav`) and append the following preset to the end of the file - don't forget to replace `mx.example.org` with your own hostname:
|
||||
```php
|
||||
$prefs['SOGo'] = array(
|
||||
'name' => 'SOGo',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'url' => 'https://mx.example.org/SOGo/dav/%u/',
|
||||
'carddav_name_only' => true,
|
||||
|
||||
Note: If you have changed the mailcow nginx configuration to redirect http requests to https
|
||||
(e.g., as described [here](https://docs.mailcow.email/manual-guides/u_e-80_to_443/)), then
|
||||
directly talking to the nginx container via http will not work because nginx is not a hostname contained
|
||||
in the certificate. In such cases, set `password_mailcow_api_host` in the above configuration to the
|
||||
public URI instead:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/plugins/password/config.inc.php
|
||||
<?php
|
||||
\$config['password_driver'] = 'mailcow';
|
||||
\$config['password_confirm_current'] = true;
|
||||
\$config['password_mailcow_api_host'] = 'https://${MAILCOW_HOSTNAME}';
|
||||
\$config['password_mailcow_api_token'] = '**API_KEY**';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Integrate CardDAV addressbooks in Roundcube
|
||||
|
||||
Install the latest v5 version (the config below is compatible with v5 releases) using composer.
|
||||
Answer `Y` when asked if you want to activate the plugin.
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer require --update-no-dev -o "roundcube/carddav:~5"
|
||||
```
|
||||
|
||||
Edit the file `data/web/rc/plugins/carddav/config.inc.php` and insert the following content:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/web/rc/plugins/carddav/config.inc.php
|
||||
<?php
|
||||
\$prefs['_GLOBAL']['pwstore_scheme'] = 'des_key';
|
||||
|
||||
\$prefs['SOGo'] = [
|
||||
'accountname' => 'SOGo',
|
||||
'username' => '%u',
|
||||
'password' => '%p',
|
||||
'discovery_url' => 'http://sogo:20000/SOGo/dav/',
|
||||
'name' => '%N',
|
||||
'use_categories' => true,
|
||||
'active' => true,
|
||||
'readonly' => false,
|
||||
'refresh_time' => '02:00:00',
|
||||
'fixed' => array( 'active', 'name', 'username', 'password', 'refresh_time' ),
|
||||
'hide' => false,
|
||||
);
|
||||
```
|
||||
Please note, that this preset only integrates the default addressbook (the one that's named "Personal Address Book" and can't be deleted). Additional addressbooks are currently not automatically detected but can be manually added within the roundecube settings.
|
||||
|
||||
Enable the plugin by adding `carddav` to `$config['plugins']` in `rc/config/config.inc.php`.
|
||||
|
||||
If you want to remove the default addressbooks (stored in the Roundcube database), so that only the CardDAV addressbooks are accessible, append `$config['address_book_type'] = '';` to the config file `data/web/rc/config/config.inc.php`.
|
||||
|
||||
---
|
||||
|
||||
Optionally, you can add Roundcube's link to the mailcow Apps list.
|
||||
To do this, open or create `data/web/inc/vars.local.inc.php` and add the following code-block:
|
||||
|
||||
*NOTE: Don't forget to add the `<?php` delimiter on the first line*
|
||||
|
||||
```php
|
||||
...
|
||||
$MAILCOW_APPS = array(
|
||||
array(
|
||||
'name' => 'SOGo',
|
||||
'link' => '/SOGo/'
|
||||
),
|
||||
array(
|
||||
'name' => 'Roundcube',
|
||||
'link' => '/rc/'
|
||||
)
|
||||
);
|
||||
...
|
||||
'fixed' => ['username', 'password'],
|
||||
];
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
## Upgrading Roundcube
|
||||
RCMCardDAV will add all addressbooks of the user on login, including __subscribed__ addressbooks shared to the user by
|
||||
other users.
|
||||
|
||||
Upgrading Roundcube is rather simple, go to the [Github releases](https://github.com/roundcube/roundcubemail/releases) page for Roundcube and get the link for the "complete.tar.gz" file for the wanted release. Then follow the below commands and change the URL and Roundcube folder name if needed.
|
||||
If you want to remove the default addressbooks (stored in the Roundcube database), so that only the CardDAV addressbooks
|
||||
are accessible, append `$config['address_book_type'] = '';` to the config file `data/web/rc/config/config.inc.php`.
|
||||
|
||||
Note: RCMCardDAV uses additional database tables. After installing (or upgrading) RCMCardDAV, it is required to log
|
||||
in roundcube (log out first if already logged in) because the database table creation / changes are performed only
|
||||
during the login to roundcube.
|
||||
|
||||
### Forward the client network address to dovecot
|
||||
|
||||
Normally, the IMAP server dovecot will see the network address of the php-fpm container when roundcube interacts with the IMAP
|
||||
server. Using an IMAP extension and the `roundcube-dovecot_client_ip` roundcube plugin, it is possible for roundcube to tell
|
||||
dovecot the client IP, so it will also show up in the logs as the remote IP. When doing this, login attempts will show in the
|
||||
dovecot logs like any direct client connections to dovecot, and such failed logins into roundcube will be treated in the same
|
||||
manner as failed direct IMAP logins, causing blocking of the client with the netfilter container or other mechanisms that may
|
||||
already be in place to handle bruteforce attacks on the IMAP server.
|
||||
|
||||
For this, the roundcube plugin must be installed.
|
||||
|
||||
```bash
|
||||
# Enter a bash session of the mailcow PHP container
|
||||
docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
|
||||
|
||||
# Install required upgrade dependency, then upgrade Roundcube to wanted release
|
||||
apk add rsync
|
||||
cd /tmp
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
cd roundcubemail-1.6.1
|
||||
bin/installto.sh /web/rc
|
||||
|
||||
# Type 'Y' and press enter to upgrade your install of Roundcube
|
||||
# Type 'N' to "Do you want me to fix your local configuration" if prompted
|
||||
|
||||
# If you see "NOTICE: Update dependencies by running php composer.phar update --no-dev" just download composer.phar and run it:
|
||||
cd /web/rc
|
||||
wget https://getcomposer.org/download/2.4.2/composer.phar
|
||||
php composer.phar update --no-dev
|
||||
# When asked "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " hit y and continue.
|
||||
|
||||
|
||||
# Remove leftover files
|
||||
cd /tmp
|
||||
rm -rf roundcube*
|
||||
|
||||
# If you're going from 1.5 to 1.6 please run the config file changes below
|
||||
sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'tls:\/\/dovecot:143'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'tls:\/\/postfix:587'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'tls:\/\/dovecot:4190'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer require --update-no-dev -o "takerukoushirou/roundcube-dovecot_client_ip:~1"
|
||||
```
|
||||
|
||||
## Let admins log into Roundcube without password
|
||||
Furthermore, we must configure dovecot to treat the php-fpm container as part of a trusted network so it is allowed to override
|
||||
the client IP in the IMAP session. Note that this also enables plaintext authentication for the listed network ranges, so the
|
||||
explicit overridings of `disable_plaintext_auth` done above are not necessary when using this.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/conf/dovecot/extra.conf
|
||||
login_trusted_networks = ${IPV4_NETWORK}.0/24 ${IPV6_NETWORK}
|
||||
EOCONFIG
|
||||
|
||||
docker compose restart dovecot-mailcow
|
||||
```
|
||||
|
||||
### Add roundcube link to mailcow Apps list
|
||||
|
||||
You can add Roundcube's link to the mailcow Apps list.
|
||||
To do this, open or create `data/web/inc/vars.local.inc.php` and make sure it includes the following configuration
|
||||
block:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
$MAILCOW_APPS = [
|
||||
[
|
||||
'name' => 'SOGo',
|
||||
'link' => '/SOGo/'
|
||||
],
|
||||
[
|
||||
'name' => 'Roundcube',
|
||||
'link' => '/rc/'
|
||||
]
|
||||
];
|
||||
```
|
||||
|
||||
### Let admins log into Roundcube without password
|
||||
|
||||
First, install plugin [dovecot_impersonate](https://github.com/corbosman/dovecot_impersonate/) and add Roundcube as an app (see above).
|
||||
|
||||
|
@ -224,7 +369,6 @@ services:
|
|||
- ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=${ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE:-n}
|
||||
```
|
||||
|
||||
|
||||
Edit `data/web/js/site/mailbox.js` and the following code after [`if (ALLOW_ADMIN_EMAIL_LOGIN) { ... }`](https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/js/site/mailbox.js#L485-L487)
|
||||
|
||||
```js
|
||||
|
@ -250,6 +394,7 @@ Copy the contents of the following files from this [Snippet](https://gitlab.com/
|
|||
* `data/web/inc/lib/RoundcubeAutoLogin.php`
|
||||
* `data/web/rc-auth.php`
|
||||
|
||||
## Finish installation
|
||||
Finally, restart mailcow
|
||||
|
||||
=== "docker compose (Plugin)"
|
||||
|
@ -262,6 +407,218 @@ Finally, restart mailcow
|
|||
=== "docker-compose (Standalone)"
|
||||
|
||||
``` bash
|
||||
docker-compose down
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Upgrading Roundcube
|
||||
|
||||
Upgrading Roundcube is rather simple, go to the [GitHub releases](https://github.com/roundcube/roundcubemail/releases)
|
||||
page for Roundcube and get the link for the "complete.tar.gz" file for the wanted release. Then follow the below
|
||||
commands and change the URL and Roundcube folder name if needed.
|
||||
|
||||
```bash
|
||||
# Enter a bash session of the mailcow PHP container
|
||||
docker exec -it mailcowdockerized-php-fpm-mailcow-1 bash
|
||||
|
||||
# Install required upgrade dependency, then upgrade Roundcube to wanted release
|
||||
apk add rsync
|
||||
cd /tmp
|
||||
wget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.1/roundcubemail-1.6.1-complete.tar.gz | tar xfvz -
|
||||
cd roundcubemail-1.6.1
|
||||
bin/installto.sh /web/rc
|
||||
|
||||
# Type 'Y' and press enter to upgrade your install of Roundcube
|
||||
# Type 'N' to "Do you want me to fix your local configuration" if prompted
|
||||
|
||||
# If you see "NOTICE: Update dependencies by running php composer.phar update --no-dev" run composer:
|
||||
cd /web/rc
|
||||
composer update --no-dev -o
|
||||
# If asked "Do you trust "roundcube/plugin-installer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] " hit y and continue.
|
||||
|
||||
# Remove leftover files
|
||||
rm -rf /tmp/roundcube*
|
||||
|
||||
# If you're going from 1.5 to 1.6 please run the config file changes below
|
||||
sed -i "s/\$config\['default_host'\].*$/\$config\['imap_host'\]\ =\ 'dovecot:143'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['default_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['smtp_server'\].*$/\$config\['smtp_host'\]\ =\ 'postfix:588'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['smtp_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
sed -i "s/\$config\['managesieve_host'\].*$/\$config\['managesieve_host'\]\ =\ 'dovecot:4190'\;/" /web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['managesieve_port'\].*$/d" /web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
### Upgrade composer plugins
|
||||
|
||||
To upgrade roundcube plugins installed using composer and dependencies (e.g. RCMCardDAV plugin), you can simply run
|
||||
composer in the container:
|
||||
|
||||
```bash
|
||||
docker exec -it -w /web/rc $(docker ps -f name=php-fpm-mailcow -q) composer update --no-dev -o
|
||||
```
|
||||
|
||||
### Upgrade mime type mappings
|
||||
|
||||
To upgrade the mime type mappings, re-download them using the command in the
|
||||
[installation instructions](#Install-mime-type-mappings).
|
||||
|
||||
## Uninstalling roundcube
|
||||
|
||||
For the uninstallation, it is also assumed that the commands are executed in the mailcow installation directory and
|
||||
that `mailcow.conf` has been sourced in the shell, see [Preparation](#Preparation) above.
|
||||
|
||||
### Remove the web directory
|
||||
|
||||
This deletes the roundcube installation and all plugins and dependencies that you may have installed,
|
||||
including those installed with composer.
|
||||
|
||||
Note: This deletes also any custom configuration that you may have done in roundcube. If you want to preserve it, move it some
|
||||
place else instead of deleting it.
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc
|
||||
```
|
||||
|
||||
### Remove the database
|
||||
|
||||
Note: This clears all data stored for roundcube. If you want to preserve it, you could use `mysqldump` before deleting the data,
|
||||
or simply keep the database.
|
||||
|
||||
```bash
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "DROP USER 'roundcube'@'%';"
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -e "DROP DATABASE roundcubemail;"
|
||||
```
|
||||
|
||||
### Remove any custom configuration files we added to mailcow
|
||||
|
||||
To determine these, please read through the installation steps and revert what you changed there.
|
||||
|
||||
## Migration from older mailcow roundcube setup
|
||||
|
||||
Older versions of this instruction used the mailcow database also for roundcube, with a configured name prefix
|
||||
`mailcow_rc1` on all roundcube tables.
|
||||
|
||||
For the migration, it is also assumed that the commands are executed in the mailcow installation directory and
|
||||
that `mailcow.conf` has been sourced in the shell, see [Preparation](#Preparation) above. The commands of the different
|
||||
steps build on each other and must be executed in the same shell. Particularly, some steps set shell variables (most
|
||||
importantly the `DBROUNDCUBE` variable with the database password of the roundcube database user) used in later steps.
|
||||
|
||||
### Create new roundcube database user and database
|
||||
|
||||
Follow the [steps above](#Create-roundcube-database) to create the roundcube database user and the separate database.
|
||||
|
||||
### Migrate roundcube data from mailcow database
|
||||
|
||||
Before starting the database migration, we disable roundcube to avoid further changes to the roundcube database tables
|
||||
during the migration.
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location ^~ /rc/ {
|
||||
return 503;
|
||||
}
|
||||
EOCONFIG
|
||||
docker compose exec nginx-mailcow nginx -s reload
|
||||
```
|
||||
|
||||
Now we copy the roundcube data to the new database. We strip the database table prefix in the process, you may need to
|
||||
adjust `mailcow\_rc1` in case you used a different prefix. It is also possible to keep the prefix (then also keep the
|
||||
respective `db_prefix` roundcube setting).
|
||||
|
||||
```bash
|
||||
RCTABLES=$(docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -sN mailcow -e "show tables like 'mailcow_rc1%';" | tr '\n\r' ' ')
|
||||
docker exec $(docker ps -f name=mysql-mailcow -q) /bin/bash -c "mysqldump -uroot -p${DBROOT} mailcow $RCTABLES | sed 's/mailcow_rc1//' | mysql -uroot -p${DBROOT} roundcubemail"
|
||||
```
|
||||
|
||||
### Update roundcube configuration
|
||||
|
||||
Run the following to remove the no longer required `db_prefix` option. We also enable logging of roundcube by removing
|
||||
the settings `log_dir` and `temp_dir` that were part of the old setup instructions.
|
||||
|
||||
```bash
|
||||
sed -i "/\$config\['db_prefix'\].*$/d" data/web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['log_dir'\].*$/d" data/web/rc/config/config.inc.php
|
||||
sed -i "/\$config\['temp_dir'\].*$/d" data/web/rc/config/config.inc.php
|
||||
```
|
||||
|
||||
We need to adapt the nginx configuration for roundcube to not expose the non-public folders of roundcube, specifically
|
||||
those containing temporary files and log files:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >data/conf/nginx/site.roundcube.custom
|
||||
location /rc/ {
|
||||
alias /web/rc/public_html/;
|
||||
}
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
We can also update the `cipher_method` to a more secure one but mind that data previously encrypted by roundcube cannot
|
||||
be decrypted anymore afterwards. This specifically affects stored CardDAV passwords if you use RCMCardDAV and your
|
||||
users added custom addressbooks (the preset will be fixed automatically upon next login of the user). If you want to
|
||||
change the `cipher_method`, run:
|
||||
|
||||
```bash
|
||||
cat <<EOCONFIG >>data/web/rc/config/config.inc.php
|
||||
\$config['cipher_method'] = 'chacha20-poly1305';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Switch RCMCardDAV plugin to composer installation method
|
||||
|
||||
This is optional but will align your installation with these instructions and enable you to upgrade RCMCardDAV
|
||||
using composer. This is simply done by deleting the carddav plugin from the installation and installing it using
|
||||
composer according to the [instructions above](#Integrate-CardDAV-addressbooks-in-Roundcube), which include the creation
|
||||
of a new RCMCardDAV v5 config. In case you modified your RCMCardDAV configuration file, you may want to backup it before
|
||||
deleting the plugin and carry over your changes to the new configuration afterwards as well.
|
||||
|
||||
To delete the carddav plugin run the following command, then re-install according to the
|
||||
[instructions above](#Integrate-CardDAV-addressbooks-in-Roundcube):
|
||||
|
||||
```bash
|
||||
rm -r data/web/rc/plugins/carddav
|
||||
```
|
||||
|
||||
### Switch roundcube to new database
|
||||
|
||||
First adapt the roundcube configuration to use the new database.
|
||||
```bash
|
||||
sed -i "/\$config\['db_dsnw'\].*$/d" data/web/rc/config/config.inc.php
|
||||
cat <<EOCONFIG >>data/web/rc/config/config.inc.php
|
||||
\$config['db_dsnw'] = 'mysql://roundcube:${DBROUNDCUBE}@mysql/roundcubemail';
|
||||
EOCONFIG
|
||||
```
|
||||
|
||||
### Re-enable roundcube web access
|
||||
Execute the chown and chmod commands on sensitive roundcube directories listed in [Preparation](#Preparation), to
|
||||
make sure the nginx webserver cannot access files it is not supposed to serve.
|
||||
|
||||
Then re-enable web access to roundcube by replacing our temporary roundcube custom config for the one described
|
||||
[above](#Webserver-configuration), and reload the nginx configuration:
|
||||
|
||||
```bash
|
||||
docker compose exec nginx-mailcow nginx -s reload
|
||||
```
|
||||
|
||||
### Other changes
|
||||
You must also adapt the configuration of the roundcube password plugin according to this instruction, specifically if
|
||||
you use the password changing functionality, since the old instruction directly changed the password in the database,
|
||||
whereas this version of the instruction uses the mailcow API for the password change.
|
||||
|
||||
Regarding other changes and additions (e.g., roundcube-dovecot\_client\_ip plugin), you can go through the current
|
||||
installation instructions and adapt your configuration accordingly or perform the listed installation steps for new
|
||||
additions.
|
||||
|
||||
Specifically, consider the following sections:
|
||||
- [Ofelia job for roundcube housekeeping](#Ofelia-job-for-roundcube-housekeeping)
|
||||
- [Allow plaintext authentication in dovecot](#Allow-plaintext-authentication-for-the-php-fpm-container-without-using-TLS),
|
||||
if you adapt the roundcube configuration to contact dovecot via non-encrypted IMAP connection.
|
||||
- [Forward the client network address to dovecot](#Forward-the-client-network-address-to-dovecot)
|
||||
|
||||
### Removing roundcube tables from mailcow database
|
||||
|
||||
After you have verified that the migration was successful and roundcube works using the separate database, you can remove
|
||||
the roundcube tables from the mailcow database using the following command:
|
||||
|
||||
```bash
|
||||
docker exec -it $(docker ps -f name=mysql-mailcow -q) mysql -uroot -p${DBROOT} -sN mailcow -e "SET SESSION foreign_key_checks = 0; DROP TABLE IF EXISTS $(echo $RCTABLES | sed -e 's/ \+/,/g');"
|
||||
```
|
||||
|
|
Laden …
In neuem Issue referenzieren