Roundcube (Ubuntu 16.04): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
 
(23 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 43: Zeile 43:


=== Composer ===
=== Composer ===
==== Composer installieren ====


<pre>
<pre>
Zeile 67: Zeile 69:
sudo -u www-data php -r "unlink('composer-setup.php');"
sudo -u www-data php -r "unlink('composer-setup.php');"
</pre>
</pre>
==== composer.json ====


<pre>
<pre>
sudo -u www-data cp composer.json-dist composer.json
sudo -u www-data cp composer.json-dist composer.json
</pre>
</pre>
<pre>
{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net/"
        },
        {
            "type": "vcs",
            "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "pear/pear-core-minimal": "~1.10.1",
        "pear/net_socket": "~1.2.1",
        "pear/auth_sasl": "~1.1.0",
        "pear/net_idna2": "~0.2.0",
        "pear/mail_mime": "~1.10.0",
        "pear/net_smtp": "~1.7.1",
        "pear/crypt_gpg": "~1.6.0",
        "pear/net_sieve": "~1.4.0",
        "roundcube/plugin-installer": "~0.1.6",
        "endroid/qr-code": "~1.6.5",
        "pear/net_ldap2": "~2.2.0",
        "kolab/Net_LDAP3": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "^4.8.36 || ^5.7.15"
    }
}
</pre>
==== Pakete installieren ====


<pre>
<pre>
Zeile 76: Zeile 118:
</pre>
</pre>


