Skip to content
Snippets Groups Projects
Select Git revision
  • 79d1f341113c87851b8916f57b725f917f98eea7
  • master default
2 results

main.yml

Blame
  • README.rst 1.91 KiB

    bgp-spamd

    Provision spamd with spam list distributed via bpg. For more information visit bgp-spamd.net. Configuration of PF is more custom and out of scope for this role, however one can include the configuration snippet created by this role by adding the following to your pf.conf.

    include "/etc/pf.conf.bgp-spamd"

    This will add 2 PF tables, spamd-white and bgp-spamd-bypass, both contain whitelisted IP addresses of mail senders. You can allow them through and send the rest to the spam trap by adding the following line to your pf.conf.

    pass in quick proto tcp from { <bgp-spamd-bypass>, <spamd-white> } to port smtp
    pass in quick proto tcp to (egress:0) port smtp rdr-to 127.0.0.1 port spamd

    Requirements

    See meta/main.yml, tests/requirements.yml and assertions at the top of tasks/main.yml.

    Role Variables

    See defaults/main.yml.

    Dependencies

    See meta/main.yml.

    Example Playbook

    See tests/playbook.yml.

    Testing

    Testing requires Virtualbox and Vagrant and Python 2.7. Install the Python dependencies, add pre-commit hooks by running:

    pip install -r tests/requirements.txt
    pre-commit install

    To run the full test suite:

    ansible-galaxy install git+file://$(pwd),$(git rev-parse --abbrev-ref HEAD) -p .molecule/roles
    molecule test --platform all
    pre-commit run --all-files

    License

    This software is licensed under the MIT license (see the LICENSE.txt file).

    Author Information

    Nimrod Adar, contact me or visit my website. Patches are welcome via git send-email. The repository is located at: https://www.shore.co.il/git/.