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.

dmarc.yml 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. - name: Install OpenDMARC milter
  2. apt: pkg=opendmarc state=installed update_cache=yes
  3. - name: Copy OpenDMARC configuration file into place
  4. template: src=etc_opendmarc.conf.j2 dest=/etc/opendmarc.conf owner=root group=root
  5. notify: restart opendmarc
  6. - name: Create OpenDMARC configuration directory
  7. file: state=directory path=/etc/opendmarc
  8. - name: Copy OpenDMARC ignore hosts file into place
  9. template: src=etc_opendmarc_ignore.hosts.j2 dest=/etc/opendmarc/ignore.hosts owner=root group=root
  10. - name: Copy OpenDMARC defaults file into place
  11. copy: src=etc_default_opendmarc dest=/etc/default/opendmarc owner=root group=root
  12. notify:
  13. - restart opendmarc
  14. - restart postfix
  15. - name: Copy OpenDMARC database schema file into place
  16. copy: src=etc_opendmarc_import.sql dest=/etc/opendmarc/import.sql owner=root group=root
  17. - name: Create database user for OpenDMARC reports
  18. mysql_user: user={{ mail_db_opendmarc_username }} password={{ mail_db_opendmarc_password }} state=present priv="opendmarc.*:ALL"
  19. - name: Create database for OpenDMARC reports
  20. mysql_db: name={{ mail_db_opendmarc_database }} state=present
  21. - name: Import database schema for OpenDMARC reports
  22. mysql_db: name={{ mail_db_opendmarc_database }} state=import target=/etc/opendmarc/import.sql
  23. tags: import_mysql_postfix
  24. - name: Copy nightly OpenDMARC report generation script into place
  25. template: src=etc_opendmarc_report.sh.j2 dest=/etc/opendmarc/report.sh owner=root group=root mode="755"
  26. - name: Activate OpenDMARC report cronjob
  27. cron: name="OpenDMARC report" hour="2" minute="0" job="/bin/bash /etc/opendmarc/report.sh >> /var/log/opendmarc_report.log"