-
Notifications
You must be signed in to change notification settings - Fork 20
/
metadata.rb
253 lines (222 loc) · 8.47 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# encoding: UTF-8
#
# Cookbook Name:: postfix-dovecot
# Author:: Xabier de Zuazo (<xabier@zuazo.org>)
# 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 'postfix-dovecot'
maintainer 'Xabier de Zuazo'
maintainer_email 'xabier@zuazo.org'
license 'Apache 2.0'
description 'Installs and configures a mail server using Postfix, Dovecot, '\
'PostfixAdmin and SpamAssassin, including Amazon SES support.'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.1.0' # WiP
if respond_to?(:source_url)
source_url "https://github.com/zuazo/#{name}-cookbook"
end
if respond_to?(:issues_url)
issues_url "https://github.com/zuazo/#{name}-cookbook/issues"
end
chef_version '>= 12.5' if respond_to?(:chef_version)
supports 'amazon'
supports 'centos', '>= 6.0'
supports 'debian', '>= 7.0'
supports 'fedora', '>= 17.0'
supports 'ubuntu', '>= 12.04'
recipe 'postfix-dovecot::default', 'Installs and configures everything.'
recipe 'postfix-dovecot::vmail', 'Creates vmail user.'
recipe 'postfix-dovecot::spam', 'Installs and configures SpamAssassin.'
recipe 'postfix-dovecot::postfix', 'Installs and configures Postfix.'
recipe 'postfix-dovecot::postfix_mysql',
'Installs Postfix package with MySQL support.'
recipe 'postfix-dovecot::postfix_postgresql',
'Installs Postfix package with PostgreSQL support.'
recipe 'postfix-dovecot::postfixadmin', 'Installs and configures PostfixAdmin.'
recipe 'postfix-dovecot::dovecot', 'Installs and configures Dovecot 2.'
depends 'chef-vault', '~> 2.0'
depends 'build-essential', '~> 8.0'
depends 'dovecot', '~> 3.0'
depends 'onddo-spamassassin', '~> 2.0'
depends 'postfixadmin', '~> 3.0'
depends 'postfix-full', '~> 0.1'
depends 'ssl_certificate', '~> 2.0'
depends 'yum', '~> 5.0'
attribute 'postfix-dovecot/postmaster_address',
display_name: 'postmaster address',
description: 'Postmaster mail address.',
type: 'string',
required: 'recommended',
default: 'postmaster@foo.bar'
attribute 'postfix-dovecot/rbls',
display_name: 'postfix rbls',
description: 'Mail RBLs array.',
type: 'array',
required: 'recommended',
default: []
attribute 'postfix-dovecot/hostname',
display_name: 'hostname',
description: 'Hostname.',
type: 'string',
required: 'recommended',
calculated: true
attribute 'postfix-dovecot/database/type',
display_name: 'postfix database type',
description: 'Postfix database type.',
choice: %w(mysql postgresql),
type: 'string',
required: 'optional',
default: 'mysql'
attribute 'postfix-dovecot/sieve/enabled',
display_name: 'sieve enabled',
description: 'Whether to enable sieve.',
type: 'string',
choice: %w(true false),
required: 'recommended',
default: 'true'
attribute 'postfix-dovecot/sieve/global_path',
display_name: 'sieve global_path',
description: 'Sieve global path.',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/spamc/enabled',
display_name: 'spamc enabled',
description: 'Whether to enable SpamAssassin.',
type: 'string',
choice: %w(true false),
required: 'optional',
default: 'true'
attribute 'postfix-dovecot/spamc/recipe',
display_name: 'spamc recipe',
description: 'Spamc recipe name to use.',
type: 'string',
required: 'optional',
default: 'onddo-spamassassin'
attribute 'postfix-dovecot/vmail/user',
display_name: 'vmail user',
description: 'Virtual mail system user name.',
type: 'string',
required: 'optional',
default: 'vmail'
attribute 'postfix-dovecot/vmail/group',
display_name: 'vmail group',
description: 'Virtual mail system group name.',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/vmail/uid',
display_name: 'vmail uid',
description: 'Virtual mail system user id.',
type: 'string',
required: 'optional',
default: '5000'
attribute 'postfix-dovecot/vmail/gid',
display_name: 'vmail gid',
description: 'Virtual mail system group id.',
type: 'string',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/vmail/home',
display_name: 'vmail home',
description: 'Virtual mail user home path.',
type: 'string',
required: 'optional',
default: '/var/vmail'
attribute 'postfix-dovecot/ses/enabled',
display_name: 'ses enabled',
description: 'Whether to enable Amazon SES.',
type: 'string',
choice: %w(true false),
required: 'recommended',
default: 'false'
attribute 'postfix-dovecot/ses/source',
display_name: 'ses credentials source',
description: 'Where to read the credentials from.',
type: 'string',
choice: %w(attributes chef-vault),
required: 'recommended',
default: 'attributes'
attribute 'postfix-dovecot/ses/vault',
display_name: 'ses credentials vault',
description: 'Chef Vault bag to read SES credentials from.',
type: 'string',
required: 'recommended',
default: 'amazon'
attribute 'postfix-dovecot/ses/item',
display_name: 'ses credentials vault item',
description: 'Chef Vault item.',
type: 'string',
required: 'recommended',
default: 'ses'
attribute 'postfix-dovecot/ses/region',
display_name: 'ses region',
description: 'Amazon AWS region, used to calculate the servers.',
type: 'string',
required: 'optional',
default: 'us-east-1'
attribute 'postfix-dovecot/ses/servers',
display_name: 'ses servers',
description: 'Amazon SES SMTP servers.',
type: 'array',
required: 'optional',
default: %w(
email-smtp.us-east-1.amazonaws.com:25
ses-smtp-prod-335357831.us-east-1.elb.amazonaws.com:25
)
attribute 'postfix-dovecot/ses/username',
display_name: 'ses username',
description: 'Amazon SES SMTP username.',
type: 'string',
required: 'recommended',
default: 'USERNAME'
attribute 'postfix-dovecot/ses/password',
display_name: 'ses password',
description: 'Amazon SES SMTP password.',
type: 'string',
required: 'recommended',
default: 'PASSWORD'
attribute 'postfix-dovecot/yum',
display_name: 'yum repositories',
description:
'A list of yum repositories to add to include the source SRPMs.',
type: 'hash',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/srpm/packages',
display_name: 'srpm packages',
description: 'Packages required for compiling Postfix from sources.',
type: 'array',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/srpm/rpm_regexp',
display_name: 'srpm rpm regexp',
description:
'An array with two values, a pattern and a replacement. This'\
'Regexp is used to get the final Postfix RPM name from the SRPM '\
'name.',
type: 'array',
required: 'optional',
calculated: true
attribute 'postfix-dovecot/srpm/rpm_regexp',
display_name: 'srpm rpm regexp',
description:
'A string with the arguments to pass to rpmbuild application. '\
'Normally contains the required option to enable PostgreSQL in '\
'the Postfix SRPM.',
type: 'hash',
required: 'optional',
calculated: true