プログラマーのメモ書き

伊勢在住のプログラマーが気になることを気ままにメモったブログです

Roundcube の 1.5.x -> 1.6.x へのアップデートおよび ident_switch から identy_switch へ移行

こちらの記事の最後で触れたように、 Roundcube のアップデートを 1.5.x -> 1.6.x でやろうとするとなかなか面倒なことがわかりました。

で、時間ができたのを機に、 1.5.x から 1.6.x へアップデートし、 ident_switch も identy_switch へ移行してみたので、その際の作業をメモにしておきます。

準備

まずは、準備作業です。

sqlite のデータを吐き出し

始めに、 Roundcube のコンテナに接続して、 ident_switch のテーブルをダンプしておきます。

[ユーザ名@NAS名 ~]$ docker exec -it myrc /bin/bash
root@67dab0eafe94:/var/www/html# 
root@67dab0eafe94:/var/www/html# cd /var/roundcube/db/
root@67dab0eafe94:/var/roundcube/db# ls
sqlite.db
root@67dab0eafe94:/var/roundcube/db# 
root@67dab0eafe94:/var/roundcube/db# sqlite3 sqlite.db 
SQLite version 3.34.1 2021-01-20 14:10:07
Enter ".help" for usage hints.
sqlite> .output ident_switch.dump.sql
sqlite> .dump ident_switch
sqlite> .quit
root@67dab0eafe94:/var/roundcube/db# ls
ident_switch.dump.sql  sqlite.db
root@67dab0eafe94:/var/roundcube/db# 

ident_switch.dump.sql の中身を見てみると

root@67dab0eafe94:/var/roundcube/db# cat ident_switch.dump.sql 
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE ident_switch
(
        id
                integer
                PRIMARY KEY,
        user_id
                integer
                NOT NULL
                REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE,
        iid
                integer
                NOT NULL
                REFERENCES identities(identity_id) ON DELETE CASCADE ON UPDATE CASCADE
                UNIQUE,
        username
                varchar(64),
        password
                varchar(64),
        imap_host
                varchar(64),
        imap_port
                integer
                CHECK(imap_port > 0 AND imap_port <= 65535),
        imap_delimiter
                char(1),
        label
                varchar(32),
        flags
                integer
                NOT NULL
                DEFAULT(0),
        smtp_host
                varchar(64),
        smtp_port
                integer
                CHECK(smtp_port > 0 AND smtp_port <= 65535),
        smtp_auth
                smallint
                NOT NULL
                DEFAULT 1,
        drafts_mbox
                varchar(64),
        sent_mbox
                varchar(64),
        junk_mbox
                varchar(64),
        trash_mbox
                varchar(64),
        UNIQUE (user_id, label)
);
INSERT INTO ident_switch VALUES(1,1,2,'mail_address@example.com','encrypted_password','ssl://サーバー名',993,'/',NULL,1,'ssl://SMTPサーバー名',465,1,'Drafts','Sent','Junk E-mail','Trash');
INSERT INTO ident_switch VALUES(2,1,3,'mail_address2@example.com','encrypted_password','ssl://サーバー名',993,NULL,NULL,1,'ssl://SMTPサーバー名',465,1,'INBOX.Draft','INBOX.Sent','INBOX.spam','INBOX.Trash');
(略)
COMMIT;
root@67dab0eafe94:/var/roundcube/db# 

とこんな感じで、確かにスキーマとデータがダンプされていることがわかります。

docker イメージの作成

dockerfile を 1.6.7 ベースにしておきます。あと、 sqlite を操作するので sqlite3 をインストールしておきます。

FROM roundcube/roundcubemail:1.6.7-apache

RUN apt-get update -y \
    && apt-get install -y git \
    && apt-get install -y sqlite3

RUN set -ex; \
    sed -i "s/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/" /etc/ssl/openssl.cnf \
    ;

COPY ./config.docker.add_imap_conn_options.inc.php /var/roundcube/config/

これで、イメージをビルドしておきます。

