|
@@ -109,6 +109,15 @@ function KerioEmail_setSPF($params)
|
|
|
array_push($zoneRecords, $spfRecord);
|
|
array_push($zoneRecords, $spfRecord);
|
|
|
|
|
|
|
|
foreach($dnsZone['data']->records as $record) {
|
|
foreach($dnsZone['data']->records as $record) {
|
|
|
|
|
+
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $record,
|
|
|
|
|
+ 'Debug Usage',
|
|
|
|
|
+ $record->rdata
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
if(!$record->type === 'TXT'){
|
|
if(!$record->type === 'TXT'){
|
|
|
array_push($zoneRecords, $record);
|
|
array_push($zoneRecords, $record);
|
|
|
} elseif (!preg_match("#^v=spf(.*)$#i", $record->rdata->txtdata)) {
|
|
} elseif (!preg_match("#^v=spf(.*)$#i", $record->rdata->txtdata)) {
|
|
@@ -123,14 +132,6 @@ function KerioEmail_setSPF($params)
|
|
|
)
|
|
)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
- logModuleCall(
|
|
|
|
|
- 'kerioEmail',
|
|
|
|
|
- __FUNCTION__,
|
|
|
|
|
- $zoneRecords,
|
|
|
|
|
- 'Debug Usage',
|
|
|
|
|
- $result
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
if($result['result'] != 'success') {
|
|
if($result['result'] != 'success') {
|
|
|
return 'Error: cloud not update zone for ID ' . $zoneID;
|
|
return 'Error: cloud not update zone for ID ' . $zoneID;
|
|
|
}
|
|
}
|