6. Config.php

The config file for the webapp. All possible web client settings can be set in this file. Some settings (such as language) can also be set per user or logon.

6.1. Config check

// Comment next line to disable the config check (or set FALSE to log the config errors)

If set to true a check will be made for php-version, php-mapi and a tmp folder.

// Use these options to optionally disable some PHP configuration checks.
// WARNING: these checks will disable checks regarding the security of the WebApp site configuration,
// only change them if you know the consequences - improper use will lead to an insecure installation!

This config option checks if cookies are used with an insecure connection. Default is false.

6.2. Default server socket

// Depending on your setup, it might be advisable to change the lines below to one defined with your
// default socket location.
// Normally "default:" points to the default setting ("file:///var/run/kopano/server.sock")
// Examples: define("DEFAULT_SERVER", "default:");
//           define("DEFAULT_SERVER", "http://localhost:236/kopano");
//           define("DEFAULT_SERVER", "https://localhost:237/kopano");
//           define("DEFAULT_SERVER", "file:///var/run/kopano/server.sock");
define("DEFAULT_SERVER", "default:");

This config options defines the default (Kopano Core) socket location.

6.3. Redirects with an Nginx reverse proxy

When you are using a setup with an Nginx webserver as a reverse proxy (e.g. for Web Meetings), adding an explicit redirect to your configuration is recommended to avoid an unintended downgrade to HTTP from HTTPS.

