1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-21 01:49:22 +02:00

Use domain from e-mail address, if provided.

This ensures that the correct SRV records are retrieved when the
autoconfig file is loaded through a redirect or proxy.
This commit is contained in:
Sebastian Marsching 2023-10-12 21:29:05 +02:00
parent 8a70cdb48b
commit c4a158ea81

View File

@ -23,6 +23,13 @@ else {
$port = substr($_SERVER['HTTP_HOST'], $domain_port+1);
}
if (isset($_GET['emailaddress'])) {
$emailaddress_at = strpos($_GET['emailaddress'], '@');
if ($emailaddress_at !== FALSE) {
$domain = substr($_GET['emailaddress'], $emailaddress_at + 1);
}
}
header('Content-Type: application/xml');
?>
<?= '<?xml version="1.0"?>'; ?>