# Technical Documentation: roundcube/roundcubemail > ℹ️ **Provenance:** Hybrid Fusion: `roundcube/roundcubemail` (README + 4 In-Tree Chapters) · [CodeWiki Reference](https://codewiki.google/github.com/roundcube/roundcubemail) · Recency: Active (< 180 days) ## 1. Project Overview & Quickstart (roundcube/roundcubemail) Roundcube Webmail ================= [roundcube.net](https://roundcube.net) [](https://github.com/roundcube/roundcubemail/actions/workflows/tests.yml) ATTENTION --------- This is just a snapshot from the GIT repository and is **NOT A STABLE version of Roundcube**. It's not recommended to replace an existing installation of Roundcube with this version. Also using a separate database for this installation is highly recommended. INTRODUCTION ------------ Roundcube Webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder management, message searching and spell checking. Roundcube Webmail is written in PHP and requires the MariaDB, MySQL, PostgreSQL or SQLite database. With its plugin API it is easily extendable and the user interface is fully customizable using skins. The code designed to run on a webserver is mainly written in PHP and Javascript. It includes a custom framework with an IMAP library derived from [IlohaMail][iloha] and requires a set of external libraries (see composer.json and jsdeps.json files). RELEASES -------- Roundcubemail follows the semantic versioning rules for releases. For more details please read [the RELEASE_MANAGEMENT file](docs/RELEASE_MANAGEMENT.md). INSTALLATION ------------ For detailed instructions on how to install Roundcube webmail on your server, please refer to the [INSTALL.md](docs/INSTALL.md) document in the same directory as this document. If you're updating an older version of Roundcube please follow the steps described in the [UPGRADING.md](docs/UPGRADING.md) file. BROWSER SUPPORT --------------- Roundcube uses jQuery 3.x (and other libs) for its client and therefore inherits the browser support from there. This currently includes: - Chrome: (Current - 1) and Current - Edge: (Current - 1) and Current - Firefox: (Current - 1) and Current, ESR - Safari: (Current - 1) and Current - Opera: Current LICENSE ------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (**with exceptions for skins & plugins**) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see [www.gnu.org/licenses/][gpl]. This file forms part of the Roundcube Webmail Software for which the following exception is added: Plugins and Skins which merely make function calls to the Roundcube Webmail Software, and for that purpose include it by reference shall not be considered modifications of the software. If you wish to use this file in another project or create a modified version that will not be part of the Roundcube Webmail Software, you may remove the exception above and use this source code under the original version of the license. For more details about licensing and the exceptions for skins and plugins see [roundcube.net/license][license] CONTRIBUTION ------------ Want to help make Roundcube the best webmail solution ever? Roundcube is open source software. Our developers and contributors all are volunteers and we're always looking for new additions and resources. For more information visit [roundcube.net/contribute][contrib] CONTACT ------- For bug reports or feature requests please refer to the tracking system at [Github][githubissues] or subscribe to our mailing list. See [roundcube.net/support][support] for details. You're always welcome to send a message to the project admin: hello(at)roundcube(dot)net [iloha]: https://sourceforge.net/projects/ilohamail/ [gpl]: https://www.gnu.org/licenses/ [license]: https://roundcube.net/license [contrib]: https://roundcube.net/contribute [support]: https://roundcube.net/support [githubissues]: https://github.com/roundcube/roundcubemail/issues ## 2. In-Tree Documentation Chapters (roundcube/roundcubemail) ## File: README.md Roundcube Webmail ================= [roundcube.net](https://roundcube.net) [](https://github.com/roundcube/roundcubemail/actions/workflows/tests.yml) ATTENTION --------- This is just a snapshot from the GIT repository and is **NOT A STABLE version of Roundcube**. It's not recommended to replace an existing installation of Roundcube with this version. Also using a separate database for this installation is highly recommended. INTRODUCTION ------------ Roundcube Webmail is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality you expect from an email client, including MIME support, address book, folder management, message searching and spell checking. Roundcube Webmail is written in PHP and requires the MariaDB, MySQL, PostgreSQL or SQLite database. With its plugin API it is easily extendable and the user interface is fully customizable using skins. The code designed to run on a webserver is mainly written in PHP and Javascript. It includes a custom framework with an IMAP library derived from [IlohaMail][iloha] and requires a set of external libraries (see composer.json and jsdeps.json files). RELEASES -------- Roundcubemail follows the semantic versioning rules for releases. For more details please read [the RELEASE_MANAGEMENT file](docs/RELEASE_MANAGEMENT.md). INSTALLATION ------------ For detailed instructions on how to install Roundcube webmail on your server, please refer to the [INSTALL.md](docs/INSTALL.md) document in the same directory as this document. If you're updating an older version of Roundcube please follow the steps described in the [UPGRADING.md](docs/UPGRADING.md) file. BROWSER SUPPORT --------------- Roundcube uses jQuery 3.x (and other libs) for its client and therefore inherits the browser support from there. This currently includes: - Chrome: (Current - 1) and Current - Edge: (Current - 1) and Current - Firefox: (Current - 1) and Current, ESR - Safari: (Current - 1) and Current - Opera: Current LICENSE ------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (**with exceptions for skins & plugins**) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see [www.gnu.org/licenses/][gpl]. This file forms part of the Roundcube Webmail Software for which the following exception is added: Plugins and Skins which merely make function calls to the Roundcube Webmail Software, and for that purpose include it by reference shall not be considered modifications of the software. If you wish to use this file in another project or create a modified version that will not be part of the Roundcube Webmail Software, you may remove the exception above and use this source code under the original version of the license. For more details about licensing and the exceptions for skins and plugins see [roundcube.net/license][license] CONTRIBUTION ------------ Want to help make Roundcube the best webmail solution ever? Roundcube is open source software. Our developers and contributors all are volunteers and we're always looking for new additions and resources. For more information visit [roundcube.net/contribute][contrib] CONTACT ------- For bug reports or feature requests please refer to the tracking system at [Github][githubissues] or subscribe to our mailing list. See [roundcube.net/support][support] for details. You're always welcome to send a message to the project admin: hello(at)roundcube(dot)net [iloha]: https://sourceforge.net/projects/ilohamail/ [gpl]: https://www.gnu.org/licenses/ [license]: https://roundcube.net/license [contrib]: https://roundcube.net/contribute [support]: https://roundcube.net/support [githubissues]: https://github.com/roundcube/roundcubemail/issues --- ## File: plugins/reconnect/readme.md # RoundCube Reconnect Plugin RoundCube reconnect Plugin is a small plugin that will try to reconnect to an IMAP server, if there is no explicit error code replied. If there is a know failure like wrong password, no additional attempts are triggered. This should help in cases, when the connection to the IMAP server is not 100% stable. ## Configuration You can specify the maximum attempts to connect the IMAP server. // Maximum attempts to connect the IMAP server $config['reconnect_imap_max_attempts'] = 5; --- ## File: plugins/markasjunk/README.md Roundcube Webmail MarkAsJunk Plugin =================================== This plugin adds "mark as spam" or "mark as not spam" button to the message menu. When not in the Junk mailbox: Messages are moved into the Junk mailbox and marked as read When in the Junk mailbox: The buttons are changed to "mark as not spam" or "this message is not spam" and the message is moved to the Inbox License ------- This plugin is released under the [GNU General Public License Version 3+][gpl]. Even if skins might contain some programming work, they are not considered as a linked part of the plugin and therefore skins DO NOT fall under the provisions of the GPL license. See the README file located in the core skins folder for details on the skin license. Configuration ------------- The default config file is plugins/markasjunk/config.inc.php.dist Rename this to plugins/markasjunk/config.inc.php All config parameters are optional. The Learning Driver ------------------- The learning driver allows you to perform additional processing on each message marked as spam/ham. A driver must contain a class named markasjunk_{driver file name}. The class must contain 3 functions: **spam:** This function should take 2 arguments: an array of UIDs of message(s) being marked as spam, the name of the mailbox containing those messages **ham:** This function should take 2 arguments: an array of UIDs of message(s) being marked as ham, the name of the mailbox containing those messages **init:** Optional, this function should take 0 arguments. eg: allows drivers to add JS to the page to control which of the spam/ham options are displayed. The `jsevents` driver is available to show how to use the JS events. Several drivers are provided by default they are: **cmd_learn:** This driver calls an external command (for example salearn) to process the message **dir_learn:** This driver places a copy of the message in a predefined folder, for example to allow for processing later **email_learn:** This driver emails the message either as an attachment or directly to a set address. This driver requires Roundcube 1.4 or above. **sa_blacklist:** This driver adds the sender address of a spam message to the users blacklist (or whitelist of ham messages) Requires SAUserPrefs plugin **amavis_blacklist:** This driver adds the sender address of a spam message to the users blacklist (or whitelist of ham messages) Requires Amacube plugin. Driver by Der-Jan **sa_detach:** If the message is a Spamassassin spam report with the original email attached then this is detached and saved in the Inbox, the spam report is deleted **edit_headers:** Edit the message headers. Headers are edited using preg_replace. **WARNING:** Be sure to match the entire header line, including the name of the header, and include the ^ and $ and test carefully before use on real messages. This driver alters the message source Running multiple drivers ------------------------ **WARNING:** This is very dangerous please always test carefully. Run multiple drivers at your own risk! It may be safer to create one driver that does everything you want. It is possible to run multiple drivers when marking a message as spam/ham. For example running sa_blacklist followed by cmd_learn or edit_headers and cmd_learn. An [example multi-driver][multidriver] is available. This is a starting point only, it requires modification for individual cases. Spam learning commands ---------------------- Spamassassin: ```sa-learn --spam --username=%u %f``` or ```sa-learn --spam --prefs-file=/var/mail/%d/%l/.spamassassin/user_prefs %f``` Ham learning commands --------------------- Spamassassin: ```sa-learn --ham --username=%u %f``` or ```sa-learn --ham --prefs-file=/var/mail/%d/%l/.spamassassin/user_prefs %f``` edit_headers example config --------------------------- **WARNING:** These are simple examples of how to configure the driver options, use at your own risk ```php $config['markasjunk_spam_patterns'] = array( 'patterns' => array('/^(Subject:\s*)(.*)$/m'), 'replacements' => array('$1[SPAM] $2') ); ``` ```php $config['markasjunk_ham_patterns'] = array( 'patterns' => array('/^(Subject:\s*)\[SPAM\](.*)$/m'), 'replacements' => array('$1$2') ); ``` [gpl]: https://www.gnu.org/licenses/gpl.html [multidriver]: https://gist.github.com/johndoh/8173505 --- ## File: program/lib/Roundcube/README.md Roundcube Framework =================== INTRODUCTION ------------ The Roundcube Framework is the basic library used for the Roundcube Webmail application. It is an extract of classes providing the core functionality for an email system. They can be used individually or as package for the following tasks: - IMAP mailbox access with optional caching - MIME message handling - Email message creation and sending through SMTP - General caching utilities using the local database - Database abstraction using PDO - VCard parsing and writing REQUIREMENTS ------------ PHP Version 8.1 or greater including: - PCRE, DOM, JSON, Session, Sockets, OpenSSL, Mbstring, Filter, Ctype, Intl (required) - PHP PDO with driver for either MySQL, PostgreSQL, or SQLite (required) - Iconv, Zip, Fileinfo, Exif (recommended) - LDAP for LDAP addressbook support (optional) INSTALLATION ------------ Copy all files of this directory to your project or install it in the default include_path directory of your webserver. Some classes of the framework require external libraries. See composer.json for the list of required packages. USAGE ----- The Roundcube Framework provides a bootstrapping file which registers an autoloader and sets up the environment necessary for the Roundcube classes. In order to make use of the framework, simply include the bootstrap.php file from this directory in your application and start using the classes by simply instantiating them. If you wanna use more complex functionality like IMAP access with database caching or plugins, the rcube singleton helps you loading the necessary files: ```php ``` LICENSE ------- This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (**with exceptions for plugins**) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see [www.gnu.org/licenses/][gpl]. This file forms part of the Roundcube Webmail Framework for which the following exception is added: Plugins which merely make function calls to the Roundcube Webmail Framework, and for that purpose include it by reference shall not be considered modifications of the software. If you wish to use this file in another project or create a modified version that will not be part of the Roundcube Webmail Framework, you may remove the exception above and use this source code under the original version of the license. For more details about licensing and the exceptions for skins and plugins see [roundcube.net/license][license] CONTACT ------- For bug reports or feature requests please refer to the tracking system at [Github][githubissues] or subscribe to our mailing list. See [roundcube.net/support][support] for details. You're always welcome to send a message to the project admins: hello(at)roundcube(dot)net [pear]: http://pear.php.net [gpl]: http://www.gnu.org/licenses/ [license]: http://roundcube.net/license [support]: http://roundcube.net/support [githubissues]: https://github.com/roundcube/roundcubemail/issues --- METRICS --- - Files Extracted: 5 - Estimated Token Budget: ~4297 tokens - Recency Window: Active (< 180 days) - Canonical Reference: https://codewiki.google/github.com/roundcube/roundcubemail