Roundcube Installation
Zur Navigation springen
Zur Suche springen
Roundcube Webmail unter Debian 12 installieren
- apt update
- apt install php php-cli php-common php-curl php-gd php-intl php-mbstring php-mysql php-xml php-zip php-imagick php-apcu libapache2-mod-php unzip mariadb-server mariadb-client
Einführung
Roundcube ist ein webbasiertes E-Mail-Client-Programm, das es ermöglicht, E-Mails von IMAP-Servern wie web.de, GMX oder Gmail direkt über den Browser abzurufen. Diese Anleitung beschreibt die Installation von Roundcube auf Debian 12.
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 /root
Die aktuelle Version von Roundcube herunterladen
Die aktuelle Version ist unter https://github.com/roundcube/roundcubemail/releases verfügbar.
Archiv entpacken und bereinigen
- tar -xzvf roundcubemail-1.6.*-complete.tar.gz
Dateien ins Webserver-Verzeichnis verschieben
- mv roundcubemail-1.6.* /var/www/roundcube
Apache-Konfiguration erstellen
Vorarbeiten
- a2enmod ssl
- a2enmod rewrite
Virtuelle Host-Datei erstellen
- vi /etc/apache2/sites-available/roundcube.conf
<VirtualHost *:80>
ServerName mail.it2xx.int
Redirect permanent / https://mail.it2xx.int/
</VirtualHost>
<VirtualHost *:443>
ServerName mail.it113.int
SSLEngine on
SSLCertificateFile /etc/ssl/own.crt
SSLCertificateKeyFile /etc/ssl/own.key
ServerAdmin technik@it213.int
DocumentRoot /var/www/roundcube/
<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}/mail-error.log
CustomLog ${APACHE_LOG_DIR}/mail-access.log combined
</VirtualHost>
Konfiguration 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 roundcubemail;
- CREATE USER 'roundcube'@'localhost' IDENTIFIED BY '123Start$';
- GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost';
- FLUSH PRIVILEGES;
- EXIT;
Berechtigungen setzen
- chown -R www-data:www-data /var/www/roundcube/
- chmod -R 750 /var/www/roundcube/
Installer aufrufen
Einstellungen
- Database setup
- Database Server: localhost
- Database name: roundcubemail
- Database username: roundcube
- Database password: 123Start$
- IMAP Settings
- imap: ssl://mail.it213.int:933
- smtp_host
- ssl://mail.it213.int:465
- nächste Seite
- Check DB config
- Initialize database
- test
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
- nano /etc/apache2/conf-available/security.conf
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
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.