Skip to content

Commit 718aa39

Browse files
authored
Merge pull request #70 from userjack6880/dev
Dev
2 parents 4c5cf19 + a099928 commit 718aa39

File tree

17 files changed

+711
-46
lines changed

17 files changed

+711
-46
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Software Version**
27+
[ ] Version 1 Beta 2
2728
[ ] Version 1 Beta 1
28-
[ ] Version 1 Feature Complete
2929
[ ] Other
3030

3131
**Desktop (please complete the following information):**

.github/ISSUE_TEMPLATE/critical_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ A clear and concise description of what you expected to happen.
2424
If applicable, add screenshots to help explain your problem.
2525

2626
**Software Version**
27+
[ ] Version 1 Beta 2
2728
[ ] Version 1 Beta 1
28-
[ ] Version 1 Feature Complete
2929
[ ] Other
3030

3131
**Desktop (please complete the following information):**

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Open DMARC Analyzer
2+
![Open DMARC Analyzer Screenshot](docs/images/oda-screenshot.jpg?raw=true)
23

3-
This is Open DMARC Analyzer Version 1 Beta 1 (1-β1) by John Bradley ([email protected]). Open DMARC Analyzer is an Open Source DMARC Report Analyzer to be used with DMARC reports that have been parsed by [John Levine's rrdmarc script](http://www.taugh.com/rddmarc/) or [techsneeze's dmarcts-report-parser](https://github.com/techsneeze/dmarcts-report-parser).
4+
Open DMARC Analyzer is an Open Source DMARC Report Analyzer to be used with DMARC reports that have been parsed by [John Levine's rrdmarc script](http://www.taugh.com/rddmarc/) or [techsneeze's dmarcts-report-parser](https://github.com/techsneeze/dmarcts-report-parser).
45

56
Open DMARC Analyzer was written because there didn't seem to be a full-featured self-hosted report analyzer that provided enough details to make heads or tails of a large volume of DMARC reports that come into medium to large-sized organizations. While other solutions required paid subscriptions or have part of it hosted on AWS, Open DMARC Analyzer will run on any webserver that supports PHP 7.4+ and MySQL 15.1+.
67

8+
Open DMARC Analyzer Version 1 Beta 2 (1-β2) is an [Anomaly <Codebase>](https://systemanomaly.com/codebase) project by John Bradley ([email protected])
9+
710
# Requirements
811
- Apache 2 or equivalent
912
- PHP 5 (PHP 7 required for phpWhois)
@@ -94,9 +97,10 @@ Valid date signifiers are `m`, `w`, and `d` for "month", "week", and "day".
9497

9598
# Latest Changes
9699

97-
## 1-β1
98-
- Corrected a geoip/whois bug (thank you [volkermauel](https://github.com/userjack6880/Open-DMARC-Analyzer/commits?author=volkermauel)).
99-
- Corrected template formatting bug with GEOIP disabled.
100+
## 1-β2
101+
- Corrected a divide-by-zero error in `template.php` issue #68.
102+
- Limited width of page to a minimum of 1230px to fix visual element issues.
103+
- Added `openda_light` theme.
100104

101105
See `CHANGELOG` under `docs` for full details of all changes.
102106

@@ -117,11 +121,11 @@ This project regular release cycle is not yet determined. Versioning is under th
117121

118122
Support will be provided as outlined in the following schedule. For more details, see `SUPPORT`.
119123

120-
| Version | Support Level | Released | End of Support | End of Life |
121-
| ----------------------------------- | ---------------- | --------------- | --------------- | --------------- |
122-
| Version 1 Beta 1 | Full Support | 4 November 2022 | TBD | TBD |
123-
| Version 1 Feature Complete | Critical Support | 27 July 2022 | 4 November 2022 | TBD |
124-
| Version 0 Alpha 9 | End of Life | 2 May 2022 | 27 July 2022 | 4 November 2022 |
124+
| Version | Support Level | Released | End of Support | End of Life |
125+
| ----------------------------------- | ---------------- | ---------------- | ---------------- | ---------------- |
126+
| Version 1 Beta 2 | Full Support | 29 November 2022 | TBD | TBD |
127+
| Version 1 Beta 1 | Critical Support | 4 November 2022 | 29 November 2022 | TBD |
128+
| Version 1 Feature Complete | End of Life | 27 July 2022 | 4 November 2022 | 29 November 2022 |
125129

126130
# Contributing
127131

@@ -136,4 +140,4 @@ Thanks to [all who contributed](https://github.com/userjack6880/Open-DMARC-Analy
136140

137141
# Licenses and Copyrights
138142

139-
Copyright © 2022 John Bradley (userjack6880). Open DMARC Analyzer is released under GNU GPLv3. See `LICENSE`.
143+
Copyright © 2022 John Bradley (userjack6880). Open DMARC Analyzer is released under GNU GPLv3. See `LICENSE`.

docs/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1-β2
4+
- Corrected a divide-by-zero error in `template.php` issue #68.
5+
- Limited width of page to a minimum of 1230px to fix visual element issues.
6+
- Added `openda_light` theme.
7+
38
## 1-β1
49
- Corrected a geoip/whois bug (thank you [volkermauel](https://github.com/userjack6880/Open-DMARC-Analyzer/commits?author=volkermauel)).
510
- Corrected template formatting bug with GEOIP disabled.

docs/SECURITY.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ A response should be recieved within 72 hours. If no response is given, please f
1818

1919
Open DMARC Analyzer Version Security Support
2020

21-
| Version | Supported | End of Life |
22-
| -------------------------- | --------- | --------------- |
23-
| Version 1 Beta 1 | YES | TBD |
24-
| Version 1 Feature Complete | YES | TBD |
25-
| Version 0 Alpha 9 | NO | 4 November 2022 |
26-
| Version 0 Alpha 8.2 | NO | 27 July 2022 |
27-
| Version 0 Alpha 8.1 | NO | 2 May 2022 |
28-
| Version 0 Alpha 8 | NO | 30 March 2022 |
29-
| Version 0 Alpha 7 or Older | NO | 29 March 2022 |
21+
| Version | Supported | End of Life |
22+
| -------------------------- | --------- | ---------------- |
23+
| Version 1 Beta 2 | YES | TBD |
24+
| Version 1 Beta 1 | YES | TBD |
25+
| Version 1 Feature Complete | NO | 29 November 2022 |
26+
| Version 0 Alpha 9 | NO | 4 November 2022 |

docs/SUPPORT.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
Due to the limited time available to developrs to maintain support, dates must be set where support must end. The following is a chart outlining the support shedule for Open DMARC Analyzer.
44

5-
| Version | Support Level | Released | End of Support | End of Life |
6-
| ----------------------------------- | ---------------- | --------------- | --------------- | --------------- |
7-
| Version 1 Beta 1 | Full Support | 4 November 2022 | TBD | TBD |
8-
| Version 1 Feature Complete | Critical Support | 27 July 2022 | 4 November 2022 | TBD |
9-
| Version 0 Alpha 9 | End of Life | 2 May 2022 | 27 July 2022 | 4 November 2022 |
10-
| Version 0 Alpha 8.2 | End of Life | 31 March 2022 | 2 May 2022 | 27 July 2022 |
11-
| Version 0 Alpha 8.1 | End of Life | 30 March 2022 | 31 March 2022 | 2 May 2022 |
12-
| Version 0 Alpha 8 or Older | End of Life | 29 March 2022 | 30 March 2022 | 30 March 2022 |
5+
| Version | Support Level | Released | End of Support | End of Life |
6+
| ----------------------------------- | ---------------- | ---------------- | ---------------- | ---------------- |
7+
| Version 1 Beta 2 | Full Support | 29 November 2022 | TBD | TBD |
8+
| Version 1 Beta 1 | Critical Support | 4 November 2022 | 29 November 2022 | TBD |
9+
| Version 1 Feature Complete | End of Life | 27 July 2022 | 4 November 2022 | 29 November 2022 |
10+
| Version 0 Alpha 9 | End of Life | 2 May 2022 | 27 July 2022 | 4 November 2022 |
11+
| Version 0 Alpha 8.2 | End of Life | 31 March 2022 | 2 May 2022 | 27 July 2022 |
12+
| Version 0 Alpha 8.1 | End of Life | 30 March 2022 | 31 March 2022 | 2 May 2022 |
13+
| Version 0 Alpha 8 or Older | End of Life | 29 March 2022 | 30 March 2022 | 30 March 2022 |
1314

1415
# Support Levels
1516

docs/images/oda-screenshot.jpg

190 KB
Loading

includes/template.php

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
// Versioning -----------------------------------------------------------------
3232
function oda_version() {
3333

34-
echo "1-β1";
34+
echo "1-β2";
3535

3636
}
3737

@@ -193,12 +193,21 @@ function overview_bar($stats, $domain) {
193193
if ($stats[0]['spf_pass_unaligned'] > 0) { $spf_pass_noalign = $stats[0]['spf_pass_unaligned']; }
194194
}
195195

196-
// stat calculations
197-
$dmarc_comp_pct = number_format(100 * ($dmarc_comp / $dmarc_none));
198-
$dkim_comp_pct = number_format(100 * ($dkim_pass_aligned / $dmarc_none));
199-
$dkim_pass_pct = number_format(100 * (($dkim_pass_aligned + $dkim_pass_noalign) / $dmarc_none));
200-
$spf_comp_pct = number_format(100 * ($spf_pass_aligned / $dmarc_none));
201-
$spf_pass_pct = number_format(100 * (($spf_pass_aligned + $spf_pass_noalign) / $dmarc_none));
196+
// stat calculations
197+
if ($dmarc_none) {
198+
$dmarc_comp_pct = number_format(100 * ($dmarc_comp / $dmarc_none));
199+
$dkim_comp_pct = number_format(100 * ($dkim_pass_aligned / $dmarc_none));
200+
$dkim_pass_pct = number_format(100 * (((int)$dkim_pass_aligned + (int)$dkim_pass_noalign) / $dmarc_none));
201+
$spf_comp_pct = number_format(100 * ($spf_pass_aligned / $dmarc_none));
202+
$spf_pass_pct = number_format(100 * (((int)$spf_pass_aligned + (int)$spf_pass_noalign) / $dmarc_none));
203+
}
204+
else {
205+
$dmarc_comp_pct = 0;
206+
$dkim_comp_pct = 0;
207+
$dkim_pass_pct = 0;
208+
$spf_comp_pct = 0;
209+
$spf_pass_pct = 0;
210+
}
202211

203212
// overview details
204213
echo "<div id=overviewbar>\n
@@ -277,11 +286,20 @@ function domain_overview($stats, $dateRange) {
277286
$sender_count = getSenderCount($dateRange, $domain);
278287

279288
// stat calculations
280-
$dmarc_comp_pct = number_format(100 * ($dmarc_comp / $dmarc_none));
281-
$dkim_comp_pct = number_format(100 * ($dkim_pass_aligned / $dmarc_none));
282-
$dkim_pass_pct = number_format(100 * (((int)$dkim_pass_aligned + (int)$dkim_pass_noalign) / $dmarc_none));
283-
$spf_comp_pct = number_format(100 * ($spf_pass_aligned / $dmarc_none));
284-
$spf_pass_pct = number_format(100 * (((int)$spf_pass_aligned + (int)$spf_pass_noalign) / $dmarc_none));
289+
if ($dmarc_none) {
290+
$dmarc_comp_pct = number_format(100 * ($dmarc_comp / $dmarc_none));
291+
$dkim_comp_pct = number_format(100 * ($dkim_pass_aligned / $dmarc_none));
292+
$dkim_pass_pct = number_format(100 * (((int)$dkim_pass_aligned + (int)$dkim_pass_noalign) / $dmarc_none));
293+
$spf_comp_pct = number_format(100 * ($spf_pass_aligned / $dmarc_none));
294+
$spf_pass_pct = number_format(100 * (((int)$spf_pass_aligned + (int)$spf_pass_noalign) / $dmarc_none));
295+
}
296+
else {
297+
$dmarc_comp_pct = 0;
298+
$dkim_comp_pct = 0;
299+
$dkim_pass_pct = 0;
300+
$spf_comp_pct = 0;
301+
$spf_pass_pct = 0;
302+
}
285303

286304
// overview details
287305
echo "<div class=dov-bar>\n
@@ -494,14 +512,14 @@ function sender_details($geo_data, $stats, $domain, $dateRange, $ip) {
494512
<td>".$stat['reason']."</td>\n
495513
<td>";
496514
if ($stat['dkimdomain'] != '') {
497-
echo "Signed by <span style='color:#fff'>".$stat['dkimdomain']."</span><br />\n
515+
echo "Signed by <span class=signed>".$stat['dkimdomain']."</span><br />\n
498516
Result: <span class=$dkimresult>$dkimresult</span> |
499517
Alignment: <span class=$dkim_align>$dkim_align</span></td>\n";
500518
}
501519
else {
502520
echo "Not Signed</td>\n";
503521
}
504-
echo " <td>Envelope from <span style='color:#fff'>".$stat['spfdomain']."</span><br />\n
522+
echo " <td>Envelope from <span class=signe'>".$stat['spfdomain']."</span><br />\n
505523
Result: <span class=$spfresult>$spfresult</span> |
506524
Alignment: <span class=$spf_align>$spf_align</span></td>\n
507525
</tr>\n";
@@ -589,14 +607,14 @@ function report_details($data, $report) {
589607
<td>".$row['reason']."</td>\n
590608
<td>";
591609
if ($row['dkimdomain'] != '') {
592-
echo "Signed by <span style='color:#fff'>".$row['dkimdomain']."</span><br />\n
610+
echo "Signed by <span class=signed>".$row['dkimdomain']."</span><br />\n
593611
Result: <span class=$dkimresult>$dkimresult</span> |
594612
Alignment: <span class=$dkim_align>$dkim_align</span></td>\n";
595613
}
596614
else {
597615
echo "Not Signed</td>\n";
598616
}
599-
echo " <td>Envelope from <span style='color:#fff'>".$row['spfdomain']."</span><br />\n
617+
echo " <td>Envelope from <span class=signed>".$row['spfdomain']."</span><br />\n
600618
Result: <span class=$spfresult>$spfresult</span> |
601619
Alignment: <span class=$spf_align>$spf_align</span></td>\n
602620
</tr>\n";

templates/openda/codebase_logo.png

3.92 KB
Loading

templates/openda/footer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
</div>
3333
<div id="footer">
3434
<p>
35-
<a href="https://github.com/userjack6880/Open-DMARC-Analyzer">Open DMARC Analyzer</a> <?php oda_version(); ?>
35+
<a href="https://github.com/userjack6880/Open-DMARC-Analyzer">Open DMARC Analyzer</a> <?php oda_version(); ?><br />
36+
<a href="https://systemanomaly.com/codebase"><img src="templates/openda/codebase_logo.png" alt="Anomaly <Codebase>" height="50px"></a>
3637
</p>
3738
</div>
3839

0 commit comments

Comments
 (0)