PHPackages                             gecka/ident-switch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. gecka/ident-switch

ActiveRoundcube-plugin[Mail &amp; Notifications](/categories/mail)

gecka/ident-switch
==================

This plugin allows users to switch between different accounts (including remote) in single Roundcube session.

v5.0.4(1mo ago)293AGPL-3.0+PHPPHP &gt;=8.2CI passing

Since May 16Pushed 1mo agoCompare

[ Source](https://github.com/Gecka-Apps/roundcube-ident_switch)[ Packagist](https://packagist.org/packages/gecka/ident-switch)[ Docs](https://github.com/Gecka-Apps/roundcube-ident_switch)[ RSS](/packages/gecka-ident-switch/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (4)Versions (31)Used By (0)

Ultimate Identity Switcher for Roundcube
========================================

[](#ultimate-identity-switcher-for-roundcube)

[![Version](https://camo.githubusercontent.com/6e079557af6108c27bd87dfe1a236a5ee5ceb2264183698e02f8c2ee4e340c1b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f4765636b612d417070732f726f756e64637562652d6964656e745f7377697463683f6c6162656c3d76657273696f6e)](https://github.com/Gecka-Apps/roundcube-ident_switch/releases)[![PHP CodeSniffer](https://github.com/Gecka-Apps/roundcube-ident_switch/actions/workflows/phpcs.yml/badge.svg)](https://github.com/Gecka-Apps/roundcube-ident_switch/actions/workflows/phpcs.yml)[![PHP Lint](https://github.com/Gecka-Apps/roundcube-ident_switch/actions/workflows/php-lint.yml/badge.svg)](https://github.com/Gecka-Apps/roundcube-ident_switch/actions/workflows/php-lint.yml)[![License: AGPL v3](https://camo.githubusercontent.com/a3e79d899e42547e60b531886472b3cb818e2a42dac09cc16a8d87105c077ca8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4147504c5f76332d626c75652e737667)](https://www.gnu.org/licenses/agpl-3.0)[![PHP](https://camo.githubusercontent.com/d8cb12d4161bcf3d0abb89bdcd751b5c5812aff012d9323cd8cc56633e950041/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d373737424234)](https://www.php.net)[![Roundcube](https://camo.githubusercontent.com/9ed7f39f4307109e289b0a2c82d770e8298ceaaf41f44c9401a6d100166e2858/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f526f756e64637562652d312e362b2d333742454646)](https://roundcube.net)

Switch between multiple IMAP accounts within a single Roundcube session.

About
-----

[](#about)

**ident\_switch** is a Roundcube plugin that turns identities into full account shortcuts. Configure each identity with its own IMAP, SMTP and Sieve server, then switch between accounts with a single click from the toolbar dropdown. Aliases, notifications, and domain preconfig are all built in.

*Originally created by Boris Gulay. This fork is a major rewrite by [Gecka](https://gecka.nc) — modernized for PHP 8.2+, restructured codebase, and packed with new features: alias identities, Sieve support, background mail notifications, domain preconfig, connection testing, and per-protocol security.*

Features
--------

[](#features)

### Multi-Account Switching

[](#multi-account-switching)

- One-click account switching from a toolbar dropdown
- Each identity can be linked to a separate IMAP/SMTP server with its own credentials
- Automatic special folder mapping (Sent, Drafts, Junk, Trash) per account
- Encrypted password storage in database

### Alias Identities

[](#alias-identities)

- Link identities as aliases of any configured account (not just the primary)
- Aliases share the parent account's IMAP inbox, SMTP and Sieve configuration
- Compose "From" dropdown automatically filtered to show only the active account and its aliases

### Sieve (ManageSieve) Support

[](#sieve-managesieve-support)

- Per-account Sieve server configuration with independent host, port and credentials
- Three authentication modes: same as IMAP, none, or custom credentials
- Sieve section only appears when the `managesieve` plugin is active

### New Mail Notifications

[](#new-mail-notifications)

- Background mail checking across all secondary accounts
- Unread count badge in the account switcher dropdown
- Per-account notification settings: favicon, sound, desktop notifications
- Optional round-robin mode to reduce IMAP connections with many accounts
- Integrates with Roundcube's `newmail_notifier` plugin

### Domain Preconfig

[](#domain-preconfig)

- Pre-fill server settings based on the identity's email domain
- Wildcard domain support (`*`) for catch-all defaults
- Lock preconfigured fields as read-only to prevent user changes
- Restrict account creation to preconfigured domains only (`preconfig_only` mode)

### Security

[](#security)

- Per-protocol security selection: None, STARTTLS, or SSL/TLS (IMAP, SMTP, Sieve independently)
- Connection testing on save (IMAP, SMTP, Sieve) to catch misconfigurations early
- Passwords encrypted using Roundcube's built-in encryption
- Warning displayed when selecting unencrypted connections

Requirements
------------

[](#requirements)

- PHP 8.2+
- Roundcube 1.6+
- MySQL, PostgreSQL, or SQLite

Installation
------------

[](#installation)

### With Composer (recommended)

[](#with-composer-recommended)

Navigate to your Roundcube installation directory and run:

```
composer require gecka/ident-switch
```

The [roundcube/plugin-installer](https://github.com/roundcube/plugin-installer) will automatically place the plugin in the correct `plugins/` directory, initialize the database schema, and offer to enable it.

> **Don't have Composer?** See [getcomposer.org](https://getcomposer.org/download/) for installation instructions.

> **Running as root on a VPS?** Roundcube files are typically owned by `www-data`. Run Composer as the web server user to avoid permission issues:
>
> ```
> sudo -u www-data composer require gecka/ident-switch
> ```

### Manual

[](#manual)

1. Place this plugin folder into the plugins directory of Roundcube:

    ```
    cd /path/to/roundcube/plugins/
    git clone https://github.com/Gecka-Apps/roundcube-ident_switch.git ident_switch
    ```
2. Add `ident_switch` to `$config['plugins']` in your Roundcube config:

    ```
    $config['plugins'] = array('ident_switch', /* other plugins */);
    ```
3. Initialize the database schema:

    ```
    bin/updatedb.sh --package=ident_switch --dir=plugins/ident_switch/SQL
    ```

Configuration
-------------

[](#configuration)

Copy the sample configuration file and edit it to match your environment:

```
cp plugins/ident_switch/config.inc.php.dist plugins/ident_switch/config.inc.php
```

### Domain Preconfig

[](#domain-preconfig-1)

Pre-fill server settings per email domain so users don't have to enter them manually:

```
$config['ident_switch.preconfig'] = [
    'domain.tld' => [
        'imap_host' => 'ssl://mail.domain.tld:993',
        'smtp_host' => 'tls://mail.domain.tld:587',
        'sieve_host' => 'tls://mail.domain.tld:4190',
        'user' => 'email',        // 'email' = full address, 'mbox' = local part
        'readonly' => true,       // lock fields in UI
    ],
    '*' => [                      // wildcard: default for unlisted domains
        'imap_host' => 'ssl://mail.example.com:993',
        'smtp_host' => 'tls://mail.example.com:587',
        'user' => 'email',
    ],
];
```

### Options

[](#options)

SettingDefaultDescription`ident_switch.check_mail``true`Enable background mail checking across secondary accounts`ident_switch.round_robin``false`Check one account per refresh cycle instead of all at once`ident_switch.hide_notifier_warning``false`Hide the warning when `newmail_notifier` plugin is not active`ident_switch.preconfig_only``false`Restrict account creation to preconfigured domains only`ident_switch.debug``false`Log SMTP/Sieve routing and alias resolution to `logs/ident_switch.log`Usage
-----

[](#usage)

1. Create a new identity in **Settings &gt; Identities**
2. Choose the account mode:
    - **Primary account** — default identity, no server config needed
    - **Separate account** — configure IMAP, SMTP, and optionally Sieve servers
    - **Alias of \[account\]** — link to an existing account's servers
3. For separate accounts, fill in server details (or let preconfig handle it)
4. The account switcher dropdown appears in the toolbar once at least one separate account is configured

Updating
--------

[](#updating)

```
composer update gecka/ident-switch
```

Database migrations are applied automatically by the Roundcube plugin installer.

Migrating from the Original Plugin
----------------------------------

[](#migrating-from-the-original-plugin)

If you are upgrading from `boressoft/ident_switch`, `toteph42/identity_switch`, or another fork:

> **Important:** This version (5.x) requires a **v4.x database schema** as its starting point. If you are running v1.x–v3.x, you must first upgrade to v4.x (`boressoft/ident_switch`) before migrating to this fork. This applies to all supported databases (MySQL, PostgreSQL, SQLite).

### With Composer

[](#with-composer)

1. Replace the old package in `composer.json` with `gecka/ident-switch` and run `composer update`
2. Database migrations are applied automatically

### Manual

[](#manual-1)

1. Replace the plugin files in `plugins/ident_switch/`
2. Run the database migration: ```
    bin/updatedb.sh --package=ident_switch --dir=plugins/ident_switch/SQL
    ```

### Configuration

[](#configuration-1)

If you use `config.inc.php`, update it to the new format — the `'host'` key has been replaced by separate `'imap_host'` and `'smtp_host'` keys (old `'host'` key still works as fallback).

Localization
------------

[](#localization)

Available in 7 languages: English, French, German, Italian, Dutch, Russian, Slovenian.

Version Compatibility
---------------------

[](#version-compatibility)

VersionRoundcubePHP5.x1.6+8.2+4.x1.3 — 1.57.x — 8.11.x — 3.x1.1 — 1.3*discontinued*License
-------

[](#license)

This plugin is released under the [GNU Affero General Public License Version 3](https://www.gnu.org/licenses/agpl-3.0.html).

Original code by Boris Gulay licensed under GPL-3.0+. New contributions licensed under AGPL-3.0+.

Authors
-------

[](#authors)

- **Boris Gulay** — Original developer (2016–2022)
- **Christian Landvogt** — Special folders support
- **Gergely Papp** — Bug fixes
- **Laurent Dinclaux** — Current maintainer ([Gecka](https://gecka.nc))

---

Built with 🥥 and ☕ by [Gecka](https://gecka.nc) — Kanaky-New Caledonia 🇳🇨

###  Health Score

54

—

FairBetter than 96% of packages

Maintenance89

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 72.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~125 days

Recently: every ~22 days

Total

30

Last Release

54d ago

Major Versions

0.8 → 1.02016-06-02

1.2 → 2.02018-03-12

2.0 → 3.02018-03-17

3.4 → 4.02019-01-12

4.4.2 → 5.0.02026-02-10

PHP version history (2 changes)0.5PHP &gt;=5.3.0

5.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/9995?v=4)[Eugenio](/maintainers/gecka)[@gecka](https://github.com/gecka)

---

Top Contributors

[![BoresXP](https://avatars.githubusercontent.com/u/18707586?v=4)](https://github.com/BoresXP "BoresXP (133 commits)")[![loxK](https://avatars.githubusercontent.com/u/136687?v=4)](https://github.com/loxK "loxK (45 commits)")[![lvogt](https://avatars.githubusercontent.com/u/36930594?v=4)](https://github.com/lvogt "lvogt (6 commits)")

---

Tags

mailidentityswitchimap

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/gecka-ident-switch/health.svg)

```
[![Health](https://phpackages.com/badges/gecka-ident-switch/health.svg)](https://phpackages.com/packages/gecka-ident-switch)
```

###  Alternatives

[php-imap/php-imap

Manage mailboxes, filter/get/delete emails in PHP (supports IMAP/POP3/NNTP)

1.7k13.4M52](/packages/php-imap-php-imap)[ddeboer/imap

Object-oriented IMAP for PHP

9364.1M15](/packages/ddeboer-imap)[webklex/php-imap

PHP IMAP client

4466.7M27](/packages/webklex-php-imap)[toteph42/identity_switch

This plugin allows users to switch between different identities (and check for new mails) in a single Roundcube session.

221.5k](/packages/toteph42-identity-switch)[directorytree/imapengine

A fully-featured IMAP library -- without the PHP extension

551284.6k9](/packages/directorytree-imapengine)[elm/identity_smtp

Individual SMTP settings for every identity

491.7k](/packages/elm-identity-smtp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
