diff --git a/dmarc/.env.example b/dmarc/.env.example new file mode 100644 index 0000000..d728499 --- /dev/null +++ b/dmarc/.env.example @@ -0,0 +1,2 @@ +IMAP_USER=EMAIL_ADDRESS +IMAP_PASS=EMAIL_PASSWORD \ No newline at end of file diff --git a/dmarc/README.md b/dmarc/README.md new file mode 100644 index 0000000..a701128 --- /dev/null +++ b/dmarc/README.md @@ -0,0 +1,11 @@ +# DMARC + +Skynet admins get dmarc reports into a folder in tehir mail account called ``mailman``. +This compose script pulls mails into a databse and displays them on a local website. + +Uses https://github.com/gutmensch/docker-dmarc-report + +1. ``cp .env.example .env`` +2. Add yer username and pass to the ``.env`` +3. ``docker compose up`` +4. Go to ``localhost`` in your browser to view it. \ No newline at end of file diff --git a/dmarc/docker-compose.yml b/dmarc/docker-compose.yml new file mode 100644 index 0000000..2acb989 --- /dev/null +++ b/dmarc/docker-compose.yml @@ -0,0 +1,41 @@ +version: "3.6" + +services: + dmarc-report: + image: "gutmensch/dmarc-report:latest" + hostname: dmarc-report + container_name: dmarc-report + depends_on: + db_dmark: + condition: service_healthy + ports: + - "80:80" + environment: + - "REPORT_DB_HOST=db_dmark" + - "REPORT_DB_PORT=3306" + - "REPORT_DB_NAME=dmarc_report" + - "REPORT_DB_USER=dmarc_report" + - "REPORT_DB_PASS=dbpassword" + - "PARSER_IMAP_SERVER=mail.skynet.ie" + - "PARSER_IMAP_PORT=143" + - "PARSER_IMAP_USER=${IMAP_USER}" + - "PARSER_IMAP_PASS=${IMAP_PASS}" + - "PARSER_IMAP_READ_FOLDER=mailman" + - "PARSER_IMAP_MOVE_FOLDER=mailman.processed" + - "PARSER_IMAP_MOVE_FOLDER_ERR=mailman.error" + + db_dmark: + image: mariadb:10 + command: --skip-innodb-read-only-compressed + environment: + - "MYSQL_ROOT_PASSWORD=dbrootpassword" + - "MYSQL_DATABASE=dmarc_report" + - "MYSQL_USER=dmarc_report" + - "MYSQL_PASSWORD=dbpassword" + volumes: + - ./dmarc-report-db:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-uroot", "-pdbrootpassword"] + interval: 10s + timeout: 10s + retries: 5 \ No newline at end of file