Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.4.x
- Puppet >= 4.9.0 < 7.0.0
- FreeBSD , , , , , ,
This module has been deprecated by its author since May 16th 2023.
The author has suggested markt-rspamd as its replacement.
Start using this module
Documentation
rspamd
Table of Contents
- Description
- Setup - The basics of getting started with rspamd
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This module installs and manages the Rspamd spam filter, and provides resources and functions to configure the Rspamd system. It does, however, not configure the systems beyond the upstream defaults.
This module is intended to work with Puppet 4.10, 5 and 6, and has been tested with Rspamd versions from 1.6.3 to at least 2.5.0 on Ubuntu 16.04 and CentOS 7. Patches to support other setups are welcome.
Please note that while all versions starting from 1.6.3 should still be supported, this module is intended to be run with the latest version of Rspamd, and compatibility with older versions will not be tested for new releases.
Setup
What rspamd affects
By default, this package...
- adds rspamd.com/apt-stable to your APT repository list
- installs the rspamd package
- recursively purges all custom rspamd config (e.g. local.d and override.d directories)
Beginning with rspamd
The simplest way to use this module is:
include rspamd
This will setup the rspamd service the upstream default configuration.
Usage
The rspamd::config resource can be used to specify custom configuration entries. The easiest way to use it, is to put both the file and the hierachical config key into the resource title:
class { 'rspamd': }
rspamd::config {
'classifier-bayes:backend': value => 'redis';
'classifier-bayes:servers': value => '127.0.0.1:6379';
'classifier-bayes:statfile[0].symbol': value => 'BAYES_HAM';
'classifier-bayes:statfile[0].spam': value => false;
'classifier-bayes:statfile[1].symbol': value => 'BAYES_SPAM';
'classifier-bayes:statfile[1].spam': value => true;
}
This results the following config file /etc/rspamd/local.d/classifier-bayes.conf
:
# This file is managed by Puppet. DO NOT EDIT.
backend = redis;
servers = "127.0.0.1:6379";
statfile {
spam = false;
symbol = 'BAYES_HAM';
}
statfile {
spam = true;
symbol = 'BAYES_SPAM';
}
Using the rspamd $config
parameter, values for multiple config files can
easily be provided from hiera:
rspamd::config:
classifier-bayes:
backend: redis
servers: "127.0.0.1:6379"
statfile:
- symbol: BAYES_HAM
spam: false
- symbol: BAYES_SPAM
spam: true
milter_headers:
use:
- authentication-results
- x-spam-status
'worker-proxy.inc':
bind_socket: 'localhost:11332'
upstream:
local:
self_scan: true
dkim_signing:
sign_local: true
This uses the provided rspamd::create_config_resources
and rspamd::create_config_file_resources
functions, which can be used in custom profiles for extended use cases:
class profile::mail::rspamd (
Hash $config,
Hash $override_config,
) {
class { 'rspamd': }
rspamd::create_config_file_resources($config)
rspamd::create_config_file_resources($override_config, { mode => 'override' })
}
Reference
See the reference generated by puppet strings on https://oxc.github.io/puppet-rspamd/
Limitations
OS Versions tested:
- Ubuntu 16.04
- CentOS 7
Feel free to let me know if it correctly works on a different OS/setup, or submit patches if it doesn't.
Development
You're welcome to submit patches and issues to the issue tracker on Github.
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Unreleased
1.3.0 - 2021-02-03
Added
- Increase compatible dependency versions in metadata (#8)
- Add parameter
$package_ensure
(#10) - Convert to PDK
1.2.0 - 2020-04-07
This release solely changes documentation and metadata.
Changed
Release 1.1.0 - 2019-03-03
This version adds a convenience parameter for simplified hiera usage.
Added
- $rspamd::config parameter to simplify usage from hiera out of the box (#2).
Release 1.0.2 - 2018-01-28
This version fixes a regression introduced in 1.0.0 that caused a non-working APT repo to be added on Debian/Ubuntu by default.
Fixes
- Fix links in this changelog
- Fix repo being added with
undef
URL by default on Debian/Ubuntu.
Release 1.0.1 - 2018-01-28
This version contains some minor documentation fixes only
Fixes
- Fix links in this changelog
Release 1.0.0 - 2018-01-28
First stable release. This version now requires Puppet 4.9 or greater.
Added
- FreeBSD support (no repo management)
Changed
- Large refactoring to adhere to standard module layout
$packages_install
has been renamed to$package_manage
- Minimum required Puppet version is now 4.9
- Several style/lint related changes
Release 0.2.1 - 2017-07-31
First public release. This version is used by the author on a production system.
Fixes
- Fixes several style/lint related issues
Release 0.2.0 - 2017-07-31
This version removes rmilter
support in favor of the rspamd_proxy
milter support added in Rspamd 1.6
Version 0.1.0 (unreleased)
Initial development, was not used or tested on a production system
Dependencies
- puppetlabs-stdlib (>= 4.16.0 < 7.0.0)
- puppetlabs-concat (>= 3.0.0 < 7.0.0)
- puppetlabs-apt (>= 3.0.0 < 8.0.0)
Copyright 2017 Bernhard Frauendienst Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.