diff --git a/defaults/main.yml b/defaults/main.yml index 1f54e5c..82f1944 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -116,31 +116,3 @@ spamassassin_packages: - libmail-spf-perl - libmail-dkim-perl - procps # provides /bin/kill, should actually be a dependency - - -# enable DMARC checks -# requires SPF and DKIM checks, which are enabled by default -spamassassin_dmarc_enabled: true -spamassassin_dmarc_dependencies: - - libconfig-tiny-perl - - libdbd-sqlite3-perl - - libdbix-simple-perl - - libemail-address-perl - - libemail-mime-perl - - libemail-sender-perl - - libemail-simple-perl - - libfile-sharedir-install-perl - - libfile-sharedir-perl - - libio-compress-lzma-perl - - libnet-dns-perl - - libnet-idn-encode-perl - - libregexp-common-perl - - libtest-file-sharedir-perl - - libxml-libxml-perl - -spamassassin_dmarc_dependencies_build: - - cpanminus - - gcc - - libc6-dev - - libextutils-cbuilder-perl - - make diff --git a/handlers/main.yml b/handlers/main.yml index 4c08c54..ceed2d7 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -23,8 +23,3 @@ service: name: monit state: restarted - -- name: Remove build dependencies - apt: - name: "{{ spamassassin_dmarc_dependencies_build }}" - state: absent diff --git a/tasks/dmarc.yml b/tasks/dmarc.yml deleted file mode 100644 index b510f49..0000000 --- a/tasks/dmarc.yml +++ /dev/null @@ -1,57 +0,0 @@ ---- -# There was an upstream change to upper case file names -- name: Delete former DMARC plugin files - file: - path: "/etc/spamassassin/{{ item }}" - state: absent - with_items: - - Dmarc.pm - - Dmarc.cf - - Dmarc.pre - -- name: Enable DMARC plugin - when: spamassassin_dmarc_enabled - block: - - name: Install DMARC dependencies - apt: - name: "{{ spamassassin_dmarc_dependencies }}" - state: present - register: dmarc_install - - - name: Install DMARC build dependencies # noqa no-handler - apt: - name: "{{ spamassassin_dmarc_dependencies_build }}" - notify: Remove build dependencies - when: dmarc_install.changed - - - name: Install perl modules # noqa no-handler - community.general.cpanm: - name: "{{ item }}" - notest: true - with_items: - - "IO::Compress::Zstd" - - "Mail::DMARC::PurePerl" - when: dmarc_install.changed - notify: Restart {{ spamassassin_daemon }} - - - name: Get DMARC plugin files - get_url: - url: "https://github.com/bigio/spamassassin-dmarc/raw/master/{{ item }}" - dest: /etc/spamassassin/ - mode: '0644' - with_items: - - DMARC.pm - - DMARC.cf - - DMARC.pre - notify: Restart {{ spamassassin_daemon }} - -- name: Delete DMARC plugin - file: - path: "/etc/spamassassin/{{ item }}" - state: absent - with_items: - - DMARC.pm - - DMARC.cf - - DMARC.pre - when: not spamassassin_dmarc_enabled - notify: Restart {{ spamassassin_daemon }}