[ユーザ名@NAS名 myroundcube]$ docker build -t myroundcube -t myroundcube:0.3 .
(略)

Roundcube 1.6.7 で起動

QNAP の管理画面にログインして、 Container Station を立ち上げます。稼働中の Roundcube アプリケーションを選択して、歯車メニューより『再作成』を選択します。

docker-compose.yml を下記のように指定して、再作成します。

version: '3'

services:
  https-portal:
    image: steveltn/https-portal:1.23.1
    ports:
      - 'xxxx:80'
      - 'yyyy:443'
    restart: always
    volumes:
      - rcmail_ssl_certs:/var/lib/https-portal
    environment:
      DOMAINS: 'xxxx.yyyy.zzzz -> http://roundcubemail:80'
      STAGE: 'production'
      # FORCE_RENEW: 'true'
      CLIENT_MAX_BODY_SIZE: 0
  
  roundcubemail:
    image: myroundcube:0.3
    container_name: myrc
#    restart: unless-stopped
    volumes:
      - rcmail_www:/var/www/html
      - rcmail_sqlite:/var/roundcube/db
#    ports:
#      - 9001:80
    environment:
      - ROUNDCUBEMAIL_DB_TYPE=sqlite
      - ROUNDCUBEMAIL_SKIN=elastic
      - ROUNDCUBEMAIL_DEFAULT_HOST=ssl://サーバー名
      - ROUNDCUBEMAIL_DEFAULT_PORT=993
      - ROUNDCUBEMAIL_SMTP_SERVER=ssl://サーバー名
      - ROUNDCUBEMAIL_SMTP_PORT=465
      - ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE=30M
      - ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,attachment_reminder

volumes:
    rcmail_ssl_certs:
        external: true
    rcmail_www:
        external: true
    rcmail_sqlite:
        external: true

ボリューム rcmail_www および rcmail_sqlite の中身は、 1.5.x の状態のままです。これで起動すると、前回の記事の通り ident_switch に関する警告が出ますが、一応起動します(警告の詳細は下記も参照)。

これで、準備OK です。ここから移行作業を行ってみます。

警告の確認

何かの参考になるかもしれないので、 1.6.7 で起動した際の警告を改めてを確認しておきます。

(略)
Running update script at target...
PHP Warning:  Undefined array key "drafts_mbox_default_iswitch" in /var/www/html/plugins/ident_switch/ident_switch.php on line 47
PHP Warning:  Undefined array key "sent_mbox_default_iswitch" in /var/www/html/plugins/ident_switch/ident_switch.php on line 47
PHP Warning:  Undefined array key "junk_mbox_default_iswitch" in /var/www/html/plugins/ident_switch/ident_switch.php on line 47
PHP Warning:  Undefined array key "trash_mbox_default_iswitch" in /var/www/html/plugins/ident_switch/ident_switch.php on line 47
WARNING: Replaced config options:
(These config options have been replaced or renamed)
- 'default_host' was replaced by 'imap_host'
- 'smtp_server' was replaced by 'smtp_host'
- backing up the current config file(s)...
- writing /var/www/html/config/config.inc.php...
Done.
Your configuration files are now up-to-date!
Executing database schema update.
Updating database schema (2021081000)... [OK]
(略)

ident_switch から identy_switch への移行

Roundcube が 1.6.7 で起動できたので、 ident_switch から identy_switch へ移行したいと思います。

packagist.org

一応、ここに ident_switch からの移行方法も書いてありますが、後述するようにこれでは失敗したため、そのあたりも対応していきます。

identy_switch のインストール

roundcube のコンテナに入った状態でインストールを行います。

root@52cfd961e6e2:/var/www/html# composer require toteph42/identy_switch
Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
./composer.json has been updated
Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Running composer update toteph42/identy_switch
(略)
  - Installing toteph42/identy_switch (1.0.17): Extracting archive
 15/20 [=====================>------]  75%Do you want to activate the plugin identy_switch? [Y|n] y
