cleanup + add roundcubemail

This commit is contained in:
genofire 2020-07-24 17:07:52 +02:00
parent bf3d3e3616
commit cbf8dce4ef
8 changed files with 147 additions and 5 deletions

View File

@ -31,3 +31,6 @@ mailserver_mailman_web: true
mailserver_mailman_domains:
- mail: "lists.{{ mailserver_mail_domain }}"
web: "lists.{{ mailserver_mail_domain }}"
mailserver_roundcubemail_enabled: true
mailserver_roundcubemail_domain: ""

View File

@ -25,23 +25,34 @@
- name: Run userdatabase
when: mailserver_dovecot_enabled
import_tasks: db.yml
tags: mail-db
- name: Run postfixadmin
when: mailserver_dovecot_enabled
import_tasks: postfixadmin.yml
tags: postfixadmin
- name: Run dovecot
when: mailserver_dovecot_enabled
import_tasks: dovecot.yml
tags: dovecot
- name: Run rspamd
import_tasks: rspamd.yml
when: mailserver_rspamd_enabled
tags: rspamd
- name: Run mailman
when: mailserver_mailman_enabled
import_tasks: mailman.yml
tags: mailman
- name: Run postfix
import_tasks: postfix.yml
tags: postfix
- name: Run roundcubemail
when: mailserver_roundcubemail_enabled
import_tasks: roundcubemail.yml
tags: roundcubemail

View File

@ -19,7 +19,7 @@
- name: postfixadmin - config
template:
src: postfixadmin.local.php
src: postfixadmin-conf.php
dest: /etc/webapps/postfixadmin/config.local.php
- name: postfixadmin - fix config access

16
tasks/roundcubemail.yml Normal file
View File

@ -0,0 +1,16 @@
- name: roundcubemail - install
package:
name: roundcubemail
state: latest
- name: roundcubemail - nginx local
notify: reload nginx
when: mailserver_roundcubemail_domain == ""
template:
src: roundcubemail-local.nginx
dest: /etc/nginx/local.d/roundcubemail.act
- name: roundcubemail - config
template:
src: roundcubemail-conf.php
dest: /etc/webapps/roundcubemail/config/config.inc.php

View File

@ -91,7 +91,7 @@ smtpd_relay_restrictions = reject_non_fqdn_recipient
### Restrictions for all sending foreign servers ("SMTP clients")
smtpd_client_restrictions = permit_mynetworks
check_client_access hash:/etc/postfix/without_ptr
# check_client_access hash:/etc/postfix/without_ptr
# reject_unknown_client_hostname
@ -122,7 +122,7 @@ mua_client_restrictions = permit_mynetworks,permit_sasl_authenticated,reject
### Postscreen Whitelist / Blocklist
postscreen_access_list = permit_mynetworks
cidr:/etc/postfix/postscreen_access
# cidr:/etc/postfix/postscreen_access
postscreen_blacklist_action = drop

View File

@ -0,0 +1,91 @@
<?php
/*
+-----------------------------------------------------------------------+
| Local configuration for the Roundcube Webmail installation. |
| |
| This is a sample configuration file only containing the minimum |
| setup required for a functional installation. Copy more options |
| from defaults.inc.php to this file to override the defaults. |
| |
| This file is part of the Roundcube Webmail client |
| Copyright (C) 2005-2013, The Roundcube Dev Team |
| |
| Licensed under the GNU General Public License version 3 or |
| any later version with exceptions for skins & plugins. |
| See the README file for a full license statement. |
+-----------------------------------------------------------------------+
*/
$config = array();
// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql, sqlsrv, oracle
// 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'
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
$config['db_dsnw'] = 'mysql://roundcube:JAoHRkIPdsCC3woD52cfy5Eu@localhost:3306/roundcube';
// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname 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
// For example %n = mail.domain.tld, %t = domain.tld
$config['default_host'] = 'ssl://mail.sum7.eu';
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['smtp_server'] = 'tls://mail.sum7.eu';
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$config['smtp_port'] = 587;
// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';
// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';
// $config['smtp_auth_type'] = 'PLAIN';
// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = '';
// Name your service. This is displayed on the login screen and in the window title
$config['product_name'] = 'Webmail';
// this key is used to encrypt the users imap password which is stored
// in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars.
// YOUR KEY MUST BE DIFFERENT THAN THE SAMPLE VALUE FOR SECURITY REASONS
$config['des_key'] = 'oaV96vtQ6simuPuDgpABGKF7';
// List of active plugins (in plugins/ directory)
$config['plugins'] = array(
'archive',
'zipdownload',
'managesieve',
);
// skin name: folder from skins/
$config['skin'] = 'sum7';
$config['skin_logo'] = 'https://sum7.eu/img/logo.svg';
$config['enable_installer'] = false;

View File

@ -0,0 +1,21 @@
location /roundcubemail {
rewrite ^/roundcubemail/?(.*)$ /roundcubemail/public_html/$1 last;
}
location /roundcubemail/public_html {
root /usr/share/webapps;
index index.html index.htm index.php;
location ~ \.php(?:$|/) {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
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 SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
}
}