Skip to content

Commit a12b095

Browse files
author
Florian Schaal
committed
FS#3734 - DMARC Support
1 parent 9fd4f73 commit a12b095

26 files changed

+1777
-0
lines changed

interface/web/dns/dns_dmarc_edit.php

Lines changed: 409 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<?php
2+
3+
/*
4+
Form Definition
5+
6+
Tabledefinition
7+
8+
Datatypes:
9+
- INTEGER (Forces the input to Int)
10+
- DOUBLE
11+
- CURRENCY (Formats the values to currency notation)
12+
- VARCHAR (no format check, maxlength: 255)
13+
- TEXT (no format check)
14+
- DATE (Dateformat, automatic conversion to timestamps)
15+
16+
Formtype:
17+
- TEXT (Textfield)
18+
- TEXTAREA (Textarea)
19+
- PASSWORD (Password textfield, input is not shown when edited)
20+
- SELECT (Select option field)
21+
- RADIO
22+
- CHECKBOX
23+
- CHECKBOXARRAY
24+
- FILE
25+
26+
VALUE:
27+
- Wert oder Array
28+
29+
Hint:
30+
The ID field of the database table is not part of the datafield definition.
31+
The ID field must be always auto incement (int or bigint).
32+
33+
34+
*/
35+
global $app;
36+
37+
$form["title"] = "DNS DMARC Record";
38+
$form["description"] = "";
39+
$form["name"] = "dns_dmarc";
40+
$form["action"] = "dns_dmarc_edit.php";
41+
$form["db_table"] = "dns_rr";
42+
$form["db_table_idx"] = "id";
43+
$form["db_history"] = "yes";
44+
$form["tab_default"] = "dns";
45+
$form["list_default"] = "dns_a_list.php";
46+
$form["auth"] = 'yes'; // yes / no
47+
48+
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
49+
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
50+
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
51+
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
52+
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
53+
54+
$form["tabs"]['dns'] = array (
55+
'title' => "DNS DMARC",
56+
'width' => 100,
57+
'template' => "templates/dns_dmarc_edit.htm",
58+
'fields' => array (
59+
//#################################
60+
// Begin Datatable fields
61+
//#################################
62+
'server_id' => array (
63+
'datatype' => 'INTEGER',
64+
'formtype' => 'SELECT',
65+
'default' => '',
66+
'value' => '',
67+
'width' => '30',
68+
'maxlength' => '255'
69+
),
70+
'zone' => array (
71+
'datatype' => 'INTEGER',
72+
'formtype' => 'TEXT',
73+
'default' => @$app->functions->intval($_REQUEST["zone"]),
74+
'value' => '',
75+
'width' => '30',
76+
'maxlength' => '255'
77+
),
78+
'name' => array (
79+
'datatype' => 'VARCHAR',
80+
'formtype' => 'TEXT',
81+
'filters' => array( 0 => array( 'event' => 'SAVE',
82+
'type' => 'IDNTOASCII'),
83+
1 => array( 'event' => 'SHOW',
84+
'type' => 'IDNTOUTF8'),
85+
2 => array( 'event' => 'SAVE',
86+
'type' => 'TOLOWER')
87+
),
88+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
89+
'regex' => '/^[a-zA-Z0-9\.\-\_]{0,255}$/',
90+
'errmsg'=> 'name_error_regex'),
91+
),
92+
'default' => '',
93+
'value' => '',
94+
'width' => '30',
95+
'maxlength' => '255'
96+
),
97+
'type' => array (
98+
'datatype' => 'VARCHAR',
99+
'formtype' => 'TEXT',
100+
'default' => 'TXT',
101+
'value' => '',
102+
'width' => '5',
103+
'maxlength' => '5'
104+
),
105+
'data' => array (
106+
'datatype' => 'VARCHAR',
107+
'formtype' => 'TEXT',
108+
'default' => '',
109+
'value' => '',
110+
'width' => '30',
111+
'maxlength' => '255'
112+
),
113+
/*
114+
'aux' => array (
115+
'datatype' => 'INTEGER',
116+
'formtype' => 'TEXT',
117+
'default' => '0',
118+
'value' => '',
119+
'width' => '10',
120+
'maxlength' => '10'
121+
),
122+
*/
123+
'ttl' => array (
124+
'datatype' => 'INTEGER',
125+
'formtype' => 'TEXT',
126+
'validators' => array ( 0 => array ( 'type' => 'RANGE',
127+
'range' => '60:',
128+
'errmsg'=> 'ttl_range_error'),
129+
),
130+
'default' => '3600',
131+
'value' => '',
132+
'width' => '10',
133+
'maxlength' => '10'
134+
),
135+
'active' => array (
136+
'datatype' => 'VARCHAR',
137+
'formtype' => 'CHECKBOX',
138+
'default' => 'Y',
139+
),
140+
'stamp' => array (
141+
'datatype' => 'VARCHAR',
142+
'formtype' => 'TEXT',
143+
'default' => '',
144+
'value' => '',
145+
'width' => '30',
146+
'maxlength' => '255'
147+
),
148+
'serial' => array (
149+
'datatype' => 'INTEGER',
150+
'formtype' => 'TEXT',
151+
'default' => '',
152+
'value' => '',
153+
'width' => '10',
154+
'maxlength' => '10'
155+
),
156+
//#################################
157+
// End Datatable fields
158+
//#################################
159+
)
160+
);
161+
162+
163+
164+
?>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
$wb['data_txt'] = 'DMARC Record';
3+
$wb['domain_txt'] = 'Domain';
4+
$wb['dmarc_policy_txt'] = 'Mail Receiver Policy';
5+
$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.';
6+
$wb['dmarc_policy_none_txt'] = 'none';
7+
$wb['dmarc_policy_quarantine_txt'] = 'quarantine';
8+
$wb['dmarc_policy_reject_txt'] = 'reject';
9+
$wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address';
10+
$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.';
11+
$wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address';
12+
$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.';
13+
$wb['dmarc_fo_txt'] = 'Forensic reporting options';
14+
$wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result.";
15+
$wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.';
16+
$wb['dmarc_fod_txt'] = 'Generate report if DKIM signature failed to verify.';
17+
$wb['dmarc_fos_txt'] = 'Generate report if SPF failed.';
18+
$wb['dmarc_adkim_txt'] = 'DKIM identifier alignment';
19+
$wb['dmarc_adkim_note_txt'] = "'strict' requires exact matching between DKIM domain and email's from";
20+
$wb['dmarc_adkim_r_txt'] = 'relaxed';
21+
$wb['dmarc_adkim_s_txt'] = 'strict';
22+
$wb['dmarc_aspf_txt'] = 'SPF identifier alignment';
23+
$wb['dmarc_aspf_note_txt'] = "'strict' requires exact matching between SPF domain and email's from";
24+
$wb['dmarc_aspf_r_txt'] = 'relaxed';
25+
$wb['dmarc_aspf_s_txt'] = 'strict';
26+
$wb['dmarc_rf_txt'] = 'Report Format';
27+
$wb['dmarc_rf_afrf_txt'] = 'Authentication Failure Reporting Format';
28+
$wb['dmarc_rf_iodef_txt'] = 'Incident Object Description Exchange Format';
29+
$wb['dmarc_pct_txt'] = 'Apply Policy to this Percentage';
30+
$wb['dmarc_pct_note_txt'] = '% (100 default). Messages in percent from the domain you want ISPs to check.';
31+
$wb['dmarc_ri_txt'] = 'Reporting Interval';
32+
$wb['dmarc_ri_note_txt'] = 'Seconds (default=86400). The time in seconds that aggregate reports should be generate (86400 repersents 1 day).';
33+
$wb['dmarc_sp_txt'] = 'Subdomain Policy (Defaults to same as domain).';
34+
$wb['dmarc_sp_same_txt'] = 'same as domain';
35+
$wb['dmarc_sp_none_txt'] = 'none';
36+
$wb['dmarc_sp_quarantine_txt'] = 'quarantine';
37+
$wb['dmarc_sp_reject_txt'] = 'reject';
38+
$wb['ttl_txt'] = 'TTL';
39+
$wb['active_txt'] = 'Active';
40+
$wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
41+
$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.';
42+
$wb['dmarc_invalid_email_txt'] = 'Invalid Email';
43+
$wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option';
44+
$wb['record_exists_txt'] = 'DNS-Record already exists';
45+
$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
46+
$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
47+
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
48+
?>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
$wb['data_txt'] = 'DMARC Record';
3+
$wb['domain_txt'] = 'Domain';
4+
$wb['dmarc_policy_txt'] = 'Mail Receiver Policy';
5+
$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.';
6+
$wb['dmarc_policy_none_txt'] = 'none';
7+
$wb['dmarc_policy_quarantine_txt'] = 'quarantine';
8+
$wb['dmarc_policy_reject_txt'] = 'reject';
9+
$wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address';
10+
$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.';
11+
$wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address';
12+
$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.';
13+
$wb['dmarc_fo_txt'] = 'Forensic reporting options';
14+
$wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result.";
15+
$wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.';
16+
$wb['dmarc_fod_txt'] = 'Generate report if DKIM signature failed to verify.';
17+
$wb['dmarc_fos_txt'] = 'Generate report if SPF failed.';
18+
$wb['dmarc_adkim_txt'] = 'DKIM identifier alignment';
19+
$wb['dmarc_adkim_note_txt'] = "'strict' requires exact matching between DKIM domain and email's from";
20+
$wb['dmarc_adkim_r_txt'] = 'relaxed';
21+
$wb['dmarc_adkim_s_txt'] = 'strict';
22+
$wb['dmarc_aspf_txt'] = 'SPF identifier alignment';
23+
$wb['dmarc_aspf_note_txt'] = "'strict' requires exact matching between SPF domain and email's from";
24+
$wb['dmarc_aspf_r_txt'] = 'relaxed';
25+
$wb['dmarc_aspf_s_txt'] = 'strict';
26+
$wb['dmarc_rf_txt'] = 'Report Format';
27+
$wb['dmarc_rf_afrf_txt'] = 'Authentication Failure Reporting Format';
28+
$wb['dmarc_rf_iodef_txt'] = 'Incident Object Description Exchange Format';
29+
$wb['dmarc_pct_txt'] = 'Apply Policy to this Percentage';
30+
$wb['dmarc_pct_note_txt'] = '% (100 default). Messages in percent from the domain you want ISPs to check.';
31+
$wb['dmarc_ri_txt'] = 'Reporting Interval';
32+
$wb['dmarc_ri_note_txt'] = 'Seconds (default=86400). The time in seconds that aggregate reports should be generate (86400 repersents 1 day).';
33+
$wb['dmarc_sp_txt'] = 'Subdomain Policy (Defaults to same as domain).';
34+
$wb['dmarc_sp_same_txt'] = 'same as domain';
35+
$wb['dmarc_sp_none_txt'] = 'none';
36+
$wb['dmarc_sp_quarantine_txt'] = 'quarantine';
37+
$wb['dmarc_sp_reject_txt'] = 'reject';
38+
$wb['ttl_txt'] = 'TTL';
39+
$wb['active_txt'] = 'Active';
40+
$wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
41+
$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.';
42+
$wb['dmarc_invalid_email_txt'] = 'Invalid Email';
43+
$wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option';
44+
$wb['record_exists_txt'] = 'DNS-Record already exists';
45+
$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
46+
$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
47+
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
48+
?>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
$wb['data_txt'] = 'DMARC Record';
3+
$wb['domain_txt'] = 'Domain';
4+
$wb['dmarc_policy_txt'] = 'Mail Receiver Policy';
5+
$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.';
6+
$wb['dmarc_policy_none_txt'] = 'none';
7+
$wb['dmarc_policy_quarantine_txt'] = 'quarantine';
8+
$wb['dmarc_policy_reject_txt'] = 'reject';
9+
$wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address';
10+
$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.';
11+
$wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address';
12+
$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.';
13+
$wb['dmarc_fo_txt'] = 'Forensic reporting options';
14+
$wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result.";
15+
$wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.';
16+
$wb['dmarc_fod_txt'] = 'Generate report if DKIM signature failed to verify.';
17+
$wb['dmarc_fos_txt'] = 'Generate report if SPF failed.';
18+
$wb['dmarc_adkim_txt'] = 'DKIM identifier alignment';
19+
$wb['dmarc_adkim_note_txt'] = "'strict' requires exact matching between DKIM domain and email's from";
20+
$wb['dmarc_adkim_r_txt'] = 'relaxed';
21+
$wb['dmarc_adkim_s_txt'] = 'strict';
22+
$wb['dmarc_aspf_txt'] = 'SPF identifier alignment';
23+
$wb['dmarc_aspf_note_txt'] = "'strict' requires exact matching between SPF domain and email's from";
24+
$wb['dmarc_aspf_r_txt'] = 'relaxed';
25+
$wb['dmarc_aspf_s_txt'] = 'strict';
26+
$wb['dmarc_rf_txt'] = 'Report Format';
27+
$wb['dmarc_rf_afrf_txt'] = 'Authentication Failure Reporting Format';
28+
$wb['dmarc_rf_iodef_txt'] = 'Incident Object Description Exchange Format';
29+
$wb['dmarc_pct_txt'] = 'Apply Policy to this Percentage';
30+
$wb['dmarc_pct_note_txt'] = '% (100 default). Messages in percent from the domain you want ISPs to check.';
31+
$wb['dmarc_ri_txt'] = 'Reporting Interval';
32+
$wb['dmarc_ri_note_txt'] = 'Seconds (default=86400). The time in seconds that aggregate reports should be generate (86400 repersents 1 day).';
33+
$wb['dmarc_sp_txt'] = 'Subdomain Policy (Defaults to same as domain).';
34+
$wb['dmarc_sp_same_txt'] = 'same as domain';
35+
$wb['dmarc_sp_none_txt'] = 'none';
36+
$wb['dmarc_sp_quarantine_txt'] = 'quarantine';
37+
$wb['dmarc_sp_reject_txt'] = 'reject';
38+
$wb['ttl_txt'] = 'TTL';
39+
$wb['active_txt'] = 'Active';
40+
$wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
41+
$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.';
42+
$wb['dmarc_invalid_email_txt'] = 'Invalid Email';
43+
$wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option';
44+
$wb['record_exists_txt'] = 'DNS-Record already exists';
45+
$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
46+
$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
47+
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
48+
?>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
$wb['data_txt'] = 'DMARC Record';
3+
$wb['domain_txt'] = 'Domain';
4+
$wb['dmarc_policy_txt'] = 'Mail Receiver Policy';
5+
$wb['dmarc_policy_note_txt'] = 'How ISPs should handle messages that failed SPF and DKIM.';
6+
$wb['dmarc_policy_none_txt'] = 'none';
7+
$wb['dmarc_policy_quarantine_txt'] = 'quarantine';
8+
$wb['dmarc_policy_reject_txt'] = 'reject';
9+
$wb['dmarc_rua_txt'] = 'Aggregate Data Reporting Address';
10+
$wb['dmarc_rua_note_txt'] = 'Email to receive reports from ISPs aboute messages which failed SPF and DKIM checks (DMARC) for the domain.';
11+
$wb['dmarc_ruf_txt'] = 'Forensic Data Reporting Address';
12+
$wb['dmarc_ruf_note_txt'] = 'Email to receive sample messages that are failing SPF and DKIM checks (DMARC) for the domain.';
13+
$wb['dmarc_fo_txt'] = 'Forensic reporting options';
14+
$wb['dmarc_fo0_txt'] = "Generate reports if all underlying authentication mechanisms fail to produce a DMARC 'pass' result.";
15+
$wb['dmarc_fo1_txt'] = 'Generate reports if any mechanisms fail.';
16+
$wb['dmarc_fod_txt'] = 'Generate report if DKIM signature failed to verify.';
17+
$wb['dmarc_fos_txt'] = 'Generate report if SPF failed.';
18+
$wb['dmarc_adkim_txt'] = 'DKIM identifier alignment';
19+
$wb['dmarc_adkim_note_txt'] = "'strict' requires exact matching between DKIM domain and email's from";
20+
$wb['dmarc_adkim_r_txt'] = 'relaxed';
21+
$wb['dmarc_adkim_s_txt'] = 'strict';
22+
$wb['dmarc_aspf_txt'] = 'SPF identifier alignment';
23+
$wb['dmarc_aspf_note_txt'] = "'strict' requires exact matching between SPF domain and email's from";
24+
$wb['dmarc_aspf_r_txt'] = 'relaxed';
25+
$wb['dmarc_aspf_s_txt'] = 'strict';
26+
$wb['dmarc_rf_txt'] = 'Report Format';
27+
$wb['dmarc_rf_afrf_txt'] = 'Authentication Failure Reporting Format';
28+
$wb['dmarc_rf_iodef_txt'] = 'Incident Object Description Exchange Format';
29+
$wb['dmarc_pct_txt'] = 'Apply Policy to this Percentage';
30+
$wb['dmarc_pct_note_txt'] = '% (100 default). Messages in percent from the domain you want ISPs to check.';
31+
$wb['dmarc_ri_txt'] = 'Reporting Interval';
32+
$wb['dmarc_ri_note_txt'] = 'Seconds (default=86400). The time in seconds that aggregate reports should be generate (86400 repersents 1 day).';
33+
$wb['dmarc_sp_txt'] = 'Subdomain Policy (Defaults to same as domain).';
34+
$wb['dmarc_sp_same_txt'] = 'same as domain';
35+
$wb['dmarc_sp_none_txt'] = 'none';
36+
$wb['dmarc_sp_quarantine_txt'] = 'quarantine';
37+
$wb['dmarc_sp_reject_txt'] = 'reject';
38+
$wb['ttl_txt'] = 'TTL';
39+
$wb['active_txt'] = 'Active';
40+
$wb['dmarc_more_spf_txt'] = 'More than one active SPF Record';
41+
$wb['dmarc_no_dkim_spf_txt'] = 'No active DKIM or SPF Record.';
42+
$wb['dmarc_invalid_email_txt'] = 'Invalid Email';
43+
$wb['dmarc_empty_txt'] = 'DMARC Record empty - specify at least one option';
44+
$wb['record_exists_txt'] = 'DNS-Record already exists';
45+
$wb['limit_dns_record_txt'] = 'The max. number of DNS records for your account is reached.';
46+
$wb['no_zone_perm'] = 'You do not have the permission to add a record to this DNS zone.';
47+
$wb['ttl_range_error'] = 'Min. TTL time is 60 seconds.';
48+
?>

0 commit comments

Comments
 (0)