Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
865 B

#!/bin/bash
set -e
if [ -e /var/run/opendmarc/history.dat ]; then
mv /var/run/opendmarc/history.dat /tmp/dmarc_history.$$
/usr/sbin/opendmarc-import --dbhost={{ pmg_dmarc_db_server }} --dbuser={{ pmg_dmarc_db_user }} --dbpasswd='{{ pmg_dmarc_db_pass }}' --dbname={{ pmg_dmarc_db_name }} --verbose < /tmp/dmarc_history.$$
/usr/sbin/opendmarc-reports --dbhost={{ pmg_dmarc_db_server }} --dbuser={{ pmg_dmarc_db_user }} --dbpasswd='{{ pmg_dmarc_db_pass }}' --dbname={{ pmg_dmarc_db_name }} --verbose --interval=86400 --report-email 'dmarc-noreply@{{ ansible_domain }}' --report-org '{{ pmg_dmarc_report_org }}' --smtp-port={{ pmg_smtp_int_ports.0 }}
/usr/sbin/opendmarc-expire --dbhost={{ pmg_dmarc_db_server }} --dbuser={{ pmg_dmarc_db_user }} --dbpasswd='{{ pmg_dmarc_db_pass }}' --dbname={{ pmg_dmarc_db_name }} --verbose
rm -f /tmp/dmarc_history.$$
fi