Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | <?php |
| 2 | error_reporting(E_ERROR); |
| 3 | //error_reporting(E_ALL); |
| 4 | |
| 5 | /* |
| 6 | PLEASE USE THE FILE "vars.local.inc.php" TO OVERWRITE SETTINGS AND MAKE THEM PERSISTENT! |
| 7 | This file will be reset on upgrades. |
| 8 | */ |
| 9 | |
| 10 | // SQL database connection variables |
| 11 | $database_type = 'mysql'; |
| 12 | $database_sock = '/var/run/mysqld/mysqld.sock'; |
| 13 | $database_host = 'mysql'; |
| 14 | $database_user = getenv('DBUSER'); |
| 15 | $database_pass = getenv('DBPASS'); |
| 16 | $database_name = getenv('DBNAME'); |
| 17 | |
| 18 | // Other variables |
| 19 | $mailcow_hostname = getenv('MAILCOW_HOSTNAME'); |
| 20 | $default_pass_scheme = getenv('MAILCOW_PASS_SCHEME'); |
| 21 | |
| 22 | // Autodiscover settings |
| 23 | // === |
| 24 | // Auto-detect HTTPS port => |
| 25 | $https_port = strpos($_SERVER['HTTP_HOST'], ':'); |
| 26 | if ($https_port === FALSE) { |
| 27 | $https_port = 443; |
| 28 | } else { |
| 29 | $https_port = substr($_SERVER['HTTP_HOST'], $https_port+1); |
| 30 | } |
| 31 | |
| 32 | // Alternatively select port here => |
| 33 | //$https_port = 1234; |
| 34 | // Other settings => |
| 35 | $autodiscover_config = array( |
| 36 | // General autodiscover service type: "activesync" or "imap" |
| 37 | // emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync. |
| 38 | // With SOGo disabled, the type will always fallback to imap. CalDAV and CardDAV will be excluded, too. |
| 39 | 'autodiscoverType' => 'activesync', |
| 40 | // If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows) |
| 41 | // Outlook for Mac does not support ActiveSync |
| 42 | 'useEASforOutlook' => 'no', |
| 43 | // Please don't use STARTTLS-enabled service ports in the "port" variable. |
| 44 | // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services). |
| 45 | // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable. |
| 46 | 'imap' => array( |
| 47 | 'server' => $mailcow_hostname, |
| 48 | 'port' => end(explode(':', getenv('IMAPS_PORT'))), |
| 49 | 'tlsport' => end(explode(':', getenv('IMAP_PORT'))), |
| 50 | ), |
| 51 | 'pop3' => array( |
| 52 | 'server' => $mailcow_hostname, |
| 53 | 'port' => end(explode(':', getenv('POPS_PORT'))), |
| 54 | 'tlsport' => end(explode(':', getenv('POP_PORT'))), |
| 55 | ), |
| 56 | 'smtp' => array( |
| 57 | 'server' => $mailcow_hostname, |
| 58 | 'port' => end(explode(':', getenv('SMTPS_PORT'))), |
| 59 | 'tlsport' => end(explode(':', getenv('SUBMISSION_PORT'))), |
| 60 | ), |
| 61 | 'activesync' => array( |
| 62 | 'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync', |
| 63 | ), |
| 64 | 'caldav' => array( |
| 65 | 'server' => $mailcow_hostname, |
| 66 | 'port' => $https_port, |
| 67 | ), |
| 68 | 'carddav' => array( |
| 69 | 'server' => $mailcow_hostname, |
| 70 | 'port' => $https_port, |
| 71 | ), |
| 72 | ); |
| 73 | |
| 74 | // If false, we will use DEFAULT_LANG |
| 75 | // Uses HTTP_ACCEPT_LANGUAGE header |
| 76 | $DETECT_LANGUAGE = true; |
| 77 | |
| 78 | // Change default language |
| 79 | $DEFAULT_LANG = 'en'; |
| 80 | |
| 81 | // Available languages |
| 82 | $AVAILABLE_LANGUAGES = array('ca', 'cs', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ko', 'lv', 'nl', 'pl', 'pt', 'ro', 'ru', 'sk', 'sv', 'zh'); |
| 83 | |
| 84 | // Change theme (default: lumen) |
| 85 | // Needs to be one of those: cerulean, cosmo, cyborg, darkly, flatly, journal, lumen, paper, readable, sandstone, |
| 86 | // simplex, slate, spacelab, superhero, united, yeti |
| 87 | // See https://bootswatch.com/ |
| 88 | // WARNING: Only lumen is loaded locally. Enabling any other theme, will download external sources. |
| 89 | $DEFAULT_THEME = 'lumen'; |
| 90 | |
| 91 | // Password complexity as regular expression |
| 92 | // Min. 6 characters |
| 93 | $PASSWD_REGEP = '.{6,}'; |
| 94 | // Min. 6 characters, which must include at least one uppercase letter, one lowercase letter and one number |
| 95 | // $PASSWD_REGEP = '^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{6,}$'; |
| 96 | // Min. 6 characters, which must include at least one letter and one number |
| 97 | // $PASSWD_REGEP = '^(?=.*[0-9])(?=.*[A-Za-z]).{6,}$'; |
| 98 | |
| 99 | // Show DKIM private keys - false by default |
| 100 | $SHOW_DKIM_PRIV_KEYS = false; |
| 101 | |
| 102 | // mailcow Apps - buttons on login screen |
| 103 | $MAILCOW_APPS = array( |
| 104 | array( |
| 105 | 'name' => 'Webmail', |
| 106 | 'link' => '/SOGo/', |
| 107 | ) |
| 108 | ); |
| 109 | |
| 110 | // Rows until pagination begins |
| 111 | $PAGINATION_SIZE = 20; |
| 112 | |
| 113 | // Default number of rows/lines to display (log table) |
| 114 | $LOG_LINES = 1000; |
| 115 | |
| 116 | // Rows until pagination begins (log table) |
| 117 | $LOG_PAGINATION_SIZE = 50; |
| 118 | |
| 119 | // Session lifetime in seconds |
| 120 | $SESSION_LIFETIME = 10800; |
| 121 | |
| 122 | // Label for OTP devices |
| 123 | $OTP_LABEL = "mailcow UI"; |
| 124 | |
| 125 | // Default "to" address in relay test tool |
| 126 | $RELAY_TO = "null@hosted.mailcow.de"; |
| 127 | |
| 128 | // How long to wait (in s) for cURL Docker requests |
| 129 | $DOCKER_TIMEOUT = 60; |
| 130 | |
| 131 | // Anonymize IPs logged via UI |
| 132 | $ANONYMIZE_IPS = true; |
| 133 | |
| 134 | // Split DKIM key notation (bind format) |
| 135 | $SPLIT_DKIM_255 = false; |
| 136 | |
| 137 | // OAuth2 settings |
| 138 | $REFRESH_TOKEN_LIFETIME = 2678400; |
| 139 | $ACCESS_TOKEN_LIFETIME = 86400; |
| 140 | // Logout from mailcow after first OAuth2 session profile request |
| 141 | $OAUTH2_FORGET_SESSION_AFTER_LOGIN = false; |
| 142 | |
| 143 | // MAILBOX_DEFAULT_ATTRIBUTES define default attributes for new mailboxes |
| 144 | // These settings will not change existing mailboxes |
| 145 | |
| 146 | // Force incoming TLS for new mailboxes by default |
| 147 | $MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_in'] = false; |
| 148 | |
| 149 | // Force outgoing TLS for new mailboxes by default |
| 150 | $MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_out'] = false; |
| 151 | |
| 152 | // Force password change on next login (only allows login to mailcow UI) |
| 153 | $MAILBOX_DEFAULT_ATTRIBUTES['force_pw_update'] = false; |
| 154 | |
| 155 | // Enable SOGo access (set to false to disable access by default) |
| 156 | $MAILBOX_DEFAULT_ATTRIBUTES['sogo_access'] = true; |
| 157 | |
| 158 | // Send notification when quarantine is not empty (never, hourly, daily, weekly) |
| 159 | $MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification'] = 'hourly'; |
| 160 | |
| 161 | // Mailbox has IMAP access by default |
| 162 | $MAILBOX_DEFAULT_ATTRIBUTES['imap_access'] = true; |
| 163 | |
| 164 | // Mailbox has POP3 access by default |
| 165 | $MAILBOX_DEFAULT_ATTRIBUTES['pop3_access'] = true; |
| 166 | |
| 167 | // Mailbox has SMTP access by default |
| 168 | $MAILBOX_DEFAULT_ATTRIBUTES['smtp_access'] = true; |
| 169 | |
| 170 | // Mailbox receives notifications about... |
| 171 | // "add_header" - mail that was put into the Junk folder |
| 172 | // "reject" - mail that was rejected |
| 173 | // "all" - mail that was rejected and put into the Junk folder |
| 174 | $MAILBOX_DEFAULT_ATTRIBUTES['quarantine_category'] = 'reject'; |
| 175 | |
| 176 | // Default mailbox format, should not be changed unless you know exactly, what you do, keep the trailing ":" |
| 177 | // Check dovecot.conf for further changes (e.g. shared namespace) |
| 178 | $MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format'] = 'maildir:'; |
| 179 | |
| 180 | // Show last IMAP and POP3 logins |
| 181 | $SHOW_LAST_LOGIN = true; |
| 182 | |
| 183 | // UV flag handling in FIDO2/WebAuthn - defaults to false to allow iOS logins |
| 184 | // true = required |
| 185 | // false = preferred |
| 186 | // string 'required' 'preferred' 'discouraged' |
| 187 | $FIDO2_UV_FLAG_REGISTER = 'preferred'; |
| 188 | $FIDO2_UV_FLAG_LOGIN = 'preferred'; // iOS ignores the key via NFC if required - known issue |
| 189 | $FIDO2_USER_PRESENT_FLAG = true; |
| 190 | $FIDO2_FORMATS = array('apple', 'android-key', 'android-safetynet', 'fido-u2f', 'none', 'packed', 'tpm'); |
| 191 | |
| 192 | // Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing |
| 193 | $RSPAMD_MAPS = array( |
| 194 | 'regex' => array( |
| 195 | 'Header-From: Blacklist' => 'global_mime_from_blacklist.map', |
| 196 | 'Header-From: Whitelist' => 'global_mime_from_whitelist.map', |
| 197 | 'Envelope Sender Blacklist' => 'global_smtp_from_blacklist.map', |
| 198 | 'Envelope Sender Whitelist' => 'global_smtp_from_whitelist.map', |
| 199 | 'Recipient Blacklist' => 'global_rcpt_blacklist.map', |
| 200 | 'Recipient Whitelist' => 'global_rcpt_whitelist.map', |
| 201 | 'Fishy TLDS (only fired in combination with bad words)' => 'fishy_tlds.map', |
| 202 | 'Bad Words (only fired in combination with fishy TLDs)' => 'bad_words.map', |
| 203 | 'Bad Words DE (only fired in combination with fishy TLDs)' => 'bad_words_de.map', |
| 204 | 'Bad Languages' => 'bad_languages.map', |
| 205 | 'Bulk Mail Headers' => 'bulk_header.map', |
| 206 | 'Monitoring Hosts' => 'monitoring_nolog.map' |
| 207 | ) |
| 208 | ); |