Updated local config at /var/www/html/config/config.inc.php
Creating package config file
Running database initialization script for identy_switch
Creating database schema... [OK]
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
7 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
Using version ^1.0 for toteph42/identy_switch
root@52cfd961e6e2:/var/www/html# 

途中でこのプラグインを有効にするか聞かれるので、yを押しておきます。無事にインストールされたら、

/var/www/html/plugins/identy_switch/SQL に migrate.sql があることを確認します。

ありますね。これが移行スクリプトになるとのことです。

sqlite のテーブルを書き戻す

この時点では、 ident_switch のテーブルが存在していますが、データがすべて消えた状態になっています。なので、移行スクリプトを呼び出す前に、 ident_switch のテーブルを復元します。

まずは現時点の状態を確認します。

root@52cfd961e6e2:/var/www/html# cd /var/roundcube/db/
root@52cfd961e6e2:/var/roundcube/db# ls
ident_switch.dump.sql  sqlite.db
root@52cfd961e6e2:/var/roundcube/db# sqlite3 sqlite.db 
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite> 
sqlite> .table
cache                contactgroups        responses          
cache_index          contacts             searches           
cache_messages       dictionary           session            
cache_shared         filestore            system             
cache_thread         ident_switch         users              
collected_addresses  identities         
contactgroupmembers  identy_switch      
sqlite> 
sqlite> select * from ident_switch;
sqlite> 

ident_switch のテーブルが存在しますが、中身は空ですね。一旦、このテーブルを削除しておきます。

sqlite> drop table ident_switch;
sqlite> .table
cache                contactgroupmembers  identy_switch      
cache_index          contactgroups        responses          
cache_messages       contacts             searches           
cache_shared         dictionary           session            
cache_thread         filestore            system             
collected_addresses  identities           users              
sqlite> 

次に、最初に取得したテーブルのダンプファイルを読み込み、テーブルおよびレコードを復元します。

sqlite> .read ident_switch.dump.sql
sqlite> .table
cache                contactgroups        responses          
cache_index          contacts             searches           
cache_messages       dictionary           session            
cache_shared         filestore            system             
cache_thread         ident_switch         users              
collected_addresses  identities         
contactgroupmembers  identy_switch      
sqlite> 

レコードも確認すると、ちゃんと戻っています。

sqlite> select * from ident_switch;
1|1|2|mail_address@example.com|encrypted_password|ssl://サーバー名|993|/||1|ssl://SMTPサーバー名|465|1|Drafts|Sent|Junk E-mail|Trash
2|1|3|mail_address2@example.com|encrypted_password|ssl://サーバー名|993|||1|ssl://SMTPサーバー名|465|1|INBOX.Draft|INBOX.Sent|INBOX.spam|INBOX.Trash
(略)
sqlite> 

移行スクリプトの実行

それでは、移行スクリプトを実行します。

sqlite> .read /var/www/html/plugins/identy_switch/SQL/migrate.sql
Parse error near line 3: no such column: notify_timeout
  host`,     `imap_port`,     `imap_delimiter`,     `notify_timeout`,     `newma
                                      error here ---^
sqlite> 

あれれ?エラーになります。ついでにいうと、この時点で ident_switch テーブルは削除されてしまってます。

migrate.sql の中を見てみると、これ自体はそんなに難しいことをしておらず、 ident_switch の各項目を identy_switch に insert しているだけです。

ここで、2つのテーブルのスキーマを見比べてみると、(少なくとも現時点の) ident_switch には

  • notify_timeout
  • newmail_check

の項目がないのにかかわらず、 migrate.sql の select のフィールドとして含まれてしまってます。これがエラーの原因ですね。

ということで、移行スクリプトを修正してやります。まず、

[ユーザ名@NAS名 docker]$ docker cp myrc:/var/www/html/plugins/identy_switch/SQL/migrate.sql .

こんな感じで、コンテナからホスト持ってきて、編集します。

[ユーザ名@NAS名 docker]$ cat migrate.sql
--  Created with phpmyadmin

