Roundcube Installation: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 15: Zeile 15:
 
*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
 
*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 herunterladen (Hier gibt es aktuelle Versionen: https://roundcube.net/download/ )
 
*cd /root
 
*cd /root
 
*wget https://github.com/roundcube/roundcubemail/releases/download/1.7.1/roundcubemail-1.7.1-complete.tar.gz
 
*wget https://github.com/roundcube/roundcubemail/releases/download/1.7.1/roundcubemail-1.7.1-complete.tar.gz
Zeile 28: Zeile 28:
 
;Module aktivieren
 
;Module aktivieren
 
*a2enmod ssl rewrite headers
 
*a2enmod ssl rewrite headers
*a2ensite roundcube.conf
+
 
 +
;Für die Installation brauchen wir diese Konfiguration
  
 
;Virtuelle Host-Datei erstellen
 
;Virtuelle Host-Datei erstellen
Zeile 43: Zeile 44:
 
     SSLCertificateKeyFile /etc/ssl/own.key
 
     SSLCertificateKeyFile /etc/ssl/own.key
 
     ServerAdmin technik@it2XX.int
 
     ServerAdmin technik@it2XX.int
     DocumentRoot /var/www/roundcube/public_html
+
     DocumentRoot /var/www/roundcube
     <Directory /var/www/roundcube/public_html>
+
     <Directory /var/www/roundcube>
 
         Options +FollowSymlinks
 
         Options +FollowSymlinks
 
         AllowOverride All
 
         AllowOverride All
Zeile 63: Zeile 64:
  
 
==Datenbank einrichten==
 
==Datenbank einrichten==
*mysql -u root -p
+
*mysql -u root
 
<syntaxhighlight lang="sql">
 
<syntaxhighlight lang="sql">
 
CREATE DATABASE roundcubemail;
 
CREATE DATABASE roundcubemail;
Zeile 103: Zeile 104:
 
*chmod 640 /var/www/roundcube/config/config.inc.php
 
*chmod 640 /var/www/roundcube/config/config.inc.php
 
*chown root:www-data /var/www/roundcube/config/config.inc.php
 
*chown root:www-data /var/www/roundcube/config/config.inc.php
 +
 +
==Für den Betrieb brauchen wir diese Konfiguration==
 +
Die roten Zeilen müssen geändert oder ergänzt werden-
 +
 +
;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
 +
    <span style="color:red;"><nowiki>DocumentRoot /var/www/roundcube/public_html</nowiki></span>
 +
    <span style="color:red;"><nowiki><Directory /var/www/roundcube/public_html></nowiki></span>
 +
        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>
 +
 +
 +
*systemctl restart apache2
  
 
==Test==
 
==Test==

Aktuelle Version vom 10. Juni 2026, 14:02 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 (Hier gibt es aktuelle Versionen
https://roundcube.net/download/ )
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
Für die Installation brauchen wir diese Konfiguration
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
    <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>
  • a2ensite roundcube.conf
  • systemctl restart apache2

Datenbank einrichten

  • mysql -u root
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

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

Für den Betrieb brauchen wir diese Konfiguration

Die roten Zeilen müssen geändert oder ergänzt werden-

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>


  • systemctl restart apache2

Test

Roundcube aufrufen und einloggen