diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php
index 91040174683f42e4f27530ff31cfc9270a45c991..5f94cab672af068611b08691237d0e5279439f17 100644
--- a/interface/lib/classes/tools_monitor.inc.php
+++ b/interface/lib/classes/tools_monitor.inc.php
@@ -576,6 +576,27 @@ class tools_monitor {
return $html;
}
+ function showMx_ip_match() {
+ global $app;
+
+ /* fetch the Data from the DB */
+ $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'mx_ip_match' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']);
+
+ if(isset($record['data'])) {
+ $data = unserialize($record['data']);
+ $html = '
';
+ }
+
+ return $html;
+ }
+
function getDataTime($type) {
global $app;
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index d272b0807767f4a6a079f713db608f83f6dc4876..ecf957d7428df073b1c5924a304e198890a1e714 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -810,6 +810,29 @@ $form["tabs"]['mail'] = array(
'width' => '40',
'maxlength' => '255'
),
+ 'monitor_mx_records' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'additional_smtp_hostnames' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '20',
+ 'maxlength' => '255'
+ ),
+ 'additional_smtp_ips' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '20',
+ 'maxlength' => '255'
+ ),
+
//#################################
// END Datatable fields
//#################################
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index eff86620795d24ff04e842bd42ee78165c30d665..b8113a4a48ed8e93afa1ecc548c4be6c81a0ed1d 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index 94f805fae944bf054f4a148684ea939d2b7c5956..264f75c2bba6295c5d1f92696295f995d957e19b 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index aa83f0dbba57a9855a053666c270eef21fbf2794..b80a2cb8cf87fce6d72437984926c27234b315bd 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/ca_server_config.lng b/interface/web/admin/lib/lang/ca_server_config.lng
index 39feb97f352053aa23246ef85c3a3c73cc2804e8..11348af40b1cfa8b0ad0eb0b21f25712e2d52965 100644
--- a/interface/web/admin/lib/lang/ca_server_config.lng
+++ b/interface/web/admin/lib/lang/ca_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/cn_server_config.lng b/interface/web/admin/lib/lang/cn_server_config.lng
index bc728bb6321a3cb127f80fdece5e8a8667649eb1..695ea01d58619e9705de9fe01f18ee89ee720342 100644
--- a/interface/web/admin/lib/lang/cn_server_config.lng
+++ b/interface/web/admin/lib/lang/cn_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index 96ea04fb968747580c78bb3f2766ca69e5a55f25..b3ab204e686b437572968549032a7d52a2a59ad2 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng
index 92297bb355a70aa94a68b2a9241e0aa5a0c673d4..3657ae35d93b3ea4c86a89aaf5bbd42fe1dfad24 100644
--- a/interface/web/admin/lib/lang/de_server_config.lng
+++ b/interface/web/admin/lib/lang/de_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/dk_server_config.lng b/interface/web/admin/lib/lang/dk_server_config.lng
index 05f540220260ae3bde82ce298b6b0cb9b437757b..21edd59caaeb14e3f20fb2febcaa8db239c41991 100644
--- a/interface/web/admin/lib/lang/dk_server_config.lng
+++ b/interface/web/admin/lib/lang/dk_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index ecedc2524339e3c1124ce486f99721886d1d641e..d83c99451d0a2a7b9a5fc69f877cefff9ea18f78 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng
index af7beb9a4d7807156439f0bfc4e8dc4e07ea3213..c6e65b2bfce4081ff47943dc44b2e1ac4951765f 100644
--- a/interface/web/admin/lib/lang/en_server_config.lng
+++ b/interface/web/admin/lib/lang/en_server_config.lng
@@ -364,3 +364,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index 8961010f73f6e017e6e1d343fcb3fb983ae87dd5..72d9b3f642107092fa44e8b4766499031f4fba07 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index 68f12468a0cbd0baf4fdf5a216398e44eccf9097..bbd8fa874c70795ce77dd7a708779c92f162827b 100644
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index fb5d1e2f973a7d2b47e7de305e5a7d3d7c6ad5c5..3afe90f9ccf0d54852a66e227bd3abbd547a627d 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index b40c7fd49e7aca7fff377496c32f39691b618d29..21ddfef8ea7edb15a0d376286edfe351bbeee7b1 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 526b800cbdc42aada4a7e7e774416398dab0d7e4..0951a88044c9bae3ca79b3fd41cfea47e96a9bbe 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index daaa08c24aecbe198a6ad6ea259b68de4ef728f8..1e61c85cd6b3077387c7cf06307fd89ae2f55d5e 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index 9e7064fe14f12a9ac2333d3cbe97221fdb3d4893..23828032c145cade258ecba8f5cc996edb95515a 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -357,3 +357,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index fa9abcaaf1d4c39dd0f27422d824b901d5061c46..ac6c96e1f5df842c8250db5cf236586038e6e549 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index a8a8d473661b92d002f2e298aa782bfb1017b729..f8634b0fec72d0afd40ccec3f121fce036721d7e 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Extra MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Extra MX hostnames';
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index 83460000a22b282fc965e3674ff6be5169b8222a..fb7845417a02dc590213fc412625f26b7c100b8e 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index f856344b0a9c248f1a781089b694a7c061bffd53..01d76c2bfe3c90eef64d9e1841ab79d54dfbbc92 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index d69c33ed6525ad2cf23aac355418884a1c74629d..d030dc942493f6c00bf1034aeacc0065acf43ce9 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index 2fdb42393e3579634a528bd77258b7a9e26e26c9..1749b7f72e25bed8f1115c168c57cc5b0f44140e 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index 24df537a561ef9fe99ad633533757dc837c43f3b..8e8c3124de7112e92af04c53095cce9753c84b1b 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index 965ef097199729c5278731d7955662f7fa08bdcd..7f2353fdd4766083b74962d1aa8008c098f1f94b 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -358,3 +358,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index fcc26b10fdcb803070c202014078d16ff68639fb..a6e429d6cec3ade0ac016f3e4ebfbedecc4badf5 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -355,3 +355,6 @@ $wb['soft_delete_keep_7_txt'] = 'Purge after 7 days';
$wb['soft_delete_keep_30_txt'] = 'Purge after 30 days';
$wb['soft_delete_keep_90_txt'] = 'Purge after 90 days';
$wb['soft_delete_keep_365_txt'] = 'Purge after 365 days';
+$wb['monitor_mx_records_txt'] = 'Monitor MX records for mail domains';
+$wb['additional_mx_ips_txt'] = 'Additional MX IP\'s';
+$wb['additional_mx_hostnames_txt'] = 'Additional MX hostnames';
diff --git a/interface/web/admin/templates/server_config_mail_edit.htm b/interface/web/admin/templates/server_config_mail_edit.htm
index 485f94b740eaa51ba66ab8020619b0c2ee5fb8b8..a2d7520ff50912b1579e3661c40c80433b69a300 100644
--- a/interface/web/admin/templates/server_config_mail_edit.htm
+++ b/interface/web/admin/templates/server_config_mail_edit.htm
@@ -187,6 +187,18 @@
{tmpl_var name='overquota_notify_onok'}
+
+
+
+ {tmpl_var name='monitor_mx_records'}
+
+
+
+
+
+
+
+
@@ -214,4 +226,17 @@
$('.rspamd').hide();
}
});
+
+ if($('#monitor_mx_records').is(':checked')){
+ $('.monitor_mx_records').show();
+ } else {
+ $('.monitor_mx_records').hide();
+ }
+ $('#monitor_mx_records').change(function(){
+ if($(this).is(':checked')){
+ $('.monitor_mx_records').show();
+ } else {
+ $('.monitor_mx_records').hide();
+ }
+ });
diff --git a/interface/web/monitor/lib/lang/ar.lng b/interface/web/monitor/lib/lang/ar.lng
index c3604197a3fd51442b1d057cfe39c69247f73077..ea5e546547d5f5455c4c33530791756d5647fb13 100644
--- a/interface/web/monitor/lib/lang/ar.lng
+++ b/interface/web/monitor/lib/lang/ar.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/bg.lng b/interface/web/monitor/lib/lang/bg.lng
index b6c94dcc5119adb6ad83182002e548d56d9e2fa9..0b3719fbf061ee3541c18e848f5e55a94b6889db 100644
--- a/interface/web/monitor/lib/lang/bg.lng
+++ b/interface/web/monitor/lib/lang/bg.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/br.lng b/interface/web/monitor/lib/lang/br.lng
index 1ddfbb5fe37875b9b64ea9280f34a538680f616e..c175fe6c79935ddbffb6cb4753f8bb000cc69150 100644
--- a/interface/web/monitor/lib/lang/br.lng
+++ b/interface/web/monitor/lib/lang/br.lng
@@ -164,3 +164,9 @@ $wb['Munin'] = 'Exibir Munin';
$wb['no_munin_url_defined_txt'] = 'Nenhuma URL do Munin definida.';
$wb['no_permissions_to_view_munin_txt'] = 'Você não tem permissão para acessar o Munin.';
$wb['Database size'] = 'Banco de Dados em uso';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
diff --git a/interface/web/monitor/lib/lang/ca.lng b/interface/web/monitor/lib/lang/ca.lng
index a1ef67cbae5e05afd5051bdfe465363e7580fa98..e63a97873c27adac77f8b1747cd901bff77fd019 100644
--- a/interface/web/monitor/lib/lang/ca.lng
+++ b/interface/web/monitor/lib/lang/ca.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/cz.lng b/interface/web/monitor/lib/lang/cz.lng
index 1310d3a05fb7a10b856c631082e0c2baecfc8863..0e3abd7826751ddac1cf3c196ff2acb44a504bfd 100644
--- a/interface/web/monitor/lib/lang/cz.lng
+++ b/interface/web/monitor/lib/lang/cz.lng
@@ -164,3 +164,9 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Protokol historie datového logu';
$wb['Database size'] = 'Velikost databáze';
$wb['MySQL Database size'] = 'Velikost databází MySQL';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
diff --git a/interface/web/monitor/lib/lang/de.lng b/interface/web/monitor/lib/lang/de.lng
index 652c7b412ec00663630baffcc8d0ba072c22607b..4e264812b7d1606c07f054e494718c4f308a1a26 100644
--- a/interface/web/monitor/lib/lang/de.lng
+++ b/interface/web/monitor/lib/lang/de.lng
@@ -166,4 +166,10 @@ $wb['monitor_database_client_txt'] = 'Kunde';
$wb['monitor_database_domain_txt'] = 'Domain';
$wb['Database size'] = 'Datenbankgröße';
$wb['MySQL Database size'] = 'MySQL-Datenbankgröße';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/dk.lng b/interface/web/monitor/lib/lang/dk.lng
index efcbcc9d4189a91887e1623a85423957f414a88e..11ff849f3c256abb96d3d57fc26e222d26eaf4c4 100644
--- a/interface/web/monitor/lib/lang/dk.lng
+++ b/interface/web/monitor/lib/lang/dk.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/el.lng b/interface/web/monitor/lib/lang/el.lng
index 798aae223ab9c68a9f12e76a25a9b86aea1d935a..8de44af4f7d5971c88bf2c47b021160ef2f5424a 100644
--- a/interface/web/monitor/lib/lang/el.lng
+++ b/interface/web/monitor/lib/lang/el.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/en.lng b/interface/web/monitor/lib/lang/en.lng
index c790ed1d763b36452700fb203a175ec3ead3b337..158a44c71cbb39d5e613ac844460e60822345068 100644
--- a/interface/web/monitor/lib/lang/en.lng
+++ b/interface/web/monitor/lib/lang/en.lng
@@ -166,4 +166,10 @@ $wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/es.lng b/interface/web/monitor/lib/lang/es.lng
index ac044651a3206a9cfc4a1dc8d969fed515a1b910..422809c279b0cec1db3131d8a727e11602061862 100644
--- a/interface/web/monitor/lib/lang/es.lng
+++ b/interface/web/monitor/lib/lang/es.lng
@@ -166,4 +166,10 @@ $wb['Users online'] = 'Usuarios en línea';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/fi.lng b/interface/web/monitor/lib/lang/fi.lng
index 1e7943cc4e6df06be7ef64c954269fef2f7ff027..8cea3fefa34089895c25c69fa69cd6425294fb7d 100644
--- a/interface/web/monitor/lib/lang/fi.lng
+++ b/interface/web/monitor/lib/lang/fi.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/fr.lng b/interface/web/monitor/lib/lang/fr.lng
index 53124875e9f730e56d85fc5af7522bb3c62a2e11..c9e7599393209f4ea76061043cb25701689f9930 100644
--- a/interface/web/monitor/lib/lang/fr.lng
+++ b/interface/web/monitor/lib/lang/fr.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/hr.lng b/interface/web/monitor/lib/lang/hr.lng
index 357527b4ecb366604b622947efc2e0d420e6edb1..d1fcb74a94ac4573f3be1cb0232f5fcac39a5091 100644
--- a/interface/web/monitor/lib/lang/hr.lng
+++ b/interface/web/monitor/lib/lang/hr.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/hu.lng b/interface/web/monitor/lib/lang/hu.lng
index fe80c1dbb18212bc8b03de90e9a5bde72323eefb..61bd32bf2b6b77cf0a78aad0a353b354c5c43dbc 100644
--- a/interface/web/monitor/lib/lang/hu.lng
+++ b/interface/web/monitor/lib/lang/hu.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/id.lng b/interface/web/monitor/lib/lang/id.lng
index f36c9df9dd5a6a9520db7dac20c56585e6bff717..b160943867a1dea806a3b8c2e287f88766e0e33a 100644
--- a/interface/web/monitor/lib/lang/id.lng
+++ b/interface/web/monitor/lib/lang/id.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/it.lng b/interface/web/monitor/lib/lang/it.lng
index ddcabc45e773408a3dce4fccc7ee70e046ee324a..354d2b7600305967df425ee1f462ebd97d0acc31 100644
--- a/interface/web/monitor/lib/lang/it.lng
+++ b/interface/web/monitor/lib/lang/it.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/ja.lng b/interface/web/monitor/lib/lang/ja.lng
index 266a81f3c3eeb07b795de2626ad4a9f67f3f7426..a29f7e60f6bc3d08cf13c33259fe0babb3960992 100644
--- a/interface/web/monitor/lib/lang/ja.lng
+++ b/interface/web/monitor/lib/lang/ja.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/nl.lng b/interface/web/monitor/lib/lang/nl.lng
index 095a45090add0ab452758a28240d066a200704b5..326d1dffc6b7ec326847fdc454acc9f246c6f1d9 100644
--- a/interface/web/monitor/lib/lang/nl.lng
+++ b/interface/web/monitor/lib/lang/nl.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'Geen MX record controle data beschikbaar';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Niet alle DNS MX records komen overeen met het server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'Alle mail domeinen kloppen met de DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domeinen MX check onbekend.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/pl.lng b/interface/web/monitor/lib/lang/pl.lng
index 59f012cfa3acc136ffc088ae2394549ded8812fe..76c9c1b7de40f3851b01b7e3fd6b0c25a359883f 100644
--- a/interface/web/monitor/lib/lang/pl.lng
+++ b/interface/web/monitor/lib/lang/pl.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'Pokaż rozmiar baz danych MySQL';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/pt.lng b/interface/web/monitor/lib/lang/pt.lng
index b8ad5e533ef0d450ab59a787389fc02d8743c87b..3d0ebdfb0cab721be220e0bb03750489ac2aff4e 100644
--- a/interface/web/monitor/lib/lang/pt.lng
+++ b/interface/web/monitor/lib/lang/pt.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/ro.lng b/interface/web/monitor/lib/lang/ro.lng
index 9ca3234362f98a524d17caf325a60a5ff97cee43..1a74d7b06429985df20f164dd70f7db64f4ba02d 100644
--- a/interface/web/monitor/lib/lang/ro.lng
+++ b/interface/web/monitor/lib/lang/ro.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/ru.lng b/interface/web/monitor/lib/lang/ru.lng
index b5469fa1744fd64f72a0586534da20b7678ce9df..d0af54b0481e07254251667d7c87215765e8fd6b 100644
--- a/interface/web/monitor/lib/lang/ru.lng
+++ b/interface/web/monitor/lib/lang/ru.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'Журнал MongoDB';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/se.lng b/interface/web/monitor/lib/lang/se.lng
index 9093fb960075104156a4d362513fa4faf5d8129d..d7235389a9cc0493bf69ee13577f0e28cad2d3fb 100644
--- a/interface/web/monitor/lib/lang/se.lng
+++ b/interface/web/monitor/lib/lang/se.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/sk.lng b/interface/web/monitor/lib/lang/sk.lng
index 7b23b8c716c4db8f553d2f614d07c895a773ff9b..70dd16d3257e4e560b1aef5a1c5d3c023b66b4b0 100644
--- a/interface/web/monitor/lib/lang/sk.lng
+++ b/interface/web/monitor/lib/lang/sk.lng
@@ -166,4 +166,10 @@ $wb['monitor_title_mongodb_txt'] = 'MongoDB Log';
$wb['Data Log History'] = 'Data Log History';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/lib/lang/tr.lng b/interface/web/monitor/lib/lang/tr.lng
index 90d96b5e3932842e31e44ff1bcdc9993aea9ebe0..352b34923477ac12c174bc856ea819dfb05ff9b7 100644
--- a/interface/web/monitor/lib/lang/tr.lng
+++ b/interface/web/monitor/lib/lang/tr.lng
@@ -165,4 +165,10 @@ $wb['no_munin_url_defined_txt'] = 'Munin adresi belirtilmemiş.';
$wb['no_permissions_to_view_munin_txt'] = 'Munin erişimi izniniz yok.';
$wb['Database size'] = 'Database size';
$wb['MySQL Database size'] = 'MySQL Database size';
+$wb['monitor_title_mx_ip_match_txt'] = 'MX record to server IP match';
+$wb['monitor_serverstate_mx_ip_match_nodata_txt'] = 'No MX record check data present';
+$wb['monitor_serverstate_mx_ip_match_warning_txt'] = 'Not all DNS MX records match the server IP';
+$wb['monitor_serverstate_mx_ip_match_ok_txt'] = 'All mail domains match up with DNS.';
+$wb['monitor_serverstate_mx_ip_match_unknown_txt'] = 'Mail domains MX check unknown.';
+$wb['monitor_serverstate_mx_ip_match_note_txt'] = 'note: If your using an external smtp service for e.g. spam filtering then add that name in the Server Config -> Mail -> Additional smtp hostnames to keep them out of this list.';
?>
diff --git a/interface/web/monitor/show_data.php b/interface/web/monitor/show_data.php
index 80f246ee2dcec04b6a255c1c5d9bec58adbd5420..13258398413030a45ee9633ad89fa1510fe87fea 100644
--- a/interface/web/monitor/show_data.php
+++ b/interface/web/monitor/show_data.php
@@ -114,6 +114,14 @@ case 'mailq':
$description = '';
$add_padding = true;
break;
+case 'mx_ip_match':
+ $template = 'templates/show_data.htm';
+ $output .= $app->tools_monitor->showMx_ip_match();
+ $time = $app->tools_monitor->getDataTime('mx_ip_match');
+ $title = $app->lng("monitor_title_mx_ip_match_txt"). ' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')';
+ $description = '';
+ $add_padding = true;
+ break;
case 'raid_state':
$template = 'templates/show_data.htm';
$output .= $app->tools_monitor->showRaidState();
diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php
index 9e70496a81927067e59eed5f60909d4f5fe709c3..8f977239049418c93f2e2ea2ef91b11e46e10f16 100644
--- a/interface/web/monitor/show_sys_state.php
+++ b/interface/web/monitor/show_sys_state.php
@@ -557,6 +557,21 @@ function _processDbState($type, $serverId, $serverState, $messages) {
break;
}
}
+ if ($type == 'mx_ip_match') {
+ switch ($record['state']) {
+ case 'ok':
+ $messages[$app->lng("monitor_serverstate_listok_txt")][] = $app->lng("monitor_serverstate_mx_ip_match_ok_txt");
+ break;
+ case 'warning':
+ $messages[$app->lng("monitor_serverstate_listwarning_txt")][] = $app->lng("monitor_serverstate_mx_ip_match_warning_txt") . ' ' .
+ "[" . $app->lng("monitor_serverstate_more_txt") . "]";
+ break;
+ default:
+ $messages[$app->lng("monitor_serverstate_listunknown_txt")][] = $app->lng("monitor_serverstate_mx_ip_match_unknown_txt") . ' ' .
+ "[" . $app->lng("monitor_serverstate_more_txt") . "]";
+ break;
+ }
+ }
if ($type == 'sys_log') {
switch ($record['state']) {
diff --git a/server/lib/classes/cron.d/100-monitor_domain_mx.inc.php b/server/lib/classes/cron.d/100-monitor_domain_mx.inc.php
new file mode 100755
index 0000000000000000000000000000000000000000..7ea0492547810da3c13dab38523bdd144b9a8934
--- /dev/null
+++ b/server/lib/classes/cron.d/100-monitor_domain_mx.inc.php
@@ -0,0 +1,189 @@
+uses('getconf,functions');
+ $smtpin_ips = gethostbynamel($hostname);
+ $smtpin_ips_v6 = $app->functions->gethostbynamel6($hostname);
+ if ($smtpin_ips_v6) {
+ $smtpin_ips = array_merge($smtpin_ips, $smtpin_ips_v6);
+ }
+ return $smtpin_ips;
+ }
+
+ public function onRunJob() {
+ global $app, $conf;
+
+ $app->uses('getconf,functions');
+ $mail_config = $app->getconf->get_server_config($conf['server_id'], 'mail');
+
+ if ($mail_config['monitor_mx_records'] != 'y') {
+ return;
+ }
+ /* used for all monitor cronjobs */
+ $app->load('monitor_tools');
+ $this->_tools = new monitor_tools();
+ /* end global section for monitor cronjobs */
+
+ // Initialize data array
+ $data = array();
+ $state = 'no_state';
+
+ // the id of the server as int
+ $server_id = intval($conf['server_id']);
+
+ $hostname = $app->system->hostname();
+ $smtpin_ips = $this->_resolveHostnameBoth46($hostname);
+ if (empty($smtpin_ips)) {
+ $app->log('Our hostname['. $hostname . '] doet not resolve.', LOGLEVEL_WARN);
+ }
+
+ # Add additional IP's, e.g. an extrernal spamfilter/proxy.
+ if (!empty($mail_config['additional_smtp_hostnames'])) {
+ $additional_smtp_hostnames = explode(',', $mail_config['additional_smtp_hostnames']);
+ foreach ($additional_smtp_hostnames as $hostname) {
+ $extra = $this->_resolveHostnameBoth46($hostname);
+ if ($extra) {
+ $smtpin_ips = array_merge($smtpin_ips, $extra);
+ }
+ }
+ }
+
+ # Add additional IP's , e.g. for secondary IP on the same box or a proxy.
+ if (!empty($mail_config['additional_smtp_ips'])) {
+ $smtpin_ips = array_merge($smtpin_ips, explode(',', $mail_config['additional_smtp_ips']));
+ }
+
+ $maildomains = $app->db->queryAllRecords("SELECT domain, active FROM mail_domain WHERE server_id = ?", $server_id);
+ if(is_array($maildomains)) {
+ $state = 'ok';
+ foreach ($maildomains as $maildomain) {
+ $mx_records = array();
+ $mx_weight = array();
+ $found_mx = getmxrr($maildomain['domain'], $mx_records, $mx_weight) ;
+
+ $mx_sorted = array();
+ $mx_ip = '';
+
+ // Merge records and weight into a single array to sort on priority.
+ // ignore multiple mx's at the same weight
+ foreach ($mx_records as $key => $name) {
+ $mx_sorted[$mx_weight[$key]] = $mx_records[$key];
+ }
+ ksort ($mx_sorted, SORT_NUMERIC);
+ reset ($mx_sorted);
+
+ $first_mx = array_shift($mx_sorted);
+ if (!empty($first_mx)) {
+ $mx_ip = gethostbyname($first_mx);
+ }
+
+ if (empty($mx_ip) || !in_array( $mx_ip, $smtpin_ips)) {
+ if ($maildomain['active'] == 'y') {
+ $str = 'Domain is active but the DNS does not match our IP.';
+ if ($first_mx) {
+ $str .= ' (points to ' . $first_mx . ' on ' . $mx_ip . ')';
+ }
+ else {
+ $str .= ' (no mx record found)';
+ }
+ $app->log('Mail domain[' . $maildomain['domain'] . ']: ' . $str, LOGLEVEL_WARN);
+ $state = 'warning';
+ $data[$maildomain['domain']] = $str;
+ } else {
+
+ $app->log('Good, the mail domain[' . $maildomain['domain'] . '] is not active and DNS is not pointing to us.', LOGLEVEL_DEBUG);
+ }
+ }
+ else {
+ if ($maildomain['active'] == 'n') {
+ $app->log('DNS points to our IP but the mail domain[' . $maildomain['domain'] . '] is not active.', LOGLEVEL_WARN);
+ $state = 'warning';
+ $data[$maildomain['domain']] = 'DNS points to our IP but the mail domain is not active.';
+ }
+ else {
+ // DNS OK.
+ }
+ }
+ }
+ }
+
+ $res = array();
+ $res['server_id'] = $server_id;
+ $res['type'] = 'mx_ip_match';
+ $res['data'] = $data;
+ $res['state'] = $state;
+
+ /**
+ * Insert the data into the database
+ */
+ $sql = 'REPLACE INTO monitor_data (server_id, type, created, data, state) ' .
+ 'VALUES (?, ?, UNIX_TIMESTAMP(), ?, ?)';
+ $app->dbmaster->query($sql, $res['server_id'], $res['type'], serialize($res['data']), $res['state']);
+
+ // The new data is written, now we can delete the old one.
+ $this->_tools->delOldRecords($res['type'], $res['server_id']);
+
+ parent::onRunJob();
+ }
+
+ /* this function is optional if it contains no custom code */
+ public function onAfterRun() {
+ global $app;
+
+ parent::onAfterRun();
+ }
+
+}
+
+?>
diff --git a/server/lib/classes/functions.inc.php b/server/lib/classes/functions.inc.php
index f7a44a82c0993b16450e9a54b8ffa32e527edf6f..d9350ec465a93ffdbb2f7cc8e56daf0de5015838 100644
--- a/server/lib/classes/functions.inc.php
+++ b/server/lib/classes/functions.inc.php
@@ -483,6 +483,63 @@ class functions {
}
}
+ /**
+ * From https://www.php.net/manual/en/function.gethostbyname.php#70936
+ */
+ public function gethostbyname6($host, $try_a = false) {
+ // get AAAA record for $host
+ // if $try_a is true, if AAAA fails, it tries for A
+ // the first match found is returned
+ // otherwise returns false
+
+ $dns = gethostbynamel6($host, $try_a);
+ if ($dns == false) { return false; }
+ else { return $dns[0]; }
+ }
+
+ /**
+ * From https://www.php.net/manual/en/function.gethostbyname.php#70936
+ */
+ public function gethostbynamel6($host, $try_a = false) {
+ // get AAAA records for $host,
+ // if $try_a is true, if AAAA fails, it tries for A
+ // results are returned in an array of ips found matching type
+ // otherwise returns false
+
+ $dns6 = dns_get_record($host, DNS_AAAA);
+ if ($try_a == true) {
+ $dns4 = dns_get_record($host, DNS_A);
+ $dns = array_merge($dns4, $dns6);
+ }
+ else { $dns = $dns6; }
+ $ip6 = array();
+ $ip4 = array();
+ foreach ($dns as $record) {
+ if ($record["type"] == "A") {
+ $ip4[] = $record["ip"];
+ }
+ if ($record["type"] == "AAAA") {
+ $ip6[] = $record["ipv6"];
+ }
+ }
+ if (count($ip6) < 1) {
+ if ($try_a == true) {
+ if (count($ip4) < 1) {
+ return false;
+ }
+ else {
+ return $ip4;
+ }
+ }
+ else {
+ return false;
+ }
+ }
+ else {
+ return $ip6;
+ }
+ }
+
}
?>