INSERT INTO identy_switch(
    `id`,
    `user_id`,
    `iid`,
    `label`,
    `flags`,
    `imap_user`,
    `imap_pwd`,
    `imap_host`,
    `imap_port`,
    `imap_delim`,
    `smtp_host`,
    `smtp_port`,
    `drafts`,
    `sent`,
    `junk`,
    `trash`
)
SELECT
    `id`,
    `user_id`,
    `iid`,
    `label`,
    `flags`,
    `username`,
    `password`,
    `imap_host`,
    `imap_port`,
    `imap_delimiter`,
    `smtp_host`,
    `smtp_port`,
    `drafts_mbox`,
    `sent_mbox`,
    `junk_mbox`,
    `trash_mbox`
FROM
    ident_switch;
DROP TABLE IF EXISTS ident_switch;[mor9admin1@nas01 docker]$ 
[ユーザ名@NAS名 docker]$ 

INSERT の対象フィールドからさきほどの2つのフィールドを削除しただけです。 identy_switch のスキーマを確認すると、

sqlite> .schema identy_switch
CREATE TABLE IF NOT EXISTS "identy_switch"(
        "id" INTEGER  NOT NULL ,
        "user_id" INTEGER  NOT NULL REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE,
        "iid" INTEGER  NOT NULL REFERENCES identities(identity_id) ON DELETE CASCADE ON UPDATE CASCADE UNIQUE,
        "label" TEXT,
        "flags" INT NOT NULL DEFAULT 0,
        "imap_user" TEXT,
        "imap_pwd" TEXT,
        "imap_host" TEXT,
        "imap_port" SMALLINT DEFAULT 0,
        "imap_delim" CHAR(1),
        "newmail_check" SMALLINT DEFAULT 300,
        "notify_timeout" SMALLINT DEFAULT 10,
        "smtp_host" TEXT,
        "smtp_port" SMALLINT DEFAULT 0,
        "drafts" TEXT DEFAULT '',
        "sent" TEXT DEFAULT '',
        "junk" TEXT DEFAULT '',
        "trash" TEXT DEFAULT '',
        UNIQUE (user_id, label)
);
CREATE INDEX IX_identy_switch_user_id ON identy_switch(user_id);
CREATE INDEX IX_identy_switch_iid on identy_switch(iid);
sqlite> 

のようになっていて、 newmail_check も notify_timeout もデフォルト値が設定されているので大きな問題にはならないと予想されます。

この修正した migrate.sql を roundcube のコンテナ内にコピーしてやります。

[ユーザ名@NAS名 docker]$ docker cp migrate.sql myrc:/var/www/html/plugins/identy_switch/SQL/

コピーできたか確認しておきます。

[ユーザ名@NAS名 docker]$ docker exec -it myrc /bin/bash
root@52cfd961e6e2:/var/www/html# cd plugins/identy_switch/SQL
root@52cfd961e6e2:/var/www/html/plugins/identy_switch/SQL# ls
migrate.sql  migrate.sql.org  mysql.initial.sql  postgres.initial.sql  sqlite.initial.sql
root@52cfd961e6e2:/var/www/html/plugins/identy_switch/SQL# 

ちゃんとありますね。さきほどエラーが起きたときに、既存の ident_switch テーブルは削除されてしまったので、作業前に、もう一度戻します。

root@52cfd961e6e2:/var/www/html/plugins/identy_switch/SQL# cd /var/roundcube/db/
root@52cfd961e6e2:/var/roundcube/db# sqlite3 sqlite.db 
SQLite version 3.40.1 2022-12-28 14:03:47
Enter ".help" for usage hints.
sqlite> 
sqlite> .read ident_switch.dump.sql

やっと、修正した移行スクリプトの実行です。

sqlite> .read /var/www/html/plugins/identy_switch/SQL/migrate.sql
sqlite> 

今度はエラーが起きません。テーブルの中身を確認してみると、

