Sign inSign up

zeguigui/open-report-analyzer

By zeguigui

Updated 4 months ago

This image provides both Open Report Analyzer and Open Report Parser from userjack6880

Image
0

7.4K

zeguigui/open-report-analyzer repository overview

Open Report Analyzer and Parser

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

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:

  • 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 variableMeaningDefault value
DB_HOSTDatabase hostnamelocalhost
DB_USERDatabase usernamedmarc
DB_PASSDatabase passwordpassword
DB_NAMEDatabase namedmarc
DB_PORTDefault port 3306, 5432 for pgsql3306
DB_TYPEsupported mysql and pgsqlmysql
DEBUGnot currently used!1
TEMPLATEavailable openda and openda_lightopenda
AUTO_LOADERshould not need to change this!vendor/autoload.php
GEO_ENABLEsee official documentation1
GEO_DBPath to the MaxMind GeoIP database (not provided)includes/geolite2.mmdb
DATE_RANGEStandard starting date range for data presented. Valid date signifiers are m, w and d for "month", "week" and "day"-1w

Sample docker-compose

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

Source code available on my gitea repository

Tag summary

Content type

Image

Digest

sha256:19ed09db6

Size

268.1 MB

Last updated

4 months ago

docker pull zeguigui/open-report-analyzer