Roundcube Installation: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 1: | Zeile 1: | ||
| − | = Roundcube Webmail | + | =Roundcube Webmail= |
| − | + | ==Einführung== | |
| − | + | Roundcube ist ein webbasierter IMAP-Client der direkt im Browser läuft. | |
| + | Er wird auf dem Mailserver installiert und ermöglicht den Zugriff auf Mails über HTTPS. | ||
| + | ==Voraussetzungen== | ||
| + | * Funktionierender Postfix + Dovecot auf demselben Server | ||
| + | * Apache2, MariaDB, PHP 8.1+ | ||
| + | ==Installation== | ||
| + | ;Pakete installieren | ||
| + | *apt update | ||
| + | *apt install apache2 mariadb-server 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 | ||
| − | + | ;Roundcube herunterladen | |
| − | Roundcube | + | *cd /root |
| − | + | *wget https://github.com/roundcube/roundcubemail/releases/download/1.7.1/roundcubemail-1.7.1-complete.tar.gz | |
| − | + | *tar -xzvf roundcubemail-1.7.1-complete.tar.gz | |
| − | * | + | *mv roundcubemail-1.7.1 /var/www/roundcube |
| − | |||
| − | * | ||
| − | * | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | ;Berechtigungen setzen | |
| − | + | *chown -R www-data:www-data /var/www/roundcube/ | |
| − | * | + | *chmod -R 750 /var/www/roundcube/ |
| − | == | + | ==Apache-Konfiguration== |
| − | * | + | ;Module aktivieren |
| + | *a2enmod ssl rewrite headers | ||
| + | *a2ensite roundcube.conf | ||
| − | + | ;Virtuelle Host-Datei erstellen | |
| − | + | *vi /etc/apache2/sites-available/roundcube.conf | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | *vi /etc/apache2/sites-available/roundcube.conf | ||
<pre> | <pre> | ||
<VirtualHost *:80> | <VirtualHost *:80> | ||
ServerName mail.it2XX.int | ServerName mail.it2XX.int | ||
| − | Redirect permanent / https://mail. | + | Redirect permanent / https://mail.it2XX.int/ |
</VirtualHost> | </VirtualHost> | ||
| − | |||
<VirtualHost *:443> | <VirtualHost *:443> | ||
ServerName mail.it2XX.int | ServerName mail.it2XX.int | ||
| Zeile 49: | Zeile 42: | ||
ServerAdmin technik@it2XX.int | ServerAdmin technik@it2XX.int | ||
DocumentRoot /var/www/roundcube/public_html | DocumentRoot /var/www/roundcube/public_html | ||
| − | + | <Directory /var/www/roundcube/public_html> | |
Options +FollowSymlinks | Options +FollowSymlinks | ||
AllowOverride All | AllowOverride All | ||
Require all granted | Require all granted | ||
| − | + | <IfModule mod_dav.c> | |
Dav off | Dav off | ||
| − | + | </IfModule> | |
SetEnv HOME /var/www/roundcube | SetEnv HOME /var/www/roundcube | ||
SetEnv HTTP_HOME /var/www/roundcube | SetEnv HTTP_HOME /var/www/roundcube | ||
| − | + | </Directory> | |
ErrorLog ${APACHE_LOG_DIR}/mail-error.log | ErrorLog ${APACHE_LOG_DIR}/mail-error.log | ||
CustomLog ${APACHE_LOG_DIR}/mail-access.log combined | CustomLog ${APACHE_LOG_DIR}/mail-access.log combined | ||
</VirtualHost> | </VirtualHost> | ||
| − | |||
</pre> | </pre> | ||
| − | + | *a2ensite roundcube.conf | |
| − | * a2ensite roundcube.conf | + | *systemctl restart apache2 |
| − | * systemctl restart apache2 | ||
| − | = Datenbank einrichten | + | ==Datenbank einrichten== |
| − | + | *mysql -u root -p | |
| − | * mysql -u root -p | + | <syntaxhighlight lang="sql"> |
| + | CREATE DATABASE roundcubemail; | ||
| + | CREATE USER 'roundcube'@'localhost' IDENTIFIED BY '123Start$'; | ||
| + | GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost'; | ||
| + | FLUSH PRIVILEGES; | ||
| + | EXIT; | ||
| + | </syntaxhighlight> | ||
| − | == | + | ==Installer aufrufen== |
| − | + | ;Installation über den Webinstaller abschließen | |
| − | * | + | *https://mail.it2XX.int/installer |
| − | |||
| − | |||
| − | |||
| − | = | + | ;Einstellungen im Installer |
| − | + | {| class="wikitable" | |
| − | + | ! Parameter !! Wert | |
| + | |- | ||
| + | | Database Server || localhost | ||
| + | |- | ||
| + | | Database name || roundcubemail | ||
| + | |- | ||
| + | | Database username || roundcube | ||
| + | |- | ||
| + | | Database password || 123Start$ | ||
| + | |- | ||
| + | | imap_host || ssl://mail.it2XX.int:993 | ||
| + | |- | ||
| + | | smtp_host || ssl://mail.it2XX.int:465 | ||
| + | |} | ||
| + | ;Datenbank initialisieren | ||
| + | *Initialize database → Test klicken | ||
| − | == | + | ==SSL-Zertifikat vertrauen== |
| − | * | + | ;Roundcube prüft das Zertifikat – da wir eine eigene CA nutzen muss die Prüfung deaktiviert werden |
| − | === | + | *vi /var/www/roundcube/config/config.inc.php |
| − | ; | + | <syntaxhighlight lang="php"> |
| − | + | $config['imap_ssl_verify_peer'] = false; | |
| − | + | $config['imap_ssl_verify_peer_name'] = false; | |
| − | + | $config['smtp_ssl_verify_peer'] = false; | |
| − | + | $config['smtp_ssl_verify_peer_name'] = false; | |
| − | ; | + | </syntaxhighlight> |
| − | |||
| − | ; | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | ==Installation abschließen== |
| − | + | ;Installer-Verzeichnis entfernen | |
| − | * | + | *rm -rf /var/www/roundcube/installer |
| − | + | ;Konfigurationsdatei absichern | |
| − | * | + | *chmod 640 /var/www/roundcube/config/config.inc.php |
| − | + | *chown root:www-data /var/www/roundcube/config/config.inc.php | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | = | + | ==Test== |
| − | + | ;Roundcube aufrufen und einloggen | |
| − | + | *https://mail.it2XX.int | |
| − | |||
| − | + | [[Kategorie:Mail]] | |
Version vom 8. Juni 2026, 20:05 Uhr
Roundcube Webmail
Einführung
Roundcube ist ein webbasierter IMAP-Client der direkt im Browser läuft. Er wird auf dem Mailserver installiert und ermöglicht den Zugriff auf Mails über HTTPS.
Voraussetzungen
- Funktionierender Postfix + Dovecot auf demselben Server
- Apache2, MariaDB, PHP 8.1+
Installation
- Pakete installieren
- apt update
- apt install apache2 mariadb-server 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
- Roundcube herunterladen
- cd /root
- wget https://github.com/roundcube/roundcubemail/releases/download/1.7.1/roundcubemail-1.7.1-complete.tar.gz
- tar -xzvf roundcubemail-1.7.1-complete.tar.gz
- mv roundcubemail-1.7.1 /var/www/roundcube
- Berechtigungen setzen
- chown -R www-data:www-data /var/www/roundcube/
- chmod -R 750 /var/www/roundcube/
Apache-Konfiguration
- Module aktivieren
- a2enmod ssl rewrite headers
- a2ensite roundcube.conf
- 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.it2XX.int
SSLEngine on
SSLCertificateFile /etc/ssl/own.crt
SSLCertificateKeyFile /etc/ssl/own.key
ServerAdmin technik@it2XX.int
DocumentRoot /var/www/roundcube/public_html
<Directory /var/www/roundcube/public_html>
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>
- a2ensite roundcube.conf
- systemctl restart apache2
Datenbank einrichten
- mysql -u root -p
CREATE DATABASE roundcubemail;
CREATE USER 'roundcube'@'localhost' IDENTIFIED BY '123Start$';
GRANT ALL PRIVILEGES ON roundcubemail.* TO 'roundcube'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Installer aufrufen
- Installation über den Webinstaller abschließen
- Einstellungen im Installer
| Parameter | Wert |
|---|---|
| Database Server | localhost |
| Database name | roundcubemail |
| Database username | roundcube |
| Database password | 123Start$ |
| imap_host | ssl://mail.it2XX.int:993 |
| smtp_host | ssl://mail.it2XX.int:465 |
- Datenbank initialisieren
- Initialize database → Test klicken
SSL-Zertifikat vertrauen
- Roundcube prüft das Zertifikat – da wir eine eigene CA nutzen muss die Prüfung deaktiviert werden
- vi /var/www/roundcube/config/config.inc.php
$config['imap_ssl_verify_peer'] = false;
$config['imap_ssl_verify_peer_name'] = false;
$config['smtp_ssl_verify_peer'] = false;
$config['smtp_ssl_verify_peer_name'] = false;
Installation abschließen
- Installer-Verzeichnis entfernen
- rm -rf /var/www/roundcube/installer
- Konfigurationsdatei absichern
- chmod 640 /var/www/roundcube/config/config.inc.php
- chown root:www-data /var/www/roundcube/config/config.inc.php
Test
- Roundcube aufrufen und einloggen