|
|
@@ -221,15 +221,24 @@ class DnsHelper
|
|
|
);
|
|
|
array_push($zoneRecords, $dmarcRecord);
|
|
|
foreach($dnsZone['data']->records as $record) {
|
|
|
- if($record->type != 'MX') {
|
|
|
- if(!$record->type === 'TXT'){
|
|
|
- array_push($zoneRecords, $record);
|
|
|
- } elseif (!preg_match('/^v=spf(.*)$/i', trim($record->rdata->txtdata,'"'))) {
|
|
|
- array_push($zoneRecords, $record);
|
|
|
- };
|
|
|
+ if($record->type == 'MX') continue;
|
|
|
+ if(!$record->type === 'TXT') {
|
|
|
+ if(preg_match('/^v=spf(.*)$/i', trim($record->rdata->txtdata,'"'))) continue;
|
|
|
+ if(preg_match('/^v=DKIM1(.*)$/i', trim($record->rdata->txtdata,'"'))) continue;
|
|
|
};
|
|
|
+ array_push($zoneRecords, $record);
|
|
|
}
|
|
|
- $result = localAPI('dnsmanager' ,
|
|
|
+
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'kerioEmail',
|
|
|
+ __FUNCTION__,
|
|
|
+ $this->params,
|
|
|
+ 'DEbug',
|
|
|
+ $zoneRecords
|
|
|
+ );
|
|
|
+
|
|
|
+/* $result = localAPI('dnsmanager' ,
|
|
|
array(
|
|
|
'dnsaction' => 'updateZone',
|
|
|
'zone_id' => $zoneID,
|
|
|
@@ -238,7 +247,7 @@ class DnsHelper
|
|
|
);
|
|
|
if($result['result'] != 'success') {
|
|
|
return 'Error: cloud not update zone for ID ' . $zoneID;
|
|
|
- }
|
|
|
+ } */
|
|
|
return 'success';
|
|
|
}
|
|
|
|