Skip to content

Commit

Permalink
Merge pull request #80 from userjack6880/dev
Browse files Browse the repository at this point in the history
Beta 3 Release
  • Loading branch information
userjack6880 authored Apr 19, 2023
2 parents 718aa39 + 39a5a2e commit 7508ab2
Show file tree
Hide file tree
Showing 21 changed files with 113 additions and 44 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/enhancement_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ assignees: userjack6880

---

**Describe the enhancement requeast**
**Describe the enhancement request**
A clear and concise description of what you want us to consider.
29 changes: 14 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ Open DMARC Analyzer is an Open Source DMARC Report Analyzer to be used with DMAR

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+.

Open DMARC Analyzer Version 1 Beta 2 (1-β2) is an [Anomaly <Codebase>](https://systemanomaly.com/codebase) project by John Bradley (john@systemanomaly.com)
Open DMARC Analyzer Version 1 Beta 3 (1-β3) is an [Anomaly \<Codebase\>](https://systemanomaly.com/codebase) project by John Bradley (john@systemanomaly.com)

# Requirements
# Minimum Requirements
- Apache 2 or equivalent
- PHP 5 (PHP 7 required for phpWhois)
- PHP PDO
- MySQL 15.1 or equivalent
- A database that is pre-populated with data from rrdmarc or dmarcts-report-parser
- **A database that is pre-populated with data from [rrdmarc](http://www.taugh.com/rddmarc/) or [dmarcts-report-parser](https://github.com/techsneeze/dmarcts-report-parser)**

# Dependencies

Expand Down Expand Up @@ -97,19 +97,18 @@ Valid date signifiers are `m`, `w`, and `d` for "month", "week", and "day".

# Latest Changes

## 1-β2
- Corrected a divide-by-zero error in `template.php` issue #68.
- Limited width of page to a minimum of 1230px to fix visual element issues.
- Added `openda_light` theme.
## 1-β3
- Tweaks to the `openda` and `openda_light` themes, including table widths and data coloring.
- Issue template fix per issue #78.

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

# Tested System Configurations

| OS | HTTP | PHP | SQL |
| --------- | ------------- | ------ | --------------- |
| Debian 11 | Apache 2.4.52 | 7.4.25 | MariaDB 10.5.12 |
| CentOS 7 | Apache 2.4.6 | 5.4.16 | MariaDB 5.5.65 |
| OS | HTTP | PHP | SQL |
| --------------- | ------------- | ------ | --------------- |
| Debian 11.6 | Apache 2.4.52 | 8.2.3 | MariaDB 10.5.18 |
| CentOS 7.6.1810 | Apache 2.4.6 | 5.4.16 | MariaDB 5.5.65 |

If you have a system configuration not listed, and would like to contribue this data, please [provide feedback](https://github.com/userjack6880/Open-Dmarc-Analyzer/issues).

Expand All @@ -123,9 +122,9 @@ Support will be provided as outlined in the following schedule. For more details

| Version | Support Level | Released | End of Support | End of Life |
| ----------------------------------- | ---------------- | ---------------- | ---------------- | ---------------- |
| Version 1 Beta 2 | Full Support | 29 November 2022 | TBD | TBD |
| Version 1 Beta 1 | Critical Support | 4 November 2022 | 29 November 2022 | TBD |
| Version 1 Feature Complete | End of Life | 27 July 2022 | 4 November 2022 | 29 November 2022 |
| Version 1 Beta 3 | Full Support | 19 April 2023 | 1-rc1 Release | TBD |
| Version 1 Beta 2 | Critical Support | 29 November 2022 | 19 April 2023 | 1-rc1 Release |
| Version 1 Beta 1 | End of Life | 4 November 2022 | 29 November 2022 | 19 April 2023 |

# Contributing

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

# Licenses and Copyrights

Copyright © 2022 John Bradley (userjack6880). Open DMARC Analyzer is released under GNU GPLv3. See `LICENSE`.
Copyright © 2023 John Bradley (userjack6880). Open DMARC Analyzer is released under GNU GPLv3. See `LICENSE`.
2 changes: 1 addition & 1 deletion config.php.pub
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------

Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)

config.php
configuration file
Expand Down
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1-β3
- Tweaks to the `openda` and `openda_light` themes, including table widths and data coloring.
- Issue template fix per issue #78.

## 1-β2
- Corrected a divide-by-zero error in `template.php` issue #68.
- Limited width of page to a minimum of 1230px to fix visual element issues.
Expand Down
5 changes: 3 additions & 2 deletions docs/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Open DMARC Analyzer Version Security Support

| Version | Supported | End of Life |
| -------------------------- | --------- | ---------------- |
| Version 1 Beta 2 | YES | TBD |
| Version 1 Beta 1 | YES | TBD |
| Version 1 Beta 3 | YES | TBD |
| Version 1 Beta 2 | YES | 1-rc1 Release |
| Version 1 Beta 1 | NO | 19 April 2023 |
| Version 1 Feature Complete | NO | 29 November 2022 |
| Version 0 Alpha 9 | NO | 4 November 2022 |
5 changes: 3 additions & 2 deletions docs/SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ Due to the limited time available to developrs to maintain support, dates must b

| Version | Support Level | Released | End of Support | End of Life |
| ----------------------------------- | ---------------- | ---------------- | ---------------- | ---------------- |
| Version 1 Beta 2 | Full Support | 29 November 2022 | TBD | TBD |
| Version 1 Beta 1 | Critical Support | 4 November 2022 | 29 November 2022 | TBD |
| Version 1 Beta 3 | Full Support | 19 April 2023 | 1-rc1 Release | TBD |
| Version 1 Beta 2 | Critical Support | 29 November 2022 | 19 April 2023 | 1-rc1 Release |
| Version 1 Beta 1 | End of Life | 4 November 2022 | 29 November 2022 | 19 April 2023 |
| Version 1 Feature Complete | End of Life | 27 July 2022 | 4 November 2022 | 29 November 2022 |
| Version 0 Alpha 9 | End of Life | 2 May 2022 | 27 July 2022 | 4 November 2022 |
| Version 0 Alpha 8.2 | End of Life | 31 March 2022 | 2 May 2022 | 27 July 2022 |
Expand Down
2 changes: 1 addition & 1 deletion includes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
includes.php
file where other includes are listed and included
Expand Down
2 changes: 1 addition & 1 deletion includes/db.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - An Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
includes/db.php
basic database functions
Expand Down
2 changes: 1 addition & 1 deletion includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
includes/functions.php
site functions that also includes specific queries
Expand Down
2 changes: 1 addition & 1 deletion includes/template-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
includes/template-loader.php
glue bit to load templates - may be a bit superfulous
Expand Down
66 changes: 57 additions & 9 deletions includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
includes/template.php
template structures to be called by main page scripts
Expand Down Expand Up @@ -31,7 +31,7 @@
// Versioning -----------------------------------------------------------------
function oda_version() {

echo "1-β2";
echo "1-β3";

}

Expand Down Expand Up @@ -328,8 +328,22 @@ function domain_overview($stats, $dateRange) {
<tr class=dov>\n
<td class=dov>$total Messages</td>\n
<td class=dov>$policy_pct% $policy</td>\n
<td class=dov>$dmarc_quar Quarantined</td>\n
<td class=dov>$dmarc_rjct Rejected</td>\n
<td class=dov>";
if ($dmarc_quar > 0) {
echo "<span class='warn'>$dmarc_quar</span>";
}
else {
echo "$dmarc_quar";
}
echo " Quarantined</td>\n
<td class=dov>";
if ($dmarc_rjct > 0) {
echo "<span class='fail'>$dmarc_rjct</span>";
}
else {
echo "$dmarc_rjct";
}
echo " Rejected</td>\n
</tr>\n
</table>\n
</div>\n
Expand Down Expand Up @@ -391,7 +405,7 @@ function domain_details($stats, $domain, $dateRange) {
<h3 class=dov-bar-in-ip-h3><a href='".$_SERVER['PHP_SELF']."?range=$dateRange&page=sender&domain=$domain&ip=".$ip['ip']."'>".$ip['ip']."</a></h3>\n
<span class=dov-bar-small>".gethostbyaddr($ip['ip'])."</span>\n
</div>\n
<div style='left:420px;'>\n
<div style='left:420px; width:calc(100% - 770px); width:-moz-calc(100% - 770px); width:-webkit-calc(100% - 770px);'>\n
<table class=dov>\n
<tr class=dov>\n
<td class=dov style='min-width:100px'><strong>Messages</strong></td>\n
Expand All @@ -402,8 +416,22 @@ function domain_details($stats, $domain, $dateRange) {
<tr class=dov>\n
<td class=dov>$messages</td>\n
<td class=dov>$dmarc_comp_pct%</td>\n
<td class=dov>$quarantine</td>\n
<td class=dov>$reject</td>\n
<td class=dov>";
if ($quarantine > 0) {
echo "<span class='warn'>$quarantine</span>";
}
else {
echo "$quarantine";
}
echo "</td>\n
<td class=dov>";
if ($quarantine > 0) {
echo "<span class='fail'>$reject</span>";
}
else {
echo "$reject";
}
echo "</td>\n
</tr>\n
</table>\n
</div>\n
Expand Down Expand Up @@ -508,7 +536,17 @@ function sender_details($geo_data, $stats, $domain, $dateRange, $ip) {
echo "<tr>\n
<td><a href='".$_SERVER['PHP_SELF']."?page=report&report=".$stat['reportid']."'>".$stat['reportid']."</a></td>\n
<td>".$stat['rcount']."</td>\n
<td>".$stat['disposition']."</td>\n
<td>";
if ($stat['disposition'] == "quarantine") {
echo "<span class='warn'>".$stat['disposition']."</span>";
}
elseif ($stat['disposition'] == "reject") {
echo "<span class='fail'>".$stat['disposition']."</span>";
}
else {
echo $stat['disposition'];
}
echo "</td>\n
<td>".$stat['reason']."</td>\n
<td>";
if ($stat['dkimdomain'] != '') {
Expand Down Expand Up @@ -603,7 +641,17 @@ function report_details($data, $report) {
<td><a href='".$_SERVER['PHP_SELF']."?page=sender&ip=".$ip['ip']."'>".$ip['ip']."</a></td>\n
<td>".$row['domain']."</td>\n
<td>".$row['rcount']."</td>\n
<td>".$row['disposition']."</td>\n
<td>";
if ($row['disposition'] == "quarantine") {
echo "<span class='warn'>".$row['disposition']."</span>";
}
elseif ($row['disposition'] == "reject") {
echo "<span class='fail'>".$row['disposition']."</span>";
}
else {
echo $row['disposition'];
}
echo "</td>\n
<td>".$row['reason']."</td>\n
<td>";
if ($row['dkimdomain'] != '') {
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
index.php
the all encompassing page that is always loaded
Expand Down
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
install.php
installer to aid with setting up a new installation
Expand Down
2 changes: 1 addition & 1 deletion templates/openda/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/footer.php
footer for the Open DMARC Analyzer default template
Expand Down
2 changes: 1 addition & 1 deletion templates/openda/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/header.php
header for the Open DMARC Analyzer default template
Expand Down
2 changes: 1 addition & 1 deletion templates/openda/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/index.php
main body of the Open DMARC Analyzer default template
Expand Down
10 changes: 9 additions & 1 deletion templates/openda/style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/style.css
CSS file for the Open DMARC Analyzer default template
Expand Down Expand Up @@ -65,6 +65,7 @@ a:hover {

#header {
width: 100%;
max-width: 1920px;
margin: 0px auto 0px auto;
padding: 15px;
border: none;
Expand All @@ -73,6 +74,7 @@ a:hover {

#controlbar {
width: 100%;
max-width: 1920px;
height: 100px;
margin: 0px auto 0px auto;
padding: 15px;
Expand Down Expand Up @@ -355,6 +357,7 @@ h1.header {

#wrapper {
width: 100%;
max-width: 1920px;
margin: 0 auto 0 auto;
padding: 15px;
}
Expand Down Expand Up @@ -419,12 +422,17 @@ span.warn {
color: #F1B077;
}

span.temperror {
color: #F1B077;
}

span.unknown {
color: #2A3035;
}

#footer {
width: 100%;
max-width: 1920px;
margin: 0px auto 0px auto;
padding: 15px;
font-size: 10px;
Expand Down
2 changes: 1 addition & 1 deletion templates/openda_light/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/footer.php
footer for the Open DMARC Analyzer default template
Expand Down
2 changes: 1 addition & 1 deletion templates/openda_light/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/header.php
header for the Open DMARC Analyzer default template
Expand Down
2 changes: 1 addition & 1 deletion templates/openda_light/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* ----------------------------------------------------------------------------
Open DMARC Analyzer - Open Source DMARC Analyzer
Copyright (C) 2022 - John Bradley (userjack6880)
Copyright (C) 2023 - John Bradley (userjack6880)
templates/openda/index.php
main body of the Open DMARC Analyzer default template
Expand Down
Loading

0 comments on commit 7508ab2

Please sign in to comment.