Git Product home page Git Product logo

open-dmarc-analyzer's Introduction

Open DMARC Analyzer

This is Open DMARC Analyzer Version 1 Feature Complete (1-fc) 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 or techsneeze's dmarcts-report-parser.

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

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

Dependencies

One of the following 2 packages are required to be installed.

jsmitty12/phpWhois

It is highly recommended that you install this package using composer. Instructions are found on the package's git page. This is required, and will replace most GeoIP data if you disable the MaxMind DB reader package. This package will require PHP 7.

MaxMind DB Reader PHP API

A note on this dependency - I've tried to write the one refrence to this external project as optional as possible, and it can almost completely be configured from config.php, due to the limitation of php namespace, I haven't come across a way that won't require you to dig deeper into the code if you happen to chose a compatible library to replace this MaxMind one. If you do wish to replace this library with another compatible one, the line in question is located in includes\functions.php:

$reader = new MaxMind\Db\Reader(GEO_DB);

It is highly recommended that you install this package using composer. Instructions are found on the package's git page.

You will also need the GeoLite2 database from MaxMind (or any other compatible DB). It can be obtained from here. Open DMARC Analyzer makes use of the GeoLite2 City database.

The MaxMind library is not distributed with this project, and is ultimately an optional feature to the project as a whole, unless you are using PHP 5.

Setting up Open DMARC Analyzer

Obtaining Open DMARC Analyzer through git is probably the easiest way, in addition to doing occasional pulls to get up-to-date versions.

git clone https://github.com/userjack6880/Open-DMARC-Analyzer.git

Optionally, a zip file of the latest release can be downloaded.

Once downloaded and installed in a desired directory, install either jsmitty12's phpWhois package or the MaxMind DB Reader package through composer. Rename config.php.pub to config.php and edit the configuration for your environment (see the next section on Configuration Options for details). Finally, run install.php to create the database view used by this software package.

install.php should remove itself and mysql.sql once complete. If permissions aren't given, install.php may not delete those files. It is recommended to manually delete these.

Configuration Options

Database Options

define('DB_HOST', 'localhost');
define('DB_USER', 'dmarc');
define('DB_PASS', 'password');
define('DB_NAME', 'dmarc');
define('DB_PORT', '3306'); // default port 3306

Debug Settings

define('DEBUG', 1);

Not Currently Used

Template Settings

define('TEMPLATE','openda');

This will load the visual templated located templates/. Simply name the directory the template is located in. Do not use a trailing slash.

Package Loader

define('AUTO_LOADER','vendor/autoload.php');

Should not need to change this setting unless using a non-standard composer installation.

GeoIP2 Settings

define('GEO_ENABLE', 1);
define('GEO_DB', 'includes/geolite2.mmdb');

Allows you to select between jsmitty12's phpWhois package and the MaxMind DB Reader package. The default is to use the MaxMind DB Reader package, as it provides the most relevant data to the user. To fall back to the jsmitty12's phpWhois package, change the GEO_ENABLE option to 0.

The second option, GEO_DB is used in conjunction with the MaxMind DB Reader package. The path to the MaxMind GeoIP database is relative to the root of the software package.

Date Range

define('DATE_RANGE', '-1w');

Defines the standard starting date range for data presented. All pages where dates are relevant start at a certain point and end at the time the page is loaded. This option defines where that starting point is, and the increment by which that starting date is changed.

Valid date signifiers are m, w, and d for "month", "week", and "day".

Latest Changes

1-fc

  • Documentation Updates
  • Formatting
  • Feature Complete Release

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

If you have a system configuration not listed, and would like to contribue this data, please provide feedback.

Release Cycle and Versioning

This project regular release cycle is not yet determined. Versioning is under the Anomaly Versioning Scheme (2022), as outlined in VERSIONING under docs.

Support

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

Version Support Level Released End of Support End of Life
Version 1 Feature Complete Full Support 27 July 2022 TBD TBD
Version 0 Alpha 9 Critical Support 2 May 2022 27 July 2022 TBD
Version 0 Alpha 8.2 or Older End of Life 31 March 2022 2 May 2022 27 July 2022

Contributing

Public contributions are encouraged. Please review CONTRIBUTING under docs for contributing procedures. Additionally, please take a look at our CODE_OF_CONDUCT. By participating in this project you agree to abide by the Code of Conduct.

Contributors

Primary Contributors

  • John Bradley - Initial Work

Thanks to all who contributed and have given feedback.

Licenses and Copyrights

Copyright © 2022 John Bradley (userjack6880). Open DMARC Analyzer is released under GNU GPLv3. See LICENSE.

open-dmarc-analyzer's People

Contributors

userjack6880 avatar mwander avatar volkermauel avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.