How roundcube/roundcubemail works
Purpose
Roundcube Webmail is a PHP/JavaScript browser-based, multilingual IMAP client. It provides mail handling, MIME rendering, address books, folder management, searching, spell checking, and a customizable UI. The application requires a MariaDB/MySQL, PostgreSQL, or SQLite database and uses external libraries.
Public entry points
• public_html/index.php and index.php are web application front doors for deployments with different document-root layouts.
• installer/index.php provides the installation interface.
• bin contains administrative and maintenance command-line scripts, including database initialization/update, import/export, health checks, and installation helpers.
• public_html/static.php is a public static-resource entry point.
Core components
• Request actions — program/actions: Mail, contacts, login, settings, and utility action handlers. The directory structure exposes the application’s main user-facing operation areas.
• Application orchestration — program/include: Request setup, output handling, attachments, OAuth, mail sending, health checks, installation, and shared application utilities.
• Core framework and protocol/data services — program/lib/Roundcube: IMAP, SMTP, MIME/message processing, users, sessions, caching, databases, address books, spell checking, HTML filtering, and related framework services.
• Browser client — program/js: JavaScript application behavior, editing, lists, navigation, and shared browser utilities.
• Configuration and runtime defaults — config: Deployment configuration, defaults, MIME definitions, and web-server access protection.
• Database schemas and upgrades — SQL: Initial schemas and timestamped migrations for MySQL, PostgreSQL, and SQLite.
• Theme/UI customization — skins/elastic: Templates, JavaScript, styles, fonts, and images for the bundled Elastic interface.
• Extension system and bundled extensions — plugins: Plugin entry points, optional drivers, client assets, localization, and plugin-specific UI resources. The README identifies the plugin API as the primary extension mechanism.
Relationships
Browser traffic enters through the public PHP front doors and is handled by the application/action areas under program/actions and program/include. Those areas own mail, contacts, authentication, and settings operations while the framework under program/lib/Roundcube supplies shared protocol, message, session, cache, storage, and rendering services.
The framework’s mail-facing areas form the repository boundary to external IMAP and SMTP services; the database areas form the boundary to the configured SQL backend. SQL supplies the persistent schema and upgrade data consumed by deployment and maintenance operations.
The core UI uses program/js together with a selected skin such as skins/elastic. Bundled plugins remain optional integrations around the core and may add server behavior, browser assets, localization, drivers, or templates through the plugin API. Exact dispatch order and source-level dependency details are not established by the supplied tree and README.
Main entry points: Roundcube Framework and protocol services · actions Request actions · index.php Web front doors · plugins Bundled plugins
Components 13
Roundcube application
Core browser-based mail application.
- Web front doors · Receives browser traffic for deployed document-root layouts.
public_html/index.php - Request actions · Handles mail, contacts, login, settings, and utility operations.
program/actions - Application orchestration · Provides request setup, output handling, mail sending, OAuth, and shared utilities.
program/include - Framework and protocol services · Provides IMAP, SMTP, MIME, sessions, caching, databases, address books, and rendering services.
program/lib/Roundcube - Browser client · Provides browser application behavior, editing, lists, navigation, and shared utilities.
program/js - Elastic skin · Provides templates, client assets, styles, fonts, and images.
skins/elastic - Configuration · Provides deployment configuration and runtime defaults.
config - Database schemas · Provides initial schemas and timestamped upgrades for supported databases.
SQL - Maintenance commands · Provides database, health, import/export, and installation operations.
bin
Optional extensions
Plugin-based extensions around the core.
- Bundled plugins · Uses the plugin API for optional server behavior, assets, localization, drivers, and UI resources.
plugins
Other components
- IMAP service · External mail service reached through the framework's mail-facing areas.
- SMTP service · External mail service reached through the framework's mail-facing areas.
- SQL backend · Configured MariaDB/MySQL, PostgreSQL, or SQLite backend.
Connections 12
- Web front doors → Request actions: handles traffic
- Web front doors → Application orchestration: initializes requests
- Request actions → Framework and protocol services: uses services
- Application orchestration → Framework and protocol services: uses services
- Framework and protocol services → IMAP service: connects to
- Framework and protocol services → SMTP service: connects to
- Framework and protocol services → SQL backend: stores data
- Database schemas → SQL backend: defines schema
- Maintenance commands → Database schemas: applies upgrades
- Browser client → Elastic skin: uses theme
- Bundled plugins → Request actions: extends
- Bundled plugins → Framework and protocol services: extends