Add wildcard domain support in preconfig

Use '*' as a catch-all domain key in ident_switch.preconfig to provide
default settings for any domain not explicitly listed.
This commit is contained in:
Laurent Dinclaux
2026-02-10 17:46:58 +11:00
parent fc13088c62
commit 780cfc6a7e
2 changed files with 9 additions and 1 deletions

View File

@@ -38,7 +38,7 @@ class IdentSwitchPreconfig
$this->plugin->load_config();
$cfg = rcmail::get_instance()->config->get('ident_switch.preconfig', []);
$cfg = $cfg[$dom] ?? null;
$cfg = $cfg[$dom] ?? $cfg['*'] ?? null;
if ($cfg) {
if (empty($cfg['imap_host']) && empty($cfg['host'])) {