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

RSS

onddo-spamassassin (5) Versions 1.1.0

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

Policyfile
Berkshelf
Knife
cookbook 'onddo-spamassassin', '= 1.1.0', :supermarket
cookbook 'onddo-spamassassin', '= 1.1.0'
knife supermarket install onddo-spamassassin
knife supermarket download onddo-spamassassin
README
Dependencies
Changelog
Quality 100%

SpamAssassin Cookbook

Cookbook Version
Dependency Status
Build Status

Chef cookbook to install and configure 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
  • Oracle Linux
  • RedHat
  • SUSE
  • Ubuntu

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

Required Applications

  • Ruby >= 1.9.3

Attributes

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/spamd.pid' 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',
    '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.example.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@zuazo.org)
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

    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.

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.
  • 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 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