Merge pull request #6760 from mailcow/fix/6739

[Web] Remove Port from HTTP_HOST
This commit is contained in:
FreddleSpl0it 2025-09-22 14:20:15 +02:00 committed by GitHub
commit d31e74c778
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,8 @@ if (!isset($_SERVER['HTTP_HOST']) || strpos($_SERVER['HTTP_HOST'], 'mta-sts.') !
exit;
}
$domain = str_replace('mta-sts.', '', $_SERVER['HTTP_HOST']);
$host = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
$domain = str_replace('mta-sts.', '', $host);
$mta_sts = mailbox('get', 'mta_sts', $domain);
if (count($mta_sts) == 0 ||