This image provides both Open Report Analyzer and Open Report Parser from userjack6880
7.4K
This docker-compose file aims to provide both Open Report Analyzer and Open Report Parser from userjack6880 inside the same container.
On first run you will need to create the required database view browsing http://localhost:8080/install.php
open report parser is a perl based tool to parse DMARC reports. Please see here for a full description of the tool.
You will need one of those:
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!
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 | 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 |
services:
open-report-analyzer:
image: zeguigui/open-report-analyzer:latest
restart: always
environment:
- "DB_HOST=db"
- "DB_USER=dmarc"
- "DB_PASS=password"
- "DB_NAME=dmarc"
- "DB_PORT=3306"
- "DB_TYPE=mysql"
- "GEO_ENABLE=0"
- "DATE_RANGE=-1w"
volumes:
- ./conf/report-parser.conf:/opt/open-report-parser/report-parser.conf:ro
ports:
- 8080:80
depends_on:
- db
db:
image: mariadb:lts
restart: always
environment:
- "MARIADB_RANDOM_ROOT_PASSWORD=yes"
- "MARIADB_DATABASE=dmarc"
- "MARIADB_USER=dmarc"
- "MARIADB_PASSWORD=password"
volumes:
- ./data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
Source code available on my gitea repository
Content type
Image
Digest
sha256:19ed09db6…
Size
268.1 MB
Last updated
4 months ago
docker pull zeguigui/open-report-analyzer