mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 08:27:03 +03:00
MS autodiscover priorities DNS over subdomain
This commit is contained in:
parent
9e2b9a9fcd
commit
3306fadc47
1 changed files with 10 additions and 10 deletions
|
|
@ -168,16 +168,6 @@ abstract class Autoconfig
|
||||||
*/
|
*/
|
||||||
private static function autodiscover(string $domain) : ?array
|
private static function autodiscover(string $domain) : ?array
|
||||||
{
|
{
|
||||||
foreach ([
|
|
||||||
"https://{$domain}",
|
|
||||||
"https://autodiscover.{$domain}",
|
|
||||||
"http://autodiscover.{$domain}"
|
|
||||||
] as $host) {
|
|
||||||
$result = static::autodiscover_resolve($host, $domain);
|
|
||||||
if ($result) {
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach (\SnappyMail\DNS::SRV("_autodiscover._tcp.{$domain}") as $record) {
|
foreach (\SnappyMail\DNS::SRV("_autodiscover._tcp.{$domain}") as $record) {
|
||||||
if (443 == $record['port']) {
|
if (443 == $record['port']) {
|
||||||
$result = static::autodiscover_resolve("https://{$record['target']}", $domain);
|
$result = static::autodiscover_resolve("https://{$record['target']}", $domain);
|
||||||
|
|
@ -190,6 +180,16 @@ abstract class Autoconfig
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
foreach ([
|
||||||
|
"https://{$domain}",
|
||||||
|
"https://autodiscover.{$domain}",
|
||||||
|
"http://autodiscover.{$domain}"
|
||||||
|
] as $host) {
|
||||||
|
$result = static::autodiscover_resolve($host, $domain);
|
||||||
|
if ($result) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue