Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status


onddo-spamassassin (5) Versions 1.1.0

Installs and configures SpamAssassin, a mail filter software to identify spam.

cookbook 'onddo-spamassassin', '= 1.1.0', :supermarket
cookbook 'onddo-spamassassin', '= 1.1.0'
knife supermarket install onddo-spamassassin
knife supermarket download onddo-spamassassin
Quality 100%

SpamAssassin Cookbook

Cookbook Version
Dependency Status
Build Status

Chef cookbook to install and configure SpamAssassin, a mail filter software to identify spam.


Supported Platforms

This cookbook has been tested on the following platforms:

  • Amazon Linux
  • CentOS
  • Debian
  • Fedora
  • openSUSE
  • Oracle Linux
  • RedHat
  • SUSE
  • Ubuntu

Please, let us know if you use it successfully on any other platform.

Required Applications

  • Ruby >= 1.9.3


Attribute Default Description
node['spamassassin']['spamc']['path'] calculated SpamAssassin client binary path.
node['spamassassin']['spamd']['path'] calculated SpamAssassin daemon binary path.
node['spamassassin']['spamd']['user'] 'spamd' SpamAssassin user.
node['spamassassin']['spamd']['group'] 'spamd' SpamAssassin group.
node['spamassassin']['spamd']['lib_path'] calculated SpamAssassin library path.
node['spamassassin']['spamd']['enabled'] true SpamAssassin daemon enabler flag.
node['spamassassin']['spamd']['options'] calculated SpamAssassin daemon option arguments.
node['spamassassin']['spamd']['pidfile'] '/var/run/' SpamAssassin daemon pid file.
node['spamassassin']['spamd']['nice'] nil SpamAssassin daemon nice scheduling priority.
node['spamassassin']['conf']['rewrite_headers'] calculated An array of rewrite headers.
node['spamassassin']['conf']['report_safe'] true SpamAssassin report_safe enabler flag.
node['spamassassin']['conf']['trusted_networks'] nil Network or hosts that are considered trusted.
node['spamassassin']['conf']['lock_method'] 'flock' File-locking method used to protect database files on-disk.
node['spamassassin']['conf']['required_score'] 5 Score required before a mail is considered spam.
node['spamassassin']['conf']['use_bayes'] true Whether to use the naive-Bayesian-style classifier.
node['spamassassin']['conf']['bayes_auto_learn'] true Whether SpamAssassin should automatically feed high-scoring mail.
node['spamassassin']['conf']['bayes_ignore_headers'] [] Headers ignored by the naive-Bayesian-style classifier.
node['spamassassin']['conf']['plugins'] [] A hash to configure SpamAssassin plugins (see the example below).

Plugin Example

node.default['spamassassin']['conf']['plugins']['shortcircuit'] = [
    'USER_IN_WHITELIST' => 'on',
    'USER_IN_DEF_WHITELIST' => 'on',
    'USER_IN_ALL_SPAM_TO' => 'on',

    'USER_IN_BLACKLIST' => 'on',
    'USER_IN_BLACKLIST_TO' => 'on',

    'ALL_TRUSTED' => 'on',

    'BAYES_99' => 'spam',
    'BAYES_00' => 'ham'



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": "",
  "[...]": "[...]",
  "run_list": [




Please do not hesitate to open an issue with any questions or problems.




License and Author

Author: Xabier de Zuazo (
Copyright: Copyright (c) 2015, Xabier de Zuazo
Copyright: Copyright (c) 2013-2015 Onddo Labs, SL.
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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

CHANGELOG for onddo-spamassassin

This file is used to list changes made in each version of onddo-spamassassin.

v1.1.0 (2015-08-31)

  • Add Oracle Linux support.
  • Install deltarpm package on Fedora.
  • metadata: Add source_url and issues_url.
  • Update contact information and links after migration.

  • Documentation:

    • README:
    • Use markdown tables.
    • Improve description.
  • Testing:

    • Gemfile: Update RuboCop to 0.33.0.
    • Add a Vagrantfile.
    • Add a Guardfile.
    • Add a .rubocop.yml file.
    • Move ChefSpec tests to test/unit.
    • Rakefile: Add clean task.
    • .kitchen.yml: Update platforms.
    • Travis CI:
    • Add Ruby 2.2.
    • Run test-kitchen in Travis with the kitchen-in-travis script.

v1.0.0 (2015-04-29)

  • Move the attribute namespace from node['onddo-spamassassin'] to node['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.
    • 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 file
  • Berksfile: use source instead of site.
  • Added ChefSpec tests.
  • Added travis.yml file and a Rakefile.
  • TODO added tasks: RuboCop and namespace change.

v0.1.0 (2013-06-09)

  • Initial release of onddo-spamassassin.

Foodcritic Metric

1.1.0 passed this metric