{"id":21745158,"url":"https://github.com/zuazo/spamassassin-cookbook","last_synced_at":"2025-07-03T15:35:50.519Z","repository":{"id":8832649,"uuid":"10535041","full_name":"zuazo/spamassassin-cookbook","owner":"zuazo","description":"Chef cookbook to install and configure SpamAssassin.","archived":false,"fork":false,"pushed_at":"2017-09-16T04:04:48.000Z","size":100,"stargazers_count":3,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T05:12:33.718Z","etag":null,"topics":["antispam","bayes-classifier","bayesian-filter","chef","cookbook","devops","mail-server","mta","spamassassin"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/onddo-spamassassin","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zuazo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-06T19:47:41.000Z","updated_at":"2017-03-12T19:21:48.000Z","dependencies_parsed_at":"2022-09-07T17:02:02.692Z","dependency_job_id":null,"html_url":"https://github.com/zuazo/spamassassin-cookbook","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/zuazo/spamassassin-cookbook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fspamassassin-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fspamassassin-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fspamassassin-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fspamassassin-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zuazo","download_url":"https://codeload.github.com/zuazo/spamassassin-cookbook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zuazo%2Fspamassassin-cookbook/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263350914,"owners_count":23453360,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antispam","bayes-classifier","bayesian-filter","chef","cookbook","devops","mail-server","mta","spamassassin"],"created_at":"2024-11-26T07:13:47.341Z","updated_at":"2025-07-03T15:35:50.498Z","avatar_url":"https://github.com/zuazo.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"SpamAssassin Cookbook\n=====================\n[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg?style=flat)](http://www.rubydoc.info/github/zuazo/spamassassin-cookbook)\n[![GitHub](http://img.shields.io/badge/github-zuazo/spamassassin--cookbook-blue.svg?style=flat)](https://github.com/zuazo/spamassassin-cookbook)\n[![License](https://img.shields.io/github/license/zuazo/spamassassin-cookbook.svg?style=flat)](#license-and-author)\n\n[![Cookbook Version](https://img.shields.io/cookbook/v/onddo-spamassassin.svg?style=flat)](https://supermarket.chef.io/cookbooks/onddo-spamassassin)\n[![Dependency Status](http://img.shields.io/gemnasium/zuazo/spamassassin-cookbook.svg?style=flat)](https://gemnasium.com/zuazo/spamassassin-cookbook)\n[![Code Climate](http://img.shields.io/codeclimate/github/zuazo/spamassassin-cookbook.svg?style=flat)](https://codeclimate.com/github/zuazo/spamassassin-cookbook)\n[![Build Status](http://img.shields.io/travis/zuazo/spamassassin-cookbook.svg?style=flat)](https://travis-ci.org/zuazo/spamassassin-cookbook)\n[![Coverage Status](http://img.shields.io/coveralls/zuazo/spamassassin-cookbook.svg?style=flat)](https://coveralls.io/r/zuazo/spamassassin-cookbook?branch=master)\n[![Inline docs](http://inch-ci.org/github/zuazo/spamassassin-cookbook.svg?branch=master\u0026style=flat)](http://inch-ci.org/github/zuazo/spamassassin-cookbook)\n\n[Chef](https://www.chef.io/) cookbook to install and configure [SpamAssassin](http://spamassassin.apache.org/), a mail filter software to identify spam.\n\nRequirements\n============\n\n## Supported Platforms\n\nThis cookbook has been tested on the following platforms:\n\n* Amazon Linux\n* CentOS\n* Debian\n* Fedora\n* openSUSE\n* Oracle Linux\n* RedHat\n* SUSE\n* Ubuntu\n\nPlease, [let us know](https://github.com/zuazo/spamassassin-cookbook/issues/new?title=I%20have%20used%20it%20successfully%20on%20...) if you use it successfully on any other platform.\n\n## Required Applications\n\n* Chef `12` or higher.\n* Ruby `2.2` or higher.\n\nAttributes\n==========\n\n| Attribute                                              | Default                | Description                    |\n|:-------------------------------------------------------|:-----------------------|:-------------------------------|\n| `node['spamassassin']['spamc']['path']`                | *calculated*           | SpamAssassin client binary path.\n| `node['spamassassin']['spamd']['path']`                | *calculated*           | SpamAssassin daemon binary path.\n| `node['spamassassin']['spamd']['user']`                | `'spamd'`              | SpamAssassin user.\n| `node['spamassassin']['spamd']['group']`               | `'spamd'`              | SpamAssassin group.\n| `node['spamassassin']['spamd']['lib_path']`            | *calculated*           | SpamAssassin library path.\n| `node['spamassassin']['spamd']['enabled']`             | `true`                 | SpamAssassin daemon enabler flag.\n| `node['spamassassin']['spamd']['options']`             | *calculated*           | SpamAssassin daemon option arguments.\n| `node['spamassassin']['spamd']['pidfile']`             | `'/var/run/spamd.pid'` | SpamAssassin daemon pid file.\n| `node['spamassassin']['spamd']['nice']`                | `nil`                  | SpamAssassin daemon nice scheduling priority.\n| `node['spamassassin']['conf']['rewrite_headers']`      | *calculated*           | An array of rewrite headers.\n| `node['spamassassin']['conf']['report_safe']`          | `true`                 | SpamAssassin report_safe enabler flag.\n| `node['spamassassin']['conf']['trusted_networks']`     | `nil`                  | Network or hosts that are considered trusted.\n| `node['spamassassin']['conf']['lock_method']`          | `'flock'`              | File-locking method used to protect database files on-disk.\n| `node['spamassassin']['conf']['required_score']`       | `5`                    | Score required before a mail is considered spam.\n| `node['spamassassin']['conf']['use_bayes']`            | `true`                 | Whether to use the naive-Bayesian-style classifier.\n| `node['spamassassin']['conf']['bayes_auto_learn']`     | `true`                 | Whether SpamAssassin should automatically feed high-scoring mail.\n| `node['spamassassin']['conf']['bayes_ignore_headers']` | `[]`                   | Headers ignored by the naive-Bayesian-style classifier.\n| `node['spamassassin']['conf']['plugins']`              | `[]`                   | A hash to configure SpamAssassin plugins ([see the example below](#plugin-example)).\n| `node['spamassassin']['conf']['localrules']`           | `[]`                   | An array to configure local rules at the end of local.conf.\n\n## Plugin Example\n\n```ruby\nnode.default['spamassassin']['conf']['plugins']['shortcircuit'] = [\n  {\n    'USER_IN_WHITELIST' =\u003e 'on',\n    'USER_IN_DEF_WHITELIST' =\u003e 'on',\n    'USER_IN_ALL_SPAM_TO' =\u003e 'on',\n    'SUBJECT_IN_WHITELIST' =\u003e 'on',\n\n    'USER_IN_BLACKLIST' =\u003e 'on',\n    'USER_IN_BLACKLIST_TO' =\u003e 'on',\n    'SUBJECT_IN_BLACKLIST' =\u003e 'on',\n\n    'ALL_TRUSTED' =\u003e 'on',\n\n    'BAYES_99' =\u003e 'spam',\n    'BAYES_00' =\u003e 'ham'\n  }\n]\n```\n\n## Local Rules Example\n\nSay you want to add the following rules to local.cf to blacklist some senders\n\n```\nblacklist_from bad_sender1@example.com\nblacklist_from bad_sender2@example.com\n```\n\n```ruby\nnode.default['spamassassin']['conf']['localrules'] = [\n  'blacklist_from bad_sender1@example.com',\n  'blacklist_from bad_sender2@example.com'\n]\n```\n\nRecipes\n=======\n\n## onddo-spamassassin::default\n\nInstalls SpamAssassin client and Daemon.\n\nUsage Examples\n==============\n\n## Including in a Cookbook Recipe\n\nRunning it from a recipe:\n\n```ruby\n# Required_score is set to 5 by default, change it:\nnode.default['spamassassin']['conf']['required_score'] = 4\ninclude_recipe 'onddo-spamassassin::default' # or include it in your run-list\n```\n\nDon't forget to include the `onddo-spamassassin` cookbook as a dependency in the metadata.\n\n```ruby\n# metadata.rb\n# [...]\n\ndepends 'onddo-spamassassin'\n```\n\n## Including in the Run List\n\nAnother alternative is to include the default recipe in your *Run List*.\n\n```json\n{\n  \"name\": \"mail.example.com\",\n  \"[...]\": \"[...]\",\n  \"run_list\": [\n    \"recipe[onddo-spamassassin]\"\n  ]\n}\n```\n\nTesting\n=======\n\nSee [TESTING.md](https://github.com/zuazo/spamassassin-cookbook/blob/master/TESTING.md).\n\nContributing\n============\n\nPlease do not hesitate to [open an issue](https://github.com/zuazo/spamassassin-cookbook/issues/new) with any questions or problems.\n\nSee [CONTRIBUTING.md](https://github.com/zuazo/spamassassin-cookbook/blob/master/CONTRIBUTING.md).\n\nTODO\n====\n\nSee [TODO.md](https://github.com/zuazo/spamassassin-cookbook/blob/master/TODO.md).\n\n\nLicense and Author\n=====================\n\n|                      |                                          |\n|:---------------------|:-----------------------------------------|\n| **Author:**          | [Xabier de Zuazo](https://github.com/zuazo) (\u003cxabier@zuazo.org\u003e)\n| **Copyright:**       | Copyright (c) 2015, Xabier de Zuazo\n| **Copyright:**       | Copyright (c) 2013-2015 Onddo Labs, SL.\n| **License:**         | Apache License, Version 2.0\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n    \n        http://www.apache.org/licenses/LICENSE-2.0\n    \n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuazo%2Fspamassassin-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzuazo%2Fspamassassin-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzuazo%2Fspamassassin-cookbook/lists"}