vars.inc.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <?php
  2. error_reporting(E_ERROR);
  3. //error_reporting(E_ALL);
  4. /*
  5. PLEASE USE THE FILE "vars.local.inc.php" TO OVERWRITE SETTINGS AND MAKE THEM PERSISTENT!
  6. This file will be reset on upgrades.
  7. */
  8. // SQL database connection variables
  9. $database_type = 'mysql';
  10. $database_sock = '/var/run/mysqld/mysqld.sock';
  11. $database_host = 'mysql';
  12. $database_user = getenv('DBUSER');
  13. $database_pass = getenv('DBPASS');
  14. $database_name = getenv('DBNAME');
  15. // Other variables
  16. $mailcow_hostname = getenv('MAILCOW_HOSTNAME');
  17. // Autodiscover settings
  18. // ===
  19. // Auto-detect HTTPS port =>
  20. $https_port = strpos($_SERVER['HTTP_HOST'], ':');
  21. if ($https_port === FALSE) {
  22. $https_port = 443;
  23. } else {
  24. $https_port = substr($_SERVER['HTTP_HOST'], $https_port+1);
  25. }
  26. // Alternatively select port here =>
  27. //$https_port = 1234;
  28. // Other settings =>
  29. $autodiscover_config = array(
  30. // General autodiscover service type: "activesync" or "imap"
  31. // emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.
  32. 'autodiscoverType' => 'activesync',
  33. // If autodiscoverType => activesync, also use ActiveSync (EAS) for Outlook desktop clients (>= Outlook 2013 on Windows)
  34. // Outlook for Mac does not support ActiveSync
  35. 'useEASforOutlook' => 'yes',
  36. // Please don't use STARTTLS-enabled service ports in the "port" variable.
  37. // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).
  38. // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the "tlsport" variable.
  39. 'imap' => array(
  40. 'server' => $mailcow_hostname,
  41. 'port' => end(explode(':', getenv('IMAPS_PORT'))),
  42. 'tlsport' => end(explode(':', getenv('IMAP_PORT'))),
  43. ),
  44. 'pop3' => array(
  45. 'server' => $mailcow_hostname,
  46. 'port' => end(explode(':', getenv('POPS_PORT'))),
  47. 'tlsport' => end(explode(':', getenv('POP_PORT'))),
  48. ),
  49. 'smtp' => array(
  50. 'server' => $mailcow_hostname,
  51. 'port' => end(explode(':', getenv('SMTPS_PORT'))),
  52. 'tlsport' => end(explode(':', getenv('SUBMISSION_PORT'))),
  53. ),
  54. 'activesync' => array(
  55. 'url' => 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',
  56. ),
  57. 'caldav' => array(
  58. 'server' => $mailcow_hostname,
  59. 'port' => $https_port,
  60. ),
  61. 'carddav' => array(
  62. 'server' => $mailcow_hostname,
  63. 'port' => $https_port,
  64. ),
  65. );
  66. // If false, we will use DEFAULT_LANG
  67. // Uses HTTP_ACCEPT_LANGUAGE header
  68. $DETECT_LANGUAGE = true;
  69. // Change default language
  70. $DEFAULT_LANG = 'en';
  71. // Available languages
  72. $AVAILABLE_LANGUAGES = array('ca', 'cs', 'de', 'en', 'es', 'fi', 'fr', 'it', 'lv', 'nl', 'pl', 'pt', 'ru');
  73. // Change theme (default: lumen)
  74. // Needs to be one of those: cerulean, cosmo, cyborg, darkly, flatly, journal, lumen, paper, readable, sandstone,
  75. // simplex, slate, spacelab, superhero, united, yeti
  76. // See https://bootswatch.com/
  77. // WARNING: Only lumen is loaded locally. Enabling any other theme, will download external sources.
  78. $DEFAULT_THEME = 'lumen';
  79. // Password complexity as regular expression
  80. // Min. 6 characters
  81. $PASSWD_REGEP = '.{6,}';
  82. // Min. 6 characters, which must include at least one uppercase letter, one lowercase letter and one number
  83. // $PASSWD_REGEP = '^(?=.*[A-Z])(?=.*[0-9])(?=.*[a-z]).{6,}$';
  84. // Min. 6 characters, which must include at least one letter and one number
  85. // $PASSWD_REGEP = '^(?=.*[0-9])(?=.*[A-Za-z]).{6,}$';
  86. // Show DKIM private keys - false by default
  87. $SHOW_DKIM_PRIV_KEYS = false;
  88. // mailcow Apps - buttons on login screen
  89. $MAILCOW_APPS = array(
  90. array(
  91. 'name' => 'Webmail',
  92. 'link' => '/SOGo/',
  93. )
  94. );
  95. // Rows until pagination begins
  96. $PAGINATION_SIZE = 20;
  97. // Default number of rows/lines to display (log table)
  98. $LOG_LINES = 1000;
  99. // Rows until pagination begins (log table)
  100. $LOG_PAGINATION_SIZE = 50;
  101. // Session lifetime in seconds
  102. $SESSION_LIFETIME = 10800;
  103. // Label for OTP devices
  104. $OTP_LABEL = "mailcow UI";
  105. // Default "to" address in relay test tool
  106. $RELAY_TO = "null@hosted.mailcow.de";
  107. // How long to wait (in s) for cURL Docker requests
  108. $DOCKER_TIMEOUT = 60;
  109. // Anonymize IPs logged via UI
  110. $ANONYMIZE_IPS = true;
  111. // OAuth2 settings
  112. $REFRESH_TOKEN_LIFETIME = 2678400;
  113. $ACCESS_TOKEN_LIFETIME = 86400;
  114. // MAILBOX_DEFAULT_ATTRIBUTES define default attributes for new mailboxes
  115. // These settings will not change existing mailboxes
  116. // Force incoming TLS for new mailboxes by default
  117. $MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_in'] = false;
  118. // Force outgoing TLS for new mailboxes by default
  119. $MAILBOX_DEFAULT_ATTRIBUTES['tls_enforce_out'] = false;
  120. // Force password change on next login (only allows login to mailcow UI)
  121. $MAILBOX_DEFAULT_ATTRIBUTES['force_pw_update'] = false;
  122. // Enable SOGo access (set to false to disable access by default)
  123. $MAILBOX_DEFAULT_ATTRIBUTES['sogo_access'] = true;
  124. // Send notification when quarantine is not empty (never, hourly, daily, weekly)
  125. $MAILBOX_DEFAULT_ATTRIBUTES['quarantine_notification'] = 'hourly';
  126. // Default mailbox format, should not be changed unless you know exactly, what you do, keep the trailing ":"
  127. // Check dovecot.conf for further changes (e.g. shared namespace)
  128. $MAILBOX_DEFAULT_ATTRIBUTES['mailbox_format'] = 'maildir:';
  129. // Set visible Rspamd maps in mailcow UI, do not change unless you know what you are doing
  130. $RSPAMD_MAPS = array(
  131. 'global_mime_from_blacklist.map',
  132. 'global_mime_from_whitelist.map',
  133. 'global_rcpt_blacklist.map',
  134. 'global_rcpt_whitelist.map',
  135. 'global_smtp_from_blacklist.map',
  136. 'global_smtp_from_whitelist.map'
  137. );