=== Datenbank erstellen ===
<pre>
mysql -u root -p
mysql> CREATE DATABASE roundcubemail;
mysql> create user 'roundcube'@'%' identified by '<password>';
mysql> create user 'roundcube'@'localhost' identified by '<password>';
mysql> grant all privileges on roundcubemail.* to 'roundcube'@'%';
mysql> grant all privileges on roundcubemail.* to 'roundcube'@'localhost';
mysql> flush privileges;
mysql> quit;
</pre>
== Konfiguration ==
=== Apache ===
==== lokal ====
Konfigurationsdatei erstellen, um ''roundcube'' lokal über die IP-Adresse (z.B.: ''http://10.0.0.120/roundcube/'') zu erreichen:
<pre>
cd /etc/apache2/conf-available/
sudo vi roundcube.conf
</pre>
Folgenden Inhalt in die neu erstellte Datei ''/etc/apache2/conf-available/roundcube.conf'' schreiben:
<pre>
Alias /roundcube "/var/www/roundcube/"
<Directory "/var/www/roundcube">
    Options +FollowSymLinks
    AllowOverride All
    <IfModule mod_dav.c>
      Dav off
    </IfModule>
    SetEnv HOME /var/www/roundcube
    SetEnv HTTP_HOME /var/www/roundcube
</Directory>
</pre>
Apache-Konfigurationsdateien neu einlesen:
<pre>
sudo a2enconf roundcube.conf
sudo service apache2 reload
</pre>
==== extern ====
===== Zertifikat erstellen =====
Siehe dazu [[SSL Zertifikat]]
===== HTTP Weiterleitung =====
<pre>
cd /etc/apache2/sites-available/
sudo vi mail.conf
</pre>
<pre>
<VirtualHost *:80>
ServerName mail.kirner.or.at
ServerAlias mail.kirner.or.at
Redirect / https://mail.kirner.or.at
</VirtualHost>
</pre>
<pre>
sudo a2ensite mail.conf
sudo service apache2 reload
</pre>
===== HTTPS =====
<pre>
sudo vi mail-ssl.conf
</pre>
<pre>
<VirtualHost *:443>
ServerName mail.kirner.or.at
SSLEngine on
SSLCertificateFile /etc/ssl/certs/mail.crt
SSLCertificateKeyFile /etc/ssl/private/apache.key
# Pfad zu den Webinhalten
DocumentRoot /var/www/roundcube
ErrorLog ${APACHE_LOG_DIR}/roundcube.kirner.or.at-error.log
CustomLog ${APACHE_LOG_DIR}/roundcube.kirner.or.at-access.log combined
</VirtualHost>
</pre>
<pre>
sudo a2ensite mail-ssl.conf
sudo service apache2 reload
</pre>
=== Roundcube ===
==== Installer ====
Installer [http://10.0.0.120/roundcube/installer/ http://10.0.0.120/roundcube/installer/] aufrufen und alle Schritte ausführen.
Nach der Konfiguration Installationsverzeichnis löschen:
<pre>
sudo rm -r /var/www/roundcube/installer/
</pre>
==== config.inc.php ====
<pre>
sudo vi /var/www/roundcube/config/config.inc.php
</pre>
Am Ende folgende Zeile hinzufügen:
<pre>
$config['enable_installer'] = true;
</pre>
== Plugins ==
[[Plugins Roundcube 1.3.5|Plugins Roundcube]]
== Links ==
[https://roundcube.net/ https://roundcube.net/]




Zurück zu [[Mailserver einrichten (Ubuntu 16.04)|Mailserver einrichten]]
Zurück zu [[Mailserver einrichten (Ubuntu 16.04)|Mailserver einrichten]]

Aktuelle Version vom 31. März 2018, 11:42 Uhr

Download

Unter https://roundcube.net/download/ die neueste Version auswählen.#

wget https://github.com/roundcube/roundcubemail/releases/download/1.3.5/roundcubemail-1.3.5-complete.tar.gz

Installation

Die Installationsanleitung findet sich unter /var/www/roundcube/INSTALL.

Package installieren

tar xzvf roundcubemail-*
sudo mv roundcubemail-1.3.5 /var/www/roundcube
sudo chown -R www-data:www-data /var/www/roundcube  
sudo chmod -R g+w /var/www/roundcube/

Folgende php-Skripte sind erforderlich (falls noch nicht installiert):

sudo apt-get install -y php-curl php-xml php-gettext php-cgi \
php-mysql libcu rl3 libcurl3-dev php-mbstring php7.0-mbstring \
php-gettext php-pear php-ldap
sudo pear install Mail_Mime
sudo pear install Net_SMTP
sudo pear install Auth_SASL
sudo pear install Net_Sieve
sudo pear install Crypt_GPG

Für Net_IDNA2 gibt es noch keine stabile Version - muss mit Anhang beta runtergeladen werden

sudo pear install Net_IDNA2-beta

Composer

Composer installieren

cd /var/www/roundcube
sudo -u www-data php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
sudo -u www-data php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo usermod -aG www-data martin
php composer-setup.php
sudo -u www-data php -r "unlink('composer-setup.php');"

composer.json

sudo -u www-data cp composer.json-dist composer.json
{
    "name": "roundcube/roundcubemail",
    "description": "The Roundcube Webmail suite",
    "license": "GPL-3.0+",
    "repositories": [
        {
            "type": "composer",
            "url": "https://plugins.roundcube.net/"
        },
        {
            "type": "vcs",
            "url": "https://git.kolab.org/diffusion/PNL/php-net_ldap.git"
        }
    ],
    "require": {
        "php": ">=5.4.0",
        "pear/pear-core-minimal": "~1.10.1",
        "pear/net_socket": "~1.2.1",
        "pear/auth_sasl": "~1.1.0",
        "pear/net_idna2": "~0.2.0",
        "pear/mail_mime": "~1.10.0",
        "pear/net_smtp": "~1.7.1",
        "pear/crypt_gpg": "~1.6.0",
        "pear/net_sieve": "~1.4.0",
        "roundcube/plugin-installer": "~0.1.6",
        "endroid/qr-code": "~1.6.5",
        "pear/net_ldap2": "~2.2.0",
        "kolab/Net_LDAP3": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "^4.8.36 || ^5.7.15"
    }
}

Pakete installieren

sudo -u www-data php composer.phar install --no-dev

Datenbank erstellen

mysql -u root -p
mysql> CREATE DATABASE roundcubemail; 
mysql> create user 'roundcube'@'%' identified by '<password>';
mysql> create user 'roundcube'@'localhost' identified by '<password>';
mysql> grant all privileges on roundcubemail.* to 'roundcube'@'%';
mysql> grant all privileges on roundcubemail.* to 'roundcube'@'localhost';
mysql> flush privileges; 
mysql> quit;

Konfiguration

Apache

lokal

Konfigurationsdatei erstellen, um roundcube lokal über die IP-Adresse (z.B.: http://10.0.0.120/roundcube/) zu erreichen:

cd /etc/apache2/conf-available/
sudo vi roundcube.conf

Folgenden Inhalt in die neu erstellte Datei /etc/apache2/conf-available/roundcube.conf schreiben:

Alias /roundcube "/var/www/roundcube/"
<Directory "/var/www/roundcube">
    Options +FollowSymLinks
    AllowOverride All

    <IfModule mod_dav.c>
      Dav off
    </IfModule>

    SetEnv HOME /var/www/roundcube
    SetEnv HTTP_HOME /var/www/roundcube
</Directory>

Apache-Konfigurationsdateien neu einlesen:

sudo a2enconf roundcube.conf
sudo service apache2 reload

extern

Zertifikat erstellen

Siehe dazu SSL Zertifikat

HTTP Weiterleitung
cd /etc/apache2/sites-available/
sudo vi mail.conf
<VirtualHost *:80>
	ServerName mail.kirner.or.at
	ServerAlias mail.kirner.or.at
	Redirect / https://mail.kirner.or.at
</VirtualHost>
sudo a2ensite mail.conf
sudo service apache2 reload
HTTPS
sudo vi mail-ssl.conf
<VirtualHost *:443>
	ServerName mail.kirner.or.at

	SSLEngine on 
	SSLCertificateFile /etc/ssl/certs/mail.crt 
	SSLCertificateKeyFile /etc/ssl/private/apache.key
 
	# Pfad zu den Webinhalten 
	DocumentRoot /var/www/roundcube

	ErrorLog ${APACHE_LOG_DIR}/roundcube.kirner.or.at-error.log
	CustomLog ${APACHE_LOG_DIR}/roundcube.kirner.or.at-access.log combined
</VirtualHost>
sudo a2ensite mail-ssl.conf
sudo service apache2 reload

Roundcube

Installer

Installer http://10.0.0.120/roundcube/installer/ aufrufen und alle Schritte ausführen.


Nach der Konfiguration Installationsverzeichnis löschen:

sudo rm -r /var/www/roundcube/installer/

config.inc.php

sudo vi /var/www/roundcube/config/config.inc.php

Am Ende folgende Zeile hinzufügen:

$config['enable_installer'] = true;

Plugins

Plugins Roundcube

Links

https://roundcube.net/


Zurück zu Mailserver einrichten