2016-02-20 22:55:22 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
$config = array();
|
|
|
|
|
2016-02-21 16:39:15 +02:00
|
|
|
// Generals
|
2019-11-19 13:22:09 +02:00
|
|
|
$config['db_dsnw'] = getenv('DB_DSNW');;
|
2017-12-19 20:50:38 +02:00
|
|
|
$config['temp_dir'] = '/tmp/';
|
2020-08-30 01:04:36 +02:00
|
|
|
$config['des_key'] = getenv('SECRET_KEY') ? getenv('SECRET_KEY') : trim(file_get_contents(getenv('SECRET_KEY_FILE')));
|
2018-09-19 01:36:22 +02:00
|
|
|
$config['cipher_method'] = 'AES-256-CBC';
|
2019-01-06 23:34:09 +02:00
|
|
|
$config['identities_level'] = 0;
|
2016-02-21 16:39:15 +02:00
|
|
|
$config['reply_all_mode'] = 1;
|
|
|
|
|
2016-02-20 22:55:22 +02:00
|
|
|
// List of active plugins (in plugins/ directory)
|
|
|
|
$config['plugins'] = array(
|
|
|
|
'archive',
|
|
|
|
'zipdownload',
|
2016-10-18 23:03:43 +02:00
|
|
|
'markasjunk',
|
2018-03-05 22:32:31 +02:00
|
|
|
'managesieve',
|
2019-12-26 21:29:45 +02:00
|
|
|
'enigma',
|
2021-02-08 11:16:03 +02:00
|
|
|
'carddav'
|
2016-02-20 22:55:22 +02:00
|
|
|
);
|
|
|
|
|
2018-06-27 18:40:04 +02:00
|
|
|
$front = getenv('FRONT_ADDRESS') ? getenv('FRONT_ADDRESS') : 'front';
|
|
|
|
$imap = getenv('IMAP_ADDRESS') ? getenv('IMAP_ADDRESS') : 'imap';
|
|
|
|
|
2016-02-21 17:24:11 +02:00
|
|
|
// Mail servers
|
2018-06-27 18:40:04 +02:00
|
|
|
$config['default_host'] = $front;
|
2017-10-22 11:31:32 +02:00
|
|
|
$config['default_port'] = 10143;
|
2018-06-27 18:40:04 +02:00
|
|
|
$config['smtp_server'] = $front;
|
2017-10-22 11:31:32 +02:00
|
|
|
$config['smtp_port'] = 10025;
|
2016-02-24 08:44:49 +02:00
|
|
|
$config['smtp_user'] = '%u';
|
|
|
|
$config['smtp_pass'] = '%p';
|
|
|
|
|
2016-10-18 23:03:43 +02:00
|
|
|
// Sieve script management
|
2018-06-27 18:40:04 +02:00
|
|
|
$config['managesieve_host'] = $imap;
|
2017-11-10 16:54:41 +02:00
|
|
|
$config['managesieve_usetls'] = false;
|
2016-10-18 23:03:43 +02:00
|
|
|
|
2019-11-21 22:12:21 +02:00
|
|
|
// Customization settings
|
2021-02-08 11:16:03 +02:00
|
|
|
if (filter_var(getenv('ADMIN'), FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE)) {
|
2021-10-25 21:21:38 +02:00
|
|
|
$config['support_url'] = getenv('WEB_ADMIN') ? '../..' . getenv('WEB_ADMIN') : '';
|
2021-02-08 11:16:03 +02:00
|
|
|
}
|
2019-11-21 22:12:21 +02:00
|
|
|
$config['product_name'] = 'Mailu Webmail';
|
2021-10-25 21:21:38 +02:00
|
|
|
array_push($config['plugins'], 'mailu');
|
2021-10-26 14:07:36 +02:00
|
|
|
$config['sso_logout_url'] = '/sso/logout';
|
2019-11-21 22:12:21 +02:00
|
|
|
|
2016-02-24 08:44:49 +02:00
|
|
|
// We access the IMAP and SMTP servers locally with internal names, SSL
|
|
|
|
// will obviously fail but this sounds better than allowing insecure login
|
|
|
|
// from the outter world
|
|
|
|
$ssl_no_check = array(
|
|
|
|
'ssl' => array(
|
|
|
|
'verify_peer' => false,
|
|
|
|
'verify_peer_name' => false,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
$config['imap_conn_options'] = $ssl_no_check;
|
|
|
|
$config['smtp_conn_options'] = $ssl_no_check;
|
2016-10-18 23:03:43 +02:00
|
|
|
$config['managesieve_conn_options'] = $ssl_no_check;
|
2016-02-21 17:24:11 +02:00
|
|
|
|
2016-02-20 22:55:22 +02:00
|
|
|
// skin name: folder from skins/
|
2019-11-21 22:12:21 +02:00
|
|
|
$config['skin'] = 'elastic';
|
2018-03-05 22:32:31 +02:00
|
|
|
|
|
|
|
// Enigma gpg plugin
|
|
|
|
$config['enigma_pgp_homedir'] = '/data/gpg';
|
2020-03-01 14:56:33 +02:00
|
|
|
|
|
|
|
// Set From header for DKIM signed message delivery reports
|
|
|
|
$config['mdn_use_from'] = true;
|