Initial upload to Gitea

This commit is contained in:
antonn committed 2026-11-30 16:32:37 +00:00
1 parent 78193254ad
commit 8478998cae
1485 files changed
+461025 -42348

No files matched your search

@@ -0,0 +1,287 @@
<?php
/*
* SPDX-FileCopyrightText: Copyright 2020 - 2026 grommunio GmbH
* SPDX-FileCopyrightText: Copyright 2016 Kopano and its licensors
* SPDX-FileCopyrightText: Copyright 2005 - 2016 Zarafa B.V. and its licensors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
// The config file for grommunio Web.
// All possible web client settings can be set in this file. Some settings
// (language) can also be set per user or logon.
// Use this option to optionally disable some PHP configuration checks.
// WARNING: this check will disable checks regarding the security of grommunio Web site configuration,
// only change it if you know the consequences - improper use will lead to an insecure installation!
define("CONFIG_CHECK_COOKIES_SSL", TRUE);
// Depending on your setup, it might be advisable to change the lines below to one defined with your
// default socket location.
// Examples: define("DEFAULT_SERVER", "default:");
define("DEFAULT_SERVER", "default:");
// Defines the default domain of email addresses to login with
// If this is set, you can login with only the user part of an email.
// Examples: define("DEFAULT_DOMAIN", "example.com");
//define("DEFAULT_DOMAIN", "");
// Name of the cookie that is used for the session
define("COOKIE_NAME", "GROMMUNIO_WEB");
// Set to 'false' to disable secure session cookies and to allow log-in without HTTPS.
define("SECURE_COOKIES", TRUE);
// Enable shared rules
define("ENABLE_SHARED_RULES", TRUE);
// Allow users to remove an attachment from a message which is already stored.
// Set to FALSE where received mail has to stay as it arrived.
define("ENABLE_ATTACHMENT_REMOVAL", TRUE);
// Allow users to enable the conversation (threaded) view for their inbox.
// Set to 'false' to disable the feature server-wide regardless of user settings.
define("ENABLE_CONVERSATION_VIEW", TRUE);
// Allow dragging attachments out of an opened e-mail directly into a
// cooperating web application's drop zone (the attachment bytes are embedded
// in the drag operation). Set to FALSE to disable that embedding server-wide.
// Dragging an attachment onto the operating system (file manager, desktop)
// needs no embedded bytes and remains available either way.
// Overrides defaults.php
//define("ENABLE_ATTACHMENT_DRAG_OUT", TRUE);
// Maximum attachment size (in bytes) whose content is embedded in the drag
// operation for ENABLE_ATTACHMENT_DRAG_OUT. Larger attachments are not
// embedded; they can still be dragged to the operating system. Default 25 MiB.
// Overrides defaults.php
//define("ATTACHMENT_DRAG_OUT_MAX_SIZE", 26214400);
// CSS properties removed from content that is pasted into the editor from
// other applications or web pages, separated by spaces. Set to "" to keep
// the formatting of the source.
// Overrides defaults.php
//define("PASTE_STRIP_STYLES", "font-family font-size line-height color background-color background");
// Enable resolving hidden address book entries (disabled by default).
// Overrides defaults.php
//define("ENABLE_RESOLVE_HIDDEN_USERS", true);
// Complete recipient suggestions from the address book and contacts when the
// recipient history has too few matches (enabled by default).
// Overrides defaults.php
//define("ENABLE_DIRECTORY_SUGGESTIONS", false);
// Whether to show domains without users/contacts in their global address book.
define("GAB_SHOW_EMPTY_DOMAINS", true);
// The timeout (in seconds) for the session. User will be logged out of grommunio Web
// when he has not actively used grommunio Web for this time.
// Set to 0 (or remove) for no timeout during browser session.
define("CLIENT_TIMEOUT", 0);
// Handler which is used for storing and retrieving data associated with a session.
define("SESSION_SAVE_HANDLER", "files");
ini_set("session.save_handler", SESSION_SAVE_HANDLER);
// Path where the session associated data is saved.
define("SESSION_SAVE_PATH", "/var/lib/grommunio-web/session");
ini_set("session.save_path", SESSION_SAVE_PATH);
// How long (in seconds) a session may sit unused in the path above before
// grommunio-web-session-cleanup.timer removes it. This is deliberately not
// session.gc_maxlifetime, which is a few minutes on most systems: a session
// here lives as long as the browser keeps its cookie, and CLIENT_TIMEOUT is
// what ends an idle one. A distribution session cleaner never sees either
// value, because it reads the static php.ini and never runs this file.
define("SESSION_MAX_LIFETIME", 14 * 24 * 60 * 60);
// Defines the domains from which cross domain authentication requests
// are allowed. E.g. if WebMeetings runs under a different domain than
// the grommunio Web 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)
define("CROSS_DOMAIN_AUTHENTICATION_ALLOWED_DOMAINS", "");
// 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);
// 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/grommunio-web/tmp");
// Define the path to the plugin directory (No slash at the end)
define("PATH_PLUGIN_DIR", "plugins");
// Define list of disabled plugins separated by semicolon
define("DISABLED_PLUGINS_LIST", "");
// Define a list of plugins that cannot be disabled by users.
// Plugins should be separated by a semicolon (;). A wildcard (*)
// can be used to identify multiple plugins.
// Overrides defaults.php
define("ALWAYS_ENABLED_PLUGINS_LIST", "passwd;mdm");
// Path used for client(domain) define data such as themes, icons ...
define("APPDATA_DIR", "appdata");
// Path used for full text index of every user
define("SQLITE_INDEX_PATH", "/var/lib/grommunio-web/sqlite-index");
// General grommunio Web 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.
// See doc/theming.rst for how to write one.
//define("THEME", 'grommunioLighttheme');
// The title that will be shown in the title bar of the browser
define("WEBAPP_TITLE", "grommunio Web");
// Enable widgets/today context.
// Overrides defaults.php
define("ENABLE_WIDGETS", false);
// 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'
// )
// )));
// Additional categories can be added by uncommenting and editing the following define.
// The format is the same as the format of DEFAULT_CATEGORIES which is defined in default.php
// To change the default categories, DEFAULT_CATEGORIES can also be defined here.
// Note: Every category should have a unique name, because it is used to identify the category
// define("ADDITIONAL_CATEGORIES", json_encode(array(
// array(
// 'name' => _('Family'),
// 'color' => '#000000',
// 'quickAccess' => true,
// 'sortIndex' => 10
// )
// )));
// 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.'))
// )));
// 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'))
// )));
// The grommunio admin API endpoint
define('ADMIN_API_ENDPOINT', 'http://[::1]:8080/api/v1/');
// The grommunio admin API status endpoint
define('ADMIN_API_STATUS_ENDPOINT', ADMIN_API_ENDPOINT . 'status');
// The grommunio admin API disabled plugins endpoint
define('ADMIN_API_DISABLEDPLUGINS_ENDPOINT', ADMIN_API_ENDPOINT . 'disabledPluginsOfUser?username=');
// How long the disabled plugins answer of the admin API is cached for a
// session, in seconds. A change an administrator makes takes at most this
// long to reach a user who is already logged on.
define('ADMIN_API_DISABLEDPLUGINS_CACHE_TIME', 300);
// How long to wait before asking again when the admin API could not be
// read, in seconds.
define('ADMIN_API_DISABLEDPLUGINS_RETRY_TIME', 30);
// How long to wait for an answer of the admin API, in seconds.
define('ADMIN_API_TIMEOUT', 2);
// Whether to show the Logout button in grommunio-web (true or false).
// Show per default.
define('SHOW_LOGOUT_BUTTON', true);
/**************************************\
* Memory usage and timeouts *
\**************************************/
// 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
// BLOCK_SIZE (in bytes) is used for attachments by mapi_stream_read/mapi_stream_write
define("BLOCK_SIZE", 1048576);
// Time that static files may exist in the client's cache (13 weeks)
define("EXPIRES_TIME", 60*60*24*7*13);
// Messages a mailbox may submit per minute. Sending is one click, so this only
// ever stops a script replaying the request; 0 turns the limit off.
define("MAX_SUBMITS_PER_MINUTE", 20);
/**********************************************************************************
* 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.
*
**************************************************************************************/
// Overrides defaults.php
define("LOG_USER_LEVEL", LOGLEVEL_DEBUG);
// Uncomment to log detailed full-text search diagnostics to the PHP error log.
//define("DEBUG_FULLTEXT_SEARCH", true);
/**************************************\
* Languages *
\**************************************/
// Location to the translations
define("LANGUAGE_DIR", "server/language/");
// Defines the default interface language. This can be overridden by the user.
// The required syntax is an XPG locale identifier.
// The charset does not matter. g-web will switch to UTF-8 internally.
if (isset($_ENV['LANG']) && $_ENV['LANG']!="C") {
define('LANG', $_ENV["LANG"]); // This means the server environment language determines the web client language.
} else {
define('LANG', 'en_US.UTF-8'); // default fallback language
}
// Defines the default time zone
if (!ini_get('date.timezone')) {
date_default_timezone_set('Europe/Vienna');
}
/**************************************\
* Debugging *
\**************************************/
// Do not log errors into stdout, since this generates faulty JSON responses.
ini_set("display_errors", false);
ini_set("log_errors", true);
error_reporting(E_ERROR);
if (file_exists('debug.php')){
include_once('debug.php');
}else{
// define empty dump function in case we still use it somewhere
function dump(){}
}
?>