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 0.2.0

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

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

Description

Cookbook Version
Dependency Status
Build Status

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
  • RedHat
  • Ubuntu

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

Attributes

<table>
<tr>
<th>Attribute</th>
<th>Description</th>
<th>Default</th>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamc']['path']</code></td>
<td>SpamAssassin client binary path</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['path']</code></td>
<td>SpamAssassin daemon binary path</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['user']</code></td>
<td>SpamAssassin user</td>
<td><code>"spamd"</code></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['group']</code></td>
<td>SpamAssassin group</td>
<td><code>"spamd"</code></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['lib_path']</code></td>
<td>SpamAssassin group</td>
<td><em>calculated</em></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['enabled']</code></td>
<td>SpamAssassin daemon enabler flag</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['onddo-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['onddo-spamassassin']['spamd']['pidfile']</code></td>
<td>SpamAssassin daemon pid file</td>
<td><code>"/var/run/spamd.pid"</code></td>
</tr>
<tr>
<td><code>node['onddo-spamassassin']['spamd']['nice']</code></td>
<td>SpamAssassin daemon nice scheduling priority</td>
<td><code>nil</code></td>
</tr>
<tr>
<td><code>node['onddo-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['onddo-spamassassin']['conf']['report_safe']</code></td>
<td>SpamAssassin report_safe enabler flag</td>
<td><code>true</code></td>
</tr>
<tr>
<td><code>node['onddo-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['onddo-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['onddo-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['onddo-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['onddo-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['onddo-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['onddo-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['onddo-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:

node.default['onddo-spamassassin']['conf']['required_score'] = 4 # is set to 5 by default
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-2014 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.

CHANGELOG for onddo-spamassassin

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

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

0.1.0 (2013-06-09)

  • Initial release of onddo-spamassassin.

Foodcritic Metric
            

0.2.0 failed this metric

FC048: Prefer Mixlib::ShellOut: /tmp/cook/51082ec4c2990374cfa9ade8/onddo-spamassassin/templates/default/sysconfig_spamassassin.erb:5