systemli.spamassassin
ansible-role-spamassassin
This role installs and manages SpamAssassin, including DKIM, Pyzor, and Razor checks.
Role Variables
Default settings:
## general settings
spamassassin_user: debian-spamd
spamassassin_group: debian-spamd
spamassassin_home_dir: /var/lib/spamassassin
spamassassin_log_dir: /var/log/spamassassin
# Configure SpamAssassin (set to False to skip configuration and cron job setup)
spamassassin_configure: True
## file: /etc/default/spamassassin
spamassassin_automatic_rule_update_enabled: true
spamassassin_nice_level: 0
## file: /etc/spamassassin/local.cf
# Rewrite email headers?
spamassassin_rewrite_header_enabled: true
spamassassin_rewrite_header: "Subject *****SPAM*****"
# Allowed values: 0, 1, 2 - see documentation
spamassassin_report_safe: 0
# Minimum score for an email to be marked as spam
spamassassin_required_score: 5.0
# Enable the built-in Bayesian classifier
spamassassin_use_bayes: 1
# Allow the classifier to learn from new examples
spamassassin_bayes_auto_learn: 1
# List of trusted networks or hosts
spamassassin_trusted_networks: []
# Locking method options: nfsafe, flock, win32
spamassassin_lock_method: flock
# List headers to ignore for Bayesian classification
spamassassin_bayes_ignore_header:
- X-Bogosity
- X-Spam-Flag
- X-Spam-Status
# Manual welcome listing
spamassassin_welcomelist: []
# Additional update channels for daily updates
spamassassin_additional_update_channels: []
# Enable additional Pyzor checks
spamassassin_pyzor_enabled: False
spamassassin_pyzor_config_dir: /etc/spamassassin/.pyzor
# Enable additional Razor checks
spamassassin_razor_enabled: True
spamassassin_razor_config_dir: /etc/spamassassin/.razor
# Enable Monit for monitoring
spamassassin_monit_enabled: False
# Enable spam training for specified users and domains
spamassassin_spamtraining_users: []
# Set custom SpamAssassin scores
spamassassin_custom_scores: []
# Default packages to install based on Debian version
spamassassin_packages:
- spamassassin
- spamc
- libmail-spf-perl
- libmail-dkim-perl
- procps # provides /bin/kill, essential dependency
Download
To download the latest release, use ansible-galaxy
:
ansible-galaxy install systemli.spamassassin
Example Playbook
Here’s an example of how to use the role in a playbook:
- hosts: servers
roles:
- { role: systemli.spamassassin }
Testing & Development
This role uses Molecule, Goss, Docker, and GitHub Actions for continuous testing. You can test it locally with:
molecule test
Ensure you have Molecule, Vagrant, and python-vagrant
installed.
License
GPLv3
Author Information
For more information, visit Systemli.
Informazioni sul progetto
Install and maintain spamassassin. Contains tests for Molecule.
Installa
ansible-galaxy install systemli.spamassassin
Licenza
gpl-3.0
Download
1.2k
Proprietario
Your friendly tech collective