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 912B

1234567891011121314151617181920
  1. #!/bin/bash
  2. DB_SERVER='localhost'
  3. DB_USER='{{ mail_db_opendmarc_username }}'
  4. DB_PASS='{{ mail_db_opendmarc_password }}'
  5. DB_NAME='{{ mail_db_opendmarc_database }}'
  6. WORK_DIR='/var/run/opendmarc'
  7. REPORT_EMAIL='{{ admin_email }}'
  8. mv ${WORK_DIR}/opendmarc.dat ${WORK_DIR}/opendmarc_import.dat -f
  9. touch ${WORK_DIR}/opendmarc.dat
  10. chown opendmarc:opendmarc ${WORK_DIR}/opendmarc.dat
  11. /usr/sbin/opendmarc-import --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose < ${WORK_DIR}/opendmarc_import.dat
  12. {% for domain in mail_virtual_domains %}
  13. /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 }}'
  14. {% endfor %}
  15. /usr/sbin/opendmarc-expire --dbhost=${DB_SERVER} --dbuser=${DB_USER} --dbpasswd=${DB_PASS} --dbname=${DB_NAME} --verbose