Initial commit
This commit is contained in:
60
config/config.inc.php
Normal file
60
config/config.inc.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
/* Local configuration for Roundcube Webmail */
|
||||
/* Secrets and site-specific values are read from environment variables at runtime. */
|
||||
|
||||
// ----------------------------------
|
||||
// SQL DATABASE (from env)
|
||||
// ----------------------------------
|
||||
$dbType = getenv('ROUNDCUBEMAIL_DB_TYPE') ?: 'mysql';
|
||||
$dbHost = getenv('ROUNDCUBEMAIL_DB_HOST') ?: 'db';
|
||||
$dbName = getenv('ROUNDCUBEMAIL_DB_NAME') ?: 'roundcubemail';
|
||||
$dbUser = getenv('ROUNDCUBEMAIL_DB_USER') ?: 'roundcubemail';
|
||||
$dbPass = getenv('ROUNDCUBEMAIL_DB_PASSWORD');
|
||||
if ($dbPass !== false && $dbPass !== '') {
|
||||
$config['db_dsnw'] = $dbType . '://' . $dbUser . ':' . rawurlencode($dbPass) . '@' . $dbHost . '/' . $dbName;
|
||||
}
|
||||
|
||||
// IMAP host (from env)
|
||||
$imapHost = getenv('ROUNDCUBEMAIL_DEFAULT_IMAP_HOST');
|
||||
$imapPort = getenv('ROUNDCUBEMAIL_DEFAULT_IMAP_PORT');
|
||||
$config['imap_host'] = ($imapHost !== false && $imapHost !== '') ? ($imapPort ? $imapHost . ':' . $imapPort : $imapHost) : 'localhost';
|
||||
|
||||
// SMTP server host (from env)
|
||||
$smtpServer = getenv('ROUNDCUBEMAIL_DEFAULT_SMTP_SERVER');
|
||||
$smtpPort = getenv('ROUNDCUBEMAIL_DEFAULT_SMTP_PORT');
|
||||
$config['smtp_host'] = ($smtpServer !== false && $smtpServer !== '') ? ($smtpPort ? $smtpServer . ':' . $smtpPort : $smtpServer) : 'localhost';
|
||||
|
||||
// Support URL (from env)
|
||||
$supportUrl = getenv('ROUNDCUBEMAIL_SUPPORT_URL');
|
||||
if ($supportUrl !== false && $supportUrl !== '') {
|
||||
$config['support_url'] = $supportUrl;
|
||||
}
|
||||
|
||||
// Location of temporary saved files
|
||||
$config['temp_dir'] = '/tmp/roundcube-temp';
|
||||
|
||||
// Session encryption key (from env; must be exactly 24 characters)
|
||||
$desKey = getenv('ROUNDCUBEMAIL_DES_KEY');
|
||||
$config['des_key'] = ($desKey !== false && strlen($desKey) === 24) ? $desKey : 'rcmail-change-me-24ch';
|
||||
|
||||
// Specifies the full path of the original HTTP request
|
||||
$config['request_path'] = '/';
|
||||
|
||||
// HTTPS
|
||||
$config['use_https'] = true;
|
||||
|
||||
// LOGGING
|
||||
$config['log_driver'] = 'stdout';
|
||||
$config['session_debug'] = false;
|
||||
$config['sql_debug'] = false;
|
||||
$config['imap_debug'] = true;
|
||||
$config['smtp_debug'] = true;
|
||||
|
||||
// List of active plugins (from env, comma-separated)
|
||||
$pluginsEnv = getenv('ROUNDCUBEMAIL_PLUGINS');
|
||||
if ($pluginsEnv !== false && $pluginsEnv !== '') {
|
||||
$config['plugins'] = array_map('trim', explode(',', $pluginsEnv));
|
||||
} else {
|
||||
$config['plugins'] = ['acl', 'additional_message_headers', 'archive', 'attachment_reminder', 'autologon', 'debug_logger', 'emoticons', 'enigma', 'filesystem_attachments', 'help', 'hide_blockquote', 'http_authentication', 'identicon', 'identity_select', 'jqueryui', 'krb_authentication', 'managesieve', 'markasjunk', 'new_user_dialog', 'new_user_identity', 'newmail_notifier', 'password', 'reconnect', 'show_additional_headers', 'squirrelmail_usercopy', 'subscriptions_option', 'userinfo', 'vcard_attachments', 'virtuser_file', 'virtuser_query', 'zipdownload'];
|
||||
}
|
||||
Reference in New Issue
Block a user