Roundcube Installation: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 8: | Zeile 8: | ||
== Dateien herunterladen == | == Dateien herunterladen == | ||
| − | * | + | * In das temporäre Verzeichnis wechseln |
| − | * *cd /tmp | + | ** cd /tmp |
| − | * | + | * Die aktuelle Version von Roundcube herunterladen |
** Die aktuelle Version ist unter https://github.com/roundcube/roundcubemail/releases verfügbar | ** Die aktuelle Version ist unter https://github.com/roundcube/roundcubemail/releases verfügbar | ||
| − | + | ** wget https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | |
| − | * | + | * Archiv entpacken |
| − | + | ** tar xvf roundcubemail-1.6.0-complete.tar.gz | |
| − | * | + | * Archiv löschen |
| − | + | ** rm roundcubemail-1.6.0-complete.tar.gz | |
| − | * | + | * Dateien ins Webserver-Verzeichnis verschieben |
| − | + | ** mv roundcubemail-1.6.0 /var/www/ | |
| − | * | + | * Verzeichnis umbenennen |
| − | + | ** mv /var/www/roundcubemail-1.6.0 /var/www/roundcube | |
== Apache-Konfiguration erstellen == | == Apache-Konfiguration erstellen == | ||
| − | * | + | * Virtuelle Host-Datei erstellen |
| − | + | ** nano /etc/apache2/sites-available/roundcube.conf | |
<pre> | <pre> | ||
| Zeile 47: | Zeile 47: | ||
</pre> | </pre> | ||
| − | * | + | * Seite aktivieren und Apache neu starten |
| − | + | ** a2ensite roundcube.conf | |
| − | + | ** systemctl restart apache2 | |
== Datenbank einrichten == | == Datenbank einrichten == | ||
| − | * | + | * MariaDB starten |
| − | + | ** mysql -u root -p | |
| − | * | + | * Datenbank und Benutzer erstellen |
| − | + | ** CREATE DATABASE roundcube; | |
| − | + | ** CREATE USER 'roundcubeuser'@'localhost' IDENTIFIED BY 'sicherespasswort'; | |
| − | + | ** GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcubeuser'@'localhost'; | |
| − | + | ** FLUSH PRIVILEGES; | |
| − | + | ** EXIT; | |
== Berechtigungen setzen == | == Berechtigungen setzen == | ||
| − | * | + | * Eigentümer und Berechtigungen anpassen |
| − | + | ** chown -R www-data:www-data /var/www/roundcube/ | |
| − | + | ** chmod -R 750 /var/www/roundcube/ | |
== Sicherheitsmaßnahmen == | == Sicherheitsmaßnahmen == | ||
| − | * | + | * SSL-Verschlüsselung aktivieren |
| − | ** Let's Encrypt-Zertifikat einrichten | + | ** Let's Encrypt-Zertifikat einrichten |
| − | ** *apt install certbot python3-certbot-apache | + | *** apt install certbot python3-certbot-apache |
| − | ** *certbot --apache -d webmail.example.com | + | *** certbot --apache -d webmail.example.com |
| − | * | + | * Das installer-Verzeichnis nach der Installation entfernen |
| − | + | ** rm -rf /var/www/roundcube/installer | |
| − | * | + | * Konfigurationsdateien absichern |
| − | + | ** chmod 640 /var/www/roundcube/config/config.inc.php | |
| − | + | ** chown root:www-data /var/www/roundcube/config/config.inc.php | |
| − | * | + | * Apache-Sicherheitsheader setzen |
| − | ** Datei /etc/apache2/conf-available/security.conf anpassen | + | ** Datei /etc/apache2/conf-available/security.conf anpassen |
<pre> | <pre> | ||
Header always set X-Frame-Options DENY | Header always set X-Frame-Options DENY | ||
| Zeile 83: | Zeile 83: | ||
Header always set X-Content-Type-Options nosniff | Header always set X-Content-Type-Options nosniff | ||
</pre> | </pre> | ||
| − | + | ** a2enmod headers | |
| − | + | ** systemctl restart apache2 | |
| + | |||
| + | == PHP-Konfiguration für Roundcube == | ||
| + | <pre> | ||
| + | <?php | ||
| + | // Beispiel für eine PHP-Konfigurationsdatei für Roundcube | ||
| + | $config = array(); | ||
| + | $config['db_dsnw'] = 'mysql://roundcubeuser:sicherespasswort@localhost/roundcube'; | ||
| + | $config['default_host'] = 'localhost'; | ||
| + | $config['smtp_server'] = 'localhost'; | ||
| + | $config['smtp_port'] = 587; | ||
| + | $config['smtp_user'] = '%u'; | ||
| + | $config['smtp_pass'] = '%p'; | ||
| + | $config['enable_installer'] = false; | ||
| + | $config['log_dir'] = '/var/log/roundcube'; | ||
| + | $config['temp_dir'] = '/tmp'; | ||
| + | ?> | ||
| + | </pre> | ||
== Installation abschließen == | == Installation abschließen == | ||
| − | * | + | * Die Roundcube-Installation aufrufen |
| − | + | ** https://webmail.example.com/installer | |
| − | ** Nach Abschluss der Installation | + | ** Nach Abschluss der Installation das installer-Verzeichnis löschen |
| − | + | *** rm -rf /var/www/roundcube/installer | |
| + | |||
| + | Falls es Probleme gibt, kann die offizielle Dokumentation unter https://roundcube.net/help konsultiert werden. | ||
Version vom 16. März 2025, 15:28 Uhr
Roundcube Webmail unter Debian 12 installieren
Voraussetzungen
- Ein funktionierender Mailserver mit IMAP (z. B. Dovecot) und SMTP (z. B. Postfix)
- Ein Debian 12-Server mit Apache2, MariaDB und PHP 8.2
- Eine registrierte Domain (z. B. webmail.example.com)
- Let's Encrypt oder ein anderes SSL-Zertifikat für HTTPS
Dateien herunterladen
- In das temporäre Verzeichnis wechseln
- cd /tmp
- Die aktuelle Version von Roundcube herunterladen
- Die aktuelle Version ist unter https://github.com/roundcube/roundcubemail/releases verfügbar
- wget https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz
- Archiv entpacken
- tar xvf roundcubemail-1.6.0-complete.tar.gz
- Archiv löschen
- rm roundcubemail-1.6.0-complete.tar.gz
- Dateien ins Webserver-Verzeichnis verschieben
- mv roundcubemail-1.6.0 /var/www/
- Verzeichnis umbenennen
- mv /var/www/roundcubemail-1.6.0 /var/www/roundcube
Apache-Konfiguration erstellen
- Virtuelle Host-Datei erstellen
- nano /etc/apache2/sites-available/roundcube.conf
<VirtualHost *:80>
ServerAdmin webmaster@example.com
DocumentRoot /var/www/roundcube/
ServerName webmail.example.com
ServerAlias webmail.example.com
<Directory /var/www/roundcube/>
Options +FollowSymlinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/roundcube
SetEnv HTTP_HOME /var/www/roundcube
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
- Seite aktivieren und Apache neu starten
- a2ensite roundcube.conf
- systemctl restart apache2
Datenbank einrichten
- MariaDB starten
- mysql -u root -p
- Datenbank und Benutzer erstellen
- CREATE DATABASE roundcube;
- CREATE USER 'roundcubeuser'@'localhost' IDENTIFIED BY 'sicherespasswort';
- GRANT ALL PRIVILEGES ON roundcube.* TO 'roundcubeuser'@'localhost';
- FLUSH PRIVILEGES;
- EXIT;
Berechtigungen setzen
- Eigentümer und Berechtigungen anpassen
- chown -R www-data:www-data /var/www/roundcube/
- chmod -R 750 /var/www/roundcube/
Sicherheitsmaßnahmen
- SSL-Verschlüsselung aktivieren
- Let's Encrypt-Zertifikat einrichten
- apt install certbot python3-certbot-apache
- certbot --apache -d webmail.example.com
- Let's Encrypt-Zertifikat einrichten
- Das installer-Verzeichnis nach der Installation entfernen
- rm -rf /var/www/roundcube/installer
- Konfigurationsdateien absichern
- chmod 640 /var/www/roundcube/config/config.inc.php
- chown root:www-data /var/www/roundcube/config/config.inc.php
- Apache-Sicherheitsheader setzen
- Datei /etc/apache2/conf-available/security.conf anpassen
Header always set X-Frame-Options DENY Header always set X-XSS-Protection "1; mode=block" Header always set X-Content-Type-Options nosniff
- a2enmod headers
- systemctl restart apache2
PHP-Konfiguration für Roundcube
<?php // Beispiel für eine PHP-Konfigurationsdatei für Roundcube $config = array(); $config['db_dsnw'] = 'mysql://roundcubeuser:sicherespasswort@localhost/roundcube'; $config['default_host'] = 'localhost'; $config['smtp_server'] = 'localhost'; $config['smtp_port'] = 587; $config['smtp_user'] = '%u'; $config['smtp_pass'] = '%p'; $config['enable_installer'] = false; $config['log_dir'] = '/var/log/roundcube'; $config['temp_dir'] = '/tmp'; ?>
Installation abschließen
- Die Roundcube-Installation aufrufen
- https://webmail.example.com/installer
- Nach Abschluss der Installation das installer-Verzeichnis löschen
- rm -rf /var/www/roundcube/installer
Falls es Probleme gibt, kann die offizielle Dokumentation unter https://roundcube.net/help konsultiert werden.