2016-12-09 20:39:02 +01:00
|
|
|
|
<?php
|
2017-05-13 23:07:48 +02:00
|
|
|
|
error_reporting(E_ERROR);
|
2019-02-08 20:56:26 +01:00
|
|
|
|
//error_reporting(E_ALL);
|
2016-12-09 20:39:02 +01: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-16 19:20:58 +02: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-29 22:01:23 +02:00
|
|
|
|
$database_sock = '/var/run/mysqld/mysqld.sock';
|
2017-05-16 19:20:58 +02:00
|
|
|
|
$database_host = 'mysql';
|
2016-12-14 21:10:11 +01:00
|
|
|
|
$database_user = getenv('DBUSER');
|
|
|
|
|
$database_pass = getenv('DBPASS');
|
|
|
|
|
$database_name = getenv('DBNAME');
|
2016-12-21 12:16:05 +01:00
|
|
|
|
|
|
|
|
|
// Other variables
|
|
|
|
|
$mailcow_hostname = getenv('MAILCOW_HOSTNAME');
|
2020-11-15 20:22:35 +01:00
|
|
|
|
$default_pass_scheme = getenv('MAILCOW_PASS_SCHEME');
|
2016-12-09 20:39:02 +01:00
|
|
|
|
|
2017-06-25 18:09:42 +02:00
|
|
|
|
// Autodiscover settings
|
2017-07-24 12:35:04 +02:00
|
|
|
|
// ===
|
|
|
|
|
// Auto-detect HTTPS port =>
|
2017-07-10 20:52:51 +02: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-16 23:00:15 +02:00
|
|
|
|
|
2017-07-24 12:35:04 +02:00
|
|
|
|
// Alternatively select port here =>
|
|
|
|
|
//$https_port = 1234;
|
|
|
|
|
// Other settings =>
|
2017-06-25 18:09:42 +02:00
|
|
|
|
$autodiscover_config = array(
|
|
|
|
|
// General autodiscover service type: "activesync" or "imap"
|
2017-10-02 15:58:55 +02:00
|
|
|
|
// emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.
|
2020-04-27 17:27:47 +02:00
|
|
|
|
// With SOGo disabled, the type will always fallback to imap. CalDAV and CardDAV will be excluded, too.
|
2017-06-25 18:09:42 +02:00
|
|
|
|
'autodiscoverType' => 'activesync',
|
2017-10-02 15:58:55 +02:00
|
|
|
|
// If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows)
|
|
|
|
|
// Outlook for Mac does not support ActiveSync
|
2020-04-20 14:04:17 +02:00
|
|
|
|
'useEASforOutlook' => 'no',
|
2017-07-10 20:52:51 +02:00
|
|
|
|
// Please don't use STARTTLS-enabled service ports in the "port" variable.
|
2017-06-28 23:22:51 +02:00
|
|
|
|
// The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).
|
2017-07-10 20:52:51 +02:00
|
|
|
|
// The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable.
|
2017-06-25 18:09:42 +02:00
|
|
|
|
'imap' => array(
|
|
|
|
|
'server' => $mailcow_hostname,
|
2021-08-10 09:05:01 +02:00
|
|
|
|
'port' => (int)filter_var(substr(getenv('IMAPS_PORT'), strrpos(getenv('IMAPS_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT),
|
2021-08-10 09:06:42 +02:00
|
|
|
|
'tlsport' => (int)filter_var(substr(getenv('IMAP_PORT'), strrpos(getenv('IMAP_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT)
|
2017-07-10 20:52:51 +02:00
|
|
|
|
),
|
|
|
|
|
'pop3' => array(
|
|
|
|
|
'server' => $mailcow_hostname,
|
2021-08-10 09:05:01 +02:00
|
|
|
|
'port' => (int)filter_var(substr(getenv('POPS_PORT'), strrpos(getenv('POPS_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT),
|
|
|
|
|
'tlsport' => (int)filter_var(substr(getenv('POP_PORT'), strrpos(getenv('POP_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT)
|
2017-06-25 18:09:42 +02:00
|
|
|
|
),
|
|
|
|
|
'smtp' => array(
|
|
|
|
|
'server' => $mailcow_hostname,
|
2021-08-10 09:05:01 +02:00
|
|
|
|
'port' => (int)filter_var(substr(getenv('SMTPS_PORT'), strrpos(getenv('SMTPS_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT),
|
|
|
|
|
'tlsport' => (int)filter_var(substr(getenv('SUBMISSION_PORT'), strrpos(getenv('SUBMISSION_PORT'), ':')), FILTER_SANITIZE_NUMBER_INT)
|
2017-06-25 18:09:42 +02:00
|
|
|
|
),
|
|
|
|
|
'activesync' => array(
|
2021-08-08 16:06:55 +02:00
|
|
|
|
'url' => 'https://' . $mailcow_hostname . ($https_port == 443 ? '' : ':' . $https_port) . '/Microsoft-Server-ActiveSync',
|
2017-06-28 23:22:51 +02:00
|
|
|
|
),
|
|
|
|
|
'caldav' => array(
|
2017-07-10 20:52:51 +02:00
|
|
|
|
'server' => $mailcow_hostname,
|
|
|
|
|
'port' => $https_port,
|
2017-06-28 23:22:51 +02:00
|
|
|
|
),
|
|
|
|
|
'carddav' => array(
|
2017-07-10 20:52:51 +02:00
|
|
|
|
'server' => $mailcow_hostname,
|
|
|
|
|
'port' => $https_port,
|
|
|
|
|
),
|
2017-06-25 18:09:42 +02:00
|
|
|
|
);
|
|
|
|
|
|
2017-12-09 13:17:15 +01:00
|
|
|
|
// If false, we will use DEFAULT_LANG
|
|
|
|
|
// Uses HTTP_ACCEPT_LANGUAGE header
|
|
|
|
|
$DETECT_LANGUAGE = true;
|
|
|
|
|
|
2019-10-21 19:40:45 +02:00
|
|
|
|
// Change default language
|
2018-04-26 09:34:41 +02:00
|
|
|
|
$DEFAULT_LANG = 'en';
|
2016-12-09 20:39:02 +01:00
|
|
|
|
|
2017-05-16 18:11:58 +02:00
|
|
|
|
// Available languages
|
2021-06-08 13:16:10 +02:00
|
|
|
|
// https://www.iso.org/obp/ui/#search
|
|
|
|
|
// https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
|
|
|
|
|
$AVAILABLE_LANGUAGES = array(
|
2021-06-09 07:19:57 +02:00
|
|
|
|
'cs' => 'Čeština (Czech)',
|
|
|
|
|
'da' => 'Danish (Dansk)',
|
|
|
|
|
'de' => 'Deutsch (German)',
|
|
|
|
|
'en' => 'English',
|
|
|
|
|
'es' => 'Español (Spanish)',
|
|
|
|
|
'fi' => 'Suomi (Finish)',
|
|
|
|
|
'fr' => 'Français (French)',
|
|
|
|
|
'hu' => 'Magyar (Hungarian)',
|
|
|
|
|
'it' => 'Italiano (Italian)',
|
|
|
|
|
'ko' => '한국어 (Korean)',
|
|
|
|
|
'lv' => 'latviešu (Latvian)',
|
|
|
|
|
'nl' => 'Nederlands (Dutch)',
|
|
|
|
|
'pl' => 'Język Polski (Polish)',
|
|
|
|
|
'pt' => 'Português (Portuguese)',
|
|
|
|
|
'ro' => 'Română (Romanian)',
|
|
|
|
|
'ru' => 'Pусский (Russian)',
|
|
|
|
|
'sk' => 'Slovenčina (Slovak)',
|
|
|
|
|
'sv' => 'Svenska (Swedish)',
|
2021-06-08 13:16:10 +02:00
|
|
|
|
'zh' => '中文 (Chinese)'
|
|
|
|
|
);
|
2017-05-16 18:11:58 +02:00
|
|
|
|
|
2016-12-09 20:39:02 +01: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-29 21:51:06 +02:00
|
|
|
|
// WARNING: Only lumen is loaded locally. Enabling any other theme, will download external sources.
|
2017-05-16 19:20:58 +02:00
|
|
|
|
$DEFAULT_THEME = 'lumen';
|
2017-01-25 19:07:30 +01:00
|
|
|
|
|
2017-09-16 22:59:42 +02:00
|
|
|
|
// Show DKIM private keys - false by default
|
|
|
|
|
$SHOW_DKIM_PRIV_KEYS = false;
|
|
|
|
|
|
2017-03-21 12:22:13 +01:00
|
|
|
|
// mailcow Apps - buttons on login screen
|
|
|
|
|
$MAILCOW_APPS = array(
|
|
|
|
|
array(
|
2019-09-12 08:28:05 +02:00
|
|
|
|
'name' => 'Webmail',
|
2017-06-11 02:05:10 +02:00
|
|
|
|
'link' => '/SOGo/',
|
2017-12-09 13:17:15 +01:00
|
|
|
|
)
|
2017-03-21 12:22:13 +01:00
|
|
|
|
);
|
|
|
|
|
|
2017-03-22 10:46:24 +01:00
|
|
|
|
// Rows until pagination begins
|
2018-01-18 09:13:36 +01:00
|
|
|
|
$PAGINATION_SIZE = 20;
|
2017-03-22 10:46:24 +01:00
|
|
|
|
|
2017-11-03 20:37:24 +01:00
|
|
|
|
// Default number of rows/lines to display (log table)
|
2019-09-22 15:10:56 +02:00
|
|
|
|
$LOG_LINES = 1000;
|
2017-11-03 20:37:24 +01:00
|
|
|
|
|
2017-05-29 21:51:06 +02:00
|
|
|
|
// Rows until pagination begins (log table)
|
2019-09-22 15:10:56 +02:00
|
|
|
|
$LOG_PAGINATION_SIZE = 50;
|
2017-05-29 21:51:06 +02:00
|
|
|
|
|
2017-05-07 13:38:31 +02:00
|
|
|
|
// Session lifetime in seconds
|
2019-09-22 15:10:56 +02:00
|
|
|
|
$SESSION_LIFETIME = 10800;
|
2017-05-26 23:02:04 +02:00
|
|
|
|
|
|
|
|
|
// Label for OTP devices
|
2017-06-11 02:05:10 +02:00
|
|
|
|
$OTP_LABEL = "mailcow UI";
|
2017-07-26 23:10:18 +02:00
|
|
|
|
|
2018-07-23 20:01:01 +02:00
|
|
|
|
// How long to wait (in s) for cURL Docker requests
|
2018-07-29 00:38:22 +02:00
|
|
|
|
$DOCKER_TIMEOUT = 60;
|
|
|
|
|
|
2020-04-16 12:23:27 +02:00
|
|
|
|
// Split DKIM key notation (bind format)
|
2020-04-16 12:57:15 +02:00
|
|
|
|
$SPLIT_DKIM_255 = false;
|
2020-04-16 12:23:27 +02:00
|
|
|
|
|
2019-10-02 19:00:36 +02:00
|
|
|
|
// OAuth2 settings
|
|
|
|
|
$REFRESH_TOKEN_LIFETIME = 2678400;
|
|
|
|
|
$ACCESS_TOKEN_LIFETIME = 86400;
|
2020-03-24 18:46:11 +01:00
|
|
|
|
// Logout from mailcow after first OAuth2 session profile request
|
|
|
|
|
$OAUTH2_FORGET_SESSION_AFTER_LOGIN = false;
|
2019-10-02 19:00:36 +02:00
|
|
|
|
|
2022-05-05 08:25:01 +02:00
|
|
|
|
// Set a limit for mailbox and domain tagging
|
|
|
|
|
$TAGGING_LIMIT = 25;
|
|
|
|
|
|
2019-01-29 00:20:39 +01:00
|
|
|
|
// MAILBOX_DEFAULT_ATTRIBUTES define default attributes for new mailboxes
|
|
|
|
|
// These settings will not change existing mailboxes
|
|
|
|
|
|
2018-10-03 11:18:31 +02: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-23 21:14:57 +02:00
|
|
|
|
|
2019-03-09 23:17:11 +01:00
|
|
|
|
// Enable SOGo access (set to false to disable access by default)
|
2018-10-23 21:14:57 +02:00
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['sogo_access'] = true;
|
2018-11-12 10:03:50 +01:00
|
|
|
|
|
2019-01-29 00:20:39 +01:00
|
|
|
|
// Send notification when quarantine is not empty (never, hourly, daily, weekly)
|
2019-09-12 08:28:05 +02:00
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification'] = 'hourly';
|
2019-01-29 00:20:39 +01:00
|
|
|
|
|
2020-09-17 19:49:15 +02:00
|
|
|
|
// Mailbox has IMAP access by default
|
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['imap_access'] = true;
|
|
|
|
|
|
|
|
|
|
// Mailbox has POP3 access by default
|
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['pop3_access'] = true;
|
|
|
|
|
|
|
|
|
|
// Mailbox has SMTP access by default
|
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['smtp_access'] = true;
|
|
|
|
|
|
2021-12-07 13:56:56 +01:00
|
|
|
|
// Mailbox has sieve access by default
|
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['sieve_access'] = true;
|
|
|
|
|
|
2020-11-28 17:41:48 +01:00
|
|
|
|
// Mailbox receives notifications about...
|
|
|
|
|
// "add_header" - mail that was put into the Junk folder
|
|
|
|
|
// "reject" - mail that was rejected
|
|
|
|
|
// "all" - mail that was rejected and put into the Junk folder
|
|
|
|
|
$MAILBOX_DEFAULT_ATTRIBUTES['quarantine_category'] = 'reject';
|
|
|
|
|
|
2018-11-12 21:01:05 +01: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 09:55:09 +02:00
|
|
|
|
|
2020-04-13 20:34:39 +02:00
|
|
|
|
// Show last IMAP and POP3 logins
|
|
|
|
|
$SHOW_LAST_LOGIN = true;
|
2020-03-24 18:46:11 +01:00
|
|
|
|
|
2020-11-15 19:32:37 +01:00
|
|
|
|
// UV flag handling in FIDO2/WebAuthn - defaults to false to allow iOS logins
|
|
|
|
|
// true = required
|
|
|
|
|
// false = preferred
|
|
|
|
|
// string 'required' 'preferred' 'discouraged'
|
2022-01-12 21:09:18 +01:00
|
|
|
|
$WEBAUTHN_UV_FLAG_REGISTER = false;
|
2022-01-12 21:26:42 +01:00
|
|
|
|
$WEBAUTHN_UV_FLAG_LOGIN = false;
|
2022-01-12 21:09:18 +01:00
|
|
|
|
$WEBAUTHN_USER_PRESENT_FLAG = true;
|
|
|
|
|
|
2020-11-16 15:01:02 +01:00
|
|
|
|
$FIDO2_UV_FLAG_REGISTER = 'preferred';
|
|
|
|
|
$FIDO2_UV_FLAG_LOGIN = 'preferred'; // iOS ignores the key via NFC if required - known issue
|
2020-11-15 19:32:37 +01:00
|
|
|
|
$FIDO2_USER_PRESENT_FLAG = true;
|
2022-01-12 21:09:18 +01:00
|
|
|
|
|
2020-11-16 20:32:13 +01:00
|
|
|
|
$FIDO2_FORMATS = array('apple', 'android-key', 'android-safetynet', 'fido-u2f', 'none', 'packed', 'tpm');
|
2020-03-24 18:46:11 +01:00
|
|
|
|
|
2022-01-12 21:09:18 +01:00
|
|
|
|
|
2019-10-26 09:55:09 +02:00
|
|
|
|
// Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing
|
2019-10-29 08:39:57 +01:00
|
|
|
|
$RSPAMD_MAPS = array(
|
2019-12-22 21:26:10 +01:00
|
|
|
|
'regex' => array(
|
|
|
|
|
'Header-From: Blacklist' => 'global_mime_from_blacklist.map',
|
|
|
|
|
'Header-From: Whitelist' => 'global_mime_from_whitelist.map',
|
|
|
|
|
'Envelope Sender Blacklist' => 'global_smtp_from_blacklist.map',
|
|
|
|
|
'Envelope Sender Whitelist' => 'global_smtp_from_whitelist.map',
|
|
|
|
|
'Recipient Blacklist' => 'global_rcpt_blacklist.map',
|
|
|
|
|
'Recipient Whitelist' => 'global_rcpt_whitelist.map',
|
|
|
|
|
'Fishy TLDS (only fired in combination with bad words)' => 'fishy_tlds.map',
|
|
|
|
|
'Bad Words (only fired in combination with fishy TLDs)' => 'bad_words.map',
|
2019-12-27 15:51:23 +01:00
|
|
|
|
'Bad Words DE (only fired in combination with fishy TLDs)' => 'bad_words_de.map',
|
2019-12-22 21:26:10 +01:00
|
|
|
|
'Bad Languages' => 'bad_languages.map',
|
2020-03-06 08:43:19 +01:00
|
|
|
|
'Bulk Mail Headers' => 'bulk_header.map',
|
2021-05-23 23:13:34 +02:00
|
|
|
|
'Bad (Junk) Mail Headers' => 'bad_header.map',
|
2020-03-06 08:43:19 +01:00
|
|
|
|
'Monitoring Hosts' => 'monitoring_nolog.map'
|
2019-12-22 21:26:10 +01:00
|
|
|
|
)
|
2019-10-26 09:55:09 +02:00
|
|
|
|
);
|