No Description
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.

etc_opendmarc_report.sh.j2 975B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. # ensure this script errors out if any of its steps do
  3. set -e
  4. DB_SERVER='localhost'
  5. DB_USER='{{ mail_db_opendmarc_username }}'
  6. DB_PASS='{{ mail_db_opendmarc_password }}'
  7. DB_NAME='{{ mail_db_opendmarc_database }}'
  8. WORK_DIR='/var/run/opendmarc'
  9. REPORT_EMAIL='{{ admin_email }}'
  10. mv ${WORK_DIR}/opendmarc.dat ${WORK_DIR}/opendmarc_import.dat -f
  11. touch ${WORK_DIR}/opendmarc.dat
  12. chown opendmarc:opendmarc ${WORK_DIR}/opendmarc.dat
  13. /usr/sbin/opendmarc-import --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose < ${WORK_DIR}/opendmarc_import.dat
  14. {% for domain in mail_virtual_domains %}
  15. /usr/sbin/opendmarc-reports --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose --interval=86400 --report-email $REPORT_EMAIL --report-org '{{ domain.name }}'
  16. {% endfor %}
  17. /usr/sbin/opendmarc-expire --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose