cookbook 'onddo-spamassassin', '= 1.0.0'
onddo-spamassassin (5) Versions 1.0.0 Follow3
Installs and configures SpamAssassin, a mail filter software to identify spam.
cookbook 'onddo-spamassassin', '= 1.0.0', :supermarket
knife supermarket install onddo-spamassassin
knife supermarket download onddo-spamassassin
Description
Installs and configures SpamAssassin, a mail filter software to identify spam.
Requirements
Supported Platforms
This cookbook has been tested on the following platforms:
- Amazon Linux
- CentOS
- Debian
- Fedora
- openSUSE
- RedHat
- SUSE
- Ubuntu
Please, let us know if you use it successfully on any other platform.
Required Applications
- Ruby
>= 1.9.3
Attributes
<table>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><code>node['spamassassin']['spamc']['path']</code></td>
<td>SpamAssassin client binary path</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['path']</code></td>
<td>SpamAssassin daemon binary path</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['user']</code></td>
<td>SpamAssassin user</td>
<td><code>'spamd'</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['group']</code></td>
<td>SpamAssassin group</td>
<td><code>'spamd'</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['lib_path']</code></td>
<td>SpamAssassin group</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['enabled']</code></td>
<td>SpamAssassin daemon enabler flag</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['options']</code></td>
<td>SpamAssassin daemon option arguments</td>
<td><code>[<br/>
'--create-prefs',<br/>
'--max-children 5',<br/>
'--helper-home-dir'<br/>
]</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['pidfile']</code></td>
<td>SpamAssassin daemon pid file</td>
<td><code>'/var/run/spamd.pid'</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['spamd']['nice']</code></td>
<td>SpamAssassin daemon nice scheduling priority</td>
<td><code>nil</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['rewrite_headers']</code></td>
<td>An array of rewrite headers</td>
<td><code>[<br/>
{<br/>
'Subject' => '[SPAM]'<br/>
}<br/>
]</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['report_safe']</code></td>
<td>SpamAssassin report_safe enabler flag</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['trusted_networks']</code></td>
<td>Network or hosts that are considered trusted</td>
<td><code>nil</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['lock_method']</code></td>
<td>File-locking method used to protect database files on-disk</td>
<td><code>'flock'</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['required_score']</code></td>
<td>Score required before a mail is considered spam</td>
<td><code>5</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['use_bayes']</code></td>
<td>Whether to use the naive-Bayesian-style classifier</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['bayes_auto_learn']</code></td>
<td>Whether SpamAssassin should automatically feed high-scoring mail</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['bayes_ignore_headers']</code></td>
<td>Headers ignored by the naive-Bayesian-style classifier</td>
<td><code>[]</code></td>
</tr>
<tr>
<td><code>node['spamassassin']['conf']['plugins']</code></td>
<td>A hash to configure SpamAssassin plugins (<a href="#plugin-example">see the example below</a>)</td>
<td><code>[]</code></td>
</tr>
</table>
plugin example
node.default['spamassassin']['conf']['plugins']['shortcircuit'] = [ { 'USER_IN_WHITELIST' => 'on', 'USER_IN_DEF_WHITELIST' => 'on', 'USER_IN_ALL_SPAM_TO' => 'on', 'SUBJECT_IN_WHITELIST' => 'on', 'USER_IN_BLACKLIST' => 'on', 'USER_IN_BLACKLIST_TO' => 'on', 'SUBJECT_IN_BLACKLIST' => 'on', 'ALL_TRUSTED' => 'on', 'BAYES_99' => 'spam', 'BAYES_00' => 'ham' } ]
Recipes
onddo-spamassassin::default
Installs SpamAssassin client and Daemon.
Usage Examples
Including in a Cookbook Recipe
Running it from a recipe:
# Required_score is set to 5 by default, change it: node.default['spamassassin']['conf']['required_score'] = 4 include_recipe 'onddo-spamassassin::default' # or include it in your run-list
Don't forget to include the onddo-spamassassin
cookbook as a dependency in the metadata.
# metadata.rb # [...] depends 'onddo-spamassassin'
Including in the Run List
Another alternative is to include the default recipe in your Run List.
{ "name": "mail.onddo.com", "[...]": "[...]", "run_list": [ "recipe[onddo-spamassassin]" ] }
Testing
See TESTING.md.
Contributing
Please do not hesitate to open an issue with any questions or problems.
See CONTRIBUTING.md.
TODO
See TODO.md.
License and Author
Author: | Xabier de Zuazo (xabier@onddo.com) |
Copyright: | Copyright (c) 2013-2015 Onddo Labs, SL. (www.onddo.com) |
License: | Apache License, Version 2.0 |
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.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
CHANGELOG for onddo-spamassassin
This file is used to list changes made in each version of onddo-spamassassin
.
v1.0.0 (2015-04-29)
- Move the attribute namespace from
node['onddo-spamassassin']
tonode['spamassassin']
, includes a deprecation message (breaking change). - Add SUSE and OpenSUSE support.
- Refactor and improve multiple platform support.
Fix all RuboCop offenses.
-
Tests
- Add ServerSpec integration tests.
- Integrate unit tests with
should_not
gem. - Update unit tests to use
ChefSpec::SoloRunner
. - travis.yml: Use the new build env.
v0.2.0 (2014-09-22)
-
Gemfile
updates:- Berkshelf version 3.
- Specify vagrant version.
- Improved, added groups.
-
README
& metadata:trusted_networks
default value fixed. -
README
:- Added cookbook badge.
- File separated in multiple files.
- Added travis-ci and gamnasium badges.
- Fix SpamAssassin daemon with systemd: fixes Fedora support.
- test/kitchen/cookbooks directory moved to test/cookbooks.
- Added Fedora and Amazon Linux support.
- Added RedHat support.
-
kitchen.yml
file updated. - Added
kitchen.cloud.yml
file -
Berksfile
: use source instead of site. - Added ChefSpec tests.
- Added
travis.yml
file and aRakefile
. -
TODO
added tasks: RuboCop and namespace change.
v0.1.0 (2013-06-09)
- Initial release of
onddo-spamassassin
.
Foodcritic Metric
1.0.0 passed this metric
1.0.0 passed this metric