-
Notifications
You must be signed in to change notification settings - Fork 2
/
metadata.rb
190 lines (167 loc) · 5.95 KB
/
metadata.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
# encoding: UTF-8
#
# Cookbook Name:: onddo-spamassassin
# Author:: Xabier de Zuazo (<[email protected]>)
# 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.
#
name 'onddo-spamassassin'
maintainer 'Xabier de Zuazo'
maintainer_email '[email protected]'
license 'Apache 2.0'
description <<-EOH
Installs and configures SpamAssassin, a mail filter software to identify spam.
EOH
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.1.0' # WiP
if respond_to?(:source_url)
source_url 'https://github.com/zuazo/spamassassin-cookbook'
end
if respond_to?(:issues_url)
issues_url 'https://github.com/zuazo/spamassassin-cookbook/issues'
end
chef_version '>= 12' if respond_to?(:chef_version)
supports 'amazon'
supports 'centos'
supports 'debian'
supports 'fedora'
supports 'opensuse'
supports 'oracle'
supports 'redhat'
supports 'suse'
supports 'ubuntu'
recipe 'onddo-spamassassin::default', 'Installs SpamAssassin client and Daemon'
attribute 'spamassassin/spamc/path',
display_name: 'spamc path',
description: 'SpamAssassin client binary path',
calculated: true,
type: 'string',
required: 'optional'
attribute 'spamassassin/spamd/path',
display_name: 'spamd path',
description: 'SpamAssassin daemon binary path',
calculated: true,
type: 'string',
required: 'optional'
attribute 'spamassassin/spamd/user',
display_name: 'spamd user',
description: 'SpamAssassin user',
type: 'string',
required: 'optional',
default: 'spamd'
attribute 'spamassassin/spamd/group',
display_name: 'spamd group',
description: 'SpamAssassin group',
type: 'string',
required: 'optional',
default: 'spamd'
attribute 'spamassassin/spamd/lib_path',
display_name: 'spamd group',
description: 'SpamAssassin group',
calculated: true,
type: 'string',
required: 'optional'
attribute 'spamassassin/spamd/enabled',
display_name: 'spamd enabled',
description: 'SpamAssassin daemon enabler flag',
choice: %w(true false),
type: 'string',
required: 'optional',
default: true
attribute 'spamassassin/spamd/options',
display_name: 'spamd options',
description: 'SpamAssassin daemon option arguments',
type: 'array',
required: 'optional',
default: [
'--create-prefs',
'--max-children 5',
'--helper-home-dir'
]
attribute 'spamassassin/spamd/pidfile',
display_name: 'spamd pidfile',
description: 'SpamAssassin daemon pid file',
type: 'string',
required: 'optional',
default: '/var/run/spamd.pid'
attribute 'spamassassin/spamd/nice',
display_name: 'spamd nice',
description: 'SpamAssassin daemon nice scheduling priority',
type: 'string',
required: 'optional',
default: 'nil'
attribute 'spamassassin/conf/rewrite_headers',
display_name: 'spam rewrite_headers',
description: 'An array of rewrite headers',
type: 'array',
required: 'recommended',
default: [
'Subject' => '[SPAM]'
]
attribute 'spamassassin/conf/report_safe',
display_name: 'Report safe enabled',
description: 'SpamAssassin report_safe enabler flag',
choice: %w(true false 0 1 2),
type: 'string',
required: 'optional',
default: true
attribute 'spamassassin/conf/trusted_networks',
display_name: 'Trusted networks',
description: 'Network or hosts that are considered trusted',
type: 'string',
required: 'optional',
default: 'nil'
attribute 'spamassassin/conf/lock_method',
display_name: 'File-lock method',
description:
'File-locking method used to protect database files on-disk',
choice: %w(nfssafe flock win32),
type: 'string',
required: 'optional',
default: 'flock'
attribute 'spamassassin/conf/required_score',
display_name: 'Required score',
description: 'Score required before a mail is considered spam',
type: 'string',
required: 'recommended',
default: '5'
attribute 'spamassassin/conf/use_bayes',
display_name: 'Use bayes',
description: 'Whether to use the naive-Bayesian-style classifier',
choice: %w(true false),
type: 'string',
required: 'optional',
default: true
attribute 'spamassassin/conf/bayes_auto_learn',
display_name: 'Use bayes',
description:
'Whether SpamAssassin should automatically feed high-scoring mail',
choice: %w(true false),
type: 'string',
required: 'optional',
default: true
attribute 'spamassassin/conf/bayes_ignore_headers',
display_name: 'Bayes ignore headers',
description:
'Headers ignored by the naive-Bayesian-style classifier',
type: 'array',
required: 'optional',
default: []
attribute 'spamassassin/conf/plugins',
display_name: 'plugins',
description: 'A hash to configure SpamAssassin plugins',
type: 'array',
required: 'optional',
default: []