// Add this just before '/location webapp'
location = /webapp {
        return 302 /webapp/;

6.4. Single Sign-On

// When using a single sign-on system on your webserver, but Kopano Core is on another server
// you can use https to access the Kopano server, and authenticate using an SSL certificate.

When using a single sign-on system on your webserver, but Kopano Core is on another server you can use https to access the Kopano server, and authenticate using an SSL certificate.

// Set to true to disable login with Single Sign-On (SSO) on SSO environments.

This option allows you to disable Single Sign-On connections. Default is false.

// set to 'true' to strip domain from login name found from Single Sign-On webservers
define("LOGINNAME_STRIP_DOMAIN", false);

This option strips the domain from the users’ login name. Default is false.

6.6. Insecure Cookies

// Set to 'true' to disable secure session cookies and to allow log-in without HTTPS.
define("INSECURE_COOKIES", false);

By default only secure cookies are allowed.

6.7. KC Filtered Body

// Use Kopano Core for HTML filtering, introduced in 8.5.0
define("KC_FILTERED_BODY", false);

Enable this setting if Kopano Core should handle the HTML filtering. Note: You need at least Kopano Core version 8.5.0.

6.8. Session timeout

// The timeout (in seconds) for the session. User will be logged out of WebApp
// when he has not actively used the WebApp for this time.
// Set to 0 (or remove) for no timeout during browser session.
define('CLIENT_TIMEOUT', 0);

Session timeout in WebApp. Default is 0 which means no timeout.

6.9. Cross domain authentication

// Defines the domains from which cross domain authentication requests
// are allowed. E.g. if WebMeetings runs under a different domain than
// the WebApp then add this domain here. Add http(s):// to the domains
// and separate domains with spaces.
// Set to empty string (default) to only allow authentication requests
// from within the same domain.
// Set to "*" to allow authentication requests from any domain. (not
// recommended)

Defines the domains from which cross domain authentication requests are allowed.

6.10. Base URL

// Defines the base url and end with a slash.
$base_url = dirname($_SERVER["PHP_SELF"]);
if(substr($base_url,-1)!="/") $base_url .="/";
define("BASE_URL", $base_url);

With this option you can define the base URL for WebApp.

6.11. Temp path

// Defines the temp path (absolute). Here uploaded attachments will be saved.
// The web client doesn't work without this directory.
define("TMP_PATH", "/var/lib/kopano-webapp/tmp");

Directory of the temporary files.

6.12. Plugin directory

// Define the path to the plugin directory (No slash at the end)
define("PATH_PLUGIN_DIR", "plugins");

Directory where plugins should be stored.

6.13. Enable plugin usage

// Enable the plugins
define("ENABLE_PLUGINS", true);

Config option to enable or disable all plugins. Default is true.

6.14. Disable plugins

// Define list of disabled plugins separated by semicolon

Config option to disable specific plugins. Seperated by a semicolon (;).

6.15. Always enable plugin list

// Define a list of plugins that cannot be disabled by users.
      // Plugins should be seperated by a semicolon (;). A wildcard (*)
      // can be used to identify multiple plugins.
      define("ALWAYS_ENABLED_PLUGINS_LIST", '');

Config option to always enable certain plugins. These plugins can’t be disabled by a user. This option is overridden by “DISABLED_PLUGINS_LIST”.

Valid values are the names defined in plugins manifest.xml (For example: smime/spellchecker/files etc).

6.16. Default WebApp theme

// General WebApp theme. This will be loaded by default for every user
// (if the theme is installed as a plugin)
// Users can override the 'logged-in' theme in the settings.
define("THEME", '');

Default WebApp theme. Default is empty which means the basic theme is set as default.

6.17. Icon set

// General WebApp icon set. This will be loaded by default for every user.
// Users can override the iconset in the settings.
define("ICONSET", 'breeze');

Default icon set for every user. Default is ‘breeze’.

6.18. WebApp title

// The title that will be shown in the title bar of the browser
define("WEBAPP_TITLE", 'Kopano WebApp');

Title shown in the title bar of your browser. Default is ‘Kopano WebApp’.

6.19. Disable full GAB

// Set addressbook for GAB not to show any users unless searching for a specific user
define("DISABLE_FULL_GAB", false);

Set addressbook for GAB not to show any users unless searching for a specific user. Default is false.

6.20. Disable public contacts

// Set true to hide public contact folders in address-book folder list,
// false will show public contact folders in address-book folder list.

Option to disable public contact folders in the address book. Default is true.

6.21. Enable public folders

// Set true to show public folders in hierarchy, false will disable public folders in hierarchy.
define('ENABLE_PUBLIC_FOLDERS', true);

Config option to enable public folders in the hierarchy. Default is true.

6.22. Disable shared contact folders

// Set true to hide shared contact folders in address-book folder list,
// false will show shared contact folders in address-book folder list.

Config option to disable shared contact folders. This can decrease performance when set to false. Default is true.

6.23. Enable shared rules

// Set to true to give users the possiblity to edit, create and mail filters on the store
// of other users. The user needs owner permissions on the store of the other user.
define('ENABLE_SHARED_RULES', false);

Config option to enable shared rules. Default is false.

6.24. Booking method

// Booking method (true = direct booking, false = send meeting request)
define('ENABLE_DIRECT_BOOKING', true);

Resource booking options. true = direct booking, false = send meeting request. Default is true.

6.25. Compression

// Enable GZIP compression for responses

Response compression. Default is true.

6.26. Welcome screen

// When set to true this disables the welcome screen to be shown for first time users.
define('DISABLE_WELCOME_SCREEN', false);

Option to disable the welcome screen for new users. Default is false.

6.27. What’s new

// Set to true to disable the "What's new dialog" that will be shown to users to introduce new features.
define('DISABLE_WHATS_NEW_DIALOG', false);

Option to disable what’s new for every user. Default is false.

6.28. Advanced settings

// When set to false it will disable showing of advanced settings.

Option to enable advanced settings in WebApp. Default is false.

6.29. Free / Busy status start offset

// Freebusy start offset that will be used to load freebusy data in appointments, number is subtracted from current time

Option to set the Free / Busy status start offset. Default is 7, so current day minus 7 days.

6.30. Free / Busy status end offset

// Freebusy end offset that will be used to load freebusy data in appointments, number is added to current time

Option to set the Free / Busy status end offset. Default is 90 (3 months).

6.31. Maximum EML files in zip

// Maximum eml files to be included in a single ZIP archive
define('MAX_EML_FILES_IN_ZIP', 50);

Config option define the maximum number of .EML files inside a ZIP archive. Default is 50.

6.32. Additional calendar colors

// Additional color schemes for the calendars can be added by uncommenting and editing the following define.
// The format is the same as the format of COLOR_SCHEMES which is defined in default.php
// To change the default colors, COLOR_SCHEMES can also be defined here.
// Note: Every color should have a unique name, because it is used to identify the color
// define('ADDITIONAL_COLOR_SCHEMES', json_encode(array(
//              array(
//                      'name' => 'pink',
//                      'displayName' => _('Pink'),
//                      'base' => '#ff0099'
//              )
// )));

Option to create your own color schemes and use it as a calendar color.

6.33. Additional prefixes

// Additional Prefix for the Contact name can be added by uncommenting and editing the following define.
// define('CONTACT_PREFIX', json_encode(array(
//      array(_('Er.')),
//      array(_('Gr.'))
// )));

Option to add additional prefixes.

6.34. Additional suffixes

// Additional Suffix for the Contact name can be added by uncommenting and editing the following define.
// define('CONTACT_SUFFIX', json_encode(array(
//      array(_('A')),
//      array(_('B'))
// )));

Option to add additional suffixes.

6.35. Shared notifications polling time

// Define the polling interval in minutes for unread mail in shared stores.

Set the polling time (in minutes) for shared stores notifications.

6.36. Max execution time

// This sets the maximum time in seconds that is allowed to run before it is terminated by the parser.
ini_set('max_execution_time', 300); // 5 minutes

Max time a php script should run before you get an error 500.

6.37. Block size

// BLOCK_SIZE (in bytes) is used for attachments by mapi_stream_read/mapi_stream_write
define('BLOCK_SIZE', 1048576);

MAPI properties that contains lots of data, will be read/written in this block size.

6.38. Expires time

// Time that static files may exist in the client's cache (13 weeks)
define('EXPIRES_TIME', 60*60*24*7*13);

Time the static files are kept alive in the client cache.

6.39. Static File Max Lifetime

// Time that the state files are allowed to survive (in seconds)
// For filesystems on which relatime is used, this value should be larger then the relatime_interval
// for kernels 2.6.30 and above relatime is enabled by default, and the relatime_interval is set to
// 24 hours.
define('STATE_FILE_MAX_LIFETIME', 28*60*60);

The time the state files are allowed to survive server side. Default is 28 hours.

6.40. Attachment max lifetime

// Time that attachments are allowed to survive (in seconds)

Option to define the maximum lifetime of attachments.

6.41. User based logging

 *  Logging settings
 *  Possible LOG_USER_LEVEL values are:
 *  LOGLEVEL_OFF            - no logging
 *  LOGLEVEL_FATAL          - log only critical errors
 *  LOGLEVEL_ERROR          - logs events which might require corrective actions
 *  LOGLEVEL_WARN           - might lead to an error or require corrective actions in the future
 *  LOGLEVEL_INFO           - usually completed actions
 *  LOGLEVEL_DEBUG          - debugging information, typically only meaningful to developers
 *  The verbosity increases from top to bottom. More verbose levels include less verbose
 *  ones, e.g. setting to LOGLEVEL_DEBUG will also output LOGLEVEL_FATAL, LOGLEVEL_ERROR,
 *  LOGLEVEL_WARN and LOGLEVEL_INFO level entries.

// To save e.g. user activity data only for selected users, provide the username followed by semicolon.
// The data will be saved into a dedicated file per user in the LOG_FILE_DIR
// Users have to be encapsulated in quotes, several users are semicolon separated, like:
// define('LOG_USERS', 'user1;user2;user3');
define('LOG_USERS', '');

// Location to the log directory
// e.g /var/log/webapp-userslog/users/
define('LOG_FILE_DIR', '');

Create log files per user. By default the logging is disabled. The log file directory must be writable by the webserver.

6.42. location of language files

// Location to the translations
define("LANGUAGE_DIR", "server/language/");

Option to define the directory where the languages / translations are stored.

6.43. Default language and fallback language

// Defines the default interface language. This can be overriden by the user.
// This language is also used on the login page
if (isset($_ENV['LANG']) && $_ENV['LANG']!="C"){
        define('LANG', $_ENV["LANG"]); // This means the server environment language determines the web client language.
        define('LANG', 'en_GB'); // default fallback language

Define a default fallback language.

6.44. Enabled languages

// List of languages that should be enabled in the logon
// screen's language drop down.  Languages should be specified
// using <languagecode>_<regioncode>[.UTF-8], and separated with
// semicolon.  A list of available languages can be found in
// the manual or by looking at the list of directories in
// /usr/share/kopano-webapp/server/language .
define("ENABLED_LANGUAGES", "de_DE;en_GB;en_US;fr_FR;he_IL;it_IT;nl_NL;ru_RU;zh_CN;nb_NO;hu_HU");

list of enabled languages in WebApp.

6.45. Default timezone

// Defines the default time zone, change e.g. to "Europe/London" when needed
if(!ini_get('date.timezone')) {

Define the time zone used in WebApp.

6.46. Powerpaste options

// Options for TinyMCE's powerpaste plugin, see https://www.tinymce.com/docs/enterprise/paste-from-word/#configurationoptions
// for more details.
define('POWERPASTE_WORD_IMPORT', 'merge');
define('POWERPASTE_HTML_IMPORT', 'merge');

TinyMCE’s powerpaste options.

6.47. Display errors

// Do not log errors into stdout, since this generates faulty JSON responses.
ini_set("display_errors", false);

Display errors inside the WebApp. Default is false.

6.48. Log errors

ini_set("log_errors", true);

Enable logging of errors and specify what to log. Default is true and E_ERROR. Valid options are: E_ERROR, E_WARNING, E_PARSE, E_NOTICE.

6.49. Debug.php file

if (file_exists('debug.php')){
        // define empty dump function in case we still use it somewhere
        function dump(){}

Debug.php can be found in our repository: https://stash.kopano.io/projects/KW/repos/kopano-webapp/