sqlite> select * from identy_switch;
1|1|2||1|mail_address@example.com|encrypted_password|ssl://サーバー名|993|/|300|10|ssl://SMTPサーバー名|465|Drafts|Sent|Junk E-mail|Trash
2|1|3||1|mail_address2@example.com|encrypted_password|ssl://サーバー名|993||300|10|ssl://SMTPサーバー名|465|INBOX.Draft|INBOX.Sent|INBOX.spam|INBOX.Trash
sqlite>

おぉ、ちゃんとコピーされてますね。

動作確認

ここまでできたら、一度 roundcube にアクセスしてみて、動作確認をしてみます。Roundcube 自体は問題ないですね。メールアドレスの選択部分を見ると、 ident_switch とは少し異なりますが、

のようになっているので動作しているっぽいです。メールアカウントを切り替えてみようとすると、

あれ?変ですね。メールアドレスの選択肢がありません。

メールアドレス表示の不具合へ対応

試しにこの空欄を選択してみると、あれ?アカウントが切り替わりました。ただし、切り替え用のアカウントは7~8個設定していますが、そのうちの一つだけに切り替えできました。ということは identy_switch 自体も動作はしてるっぽいですが、表示周りの問題のようですね。

仕方ないので、『設定』->『識別情報』と進んで、デフォルト以外のアカウントを選択して内容を確認すると、設定はコピーされているようです。どういうことだろうか・・・。

ん?設定内容をよく見てみると、

こんな感じに Label の中身は何も設定されていないのが引っかかりました。 ident_switch の時は未設定でもメールアドレスが替わりに表示されていたので、特に設定を行っていませんでした。なので、すべて空白になっています。

ひょっとしてこれじゃないかな?と思い、試に文字列を設定してみると、今度はメールアドレスの選択がちゃんと表示されました。

切り替えも正しくできます。どうもこれが原因だったようです。少なくとも Label を設定してやれば問題なく表示できますね。

フォルダ階層区切り文字を設定

じゃあ、ということでこれを設定済みのメールアドレスについて全部設定してやろうとしたら、一部

というエラーが出るところがありました。 IMAP のフォルダ階層区切り文字を設定しろ、ということのようです。

ident_switch の時は、こちらの記事に書いたように、『.』(ピリオド)以外の区切り文字については設定する必要があったのですが、『.』(ピリオド)は未設定でも動作していました。ですが、 identy_switch は必須項目になっているようです(先ほどみたスキーマには not null 制約はついていなかったので、保存時にチェックしているんでしょうね)。

ということで、 Label と併せて、フォルダ階層区切り文字も設定しておきます。

後始末

この状態だと、 ident_switch と identy_switch の両方が有効になっているので、 ident_switch を無効にします。composer でインストールしたので、 composer でのアンインストール方法を調べると、

などが見つかったので、まんま、これをやってみます。

root@b428ce2626f6:/var/www/html# composer remove boressoft/ident_switch --no-update
root@b428ce2626f6:/var/www/html# composer update --dry-run
Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
  - Removing boressoft/ident_switch (4.4.2)
Installing dependencies from lock file (including require-dev)
Package operations: 19 installs, 0 updates, 1 removal
  - Removing boressoft/ident_switch (4.4.2)
  - Installing symfony/polyfill-ctype (v1.30.0)
  - Installing phpdocumentor/reflection-docblock (2.0.5)
  - Installing phpunit/php-token-stream (1.4.12)
  - Installing symfony/yaml (v3.4.47)
  - Installing sebastian/version (1.0.6)
  - Installing sebastian/global-state (1.1.1)
  - Installing sebastian/recursion-context (1.0.5)
  - Installing sebastian/exporter (1.2.2)
  - Installing sebastian/environment (1.3.7)
  - Installing sebastian/diff (1.4.1)
  - Installing sebastian/comparator (1.2.4)
  - Installing phpunit/php-text-template (1.2.1)
  - Installing doctrine/instantiator (1.5.0)
  - Installing phpunit/phpunit-mock-objects (2.3.8)
  - Installing phpunit/php-timer (1.0.8)
  - Installing phpunit/php-file-iterator (1.4.5)
  - Installing phpunit/php-code-coverage (2.2.4)
  - Installing phpspec/prophecy (v1.5.0)
  - Installing phpunit/phpunit (4.8.36)
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
4 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
root@b428ce2626f6:/var/www/html# 

