sudo-bot / docker-dmarc-srg

A docker image for dmarc-srg
https://hub.docker.com/r/botsudo/docker-dmarc-srg
Mozilla Public License 2.0
3 stars 0 forks source link
dmarc-srg docker-image

A Docker DmarcSrg image

This image uses:

Tables will be prefixed with: dmarc-srg_ by default. And require a ${MAILBOX_NAME} IMAP folder with unread reports. That will be moved to ${MAILBOXES_WHEN_DONE_MOVE_TO} or ${MAILBOXES_WHEN_FAILED_MOVE_TO}.

TODO

Supported ENVs

For utils/summary_report.php

Usage

Fetching reports

A cron is located in /var/spool/cron/crontabs/application and will fetch reports hourly. Feel free to mount another crontab file to /var/spool/cron/crontabs/application See: cron setup from the upstream image

Docker compose

version: "2.3"

services:

    dmarc-srg:
        image: docker.io/botsudo/docker-dmarc-srg
        container_name: dmarc-srg
        user: application
        # If you want to mount a custom config and skip the ENVs
        #volumes:
        #  - ./config.php:/var/www/html/config/conf.php:ro
        healthcheck:
            test:
                [
                    "CMD",
                    "curl",
                    "-s",
                    "--fail",
                    "http://127.0.0.1/.nginx/status",
                ]
            start_period: 5s
            interval: 15s
            timeout: 1s
        environment:
            DB_HOST: $DMARC_SRG_DB_HOST
            DB_NAME: $DMARC_SRG_DB_NAME
            DB_USER: $DMARC_SRG_DB_USER
            DB_PASSWORD: $DMARC_SRG_DB_PASSWORD
            IMAP_HOST: $DMARC_SRG_IMAP_HOST
            IMAP_USER: $DMARC_SRG_IMAP_USER
            IMAP_PASSWORD: $DMARC_SRG_IMAP_PASSWORD
            UI_PASSWORD: $DMARC_SRG_UI_PASSWORD
            # Use "." or "/" to use sub-folders
            MAILBOX_NAME: DMARC
            MAILBOXES_WHEN_DONE_MOVE_TO: DMARC-PROCESSED.Aggregate
            MAILBOXES_WHEN_FAILED_MOVE_TO: DMARC-PROCESSED.Invalid
        ports:
            - ${DMARC_SRG_HTTP_ADDRESS:-8082}:80
        restart: on-failure:2