From: Neil Smith Date: Mon, 9 Jan 2017 10:45:10 +0000 (+0000) Subject: Added cron.daily file X-Git-Url: https://git.njae.me.uk/?p=opendmarc.git;a=commitdiff_plain;h=64ebc7e75dbe0e367107b3c5e764ba17cc6f9414 Added cron.daily file --- diff --git a/etc/cron.daily/opendmarc_report b/etc/cron.daily/opendmarc_report new file mode 100755 index 0000000..6cd7157 --- /dev/null +++ b/etc/cron.daily/opendmarc_report @@ -0,0 +1,20 @@ +#!/bin/bash + +SHELL_USER='opendmarc' +DB_SERVER='localhost' +DB_USER='opendmarc' +DB_PASS='*****' +DB_NAME='opendmarc' +WORK_DIR='/var/run/opendmarc' +REPORT_EMAIL='dmarc@*****' +REPORT_ORG='*****' +SMTP_SERVER='*****' + +mv ${WORK_DIR}/opendmarc.dat ${WORK_DIR}/opendmarc_import.dat -f +# cat /dev/null > ${WORK_DIR}/opendmarc.dat +sudo -u ${SHELL_USER} touch ${WORK_DIR}/opendmarc.dat +# chown opendmarc:opendmarc ${WORK_DIR}/opendmarc.dat + +/usr/sbin/opendmarc-import --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose < ${WORK_DIR}/opendmarc_import.dat +/usr/sbin/opendmarc-reports --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --smtp-server=${SMTP_SERVER} --verbose --interval=86400 --report-email=${REPORT_EMAIL} --report-org=${REPORT_ORG} +/usr/sbin/opendmarc-expire --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose diff --git a/etc/opendmarc/ignore.hosts b/etc/opendmarc/ignore.hosts new file mode 100644 index 0000000..4e1b39d --- /dev/null +++ b/etc/opendmarc/ignore.hosts @@ -0,0 +1,2 @@ +localhost +192.168.1.0/24 \ No newline at end of file