diff --git a/panel/classes/Panel/Vmail/Domains.php b/panel/classes/Panel/Vmail/Domains.php index 96275b6..14b72bc 100644 --- a/panel/classes/Panel/Vmail/Domains.php +++ b/panel/classes/Panel/Vmail/Domains.php @@ -104,7 +104,22 @@ class Domains extends \Panel\Vmail { $dnsinfo['dkim']['status'] = "Create"; } - if ($dnsinfo['verified_count'] == 4) { + # DMARC (TXT) record + $dnsinfo['dmarc']['status'] = "Create"; + $dnsinfo['dmarc']['color'] = "red"; + if ($dns_txt_records = dns_get_record("_dmarc.$domain", DNS_TXT)) { + foreach ($dns_txt_records as $k=>$dns_txt_record) { + if (str_starts_with($dns_txt_record['txt'], 'v=DMARC1')) { + $dnsinfo['dmarc']['status'] = "Verified"; + $dnsinfo['dmarc']['color'] = "black"; + $dnsinfo['verified_count']++; + } else { + $dnsinfo['dmarc']['status'] = "Update"; + } + } + } + + if ($dnsinfo['verified_count'] == 5) { $dnsinfo['status'] = 'Verified'; } else { $dnsinfo['status'] = 'Update';