-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
145 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<!-- Required meta tags --> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
|
||
<!-- Bootstrap core CSS --> | ||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | ||
<style> | ||
td.left-border, th.left-border | ||
{ | ||
border-left: 1px solid #dee2e6; | ||
} | ||
|
||
.borderless td, .borderless th | ||
{ | ||
border: none; | ||
} | ||
|
||
table.table.bottomless | ||
{ | ||
margin-bottom: 0rem; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<p></p> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
DMARC Report, id {{.Report.ReportMetadata.ReportID}} | ||
</div> | ||
<div class="card-body"> | ||
<table class="table table-sm borderless bottomless"> | ||
<tbody> | ||
<tr> | ||
<td>Organization</td> | ||
<td><a href="{{.Report.ReportMetadata.ExtraContactInfo}}">{{.Report.ReportMetadata.OrgName}}</a> ({{.Report.ReportMetadata.Email}})</td> | ||
</tr> | ||
<tr> | ||
<td>Date range</td> | ||
<td>since {{.Report.ReportMetadata.DateRange.Begin.UTC}} until {{.Report.ReportMetadata.DateRange.End.UTC}}</td> | ||
</tr> | ||
<tr> | ||
<td>Policy published</td> | ||
<td>{{.Report.PolicyPublished.Domain}}: p={{.Report.PolicyPublished.Policy}} sp={{.Report.PolicyPublished.SPolicy}} pct={{.Report.PolicyPublished.Pct}} adkim={{.Report.PolicyPublished.ADKIM}} aspf={{.Report.PolicyPublished.ASPF}}</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<p></p> | ||
<div class="row"> | ||
<div class="col"> | ||
<center><span class="badge badge-success">passed {{ .Report.TotalPassed }}</span> <span class="badge badge-danger">failed {{ .Report.TotalFailed }}</span> <span class="badge">total {{ .Report.Total }}</span></center> | ||
</div> | ||
</div> | ||
<p></p> | ||
<div class="row"> | ||
<div class="col"> | ||
<table class="table table-bordered table-sm" id="items-table"> | ||
<thead> | ||
<tr> | ||
<th scope="col" colspan="3"></th> | ||
<th scope="col" colspan="3" class="left-border">policy evaluated</th> | ||
<th scope="col" colspan="4" class="left-border">auth results</th> | ||
</tr> | ||
<tr> | ||
<th scope="col">ip</th> | ||
<th scope="col" data-toggle="tooltip" title="ptr records">hostname</th> | ||
<th scope="col" data-toggle="tooltip" title="messages count">msgs</th> | ||
<th scope="col" class="left-border">disposition</th> | ||
<th scope="col">DKIM</th> | ||
<th scope="col">SPF</th> | ||
<th scope="col" class="left-border">DKIM domain</th> | ||
<th scope="col">result</th> | ||
<th scope="col">SPF domain</th> | ||
<th scope="col">result</th> | ||
</tr> | ||
</thead> | ||
<tbody id="items-table"> | ||
{{- range .Report.Record }} | ||
{{- if .IsPass }} | ||
<tr class="policy-evaluated-result-pass table-success"> | ||
{{- else }} | ||
<tr class="policy-evaluated-result-fail"> | ||
{{- end }} | ||
<td id="ip">{{.Row.SourceIP}}</td> | ||
<td id="hostname">{{.Row.SourceHostname}}</td> | ||
<td id="msgc">{{.Row.Count}}</td> | ||
<td class="left-border" title="identifiers header_from: {{.Identifiers.HeaderFrom}} envelope_from: {{.Identifiers.EnvelopeFrom}}">{{.Row.PolicyEvaluated.Disposition}}</td> | ||
<td> | ||
{{- if eq .Row.PolicyEvaluated.DKIM "fail" }} | ||
<span class="badge badge-danger">{{.Row.PolicyEvaluated.DKIM}}</span> | ||
{{- else }} | ||
<span class="badge badge-success">{{.Row.PolicyEvaluated.DKIM}}</span> | ||
{{- end}} | ||
</td> | ||
<td> | ||
{{- if eq .Row.PolicyEvaluated.SPF "fail" }} | ||
<span class="badge badge-danger">{{.Row.PolicyEvaluated.SPF}}</span> | ||
{{- else }} | ||
<span class="badge badge-success">{{.Row.PolicyEvaluated.SPF}}</span> | ||
{{- end }} | ||
</td> | ||
<td class="left-border">{{.AuthResults.DKIM.Domain}}</td> | ||
<td title="selector: {{.AuthResults.DKIM.Selector}}"> | ||
{{- if eq .AuthResults.DKIM.Result "pass"}} | ||
<span class="badge badge-success">{{.AuthResults.DKIM.Result}}</span> | ||
{{- else if eq .AuthResults.DKIM.Result "fail"}} | ||
<span class="badge badge-danger">{{.AuthResults.DKIM.Result}}</span> | ||
{{- else}} | ||
<span class="badge badge-warning">{{.AuthResults.DKIM.Result}}</span> | ||
{{- end}} | ||
</td> | ||
<td>{{.AuthResults.SPF.Domain}}</td> | ||
<td title="scope: {{.AuthResults.SPF.Scope}}"> | ||
{{- if eq .AuthResults.SPF.Result "pass"}} | ||
<span class="badge badge-success">{{.AuthResults.SPF.Result}}</span> | ||
{{- else if eq .AuthResults.SPF.Result "fail"}} | ||
<span class="badge badge-danger">{{.AuthResults.SPF.Result}}</span> | ||
{{- else}} | ||
<span class="badge badge-warning">{{.AuthResults.SPF.Result}}</span> | ||
{{- end}} | ||
</td> | ||
</tr> | ||
{{- end }} | ||
</tbody> | ||
</table> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |