2016-12-10 03:39:02 +08:00
|
|
|
<?php
|
2017-05-14 05:07:48 +08:00
|
|
|
error_reporting(E_ERROR);
|
2019-02-09 03:56:26 +08:00
|
|
|
//error_reporting(E_ALL);
|
2016-12-10 03:39:02 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
PLEASE USE THE FILE "vars.local.inc.php" TO OVERWRITE SETTINGS AND MAKE THEM PERSISTENT!
|
|
|
|
This file will be reset on upgrades.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// SQL database connection variables
|
2017-05-17 01:20:58 +08:00
|
|
|
$database_type = 'mysql';
|
[Docker API] Use TLS encryption for communication with "on-the-fly" created key paris (non-exposed)
[Docker API] Create pipe to pass Rspamd UI worker password
[Dovecot] Pull Spamassassin ruleset to be read by Rspamd (MANY THANKS to Peer Heinlein!)
[Dovecot] Garbage collector for deleted maildirs (set keep time via MAILDIR_GC_TIME which defaults to 1440 minutes)
[Web] Flush memcached after mailbox item changes, fixes #1808
[Web] Fix duplicate IDs, fixes #1792
[Compose] Use SQL sockets
[PHP-FPM] Update APCu and Redis libs
[Dovecot] Encrypt maildir with global key pair in crypt-vol-1 (BACKUP!), also fixes #1791
[Web] Fix deletion of spam aliases
[Helper] Add "crypt" to backup script
[Helper] Override file for external SQL socket (not supported!)
[Compose] New images for Rspamd, PHP-FPM, SOGo, Dovecot, Docker API, Watchdog, ACME, Postfix
2018-09-30 04:01:23 +08:00
|
|
|
$database_sock = '/var/run/mysqld/mysqld.sock';
|
2017-05-17 01:20:58 +08:00
|
|
|
$database_host = 'mysql';
|
2016-12-15 04:10:11 +08:00
|
|
|
$database_user = getenv('DBUSER');
|
|
|
|
$database_pass = getenv('DBPASS');
|
|
|
|
$database_name = getenv('DBNAME');
|
2016-12-21 19:16:05 +08:00
|
|
|
|
|
|
|
// Other variables
|
|
|
|
$mailcow_hostname = getenv('MAILCOW_HOSTNAME');
|
2016-12-10 03:39:02 +08:00
|
|
|
|
2017-06-26 00:09:42 +08:00
|
|
|
// Autodiscover settings
|
2017-07-24 18:35:04 +08:00
|
|
|
// ===
|
|
|
|
// Auto-detect HTTPS port =>
|
2017-07-11 02:52:51 +08:00
|
|
|
$https_port = strpos($_SERVER['HTTP_HOST'], ':');
|
|
|
|
if ($https_port === FALSE) {
|
|
|
|
$https_port = 443;
|
|
|
|
} else {
|
|
|
|
$https_port = substr($_SERVER['HTTP_HOST'], $https_port+1);
|
|
|
|
}
|
2018-10-17 05:00:15 +08:00
|
|
|
|
2017-07-24 18:35:04 +08:00
|
|
|
// Alternatively select port here =>
|
|
|
|
//$https_port = 1234;
|
|
|
|
// Other settings =>
|
2017-06-26 00:09:42 +08:00
|
|
|
$autodiscover_config = array(
|
|
|
|
// General autodiscover service type: "activesync" or "imap"
|
2017-10-02 21:58:55 +08:00
|
|
|
// emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.
|
2017-06-26 00:09:42 +08:00
|
|
|
'autodiscoverType' => 'activesync',
|
2017-10-02 21:58:55 +08:00
|
|
|
// If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows)
|
|
|
|
// Outlook for Mac does not support ActiveSync
|
|
|
|
'useEASforOutlook' => 'yes',
|
2017-07-11 02:52:51 +08:00
|
|
|
// Please don't use STARTTLS-enabled service ports in the "port" variable.
|
2017-06-29 05:22:51 +08:00
|
|
|
// The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).
|
2017-07-11 02:52:51 +08:00
|
|
|
// The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable.
|
2017-06-26 00:09:42 +08:00
|
|
|
'imap' => array(
|
|
|
|
'server' => $mailcow_hostname,
|
2019-02-09 03:55:05 +08:00
|
|
|
'port' => end(explode(':', getenv('IMAPS_PORT'))),
|
|
|
|
'tlsport' => end(explode(':', getenv('IMAP_PORT'))),
|
2017-07-11 02:52:51 +08:00
|
|
|
),
|
|
|
|
'pop3' => array(
|
|
|
|
'server' => $mailcow_hostname,
|
2019-02-09 03:55:05 +08:00
|
|
|
'port' => end(explode(':', getenv('POPS_PORT'))),
|
|
|
|
'tlsport' => end(explode(':', getenv('POP_PORT'))),
|
2017-06-26 00:09:42 +08:00
|
|
|
),
|
|
|
|
'smtp' => array(
|
|
|
|
'server' => $mailcow_hostname,
|
2019-02-09 03:55:05 +08:00
|
|
|
'port' => end(explode(':', getenv('SMTPS_PORT'))),
|
|
|
|
'tlsport' => end(explode(':', getenv('SUBMISSION_PORT'))),
|
2017-06-26 00:09:42 +08:00
|
|
|
),
|
|
|
|
'activesync' => array(
|
2017-07-11 02:52:51 +08:00
|
|
|
'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',
|
2017-06-29 05:22:51 +08:00
|
|
|
),
|
|
|
|
'caldav' => array(
|
2017-07-11 02:52:51 +08:00
|
|
|
'server' => $mailcow_hostname,
|
|
|
|
'port' => $https_port,
|
2017-06-29 05:22:51 +08:00
|
|
|
),
|
|
|
|
'carddav' => array(
|
2017-07-11 02:52:51 +08:00
|
|
|
'server' => $mailcow_hostname,
|
|
|
|
'port' => $https_port,
|
|
|
|
),
|
2017-06-26 00:09:42 +08:00
|
|
|
);
|
|
|
|
|
2017-12-09 20:17:15 +08:00
|
|
|
// If false, we will use DEFAULT_LANG
|
|
|
|
// Uses HTTP_ACCEPT_LANGUAGE header
|
|
|
|
$DETECT_LANGUAGE = true;
|
|
|
|
|
2019-10-22 01:40:45 +08:00
|
|
|
// Change default language
|
2018-04-26 15:34:41 +08:00
|
|
|
$DEFAULT_LANG = 'en';
|
2016-12-10 03:39:02 +08:00
|
|
|
|
2017-05-17 00:11:58 +08:00
|
|
|
// Available languages
|
2019-10-22 01:40:45 +08:00
|
|
|
$AVAILABLE_LANGUAGES = array('ca', 'cs', 'de', 'en', 'es', 'fi', 'fr', 'it', 'lv', 'nl', 'pl', 'pt', 'ru');
|
2017-05-17 00:11:58 +08:00
|
|
|
|
2016-12-10 03:39:02 +08:00
|
|
|
// Change theme (default: lumen)
|
|
|
|
// Needs to be one of those: cerulean, cosmo, cyborg, darkly, flatly, journal, lumen, paper, readable, sandstone,
|
|
|
|
// simplex, slate, spacelab, superhero, united, yeti
|
|
|
|
// See https://bootswatch.com/
|
2017-05-30 03:51:06 +08:00
|
|
|
// WARNING: Only lumen is loaded locally. Enabling any other theme, will download external sources.
|
2017-05-17 01:20:58 +08:00
|
|
|
$DEFAULT_THEME = 'lumen';
|
2017-01-26 02:07:30 +08:00
|
|
|
|
2017-02-22 05:27:11 +08:00
|
|
|
// Password complexity as regular expression
|
2018-10-11 17:59:23 +08:00
|
|
|
// Min. 6 characters
|
2019-01-09 15:43:56 +08:00
|
|
|
$PASSWD_REGEP = '.{6,}';
|
2018-10-11 17:59:23 +08:00
|
|
|
// Min. 6 characters, which must include at least one uppercase letter, one lowercase letter and one number
|
|
|
|
// $PASSWD_REGEP = '^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{6,}$';
|
|
|
|
// Min. 6 characters, which must include at least one letter and one number
|
2019-01-09 15:43:56 +08:00
|
|
|
// $PASSWD_REGEP = '^(?=.*[0-9])(?=.*[A-Za-z]).{6,}$';
|
2017-03-21 19:22:13 +08:00
|
|
|
|
2017-09-17 04:59:42 +08:00
|
|
|
// Show DKIM private keys - false by default
|
|
|
|
$SHOW_DKIM_PRIV_KEYS = false;
|
|
|
|
|
2017-03-21 19:22:13 +08:00
|
|
|
// mailcow Apps - buttons on login screen
|
|
|
|
$MAILCOW_APPS = array(
|
|
|
|
array(
|
2019-09-12 14:28:05 +08:00
|
|
|
'name' => 'Webmail',
|
2017-06-11 08:05:10 +08:00
|
|
|
'link' => '/SOGo/',
|
2017-12-09 20:17:15 +08:00
|
|
|
)
|
2017-03-21 19:22:13 +08:00
|
|
|
);
|
|
|
|
|
2017-03-22 17:46:24 +08:00
|
|
|
// Rows until pagination begins
|
2018-01-18 16:13:36 +08:00
|
|
|
$PAGINATION_SIZE = 20;
|
2017-03-22 17:46:24 +08:00
|
|
|
|
2017-11-04 03:37:24 +08:00
|
|
|
// Default number of rows/lines to display (log table)
|
2019-09-22 21:10:56 +08:00
|
|
|
$LOG_LINES = 1000;
|
2017-11-04 03:37:24 +08:00
|
|
|
|
2017-05-30 03:51:06 +08:00
|
|
|
// Rows until pagination begins (log table)
|
2019-09-22 21:10:56 +08:00
|
|
|
$LOG_PAGINATION_SIZE = 50;
|
2017-05-30 03:51:06 +08:00
|
|
|
|
2017-05-07 19:38:31 +08:00
|
|
|
// Session lifetime in seconds
|
2019-09-22 21:10:56 +08:00
|
|
|
$SESSION_LIFETIME = 10800;
|
2017-05-27 05:02:04 +08:00
|
|
|
|
|
|
|
// Label for OTP devices
|
2017-06-11 08:05:10 +08:00
|
|
|
$OTP_LABEL = "mailcow UI";
|
2017-07-27 05:10:18 +08:00
|
|
|
|
|
|
|
// Default "to" address in relay test tool
|
|
|
|
$RELAY_TO = "null@hosted.mailcow.de";
|
2018-07-24 02:01:01 +08:00
|
|
|
|
|
|
|
// How long to wait (in s) for cURL Docker requests
|
2018-07-29 06:38:22 +08:00
|
|
|
$DOCKER_TIMEOUT = 60;
|
|
|
|
|
2018-08-04 02:31:33 +08:00
|
|
|
// Anonymize IPs logged via UI
|
|
|
|
$ANONYMIZE_IPS = true;
|
2018-10-03 17:18:31 +08:00
|
|
|
|
2019-10-03 01:00:36 +08:00
|
|
|
// OAuth2 settings
|
|
|
|
$REFRESH_TOKEN_LIFETIME = 2678400;
|
|
|
|
$ACCESS_TOKEN_LIFETIME = 86400;
|
|
|
|
|
2019-01-29 07:20:39 +08:00
|
|
|
// MAILBOX_DEFAULT_ATTRIBUTES define default attributes for new mailboxes
|
|
|
|
// These settings will not change existing mailboxes
|
|
|
|
|
2018-10-03 17:18:31 +08:00
|
|
|
// Force incoming TLS for new mailboxes by default
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_in'] = false;
|
|
|
|
|
|
|
|
// Force outgoing TLS for new mailboxes by default
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_out'] = false;
|
|
|
|
|
|
|
|
// Force password change on next login (only allows login to mailcow UI)
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['force_pw_update'] = false;
|
2018-10-24 03:14:57 +08:00
|
|
|
|
2019-03-10 06:17:11 +08:00
|
|
|
// Enable SOGo access (set to false to disable access by default)
|
2018-10-24 03:14:57 +08:00
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['sogo_access'] = true;
|
2018-11-12 17:03:50 +08:00
|
|
|
|
2019-01-29 07:20:39 +08:00
|
|
|
// Send notification when quarantine is not empty (never, hourly, daily, weekly)
|
2019-09-12 14:28:05 +08:00
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification'] = 'hourly';
|
2019-01-29 07:20:39 +08:00
|
|
|
|
2018-11-13 04:01:05 +08:00
|
|
|
// Default mailbox format, should not be changed unless you know exactly, what you do, keep the trailing ":"
|
|
|
|
// Check dovecot.conf for further changes (e.g. shared namespace)
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format'] = 'maildir:';
|
2019-10-26 15:55:09 +08:00
|
|
|
|
|
|
|
// Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing
|
2019-10-29 15:39:57 +08:00
|
|
|
$RSPAMD_MAPS = array(
|
2019-10-26 15:55:09 +08:00
|
|
|
'global_mime_from_blacklist.map',
|
|
|
|
'global_mime_from_whitelist.map',
|
|
|
|
'global_rcpt_blacklist.map',
|
|
|
|
'global_rcpt_whitelist.map',
|
|
|
|
'global_smtp_from_blacklist.map',
|
|
|
|
'global_smtp_from_whitelist.map'
|
|
|
|
);
|