Roundcube (Ubuntu 18.04): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
 
(24 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
{{note|Noch in Bearbeitung}}
{{note|Noch in Bearbeitung}}


== Voraussetzungen ==
<pre>
sudo apt-get install php7.3-gd
</pre>


== Download ==
== Download ==
Zeile 13: Zeile 7:


<pre>
<pre>
wget https://github.com/roundcube/roundcubemail/releases/download/1.4.2/roundcubemail-1.4.2-complete.tar.gz
wget https://github.com/roundcube/roundcubemail/releases/download/1.4.3/roundcubemail-1.4.3-complete.tar.gz
</pre>
</pre>


Zeile 24: Zeile 18:
<pre>
<pre>
tar xzvf roundcubemail-*
tar xzvf roundcubemail-*
sudo mv roundcubemail-1.4.2 /var/www/roundcube_1_4_2
sudo mv roundcubemail-1.4.3 /var/www/roundcube_1_4_3
sudo chown -R www-data:www-data /var/www/roundcube_1_4_2/  
cd /var/www/
sudo chmod -R g+w /var/www/roundcube_1_4_2/
sudo chown -R www-data:www-data roundcube_1_4_3/  
sudo chmod -R g+w roundcube_1_4_3/
sudo ln -s roundcube_1_4_3/ roundcube
</pre>
</pre>


Zeile 32: Zeile 28:


<pre>
<pre>
sudo apt-get install -y php-curl php-xml php-gettext php-cgi \
sudo apt-get install -y php-curl php-xml php-gettext php-cgi php-net-ldap3 php-mysql php-gettext php-pear \
php-mysql libcurl4-openssl-dev php-mbstring php7.3-mbstring \
libcurl4-openssl-dev php-mbstring php7.3-mbstring php7.3-gd php7.3-dev php7.3-intl php7.3-imagick php7.3-zip \
php-gettext php-pear php-ldap
php-ldap
</pre>
 
<pre>
sudo apt-get install -y libicu-dev
</pre>
</pre>


Zeile 61: Zeile 61:


<pre>
<pre>
cd /var/www/roundcube_1_4_2
cd /var/www/roundcube
</pre>
</pre>


Zeile 148: Zeile 148:
=== Apache ===
=== Apache ===


==== lokal ====
==== php.ini ====
 
Die Datei
 
<pre>
sudo vi /etc/php/7.3/apache2/php.ini
</pre>
 
bearbeiten und folgende Zeile anpassen:
 
<pre>
date.timezone = Europe/Vienna
</pre>


Einen symbolischen Link auf das aktuelle Installationsverzeichnis erstellen:
Danach muss Apache neu gestartet werden:


<pre>
<pre>
cd /var/www
sudo service apache2 restart
sudo ln -s roundcube_1_4_2 roundcube
</pre>
</pre>
==== lokal ====


Konfigurationsdatei erstellen, um ''roundcube'' lokal über die IP-Adresse (z.B.: ''http://10.0.0.156/roundcube/'') zu erreichen:
Konfigurationsdatei erstellen, um ''roundcube'' lokal über die IP-Adresse (z.B.: ''http://10.0.0.156/roundcube/'') zu erreichen:
Zeile 195: Zeile 208:
<pre>
<pre>
cd /etc/apache2/sites-available/
cd /etc/apache2/sites-available/
sudo vi mail.conf
sudo vi mail1.conf
</pre>
</pre>


<pre>
<pre>
<VirtualHost *:80>
<VirtualHost *:80>
ServerName mail.kirner.or.at
ServerName mail1.kirner.or.at
ServerAlias mail.kirner.or.at
ServerAlias mail1.kirner.or.at
Redirect / https://mail.kirner.or.at
Redirect / https://mail1.kirner.or.at
</VirtualHost>
</VirtualHost>
</pre>
</pre>


<pre>
<pre>
sudo a2ensite mail.conf
sudo a2ensite mail1.conf
sudo service apache2 reload
sudo service apache2 reload
</pre>
</pre>
Zeile 214: Zeile 227:


<pre>
<pre>
sudo vi mail-ssl.conf
sudo vi mail1-ssl.conf
</pre>
</pre>


<pre>
<pre>
<VirtualHost *:443>
<VirtualHost *:443>
ServerName mail.kirner.or.at
ServerName mail1.kirner.or.at


SSLEngine on  
SSLEngine on  
SSLCertificateFile /etc/ssl/certs/mail.crt  
SSLCertificateFile /etc/ssl/certs/mail1.crt  
SSLCertificateKeyFile /etc/ssl/private/apache.key
SSLCertificateKeyFile /etc/ssl/private/apache.key
   
   
Zeile 234: Zeile 247:


<pre>
<pre>
sudo a2ensite mail-ssl.conf
sudo a2ensite mail1-ssl.conf
sudo service apache2 reload
sudo service apache2 reload
</pre>
</pre>
Zeile 243: Zeile 256:


Installer [http://10.0.0.156/roundcube/installer/ http://10.0.0.156/roundcube/installer/] aufrufen und alle Schritte ausführen.
Installer [http://10.0.0.156/roundcube/installer/ http://10.0.0.156/roundcube/installer/] aufrufen und alle Schritte ausführen.
<pre>
http://10.0.0.156/roundcube/installer/index.php?_step=3
</pre>




Zeile 252: Zeile 269:


==== config.inc.php ====
==== config.inc.php ====
Die Datei


<pre>
<pre>
Zeile 257: Zeile 276:
</pre>
</pre>


Am Ende folgende Zeile hinzufügen:
sollte nach der Konfiguration etwa so aussehen:


<pre>
<pre>
$config['enable_installer'] = true;
<?php
</pre>
 
/* Local configuration for Roundcube Webmail */
 
$config['enable_installer'] = false;
 
$config['db_dsnw'] = 'mysql://roundcube:<password>@localhost/roundcubemail';
 
 
$config['default_host'] = '%n';
 
$config['imap_conn_options'] = array(
  'ssl'        => array(
    'verify_peer'      => false,
    'verify_peer_name' => false,
  ),
);
 
 
$config['smtp_server'] = 'tls://%n';
 
$config['smtp_conn_options'] = array(
  'ssl'        => array(
    'verify_peer'      => false,
    'verify_peer_name' => false,
  ),
);
 
$config['smtp_port'] = 587;
 
$config['smtp_user'] = '%u';
 
$config['smtp_pass'] = '%p';
 
 
$config['support_url'] = '';
 
$config['des_key'] = '<key>';


== Plugins ==
$config['username_domain'] = 'kirner.or.at';


[[Plugins Roundcube 1.3.5|Plugins Roundcube]]
$config['product_name'] = 'Kirner Webmail (Mail 1)';


$config['plugins'] = array(
'acl',
'additional_message_headers',
'archive',
'attachment_reminder',
'emoticons',
'enigma',
'managesieve',
'markasjunk',
'newmail_notifier',
'password',
'userinfo',
'vcard_attachments',
'zipdownload'
);


[https://plugins.roundcube.net/packages/offerel/caldavzap https://plugins.roundcube.net/packages/offerel/caldavzap]
$config['language'] = 'de_DE';
</pre>
 
== Plugins ==


[https://plugins.roundcube.net/packages/texxasrulez/caldav_calendar https://plugins.roundcube.net/packages/texxasrulez/caldav_calendar]
[[Plugins Roundcube 1.4.2|Plugins Roundcube]]


== Links ==
== Links ==

Aktuelle Version vom 21. März 2020, 14:49 Uhr

Noch in Bearbeitung


Download

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

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

Installation

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

Package installieren

tar xzvf roundcubemail-*
sudo mv roundcubemail-1.4.3 /var/www/roundcube_1_4_3
cd /var/www/
sudo chown -R www-data:www-data roundcube_1_4_3/ 
sudo chmod -R g+w roundcube_1_4_3/
sudo ln -s roundcube_1_4_3/ roundcube

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

sudo apt-get install -y php-curl php-xml php-gettext php-cgi php-net-ldap3 php-mysql php-gettext php-pear \
libcurl4-openssl-dev php-mbstring php7.3-mbstring php7.3-gd php7.3-dev php7.3-intl php7.3-imagick php7.3-zip \
php-ldap
sudo apt-get install -y libicu-dev
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

sudo mkdir /var/www/.composer
sudo chown www-data:www-data /var/www/.composer
cd /var/www/roundcube

Folgende Skriptzeilen stammen von https://getcomposer.org/download/:

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') === 'baf1608c33254d00611ac1705c1d9958c817a1a33bce370c0595974b342601bd80b92a3f46067da89e3b06bff421f182') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo -u www-data 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 update
sudo -u www-data php composer.phar install --no-dev

Datenbank erstellen

mysql -u root -p
mysql> CREATE DATABASE roundcubemail CHARACTER SET utf8 COLLATE utf8_general_ci; 
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

php.ini

Die Datei

sudo vi /etc/php/7.3/apache2/php.ini 

bearbeiten und folgende Zeile anpassen:

date.timezone = Europe/Vienna

Danach muss Apache neu gestartet werden:

sudo service apache2 restart

lokal

Konfigurationsdatei erstellen, um roundcube lokal über die IP-Adresse (z.B.: http://10.0.0.156/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 mail1.conf
<VirtualHost *:80>
	ServerName mail1.kirner.or.at
	ServerAlias mail1.kirner.or.at
	Redirect / https://mail1.kirner.or.at
</VirtualHost>
sudo a2ensite mail1.conf
sudo service apache2 reload
HTTPS
sudo vi mail1-ssl.conf
<VirtualHost *:443>
	ServerName mail1.kirner.or.at

	SSLEngine on 
	SSLCertificateFile /etc/ssl/certs/mail1.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 mail1-ssl.conf
sudo service apache2 reload

Roundcube

Installer

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

http://10.0.0.156/roundcube/installer/index.php?_step=3


Nach der Konfiguration Installationsverzeichnis löschen:

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

config.inc.php

Die Datei

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

sollte nach der Konfiguration etwa so aussehen:

<?php

/* Local configuration for Roundcube Webmail */

$config['enable_installer'] = false;

$config['db_dsnw'] = 'mysql://roundcube:<password>@localhost/roundcubemail';


$config['default_host'] = '%n';

$config['imap_conn_options'] = array(
  'ssl'         => array(
     'verify_peer'      => false,
     'verify_peer_name' => false,
  ),
);


$config['smtp_server'] = 'tls://%n';

$config['smtp_conn_options'] = array(
  'ssl'         => array(
     'verify_peer'      => false,
     'verify_peer_name' => false,
  ),
);

$config['smtp_port'] = 587;

$config['smtp_user'] = '%u';

$config['smtp_pass'] = '%p';


$config['support_url'] = '';

$config['des_key'] = '<key>';

$config['username_domain'] = 'kirner.or.at';

$config['product_name'] = 'Kirner Webmail (Mail 1)';

$config['plugins'] = array(
	'acl', 
	'additional_message_headers', 
	'archive', 
	'attachment_reminder', 
	'emoticons', 
	'enigma', 
	'managesieve', 
	'markasjunk', 
	'newmail_notifier', 
	'password', 
	'userinfo', 
	'vcard_attachments', 
	'zipdownload'
);

$config['language'] = 'de_DE';

Plugins

Plugins Roundcube

Links

https://roundcube.net/


Zurück zu Mailserver einrichten