# Open Report Analyzer and Parser This docker-compose file aims to provide both Open Report Analyzer and Open Report Parser from [userjack6880](https://github.com/userjack6880) inside the same container. On first run you will need to create the required browsing `http://localhost:8080/install.php` ## Sample docker-compose file Sample file, you will need to adapt it to your configuration! ## Open Report Parser open report parser is a perl based tool to parse DMARC reports. Please see [here](https://github.com/userjack6880/Open-Report-Parser) for a full description of the tool. You will need one of those: * a MariaDB 10.5 or equivalent database * PostgreSQL 13.9+ You need to setup a configuration file and put it inside `/opt/open-report-parser` Syntax for folders is setup dependant. For my cyrusd-imap I had to use `INBOX/dmarc` syntax (folders not flattened). To run the parser: ``` docker compose run --rm -it open-report-analyzer /bin/sh -c 'cd /opt/open-report-parser; ./report-parser.pl -i --info' ``` You will want to add this to a cron job which is out of the scope of this readme file! ## Open Report Analyzer Default configuration file has beed modified to read environment variables from docker. You can user `_FILE` suffix to read the value from a file. See docker compose secrets! Apache will listen on port 80 Environment variables and default values: | Environment variable | Meaning | Default value | |----------------------|---------------------------------------------------------------------------------------------------------------------------|----------------------------| | DB_HOST | Database hostname | `localhost` | | DB_USER | Database username | `dmarc` | | DB_PASS | Database password | `password` | | DB_NAME | Database name | `dmarc` | | DB_PORT | Default port 3306, 5432 for pgsql | `3306` | | DB_TYPE | supported mysql and pgsql | `mysql` | | DEBUG | not currently used! | `1` | | TEMPLATE | available openda and openda_light | `openda` | | AUTO_LOADER | should not need to change this! | `vendor/autoload.php` | | GEO_ENABLE | see [official documentation](https://github.com/userjack6880/Open-DMARC-Analyzer) | `1` | | GEO_DB | Path to the MaxMind GeoIP database (not provided) | `includes/geolite2.mmdb` | | DATE_RANGE | Standard starting date range for data presented. Valid date signifiers are `m`, `w` and `d` for "month", "week" and "day" | `-1w` |