Added perl dependencies for the dmarc plugin #18

Merged
adellam merged 1 commits from adellam/ansible-role-spamassassin:master into master 2020-09-23 19:39:05 +02:00
4 changed files with 67 additions and 30 deletions

View File

@ -5,22 +5,6 @@ spamassassin_sql_backend: False
spamassassin_required_hits: 5
spamassassin_report_safe: '0'
spamassassin_rewrite_subject: "[SPAM]"
spamassassin_user: spamassassin
spamassassin_group: '{{ spamassassin_user }}'
spamassassin_home: /etc/mail/spamassassin
spamassassin_rh_packages:
- spamassassin
- spamassassin-iXhash2
- python2-pip
spamassassin_sql_rh_packages:
- perl-DBD-Pg
- perl-DBI
spamassassin_pyzor_pip_packages:
- pip
- pyzor
spamassassin_listen_ip: '127.0.0.1'
spamassassin_authorized_ip_addresses: '127.0.0.1'
@ -128,17 +112,10 @@ spamassassin_clamav_github_plugin_url: 'https://raw.githubusercontent.com/bigio/
# https://github.com/bigio/spamassassin-vba-macro
spamassassin_ole2macro_github_plugin: True
spamassassin_ole2macro_github_plugin_url: 'https://raw.githubusercontent.com/bigio/spamassassin-vba-macro/master/ole2macro.pm'
spamassassin_ole2macro_github_plugin_score: '3'
spamassassin_ole2_perl_packages:
- 'perl-IO-Compress'
- 'perl-IO-Compress-Lzma'
- 'perl-MIME-tools'
- 'perl-OLE-Storage_Lite'
# https://github.com/bigio/spamassassin-dmarc
spamassassin_dmarc_github_plugin: True
spamassassin_dmarc_github_plugin_url: 'https://raw.githubusercontent.com/bigio/spamassassin-dmarc/master/dmarc.pm'
spamassassin_dmarc_github_reject_score: '0.3'
spamassassin_dmarc_github_qar_score: '0.2'
spamassassin_dmarc_github_dmarc_none_score: '0.1'
@ -150,10 +127,6 @@ psql_db_data:
## Spamassassin milter settings
spamassassin_milter_install: False
spamassassin_rh_milter_packages:
- spamass-milter
- spamass-milter-postfix
spamassassin_milter_set_pref_dom_and_user: False
spamassassin_milter_pref_default_domain: 'localhost'
spamassassin_milter_pref_default_user: 'root'

View File

@ -96,7 +96,7 @@
template: src=ole2macro.cf.j2 dest={{ spamassassin_conf_dir }}/ole2macro.cf owner=root group=root mode='0644'
notify: Restart spamassassin
- name: spamassassin packages, RH/CentOS
- name: ole2 required packages, EL
yum: pkg={{ spamassassin_ole2_perl_packages }} state=present
when: ansible_distribution_file_variety == "RedHat"
@ -118,6 +118,14 @@
- name: dmarc plugin, from github
block:
- name: dmarc required packages, EL
yum: pkg={{ spamassassin_dmarc_perl_requirements }} state=present
when: ansible_distribution_file_variety == "RedHat"
- name: dmarc perl module, from CPAN
cpanm: name={{ item }} state=present
with_items: '{{ spamassassin_dmarc_perl_packages }}'
- name: Get the dmarc plugin code from github
get_url: url={{ spamassassin_dmarc_github_plugin_url }} dest={{ spamassassin_conf_dir }}/dmarc.pm owner=root group=root mode='0644'
notify: Restart spamassassin

View File

@ -36,19 +36,20 @@ use_pyzor 0
#
normalize_charset {{ spamassassin_normalize_charset }}
#
# ***** The scan_size options are not working
# Amount of data per email text/* mimepart, that will be run through body
# rules. This enables safer and faster scanning of large messages,
# perhaps having very large textual attachments. There should be no need
# to change this well tested default.
#
body_part_scan_size {{ spamassassin_text_body_scan_size }}
#body_part_scan_size {{ spamassassin_text_body_scan_size }}
#
# Textual rawbody data scan limit (default: 500000)
#
# Amount of data per email text/* mimepart, that will be run through
# rawbody rules.
#
rawbody_part_scan_size {{ spamassassin_body_part_scan_size }}
#rawbody_part_scan_size {{ spamassassin_body_part_scan_size }}
{% if spamassassin_shortcircuit_plugin %}
loadplugin Mail::SpamAssassin::Plugin::Shortcircuit

55
vars/main.yml Normal file
View File

@ -0,0 +1,55 @@
---
spamassassin_user: spamassassin
spamassassin_group: '{{ spamassassin_user }}'
spamassassin_home: /etc/mail/spamassassin
spamassassin_rh_packages:
- spamassassin
- spamassassin-iXhash2
- python2-pip
spamassassin_sql_rh_packages:
- perl-DBD-Pg
- perl-DBI
spamassassin_pyzor_pip_packages:
- pip
- pyzor
spamassassin_clamav_github_plugin_url: 'https://raw.githubusercontent.com/bigio/spamassassin-clamav/master/clamav.pm'
spamassassin_ole2macro_github_plugin_url: 'https://raw.githubusercontent.com/bigio/spamassassin-vba-macro/master/ole2macro.pm'
spamassassin_ole2_perl_packages:
- 'perl-IO-Compress'
- 'perl-IO-Compress-Lzma'
- 'perl-MIME-tools'
- 'perl-OLE-Storage_Lite'
spamassassin_dmarc_github_plugin_url: 'https://raw.githubusercontent.com/bigio/spamassassin-dmarc/master/dmarc.pm'
spamassassin_dmarc_perl_requirements:
- 'perl-App-cpanminus'
- 'perl-Test-Simple'
- 'perl-File-ShareDir'
- 'perl-File-ShareDir-Install'
- 'perl-Net-IP'
- 'perl-DBD-SQLite'
- 'perl-DBIx-Simple'
- 'perl-Regexp-Common'
- 'perl-Net-IDN-Encode'
- 'perl-Test-File'
- 'perl-Test-File-Contents'
- 'perl-Test-Output'
- 'perl-Test-Exception'
- 'perl-XML-LibXML'
- 'perl-Email-MIME'
- 'perl-Email-Simple'
- 'perl-Config-Tiny'
# via cpanm
spamassassin_dmarc_perl_packages:
- 'Mail::DMARC::PurePerl'
spamassassin_rh_milter_packages:
- spamass-milter
- spamass-milter-postfix