-
Notifications
You must be signed in to change notification settings - Fork 3
/
mailtemplate.html
345 lines (321 loc) · 9.29 KB
/
mailtemplate.html
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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<html>
<head>
<title>$MAILSUBJECT</title>
<style>
body {
background-color: #ffffff;
padding: 5px;
font-family: arial, helvetica, sans-serif;
font-size: 10px;
}
table {
border-spacing: 0px;
border-collapse: collapse;
margin: 5px 0 0 0;
padding: 0;
width: 100%;
color: black;
empty-cells: show;
}
table th {
font-weight: normal;
border-right: 1px solid #cccccc;
background-color: #999999;
text-align: center;
color: #ffffff;
vertical-align: middle;
font-size: 9pt;
height: 14px;
}
table th:last-child {
border-right-style: none;
}
table tr>td {
border-right: 1px solid #cccccc;
padding: 2px 4px;
height: 22px;
vertical-align: middle;
}
table tr td:last-child {
border-right-style: none;
}
table a {
text-decoration: none;
color: black;
}
table a:hover {
text-decoration: underline;
}
table tr td {
padding-bottom: 4px;
padding: 4px 5px 2px 5px;
text-align: left;
height: 16px;
line-height: 14px;
vertical-align: top;
font-size: 9pt;
}
table tr td.left {
width: 10%;
white-space: nowrap;
vertical-align: top;
padding-right: 20px;
}
table tr.even0 td.left {
background-color: #bbbbbb;
}
table tr.odd0 td.left {
background-color: #cccccc;
}
tr.odd0 {
background-color: #eeeeee;
}
tr.even0 {
background-color: #dddddd;
}
td.odd0 {
background-color: #eeeeee;
}
td.even0 {
background-color: #dddddd;
}
.stateOK,
.stateUP {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #0b3;
color: #ffffff;
}
.stateWARNING {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #ffff00;
color: #000000;
}
.stateCRITICAL,
.stateDOWN {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #ff0000;
color: #ffffff;
}
.stateUNKNOWN,
.stateUNREACHABLE {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #ff8800;
color: #ffffff;
}
.statePENDING {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #888888;
color: #ffffff;
}
.stateDOWNTIME {
padding-left: 3px;
padding-right: 3px;
border-radius: 2px;
font-weight: bold;
background-color: #00aaff;
color: #ffffff;
}
</style>
</head>
<body>
<table>
<tr class="even0">
<td class=left>Hostname</td>
<td>$(hostname)</td>
</tr>
<tr class="odd0">
<td class=left>Report Date</td>
<td>$(date -d "yesterday" +"%A %B %d %Y")</td>
</tr>
<tr class="even0">
<td class=left>IP-Addresses</td>
<td>$IPV4ADDRESS $IPV6ADDRESS</td>
</tr>
<tr>
<th colspan=2>Service State</th>
</tr>
<tr class="even0">
<td class=left>Postfix</td>
<td>$POSTFIX</td>
</tr>
<tr class="odd0">
<td class=left>Spamassassin</td>
<td>$SPAMASSASSIN</td>
</tr>
<tr class="even0">
<td class=left>ClamAV</td>
<td>$CLAMAV</td>
</tr>
<tr class="odd0">
<td class=left>Dovecot</td>
<td>$DOVECOT</td>
</tr>
<tr class="even0">
<td class=left>OpenDKIM</td>
<td>$OPENDKIM</td>
</tr>
<tr class="even0">
<td class=left>RSPAMD</td>
<td>$RSPAMD</td>
</tr>
<tr>
<th colspan=2>ClamAV</th>
</tr>
<tr class="even0">
<td class=left>Checked E-Mails with Clean Result</td>
<td>$CLEANCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>Checked E-Mails with Virus Result</td>
<td>$INFECTEDCOUNT</td>
</tr>
<tr>
<th colspan=2>IMAP</th>
</tr>
<tr class="even0">
<td class=left>Total IMAP Logins</td>
<td>$IMAPLOGINCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>IMAP Logins Failed</td>
<td>$IMAPLOGINFAILCOUNT</td>
</tr>
<tr class="even0">
<td class=left>IMAP Logins using IPV4</td>
<td>$IMAPIPV4LOGINCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>IMAP Logins using IPV6</td>
<td>$IMAPIPV6LOGINCOUNT</td>
</tr>
<tr class="even0">
<td class=left>IMAP Logins from localhost (e.g. webmailer)</td>
<td>$IMAPLOCALLOGINCOUNT</td>
</tr>
<tr>
<th colspan=2>POP3</th>
</tr>
<tr class="even0">
<td class=left>Total POP3 Logins</td>
<td>$POP3LOGINCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>POP3 Logins Failed</td>
<td>$POP3LOGINFAILCOUNT</td>
</tr>
<tr class="even0">
<td class=left>POP3 Logins using IPV4</td>
<td>$POP3IPV4LOGINCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>POP3 Logins using IPV6</td>
<td>$POP3IPV6LOGINCOUNT</td>
</tr>
<tr class="even0">
<td class=left>POP3 Logins from localhost (e.g. webmailer)</td>
<td>$POP3LOCALLOGINCOUNT</td>
</tr>
<tr>
<th colspan=2>Outgoing E-Mails</th>
</tr>
<tr class="even0">
<td class=left>Sent E-Mails by Postfix</td>
<td>$SENTMAILCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>Bounced E-Mails by Reciever</td>
<td>$BOUNCEDMAILCOUNT</td>
</tr>
<tr>
<th colspan=2>SMTP</th>
</tr>
<tr class="even0">
<td class=left>Total SMTP Incoming Connection Count</td>
<td>$CONNECTIONCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>SMTP Incoming Connections using IPV4</td>
<td>$CONNECTIONIPV4COUNT</td>
</tr>
<tr class="even0">
<td class=left>SMTP Incoming Connections using IPV6</td>
<td>$CONNECTIONIPV6COUNT</td>
</tr>
<tr class="odd0">
<td class=left>Relay Access Denied</td>
<td>$RELAYDENIED</td>
</tr>
<tr class="even0">
<td class=left>Postfix could not find a valid PTR Record</td>
<td>$NOPTRCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>Postfix could not find a valid A or AAAA record for the sender Domain</td>
<td>$NODOMAINCOUNT</td>
</tr>
<tr>
<th colspan=2>Blackhole</th>
</tr>
<tr class="even0">
<td class=left>Hosts Blocked by Blackhole DNS</td>
<td>$BLACKHOLEDMAILCOUNT</td>
</tr>
<tr>
<th colspan=2>Spamassassin</th>
</tr>
<tr class="even0">
<td class=left>Tested E-Mails by Spamassassin</td>
<td>$TESTEDMAILCOUNT</td>
</tr>
<tr class="odd0">
<td class=left>E-Mails rejected as SPAM</td>
<td>$SPAMCOUNT</td>
</tr>
<tr class="even0">
<td class=left>Clean E-Mails</td>
<td>$HAMCOUNT</td>
</tr>
<tr>
<th colspan=2>RSPAMD</th>
</tr>
<tr class="even0">
<td class=left>E-Mails with status rejected</td>
<td>$RSPAMD_REJECTED</td>
</tr>
<tr class="odd0">
<td class=left>E-Mails with status add header</td>
<td>$RSPAMD_ADD_HEADER</td>
</tr>
<tr class="even0">
<td class=left>E-Mails with status greylist</td>
<td>$RSPAMD_GREYLIST</td>
</tr>
<tr class="odd0">
<td class=left>E-Mails with status no action</td>
<td>$RSPAMD_NO_ACTION</td>
</tr>
<tr class="even0">
<td class=left>E-Mails with status soft reject</td>
<td>$RSPAMD_SOFT_REJECT</td>
</tr>
<tr class="odd0">
<td class=left>E-Mails with status rewrite subject</td>
<td>$RSPAMD_REWRITE_SUBJECT</td>
</tr>
</table>
</body>