実際に削除します。

root@b428ce2626f6:/var/www/html# composer update boressoft/ident_switch
Composer could not detect the root package (roundcube/roundcubemail) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 0 updates, 1 removal
  - Removing boressoft/ident_switch (4.4.2)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 19 installs, 0 updates, 1 removal
  - Downloading symfony/polyfill-ctype (v1.30.0)
  - Downloading phpdocumentor/reflection-docblock (2.0.5)
  - Downloading phpunit/php-token-stream (1.4.12)
  - Downloading symfony/yaml (v3.4.47)
  - Downloading sebastian/version (1.0.6)
  - Downloading sebastian/global-state (1.1.1)
  - Downloading sebastian/recursion-context (1.0.5)
  - Downloading sebastian/exporter (1.2.2)
  - Downloading sebastian/environment (1.3.7)
  - Downloading sebastian/diff (1.4.1)
  - Downloading sebastian/comparator (1.2.4)
  - Downloading phpunit/php-text-template (1.2.1)
  - Downloading doctrine/instantiator (1.5.0)
  - Downloading phpunit/phpunit-mock-objects (2.3.8)
  - Downloading phpunit/php-timer (1.0.8)
  - Downloading phpunit/php-file-iterator (1.4.5)
  - Downloading phpunit/php-code-coverage (2.2.4)
  - Downloading phpspec/prophecy (v1.5.0)
  - Downloading phpunit/phpunit (4.8.36)
  - Removing boressoft/ident_switch (4.4.2)
  - Installing symfony/polyfill-ctype (v1.30.0): Extracting archive
  - Installing phpdocumentor/reflection-docblock (2.0.5): Extracting archive
  - Installing phpunit/php-token-stream (1.4.12): Extracting archive
  - Installing symfony/yaml (v3.4.47): Extracting archive
  - Installing sebastian/version (1.0.6): Extracting archive
  - Installing sebastian/global-state (1.1.1): Extracting archive
  - Installing sebastian/recursion-context (1.0.5): Extracting archive
  - Installing sebastian/exporter (1.2.2): Extracting archive
  - Installing sebastian/environment (1.3.7): Extracting archive
  - Installing sebastian/diff (1.4.1): Extracting archive
  - Installing sebastian/comparator (1.2.4): Extracting archive
  - Installing phpunit/php-text-template (1.2.1): Extracting archive
  - Installing doctrine/instantiator (1.5.0): Extracting archive
  - Installing phpunit/phpunit-mock-objects (2.3.8): Extracting archive
  - Installing phpunit/php-timer (1.0.8): Extracting archive
  - Installing phpunit/php-file-iterator (1.4.5): Extracting archive
  - Installing phpunit/php-code-coverage (2.2.4): Extracting archive
  - Installing phpspec/prophecy (v1.5.0): Extracting archive
  - Installing phpunit/phpunit (4.8.36): Extracting archive
Updated local config at /var/www/html/config/config.inc.php
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
Generating autoload files
7 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.
root@b428ce2626f6:/var/www/html# 

/var/www/html/config/config.inc.php に active なプラグインが記述されているのですが、上記操作のあとは

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = [
        'archive',
        'zipdownload',
        'attachment_reminder',
        'identy_switch',
];

のように、 ident_switch の記述が消えてました。

また、 Roundcube にログインして、『このプログラムについて』を表示させても

のように、リストから ident_switch が消えていました。無事アンインストールできたようです。

なお、 ident_switch と identy_switch が両方有効な状態のままの時、一部の特殊なフォルダの表示がおかしくなっていましたが、上記の通りアンインストールしたら、問題なく表示できるようになりました。

まとめ

なんとか 1.5.x から 1.6.x にアップデートして、 ident_switch も identy_switch に移行することができました。

identy_switch の設定内容が、若干変わっているようなので、そのあたりは追って調査と設定を行いたいと思います。何はともあれ、これで一段落です。