Email Domains Mapper

Connect users to the right mail servers based on their email domain.

CI Latest Release Installs Downloads License

What it does

For Roundcube installations serving multiple email domains. You configure which domains are allowed and which IMAP, SMTP and optional ManageSieve servers each domain uses. Users sign in with their full email address; the plugin looks up the domain and selects the configured servers. Unknown or malformed domains are rejected before any connection is made.

Explicit domain allowlist (fail-closed)
IMAP + SMTP host selection per domain
Optional per-domain ManageSieve
ManageSieve UI/endpoint gating
IDN (Unicode/punycode) support
Case-insensitive domain matching
TLS-only server URLs (ssl://, tls://)
Configurable logging with sanitization

Requirements

Installation

From your Roundcube installation directory:

composer require pushpasta/email_domains_mapper

Composer installs under plugins/. If prompted to enable the plugin, answer yes. config.inc.php is preserved across updates.

Then complete the configuration below.

Configuration generator

Build a ready-to-use config.inc.php for the plugin. If you already have a config, paste it below to load and edit it (use the file from the plugin's directory, plugins/email_domains_mapper/config.inc.php - not Roundcube's main config). Otherwise start from scratch by adding mappings. When done, click Generate and copy the result into plugins/email_domains_mapper/config.inc.php.

Nothing is stored, uploaded or saved - everything happens in your browser only.

Step 1 - Import existing config (optional)

Step 2 - Log level & mappings

Step 3 - Result

// Click "Generate config" to produce config.inc.php contents.

Save the file as config.inc.php, then see the README configuration section for enabling the plugin and login form settings.