Browse Source

[Web] MAILCOW_HOSTNAME should not be a CNAME

andryyy 5 years ago
parent
commit
1c8cca8187
1 changed files with 6 additions and 0 deletions
  1. 6 0
      data/web/inc/ajax/dns_diagnostics.php

+ 6 - 0
data/web/inc/ajax/dns_diagnostics.php

@@ -320,6 +320,12 @@ foreach ($records as &$record) {
   }
   }
   else {
   else {
     $currents = dns_get_record($record[0], $record_types[$record[1]]);
     $currents = dns_get_record($record[0], $record_types[$record[1]]);
+    if ($record[0] == $mailcow_hostname && ($record[1] == "A" | $record[1] == "AAAA")) {
+      if (!empty(dns_get_record($record[0], DNS_CNAME))) {
+        $currents[0]['ip'] = state_missing . ' <b>(CNAME)</b>';
+        $currents[0]['ipv6'] = state_missing . ' <b>(CNAME)</b>';
+      }
+    }
     if ($record[1] == 'SRV') {
     if ($record[1] == 'SRV') {
       foreach ($currents as &$current) {
       foreach ($currents as &$current) {
         if ($current['target'] == '') {
         if ($current['target'] == '') {