Add alias SMTP/Sieve resolution, debug logging, and exclude aliases from switcher

SMTP and Sieve hooks follow parent_id to resolve alias config from parent
account. Aliases excluded from account switcher dropdown and background
mail checker. Debug logging behind ident_switch.debug config flag.
Fix double ssl:// prefix in switch_account host parsing.
This commit is contained in:
Laurent Dinclaux
2026-02-10 22:28:56 +11:00
parent e4bd92ca63
commit 08673a4399
4 changed files with 75 additions and 13 deletions

View File

@@ -213,7 +213,7 @@ class IdentSwitchChecker
. 'ii.email '
. 'FROM ' . $rc->db->table_name(ident_switch::TABLE) . ' isw '
. 'INNER JOIN ' . $rc->db->table_name('identities') . ' ii ON isw.iid = ii.identity_id '
. 'WHERE isw.user_id = ? AND isw.flags & ? > 0 AND isw.notify_check = ?';
. 'WHERE isw.user_id = ? AND isw.flags & ? > 0 AND isw.notify_check = ? AND isw.parent_id IS NULL';
$q = $rc->db->query($sql, $rc->user->ID, ident_switch::DB_ENABLED, ident_switch::NOTIFY_CHECK_ENABLED);