2017-03-02 12:23:23 +02:00
|
|
|
<?php
|
2020-01-29 11:37:55 +02:00
|
|
|
|
|
|
|
// Slave does not serve UI
|
2020-03-28 20:51:42 +02:00
|
|
|
/* if (!preg_match('/y|yes/i', getenv('MASTER'))) {
|
2020-01-29 11:37:55 +02:00
|
|
|
header('Location: /SOGo', true, 307);
|
2020-03-24 19:46:11 +02:00
|
|
|
exit;
|
2020-03-28 20:51:42 +02:00
|
|
|
}*/
|
2021-08-10 02:08:04 +02:00
|
|
|
// Load core functions first
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.inc.php';
|
2020-01-29 11:37:55 +02:00
|
|
|
|
2017-09-17 14:39:10 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.inc.php';
|
2017-09-16 13:33:27 +02:00
|
|
|
$default_autodiscover_config = $autodiscover_config;
|
2019-02-15 00:10:46 +02:00
|
|
|
|
2017-05-16 18:11:58 +02:00
|
|
|
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php')) {
|
|
|
|
include_once $_SERVER['DOCUMENT_ROOT'] . '/inc/vars.local.inc.php';
|
2017-03-02 12:23:23 +02:00
|
|
|
}
|
2019-02-15 00:10:46 +02:00
|
|
|
unset($https_port);
|
2017-09-16 13:33:27 +02:00
|
|
|
$autodiscover_config = array_merge($default_autodiscover_config, $autodiscover_config);
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2017-06-06 21:58:48 +02:00
|
|
|
header_remove("X-Powered-By");
|
|
|
|
|
2017-03-02 12:23:23 +02:00
|
|
|
// Yubi OTP API
|
2017-05-08 15:41:05 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/Yubico.php';
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2020-11-15 20:32:37 +02:00
|
|
|
// WebAuthn
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/WebAuthn.php';
|
|
|
|
|
2017-05-07 13:38:31 +02:00
|
|
|
// Autoload composer
|
2017-05-08 15:41:05 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/vendor/autoload.php';
|
2017-05-07 13:38:31 +02:00
|
|
|
|
2017-11-03 21:37:24 +02:00
|
|
|
// Load Sieve
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/sieve/SieveParser.php';
|
|
|
|
|
2019-10-19 23:40:19 +02:00
|
|
|
// minifierExtended
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/JSminifierExtended.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/CSSminifierExtended.php';
|
|
|
|
|
2019-11-09 11:09:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/lib/array_merge_real.php';
|
|
|
|
|
2019-01-30 13:10:26 +02:00
|
|
|
// Minify JS
|
|
|
|
use MatthiasMullie\Minify;
|
2019-10-19 23:40:19 +02:00
|
|
|
$js_minifier = new JSminifierExtended();
|
2019-01-30 13:10:26 +02:00
|
|
|
$js_dir = array_diff(scandir('/web/js/build'), array('..', '.'));
|
|
|
|
foreach ($js_dir as $js_file) {
|
|
|
|
$js_minifier->add('/web/js/build/' . $js_file);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Minify CSS
|
2019-10-19 23:40:19 +02:00
|
|
|
$css_minifier = new CSSminifierExtended();
|
2019-01-30 13:10:26 +02:00
|
|
|
$css_dir = array_diff(scandir('/web/css/build'), array('..', '.'));
|
|
|
|
foreach ($css_dir as $css_file) {
|
|
|
|
$css_minifier->add('/web/css/build/' . $css_file);
|
|
|
|
}
|
|
|
|
|
2017-05-07 13:38:31 +02:00
|
|
|
// U2F API + T/HOTP API
|
|
|
|
$u2f = new u2flib_server\U2F('https://' . $_SERVER['HTTP_HOST']);
|
2019-03-19 09:45:08 +02:00
|
|
|
$qrprovider = new RobThree\Auth\Providers\Qr\QRServerProvider();
|
|
|
|
$tfa = new RobThree\Auth\TwoFactorAuth($OTP_LABEL, 6, 30, 'sha1', $qrprovider);
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2020-11-15 20:32:37 +02:00
|
|
|
// FIDO2
|
|
|
|
$formats = $GLOBALS['FIDO2_FORMATS'];
|
|
|
|
$WebAuthn = new \WebAuthn\WebAuthn('WebAuthn Library', $_SERVER['HTTP_HOST'], $formats);
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/solo.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/apple.pem');
|
2020-11-25 17:10:33 +02:00
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/nitro.pem');
|
2020-11-15 20:32:37 +02:00
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/yubico.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/hypersecu.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/globalSign.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/googleHardware.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/microsoftTpmCollection.pem');
|
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/huawei.pem');
|
2021-02-16 22:33:46 +02:00
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/trustkey.pem');
|
2021-04-07 21:29:28 +02:00
|
|
|
$WebAuthn->addRootCertificates($_SERVER['DOCUMENT_ROOT'] . '/inc/lib/WebAuthn/rootCertificates/bsi.pem');
|
2020-11-15 20:32:37 +02:00
|
|
|
|
2017-05-05 10:35:27 +02:00
|
|
|
// Redis
|
|
|
|
$redis = new Redis();
|
2019-05-28 15:18:27 +02:00
|
|
|
try {
|
2020-02-05 12:04:14 +02:00
|
|
|
if (!empty(getenv('REDIS_SLAVEOF_IP'))) {
|
|
|
|
$redis->connect(getenv('REDIS_SLAVEOF_IP'), getenv('REDIS_SLAVEOF_PORT'));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$redis->connect('redis-mailcow', 6379);
|
|
|
|
}
|
2019-05-28 15:18:27 +02:00
|
|
|
}
|
|
|
|
catch (Exception $e) {
|
|
|
|
?>
|
|
|
|
<center style='font-family:sans-serif;'>Connection to Redis failed.<br /><br />The following error was reported:<br/><?=$e->getMessage();?></center>
|
|
|
|
<?php
|
|
|
|
exit;
|
|
|
|
}
|
2017-05-05 10:35:27 +02:00
|
|
|
|
2017-03-02 12:23:23 +02:00
|
|
|
// PDO
|
2017-04-21 10:20:31 +02:00
|
|
|
// Calculate offset
|
2018-11-12 11:03:50 +02:00
|
|
|
// $now = new DateTime();
|
|
|
|
// $mins = $now->getOffset() / 60;
|
|
|
|
// $sgn = ($mins < 0 ? -1 : 1);
|
|
|
|
// $mins = abs($mins);
|
|
|
|
// $hrs = floor($mins / 60);
|
|
|
|
// $mins -= $hrs * 60;
|
|
|
|
// $offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);
|
2017-04-21 10:20:31 +02:00
|
|
|
|
[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
|
|
|
$dsn = $database_type . ":unix_socket=" . $database_sock . ";dbname=" . $database_name;
|
2017-03-02 12:23:23 +02:00
|
|
|
$opt = [
|
2017-05-16 18:11:58 +02:00
|
|
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
|
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
|
|
PDO::ATTR_EMULATE_PREPARES => false,
|
2018-11-12 11:03:50 +02:00
|
|
|
//PDO::MYSQL_ATTR_INIT_COMMAND => "SET time_zone = '" . $offset . "', group_concat_max_len = 3423543543;",
|
2017-03-02 12:23:23 +02:00
|
|
|
];
|
|
|
|
try {
|
2017-05-16 18:11:58 +02:00
|
|
|
$pdo = new PDO($dsn, $database_user, $database_pass, $opt);
|
2017-03-02 12:23:23 +02:00
|
|
|
}
|
|
|
|
catch (PDOException $e) {
|
[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
|
|
|
// Stop when SQL connection fails
|
2017-03-02 12:23:23 +02:00
|
|
|
?>
|
[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
|
|
|
<center style='font-family:sans-serif;'>Connection to database failed.<br /><br />The following error was reported:<br/> <?=$e->getMessage();?></center>
|
2017-03-02 12:23:23 +02:00
|
|
|
<?php
|
|
|
|
exit;
|
|
|
|
}
|
[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
|
|
|
// Stop when dockerapi is not available
|
|
|
|
if (fsockopen("tcp://dockerapi", 443, $errno, $errstr) === false) {
|
|
|
|
?>
|
|
|
|
<center style='font-family:sans-serif;'>Connection to dockerapi container failed.<br /><br />The following error was reported:<br/><?=$errno;?> - <?=$errstr;?></center>
|
|
|
|
<?php
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2019-09-28 20:00:04 +02:00
|
|
|
// OAuth2
|
|
|
|
class mailcowPdo extends OAuth2\Storage\Pdo {
|
|
|
|
public function __construct($connection, $config = array()) {
|
|
|
|
parent::__construct($connection, $config);
|
|
|
|
$this->config['user_table'] = 'mailbox';
|
|
|
|
}
|
|
|
|
public function checkUserCredentials($username, $password) {
|
|
|
|
if (check_login($username, $password) == 'user') {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
public function getUserDetails($username) {
|
|
|
|
return $this->getUser($username);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$oauth2_scope_storage = new OAuth2\Storage\Memory(array('default_scope' => 'profile', 'supported_scopes' => array('profile')));
|
|
|
|
$oauth2_storage = new mailcowPdo(array('dsn' => $dsn, 'username' => $database_user, 'password' => $database_pass));
|
|
|
|
$oauth2_server = new OAuth2\Server($oauth2_storage, array(
|
2019-10-02 19:00:36 +02:00
|
|
|
'refresh_token_lifetime' => $REFRESH_TOKEN_LIFETIME,
|
|
|
|
'access_lifetime' => $ACCESS_TOKEN_LIFETIME,
|
2019-09-28 20:00:04 +02:00
|
|
|
));
|
|
|
|
$oauth2_server->setScopeUtil(new OAuth2\Scope($oauth2_scope_storage));
|
|
|
|
$oauth2_server->addGrantType(new OAuth2\GrantType\AuthorizationCode($oauth2_storage));
|
|
|
|
$oauth2_server->addGrantType(new OAuth2\GrantType\UserCredentials($oauth2_storage));
|
2019-10-02 19:00:36 +02:00
|
|
|
$oauth2_server->addGrantType(new OAuth2\GrantType\RefreshToken($oauth2_storage, array(
|
|
|
|
'always_issue_new_refresh_token' => true
|
|
|
|
)));
|
2019-09-28 20:00:04 +02:00
|
|
|
|
2018-11-12 11:03:50 +02:00
|
|
|
function exception_handler($e) {
|
2018-08-13 23:20:40 +02:00
|
|
|
if ($e instanceof PDOException) {
|
|
|
|
$_SESSION['return'][] = array(
|
|
|
|
'type' => 'danger',
|
|
|
|
'log' => array(__FUNCTION__),
|
|
|
|
'msg' => array('mysql_error', $e)
|
|
|
|
);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$_SESSION['return'][] = array(
|
|
|
|
'type' => 'danger',
|
|
|
|
'log' => array(__FUNCTION__),
|
2018-11-12 11:03:50 +02:00
|
|
|
'msg' => 'An unknown error occured: ' . print_r($e, true)
|
2018-08-13 23:20:40 +02:00
|
|
|
);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2018-11-12 11:03:50 +02:00
|
|
|
set_exception_handler('exception_handler');
|
2017-03-02 12:23:23 +02:00
|
|
|
|
2021-08-10 02:08:04 +02:00
|
|
|
// Load session
|
2017-12-09 14:17:15 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/sessions.inc.php';
|
|
|
|
|
2018-11-12 11:03:50 +02:00
|
|
|
// IMAP lib
|
|
|
|
// use Ddeboer\Imap\Server;
|
|
|
|
// $imap_server = new Server('dovecot', 143, '/imap/tls/novalidate-cert');
|
|
|
|
|
2017-05-16 18:11:58 +02:00
|
|
|
// Set language
|
2018-01-02 13:30:45 +02:00
|
|
|
if (!isset($_SESSION['mailcow_locale']) && !isset($_COOKIE['mailcow_locale'])) {
|
2017-12-09 14:17:15 +02:00
|
|
|
if ($DETECT_LANGUAGE && isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
2018-10-19 10:20:09 +02:00
|
|
|
$header_lang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));
|
2021-06-08 13:16:10 +02:00
|
|
|
if (array_key_exists($header_lang, $AVAILABLE_LANGUAGES)) {
|
2018-10-19 10:20:09 +02:00
|
|
|
$_SESSION['mailcow_locale'] = $header_lang;
|
2017-12-09 14:17:15 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$_SESSION['mailcow_locale'] = strtolower(trim($DEFAULT_LANG));
|
|
|
|
}
|
2017-05-23 09:36:59 +02:00
|
|
|
}
|
2018-01-02 13:30:45 +02:00
|
|
|
if (isset($_COOKIE['mailcow_locale'])) {
|
2018-10-19 10:20:09 +02:00
|
|
|
(preg_match('/^[a-z]{2}$/', $_COOKIE['mailcow_locale'])) ? $_SESSION['mailcow_locale'] = $_COOKIE['mailcow_locale'] : setcookie("mailcow_locale", "", time() - 300);
|
2018-01-02 13:30:45 +02:00
|
|
|
}
|
2021-06-08 13:16:10 +02:00
|
|
|
if (isset($_GET['lang']) && array_key_exists($_GET['lang'], $AVAILABLE_LANGUAGES)) {
|
2017-05-16 18:11:58 +02:00
|
|
|
$_SESSION['mailcow_locale'] = $_GET['lang'];
|
2018-01-02 13:30:45 +02:00
|
|
|
setcookie("mailcow_locale", $_GET['lang'], time()+30758400); // one year
|
2017-05-16 18:11:58 +02:00
|
|
|
}
|
|
|
|
|
2019-11-09 11:09:23 +02:00
|
|
|
/*
|
|
|
|
* load language
|
|
|
|
*/
|
|
|
|
$lang = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . '/lang/lang.en.json'), true);
|
|
|
|
|
|
|
|
$langFile = $_SERVER['DOCUMENT_ROOT'] . '/lang/lang.'.$_SESSION['mailcow_locale'].'.json';
|
|
|
|
if(file_exists($langFile)) {
|
|
|
|
$lang = array_merge_real($lang, json_decode(file_get_contents($langFile), true));
|
|
|
|
}
|
|
|
|
|
2018-09-09 21:17:59 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.acl.inc.php';
|
2018-01-23 20:59:06 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.address_rewriting.inc.php';
|
2018-10-11 11:59:23 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.admin.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.app_passwd.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.customize.inc.php';
|
2017-05-26 23:02:04 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.dkim.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.docker.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.domain_admin.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.fail2ban.inc.php';
|
2017-05-26 23:02:04 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.fwdhost.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.mailbox.inc.php';
|
2018-10-23 21:14:57 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.mailq.inc.php';
|
2019-09-28 20:00:04 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.oauth2.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.policy.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.presets.inc.php';
|
2020-04-10 20:57:01 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.pushover.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.quarantine.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.quota_notification.inc.php';
|
2018-08-21 17:41:04 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.ratelimit.inc.php';
|
2019-10-29 09:39:57 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.rspamd.inc.php';
|
2018-10-04 14:38:12 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.tls_policy_maps.inc.php';
|
2021-02-11 10:34:21 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/functions.transports.inc.php';
|
2017-05-08 15:41:05 +02:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/init_db.inc.php';
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/triggers.inc.php';
|
2017-04-21 10:20:31 +02:00
|
|
|
init_db_schema();
|
2017-08-18 22:18:14 +02:00
|
|
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
2018-11-12 11:03:50 +02:00
|
|
|
// if ($_SESSION['mailcow_cc_role'] == 'user') {
|
|
|
|
// list($master_user, $master_passwd) = explode(':', file_get_contents('/etc/sogo/sieve.creds'));
|
|
|
|
// $imap_connection = $imap_server->authenticate($_SESSION['mailcow_cc_username'] . '*' . trim($master_user), trim($master_passwd));
|
|
|
|
// $master_user = $master_passwd = null;
|
|
|
|
// }
|
2018-09-09 21:17:59 +02:00
|
|
|
acl('to_session');
|
2017-10-01 20:34:37 +02:00
|
|
|
}
|
2017-12-09 14:17:15 +02:00
|
|
|
$UI_TEXTS = customize('get', 'ui_texts');
|