forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist_mail_dns.php
More file actions
165 lines (160 loc) · 6.89 KB
/
list_mail_dns.php
File metadata and controls
165 lines (160 loc) · 6.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<?php
$v_webmail_alias = "webmail";
if (!empty($_SESSION["WEBMAIL_ALIAS"])) {
$v_webmail_alias = $_SESSION["WEBMAIL_ALIAS"];
}
?>
<div class="toolbar">
<div class="toolbar-inner">
<div class="toolbar-buttons">
<a class="button button-secondary button-back js-button-back" href="/list/mail/">
<i class="fas fa-arrow-left icon-blue"></i><?= _("Back") ?>
</a>
</div>
<div class="toolbar-right"></div>
</div>
</div>
<div class="container">
<h1 class="u-text-center u-hide-desktop u-mt20 u-pr30 u-mb20 u-pl30"><?= _("DNS Records") ?></h1>
<div class="units-table js-units-container">
<div class="units-table-header">
<div class="units-table-cell"><?= _("Record") ?></div>
<div class="units-table-cell u-text-center"><?= _("Type") ?></div>
<div class="units-table-cell u-text-center"><?= _("Priority") ?></div>
<div class="units-table-cell u-text-center"><?= _("TTL") ?></div>
<div class="units-table-cell"><?= _("IP or Value") ?></div>
</div>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="mail.<?= htmlspecialchars($_GET["domain"]) ?>">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
A
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
14400
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<input type="text" class="form-control" value="<?= empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"] ?>">
</div>
</div>
<?php if ($_SESSION["WEBMAIL_SYSTEM"]) { ?>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="<?= $v_webmail_alias ?>.<?= htmlspecialchars($_GET["domain"]) ?>">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
A
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
14400
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<input type="text" class="form-control" value="<?= empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"] ?>">
</div>
</div>
<?php } ?>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="<?= htmlspecialchars($_GET["domain"]) ?>">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
MX
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
10
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
14400
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<input type="text" class="form-control" value="mail.<?= htmlspecialchars($_GET["domain"]) ?>.">
</div>
</div>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="<?= htmlspecialchars($_GET["domain"]) ?>">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
TXT
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
14400
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<?php $ip = empty($ips[array_key_first($ips)]["NAT"]) ? array_key_first($ips) : $ips[array_key_first($ips)]["NAT"]; ?>
<input type="text" class="form-control" value="<?= htmlspecialchars("v=spf1 a mx ip4:" . $ip . " -all") ?>">
</div>
</div>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="_dmarc">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
TXT
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
14400
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<input type="text" class="form-control" value="<?= htmlspecialchars("v=DMARC1; p=quarantine; pct=100") ?>">
</div>
</div>
<?php foreach ($dkim as $key => $value) { ?>
<div class="units-table-row js-unit">
<div class="units-table-cell">
<label class="u-hide-desktop u-text-bold"><?= _("Record") ?>:</label>
<input type="text" class="form-control" value="<?= htmlspecialchars($key) ?>">
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Type") ?>:</span>
TXT
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("Priority") ?>:</span>
</div>
<div class="units-table-cell u-text-bold u-text-center-desktop">
<span class="u-hide-desktop"><?= _("TTL") ?>:</span>
3600
</div>
<div class="units-table-cell u-text-center-desktop">
<label class="u-hide-desktop u-text-bold"><?= _("IP or Value") ?>:</label>
<input type="text" class="form-control" value="<?= htmlspecialchars(str_replace(['"', "'"], "", $dkim[$key]["TXT"])) ?>">
</div>
</div>
<?php } ?>
</div>
</div>