Add managesieve (Sieve) support for remote accounts

When switching identities, the managesieve plugin still connected to
the default sieve server. Hook into managesieve_connect to redirect
the sieve connection to the remote account's server.

Adds sieve_host, sieve_port and sieve_auth columns to the database,
a Sieve section to the identity settings form, preconfig support for
sieve_host, and localized labels for all 7 languages.
This commit is contained in:
Laurent Dinclaux
2026-02-10 11:05:01 +11:00
parent 546e9ba882
commit 6ea4aee0a7
19 changed files with 346 additions and 3 deletions

View File

@@ -37,6 +37,15 @@ CREATE TABLE IF NOT EXISTS `ident_switch`
smallint
NOT NULL
DEFAULT 1,
`sieve_host`
varchar(64),
`sieve_port`
int
CHECK(`sieve_port` > 0 AND `sieve_port` <= 65535),
`sieve_auth`
smallint
NOT NULL
DEFAULT 1,
`drafts_mbox`
varchar(64),
`sent_mbox`

15
SQL/mysql/2026021001.sql Normal file
View File

@@ -0,0 +1,15 @@
ALTER TABLE `ident_switch`
ADD `sieve_host` varchar(64) AFTER `smtp_auth`;
ALTER TABLE `ident_switch`
ADD `sieve_port`
int
CHECK(`sieve_port` > 0 AND `sieve_port` <= 65535)
AFTER `sieve_host`;
ALTER TABLE `ident_switch`
ADD `sieve_auth`
smallint
NOT NULL
DEFAULT 1
AFTER `sieve_port`;

View File

@@ -38,6 +38,15 @@ CREATE TABLE ident_switch
smallint
NOT NULL
DEFAULT(1),
sieve_host
varchar(64),
sieve_port
integer
CHECK(sieve_port > 0 AND sieve_port <= 65535),
sieve_auth
smallint
NOT NULL
DEFAULT(1),
drafts_mbox
varchar(64),
sent_mbox

View File

@@ -0,0 +1,13 @@
ALTER TABLE ident_switch
ADD sieve_host varchar(64);
ALTER TABLE ident_switch
ADD sieve_port
integer
CHECK(sieve_port > 0 AND sieve_port <= 65535);
ALTER TABLE ident_switch
ADD sieve_auth
smallint
NOT NULL
DEFAULT(1);

View File

@@ -38,6 +38,15 @@ CREATE TABLE ident_switch
smallint
NOT NULL
DEFAULT 1,
sieve_host
varchar(64),
sieve_port
integer
CHECK(sieve_port > 0 AND sieve_port <= 65535),
sieve_auth
smallint
NOT NULL
DEFAULT 1,
drafts_mbox
varchar(64),
sent_mbox

13
SQL/sqlite/2026021001.sql Normal file
View File

@@ -0,0 +1,13 @@
ALTER TABLE ident_switch
ADD sieve_host varchar(64);
ALTER TABLE ident_switch
ADD sieve_port
integer
CHECK(sieve_port > 0 AND sieve_port <= 65535);
ALTER TABLE ident_switch
ADD sieve_auth
smallint
NOT NULL
DEFAULT 1;