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 2.0.0

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

cookbook 'onddo-spamassassin', '~> 2.0.0', :supermarket
cookbook 'onddo-spamassassin', '~> 2.0.0'
knife supermarket install onddo-spamassassin
knife supermarket download onddo-spamassassin
Quality 17%

SpamAssassin Cookbook


Cookbook Version
Dependency Status
Code Climate
Build Status
Coverage Status
Inline docs

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

  • Chef 12 or higher.
  • Ruby 2.2 or higher.


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.

Change Log

All notable changes to the onddo-spamassassin cookbook will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

2.0.0 - 2017-03-12


  • Metadata: Add chef_version.
  • Metadata: Remove grouping (RFC-85).
  • Add documentation for libraries.


  • Prepare for Chef 13.
  • README: Add badges: docu, github, license, code climate, coveralls, inch-ci.
  • CHANGELOG: Follow "Keep a CHANGELOG".
  • Update RuboCop to 0.47 and fix new offenses.


  • Drop Ruby < 2.2 support.
  • Drop Chef < 12 support.

1.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.
  • README: Use markdown tables and improve description.

1.0.0 - 2015-04-29


  • Add SUSE and OpenSUSE support.


  • Move the attribute namespace from node['onddo-spamassassin'] to node['spamassassin'], includes a deprecation message (breaking change).
  • Refactor and improve multiple platform support.


  • Fix all RuboCop offenses.

0.2.0 - 2014-09-22


  • Add Fedora and Amazon Linux support.
  • Add RedHat support.
    • Added cookbook badge.
    • File separated in multiple files.
    • Added travis-ci and gamnasium badges.


  • README & metadata: trusted_networks default value fixed.
  • Fix SpamAssassin daemon with systemd: fixes Fedora support.

0.1.0 - 2013-06-09

  • Initial release of onddo-spamassassin.

Collaborator Number Metric

2.0.0 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Foodcritic Metric

2.0.0 failed this metric

FC069: Ensure standardized license defined in metadata: onddo-spamassassin/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: onddo-spamassassin/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

2.0.0 passed this metric

Testing File Metric

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

2.0.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number