fix roundcubemail

This commit is contained in:
genofire 2020-07-24 18:08:57 +02:00
parent cbf8dce4ef
commit 3b6a2f7004
5 changed files with 46 additions and 13 deletions

View File

@ -34,3 +34,10 @@ mailserver_mailman_domains:
mailserver_roundcubemail_enabled: true mailserver_roundcubemail_enabled: true
mailserver_roundcubemail_domain: "" mailserver_roundcubemail_domain: ""
mailserver_roundcubemail_enabled_installer: false
mailserver_roundcubemail_db_create_schema: false # run once with true
mailserver_roundcubemail_db_type: "pgsql"
mailserver_roundcubemail_db_host: "localhost"
mailserver_roundcubemail_db_name: "roundcubemail"
mailserver_roundcubemail_db_user: "roundcubemail"
mailserver_roundcubemail_db_password: "{{ lookup('password', 'credentials/' + inventory_hostname + '/mailserver/roundcubemail_db_password length=15') }}"

View File

@ -23,9 +23,14 @@
line: "{{ mailserver_cert_domains }}" line: "{{ mailserver_cert_domains }}"
- name: Run userdatabase - name: Run userdatabase
when: mailserver_dovecot_enabled when: mailserver_dovecot_enabled or mailserver_roundcubemail_enabled
import_tasks: db.yml import_tasks: db.yml
tags: mail-db tags:
- mail-db
- postfixadmin
- dovecot
- postfix
- roundcubemail
- name: Run postfixadmin - name: Run postfixadmin
when: mailserver_dovecot_enabled when: mailserver_dovecot_enabled

View File

@ -3,6 +3,31 @@
name: roundcubemail name: roundcubemail
state: latest state: latest
- name: roundcubemail - create user
postgresql_user:
login_host: "{{ mailserver_roundcubemail_db_host }}"
name: "{{ mailserver_roundcubemail_db_user }}"
password: "{{ mailserver_roundcubemail_db_password }}"
- name: roundcubemail - create database
postgresql_db:
login_host: "{{ mailserver_roundcubemail_db_host }}"
name: "{{ mailserver_roundcubemail_db_name }}"
owner: "{{ mailserver_roundcubemail_db_user }}"
encoding: UTF-8
lc_collate: en_US.UTF-8
lc_ctype: en_US.UTF-8
- name: roundcubemail - create tables
when: mailserver_roundcubemail_db_create_schema
postgresql_query:
login_host: "{{ mailserver_roundcubemail_db_host }}"
login_user: "{{ mailserver_roundcubemail_db_user }}"
login_password: "{{ mailserver_roundcubemail_db_password }}"
db: "{{ mailserver_roundcubemail_db_name }}"
path_to_script: /usr/share/webapps/roundcubemail/SQL/postgres.initial.sql
- name: roundcubemail - nginx local - name: roundcubemail - nginx local
notify: reload nginx notify: reload nginx
when: mailserver_roundcubemail_domain == "" when: mailserver_roundcubemail_domain == ""

View File

@ -25,7 +25,7 @@ $config = array();
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php // For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646' // NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db' // or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://roundcube:JAoHRkIPdsCC3woD52cfy5Eu@localhost:3306/roundcube'; $config['db_dsnw'] = '{{ mailserver_roundcubemail_db_type }}://{{ mailserver_roundcubemail_db_user }}:{{ mailserver_roundcubemail_db_password }}@{{ mailserver_roundcubemail_db_host }}/{{ mailserver_roundcubemail_db_name }}';
// The mail host chosen to perform the log-in. // The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts // Leave blank to show a textbox at login, give a list of hosts
@ -37,7 +37,7 @@ $config['db_dsnw'] = 'mysql://roundcube:JAoHRkIPdsCC3woD52cfy5Eu@localhost:3306/
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen // %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld // For example %n = mail.domain.tld, %t = domain.tld
$config['default_host'] = 'ssl://mail.sum7.eu'; $config['default_host'] = 'ssl://{{ mailserver_mx_domain }}';
// SMTP server host (for sending mails). // SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls:// // To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
@ -49,7 +49,7 @@ $config['default_host'] = 'ssl://mail.sum7.eu';
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part) // %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part) // %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld // For example %n = mail.domain.tld, %t = domain.tld
$config['smtp_server'] = 'tls://mail.sum7.eu'; $config['smtp_server'] = 'tls://{{ mailserver_mx_domain }}';
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the // SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS)) // deprecated SSL over SMTP (aka SMTPS))
@ -75,7 +75,7 @@ $config['product_name'] = 'Webmail';
// in the session record (and the client cookie if remember password is enabled). // in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars. // please provide a string of exactly 24 chars.
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS // YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
$config['des_key'] = 'oaV96vtQ6simuPuDgpABGKF7'; $//config['des_key'] = 'oaV96vtQ6simuPuDgpABGKF7';
// List of active plugins (in plugins/ directory) // List of active plugins (in plugins/ directory)
$config['plugins'] = array( $config['plugins'] = array(
@ -85,7 +85,7 @@ $config['plugins'] = array(
); );
// skin name: folder from skins/ // skin name: folder from skins/
$config['skin'] = 'sum7'; //$config['skin'] = 'sum7';
$config['skin_logo'] = 'https://sum7.eu/img/logo.svg'; $config['skin_logo'] = 'https://sum7.eu/img/logo.svg';
$config['enable_installer'] = false; $config['enable_installer'] = {{ mailserver_roundcubemail_enabled_installer }};

View File

@ -1,8 +1,4 @@
location /roundcubemail { location /roundcubemail {
rewrite ^/roundcubemail/?(.*)$ /roundcubemail/public_html/$1 last;
}
location /roundcubemail/public_html {
root /usr/share/webapps; root /usr/share/webapps;
index index.html index.htm index.php; index index.html index.htm index.php;
@ -13,7 +9,7 @@ location /roundcubemail/public_html {
include fastcgi.conf; include fastcgi.conf;
fastcgi_param PHP_ADMIN_VALUE open_basedir=/etc/webapps/roundcubemail/:/usr/share/webapps/roundcubemail:/var/logs/roundcubemail/:/var/cache/roundcubemail/:/tmp:/usr/share/pear:/dev/urandom; fastcgi_param PHP_ADMIN_VALUE open_basedir=/etc/webapps/roundcubemail/:/usr/share/webapps/roundcubemail:/var/log/roundcubemail/:/var/cache/roundcubemail/:/tmp:/usr/share/pear:/dev/urandom;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on; fastcgi_param HTTPS on;