diff -urN ../roundcubemail-1.6.1.orig/program/include/rcmail.php ./program/include/rcmail.php --- ../roundcubemail-1.6.1.orig/program/include/rcmail.php 2023-01-23 22:03:14.000000000 +0200 +++ ./program/include/rcmail.php 2023-03-31 19:39:09.450243000 +0300 @@ -968,7 +968,7 @@ list(, $domain) = rcube_utils::explode('@', $post_user); // direct match in default_host array - if ($default_host[$post_host] || in_array($post_host, array_values($default_host))) { + if (!empty($default_host[$post_host]) || in_array($post_host, array_values($default_host))) { $host = $post_host; } // try to select host by mail domain