Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -2,6 +2,11 @@ postfix Cookbook CHANGELOG
|
||||
==========================
|
||||
This file is used to list changes made in each version of the postfix cookbook.
|
||||
|
||||
v3.7.0 (2015-04-30)
|
||||
-------------------
|
||||
- Adding support for relay restrictions
|
||||
- Update chefspec and serverspec tests
|
||||
|
||||
v3.6.2 (2014-10-31)
|
||||
-------------------
|
||||
- Fix FreeBSDisms
|
||||
@@ -71,47 +76,47 @@ v3.1.4 (2014-02-27)
|
||||
v3.1.2 (2014-02-19)
|
||||
-------------------
|
||||
### Bug
|
||||
- **[COOK-4357](https://tickets.opscode.com/browse/COOK-4357)** - postfix::sasl_auth recipe fails to converge
|
||||
- **[COOK-4357](https://tickets.chef.io/browse/COOK-4357)** - postfix::sasl_auth recipe fails to converge
|
||||
|
||||
|
||||
v3.1.0 (2014-02-19)
|
||||
-------------------
|
||||
### Bug
|
||||
- **[COOK-4322](https://tickets.opscode.com/browse/COOK-4322)** - Postfix cookbook has incorrect default path for sasl_passwd
|
||||
- **[COOK-4322](https://tickets.chef.io/browse/COOK-4322)** - Postfix cookbook has incorrect default path for sasl_passwd
|
||||
|
||||
### New Feature
|
||||
- **[COOK-4086](https://tickets.opscode.com/browse/COOK-4086)** - use conf_dir attribute for sasl recipe, and add omnios support
|
||||
- **[COOK-2551](https://tickets.opscode.com/browse/COOK-2551)** - Support creating the sender_canonical map file
|
||||
- **[COOK-4086](https://tickets.chef.io/browse/COOK-4086)** - use conf_dir attribute for sasl recipe, and add omnios support
|
||||
- **[COOK-2551](https://tickets.chef.io/browse/COOK-2551)** - Support creating the sender_canonical map file
|
||||
|
||||
|
||||
v3.0.4
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3824](https://tickets.opscode.com/browse/COOK-3824)** - main.cf.erb mishandles lists
|
||||
- **[COOK-3824](https://tickets.chef.io/browse/COOK-3824)** - main.cf.erb mishandles lists
|
||||
|
||||
### Improvement
|
||||
- **[COOK-3822](https://tickets.opscode.com/browse/COOK-3822)** - postfix cookbook readme has an incorrect example
|
||||
- **[COOK-3822](https://tickets.chef.io/browse/COOK-3822)** - postfix cookbook readme has an incorrect example
|
||||
- Got rubocop errors down to 32
|
||||
|
||||
### New Feature
|
||||
- **[COOK-2551](https://tickets.opscode.com/browse/COOK-2551)** - Support creating the sender_canonical map file
|
||||
- **[COOK-2551](https://tickets.chef.io/browse/COOK-2551)** - Support creating the sender_canonical map file
|
||||
|
||||
|
||||
v3.0.2
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3617](https://tickets.opscode.com/browse/COOK-3617)** - Fix error when no there is no FQDN
|
||||
- **[COOK-3530](https://tickets.opscode.com/browse/COOK-3530)** - Update `client.rb` after 3.0.0 refactor
|
||||
- **[COOK-2499](https://tickets.opscode.com/browse/COOK-2499)** - Do not use resource cloning
|
||||
- **[COOK-3617](https://tickets.chef.io/browse/COOK-3617)** - Fix error when no there is no FQDN
|
||||
- **[COOK-3530](https://tickets.chef.io/browse/COOK-3530)** - Update `client.rb` after 3.0.0 refactor
|
||||
- **[COOK-2499](https://tickets.chef.io/browse/COOK-2499)** - Do not use resource cloning
|
||||
|
||||
### Improvement
|
||||
- **[COOK-3116](https://tickets.opscode.com/browse/COOK-3116)** - Add SmartOS support
|
||||
- **[COOK-3116](https://tickets.chef.io/browse/COOK-3116)** - Add SmartOS support
|
||||
|
||||
|
||||
v3.0.0
|
||||
------
|
||||
### Improvement
|
||||
- **[COOK-3328](https://tickets.opscode.com/browse/COOK-3328)** - Postfix main/master and attributes refactor
|
||||
- **[COOK-3328](https://tickets.chef.io/browse/COOK-3328)** - Postfix main/master and attributes refactor
|
||||
|
||||
**Breaking changes**:
|
||||
- Attributes are namespaced as `node['postfix']`, `node['postfix']['main']`, and `node['postfix']['master']`.
|
||||
|
||||
@@ -29,6 +29,7 @@ See `attributes/default.rb` for default values.
|
||||
* `node['postfix']['use_transport_maps']` - set to true if you want the cookbook to use/configure transport maps
|
||||
* `node['postfix']['use_access_maps']` - set to true if you want the cookbook to use/configure access maps
|
||||
* `node['postfix']['use_virtual_aliases']` - set to true if you want the cookbook to use/configure virtual alias maps
|
||||
* `node['postfix']['use_relay_restrictions_maps']` - set to true if you want the cookbook to use/configure a list of domains to which postfix will allow relay
|
||||
* `node['postfix']['aliases']` - hash of aliases to create with `recipe[postfix::aliases]`, see below under __Recipes__ for more information.
|
||||
* `node['postfix']['transports']` - hash of transports to create with `recipe[postfix::transports]`, see below under __Recipes__ for more information.
|
||||
* `node['postfix']['access']` - hash of access to create with `recipe[postfix::access]`, see below under __Recipes__ for more information.
|
||||
@@ -121,8 +122,12 @@ Manage `/etc/postfix/access` with this recipe.
|
||||
### virtual_aliases
|
||||
Manage `/etc/postfix/virtual` with this recipe.
|
||||
|
||||
### relay_restrictions
|
||||
Manage `/etc/postfix/relay_restriction` with this recipe
|
||||
The postfix option smtpd_relay_restrictions in main.cf will point to this hash map db.
|
||||
|
||||
http://wiki.opscode.com/display/chef/Templates#Templates-TemplateLocationSpecificity
|
||||
|
||||
http://wiki.chef.io/display/chef/Templates#Templates-TemplateLocationSpecificity
|
||||
|
||||
|
||||
Usage
|
||||
@@ -268,9 +273,24 @@ override_attributes(
|
||||
)
|
||||
```
|
||||
|
||||
To use relay restrictions override the relay restrictions attribute in this format:
|
||||
|
||||
```ruby
|
||||
override_attributes(
|
||||
"postfix" => {
|
||||
"use_relay_restrictions_maps" => true,
|
||||
"relay_restrictions" => {
|
||||
"chef.io" => "OK",
|
||||
".chef.io" => "OK",
|
||||
"example.com" => "OK"
|
||||
}
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
License & Authors
|
||||
-----------------
|
||||
- Author:: Joshua Timberman <joshua@getchef.com>
|
||||
- Author:: Joshua Timberman <joshua@chef.io>
|
||||
|
||||
```text
|
||||
Copyright:: 2009-2014, Chef Software, Inc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Author:: Joshua Timberman <joshua@getchef.com>
|
||||
# Author:: Joshua Timberman <joshua@chef.io>
|
||||
# Copyright:: Copyright 2009-2014, Chef Software, Inc.
|
||||
# License:: Apache License, Version 2.0
|
||||
#
|
||||
@@ -25,6 +25,7 @@ default['postfix']['use_transport_maps'] = false
|
||||
default['postfix']['use_access_maps'] = false
|
||||
default['postfix']['use_virtual_aliases'] = false
|
||||
default['postfix']['use_virtual_aliases_domains'] = false
|
||||
default['postfix']['use_relay_restirictions_maps'] = false
|
||||
default['postfix']['transports'] = {}
|
||||
default['postfix']['access'] = {}
|
||||
default['postfix']['virtual_aliases'] = {}
|
||||
@@ -47,6 +48,7 @@ when 'smartos'
|
||||
default['postfix']['access_db'] = '/opt/local/etc/postfix/access'
|
||||
default['postfix']['virtual_alias_db'] = '/opt/local/etc/postfix/virtual'
|
||||
default['postfix']['virtual_alias_domains_db'] = '/opt/local/etc/postfix/virtual_domains'
|
||||
default['postfix']['relay_restrictions_db'] = '/opt/local/etc/postfix/relay_restrictions'
|
||||
when 'freebsd'
|
||||
default['postfix']['conf_dir'] = '/usr/local/etc/postfix'
|
||||
default['postfix']['aliases_db'] = '/etc/aliases'
|
||||
@@ -54,6 +56,7 @@ when 'freebsd'
|
||||
default['postfix']['access_db'] = '/usr/local/etc/postfix/access'
|
||||
default['postfix']['virtual_alias_db'] = '/usr/local/etc/postfix/virtual'
|
||||
default['postfix']['virtual_alias_domains_db'] = '/usr/local/etc/postfix/virtual_domains'
|
||||
default['postfix']['relay_restrictions_db'] = '/etc/postfix/relay_restrictions'
|
||||
when 'omnios'
|
||||
default['postfix']['conf_dir'] = '/opt/omni/etc/postfix'
|
||||
default['postfix']['aliases_db'] = '/opt/omni/etc/postfix/aliases'
|
||||
@@ -61,6 +64,7 @@ when 'omnios'
|
||||
default['postfix']['access_db'] = '/opt/omni/etc/postfix/access'
|
||||
default['postfix']['virtual_alias_db'] = '/etc/omni/etc/postfix/virtual'
|
||||
default['postfix']['virtual_alias_domains_db'] = '/etc/omni/etc/postfix/virtual_domains'
|
||||
default['postfix']['relay_restrictions_db'] = '/opt/omni/etc/postfix/relay_restrictions'
|
||||
default['postfix']['uid'] = 11
|
||||
else
|
||||
default['postfix']['conf_dir'] = '/etc/postfix'
|
||||
@@ -69,6 +73,7 @@ else
|
||||
default['postfix']['access_db'] = '/etc/postfix/access'
|
||||
default['postfix']['virtual_alias_db'] = '/etc/postfix/virtual'
|
||||
default['postfix']['virtual_alias_domains_db'] = '/etc/postfix/virtual_domains'
|
||||
default['postfix']['relay_restrictions_db'] = '/etc/postfix/relay_restrictions'
|
||||
end
|
||||
|
||||
# Non-default main.cf attributes
|
||||
@@ -87,6 +92,8 @@ default['postfix']['main']['inet_interfaces'] = 'loopback-only'
|
||||
|
||||
# Conditional attributes, also reference _attributes recipe
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
default['postfix']['cafile'] = '/etc/ssl/certs/ca-certificates.crt'
|
||||
when 'smartos'
|
||||
default['postfix']['main']['smtpd_use_tls'] = 'no'
|
||||
default['postfix']['main']['smtp_use_tls'] = 'no'
|
||||
@@ -113,7 +120,6 @@ end
|
||||
# Master.cf attributes
|
||||
default['postfix']['master']['submission'] = false
|
||||
|
||||
|
||||
# OS Aliases
|
||||
case node['platform']
|
||||
when 'freebsd'
|
||||
@@ -135,3 +141,8 @@ when 'freebsd'
|
||||
else
|
||||
default['postfix']['aliases'] = {}
|
||||
end
|
||||
|
||||
if node['postfix']['use_relay_restirictions_maps']
|
||||
default['postfix']['main']['smtpd_relay_restrictions'] = "hash:#{node['postfix']['relay_restrictions_db']}, reject"
|
||||
end
|
||||
|
||||
|
||||
@@ -1,89 +1 @@
|
||||
{
|
||||
"name": "postfix",
|
||||
"version": "3.6.2",
|
||||
"description": "Installs and configures postfix for client or outbound relayhost, or to do SASL auth",
|
||||
"long_description": "",
|
||||
"maintainer": "Chef Software, Inc.",
|
||||
"maintainer_email": "cookbooks@getchef.com",
|
||||
"license": "Apache 2.0",
|
||||
"platforms": {
|
||||
"ubuntu": ">= 0.0.0",
|
||||
"debian": ">= 0.0.0",
|
||||
"redhat": ">= 0.0.0",
|
||||
"centos": ">= 0.0.0",
|
||||
"amazon": ">= 0.0.0",
|
||||
"scientific": ">= 0.0.0",
|
||||
"smartos": ">= 0.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
},
|
||||
"recommendations": {
|
||||
},
|
||||
"suggestions": {
|
||||
},
|
||||
"conflicting": {
|
||||
},
|
||||
"providing": {
|
||||
},
|
||||
"replacing": {
|
||||
},
|
||||
"attributes": {
|
||||
"postfix/main": {
|
||||
"display_name": "postfix/main",
|
||||
"description": "Hash of Postfix main.cf attributes",
|
||||
"type": "hash"
|
||||
},
|
||||
"postfix/aliases": {
|
||||
"display_name": "Postfix Aliases",
|
||||
"description": "Hash of Postfix aliases mapping a name to a value. Example 'root' => 'operator@example.com'. See aliases man page for details.",
|
||||
"type": "hash"
|
||||
},
|
||||
"postfix/transports": {
|
||||
"display_name": "Postfix Transports",
|
||||
"description": "Hash of Postfix transports mapping a destination to a smtp server. Example 'my.domain' => 'smtp:outbound-relay.my.domain'. See transport man page for details.",
|
||||
"type": "hash"
|
||||
},
|
||||
"postfix/access": {
|
||||
"display_name": "Postfix Access Table",
|
||||
"description": "Hash of Postfix accesses mapping a pattern to a action. Example 'domain.tld' => 'OK'. See access man page for details.",
|
||||
"type": "hash"
|
||||
},
|
||||
"postfix/mail_type": {
|
||||
"display_name": "Postfix Mail Type",
|
||||
"description": "Is this node a client or server?",
|
||||
"default": "client"
|
||||
},
|
||||
"postfix/smtp_sasl_user_name": {
|
||||
"display_name": "Postfix SMTP SASL Username",
|
||||
"description": "User to auth SMTP via SASL",
|
||||
"default": ""
|
||||
},
|
||||
"postfix/smtp_sasl_passwd": {
|
||||
"display_name": "Postfix SMTP SASL Password",
|
||||
"description": "Password for smtp_sasl_user_name",
|
||||
"default": ""
|
||||
},
|
||||
"postfix/relayhost_role": {
|
||||
"display_name": "Postfix Relayhost's role",
|
||||
"description": "String containing the role name",
|
||||
"default": "relayhost"
|
||||
},
|
||||
"postfix/use_procmail": {
|
||||
"display_name": "Postfix Use procmail?",
|
||||
"description": "Whether procmail should be used as the local delivery agent for a server",
|
||||
"default": "no"
|
||||
}
|
||||
},
|
||||
"groupings": {
|
||||
},
|
||||
"recipes": {
|
||||
"postfix": "Installs and configures postfix",
|
||||
"postfix::sasl_auth": "Set up postfix to auth to a server with sasl",
|
||||
"postfix::aliases": "Manages /etc/aliases",
|
||||
"postfix::transports": "Manages /etc/postfix/transport",
|
||||
"postfix::access": "Manages /etc/postfix/access",
|
||||
"postfix::virtual_aliases": "Manages /etc/postfix/virtual",
|
||||
"postfix::client": "Searches for the relayhost based on an attribute",
|
||||
"postfix::server": "Sets the mail_type attribute to master"
|
||||
}
|
||||
}
|
||||
{"name":"postfix","version":"3.7.0","description":"Installs and configures postfix for client or outbound relayhost, or to do SASL auth","long_description":"","maintainer":"Chef Software, Inc.","maintainer_email":"cookbooks@chef.io","license":"Apache 2.0","platforms":{"ubuntu":">= 0.0.0","debian":">= 0.0.0","redhat":">= 0.0.0","centos":">= 0.0.0","amazon":">= 0.0.0","scientific":">= 0.0.0","smartos":">= 0.0.0"},"dependencies":{},"recommendations":{},"suggestions":{},"conflicting":{},"providing":{},"replacing":{},"attributes":{"postfix/main":{"display_name":"postfix/main","description":"Hash of Postfix main.cf attributes","type":"hash"},"postfix/aliases":{"display_name":"Postfix Aliases","description":"Hash of Postfix aliases mapping a name to a value. Example 'root' => 'operator@example.com'. See aliases man page for details.","type":"hash"},"postfix/transports":{"display_name":"Postfix Transports","description":"Hash of Postfix transports mapping a destination to a smtp server. Example 'my.domain' => 'smtp:outbound-relay.my.domain'. See transport man page for details.","type":"hash"},"postfix/access":{"display_name":"Postfix Access Table","description":"Hash of Postfix accesses mapping a pattern to a action. Example 'domain.tld' => 'OK'. See access man page for details.","type":"hash"},"postfix/mail_type":{"display_name":"Postfix Mail Type","description":"Is this node a client or server?","default":"client"},"postfix/smtp_sasl_user_name":{"display_name":"Postfix SMTP SASL Username","description":"User to auth SMTP via SASL","default":""},"postfix/smtp_sasl_passwd":{"display_name":"Postfix SMTP SASL Password","description":"Password for smtp_sasl_user_name","default":""},"postfix/relayhost_role":{"display_name":"Postfix Relayhost's role","description":"String containing the role name","default":"relayhost"},"postfix/use_procmail":{"display_name":"Postfix Use procmail?","description":"Whether procmail should be used as the local delivery agent for a server","default":"no"}},"groupings":{},"recipes":{"postfix":"Installs and configures postfix","postfix::sasl_auth":"Set up postfix to auth to a server with sasl","postfix::aliases":"Manages /etc/aliases","postfix::transports":"Manages /etc/postfix/transport","postfix::access":"Manages /etc/postfix/access","postfix::virtual_aliases":"Manages /etc/postfix/virtual","postfix::client":"Searches for the relayhost based on an attribute","postfix::server":"Sets the mail_type attribute to master"},"source_url":"https://github.com/opscode-cookbooks/postfix","issues_url":"https://github.com/opscode-cookbooks/postfix/issues"}
|
||||
@@ -1,64 +0,0 @@
|
||||
# encoding: utf-8
|
||||
name 'postfix'
|
||||
description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth'
|
||||
maintainer 'Chef Software, Inc.'
|
||||
maintainer_email 'cookbooks@getchef.com'
|
||||
license 'Apache 2.0'
|
||||
version '3.6.2'
|
||||
recipe 'postfix', 'Installs and configures postfix'
|
||||
recipe 'postfix::sasl_auth', 'Set up postfix to auth to a server with sasl'
|
||||
recipe 'postfix::aliases', 'Manages /etc/aliases'
|
||||
recipe 'postfix::transports', 'Manages /etc/postfix/transport'
|
||||
recipe 'postfix::access', 'Manages /etc/postfix/access'
|
||||
recipe 'postfix::virtual_aliases', 'Manages /etc/postfix/virtual'
|
||||
recipe 'postfix::client', 'Searches for the relayhost based on an attribute'
|
||||
recipe 'postfix::server', 'Sets the mail_type attribute to master'
|
||||
|
||||
%w(ubuntu debian redhat centos amazon scientific smartos).each do |os|
|
||||
supports os
|
||||
end
|
||||
|
||||
attribute 'postfix/main',
|
||||
display_name: 'postfix/main',
|
||||
description: 'Hash of Postfix main.cf attributes',
|
||||
type: 'hash'
|
||||
|
||||
attribute 'postfix/aliases',
|
||||
display_name: 'Postfix Aliases',
|
||||
description: "Hash of Postfix aliases mapping a name to a value. Example 'root' => 'operator@example.com'. See aliases man page for details.",
|
||||
type: 'hash'
|
||||
|
||||
attribute 'postfix/transports',
|
||||
display_name: 'Postfix Transports',
|
||||
description: "Hash of Postfix transports mapping a destination to a smtp server. Example 'my.domain' => 'smtp:outbound-relay.my.domain'. See transport man page for details.",
|
||||
type: 'hash'
|
||||
|
||||
attribute 'postfix/access',
|
||||
display_name: 'Postfix Access Table',
|
||||
description: "Hash of Postfix accesses mapping a pattern to a action. Example 'domain.tld' => 'OK'. See access man page for details.",
|
||||
type: 'hash'
|
||||
|
||||
attribute 'postfix/mail_type',
|
||||
display_name: 'Postfix Mail Type',
|
||||
description: 'Is this node a client or server?',
|
||||
default: 'client'
|
||||
|
||||
attribute 'postfix/smtp_sasl_user_name',
|
||||
display_name: 'Postfix SMTP SASL Username',
|
||||
description: 'User to auth SMTP via SASL',
|
||||
default: ''
|
||||
|
||||
attribute 'postfix/smtp_sasl_passwd',
|
||||
display_name: 'Postfix SMTP SASL Password',
|
||||
description: 'Password for smtp_sasl_user_name',
|
||||
default: ''
|
||||
|
||||
attribute 'postfix/relayhost_role',
|
||||
display_name: "Postfix Relayhost's role",
|
||||
description: 'String containing the role name',
|
||||
default: 'relayhost'
|
||||
|
||||
attribute 'postfix/use_procmail',
|
||||
display_name: 'Postfix Use procmail?',
|
||||
description: 'Whether procmail should be used as the local delivery agent for a server',
|
||||
default: 'no'
|
||||
@@ -40,15 +40,15 @@ if node['postfix']['main']['smtp_sasl_auth_enable'] == 'yes'
|
||||
end
|
||||
|
||||
if node['postfix']['use_alias_maps']
|
||||
node.default['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"]
|
||||
node.default['postfix']['main']['alias_maps'] = ["hash:#{node['postfix']['aliases_db']}"]
|
||||
end
|
||||
|
||||
if node['postfix']['use_transport_maps']
|
||||
node.default['postfix']['main']['transport_maps'] = ["hash:#{node['postfix']['transport_db']}"]
|
||||
node.default['postfix']['main']['transport_maps'] = ["hash:#{node['postfix']['transport_db']}"]
|
||||
end
|
||||
|
||||
if node['postfix']['use_access_maps']
|
||||
node.default['postfix']['main']['access_maps'] = ["hash:#{node['postfix']['access_db']}"]
|
||||
node.default['postfix']['main']['access_maps'] = ["hash:#{node['postfix']['access_db']}"]
|
||||
end
|
||||
|
||||
if node['postfix']['use_virtual_aliases']
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Author:: Joshua Timberman(<joshua@getchef.com>)
|
||||
# Author:: Joshua Timberman(<joshua@chef.io>)
|
||||
# Cookbook Name:: common
|
||||
# Recipe:: default
|
||||
#
|
||||
@@ -110,7 +110,7 @@ unless node['postfix']['smtp_generic_map_entries'].empty?
|
||||
end
|
||||
end
|
||||
|
||||
%w{main master}.each do |cfg|
|
||||
%w( main master ).each do |cfg|
|
||||
template "#{node['postfix']['conf_dir']}/#{cfg}.cf" do
|
||||
source "#{cfg}.cf.erb"
|
||||
owner 'root'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: Copyright (c) 2012, Opscode, Inc.
|
||||
# Copyright:: Copyright (c) 2012, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Author:: Joshua Timberman(<joshua@getchef.com>)
|
||||
# Author:: Joshua Timberman(<joshua@chef.io>)
|
||||
# Cookbook Name:: postfix
|
||||
# Recipe:: client
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Author:: Joshua Timberman(<joshua@getchef.com>)
|
||||
# Author:: Joshua Timberman(<joshua@chef.io>)
|
||||
# Cookbook Name:: postfix
|
||||
# Recipe:: default
|
||||
#
|
||||
@@ -43,3 +43,8 @@ end
|
||||
if node['postfix']['use_virtual_aliases_domains']
|
||||
include_recipe 'postfix::virtual_aliases_domains'
|
||||
end
|
||||
|
||||
if node['postfix']['use_relay_restrictions_maps']
|
||||
include_recipe 'postfix::relay_restrictions'
|
||||
end
|
||||
|
||||
|
||||
29
cookbooks/postfix/recipes/relay_restrictions.rb
Normal file
29
cookbooks/postfix/recipes/relay_restrictions.rb
Normal file
@@ -0,0 +1,29 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: Copyright (c) 2012, Chef Software, Inc.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
include_recipe 'postfix::_common'
|
||||
|
||||
execute 'update-postfix-relay-restrictions' do
|
||||
command "postmap #{node['postfix']['relay_restrictions_db']}"
|
||||
environment PATH: "#{ENV['PATH']}:/opt/omni/bin:/opt/omni/sbin" if platform_family?('omnios')
|
||||
action :nothing
|
||||
end
|
||||
|
||||
template node['postfix']['relay_restrictions_db'] do
|
||||
source 'relay_restrictions.erb'
|
||||
notifies :run, 'execute[update-postfix-relay-restrictions]'
|
||||
end
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Author:: Joshua Timberman(<joshua@getchef.com>)
|
||||
# Author:: Joshua Timberman(<joshua@chef.io>)
|
||||
# Cookbook Name:: postfix
|
||||
# Recipe:: sasl_auth
|
||||
#
|
||||
@@ -49,6 +49,7 @@ execute 'postmap-sasl_passwd' do
|
||||
end
|
||||
|
||||
template node['postfix']['sasl_password_file'] do
|
||||
sensitive true
|
||||
source 'sasl_passwd.erb'
|
||||
owner 'root'
|
||||
group node['root_group']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# encoding: utf-8
|
||||
#
|
||||
# Author:: Joshua Timberman(<joshua@getchef.com>)
|
||||
# Author:: Joshua Timberman(<joshua@chef.io>)
|
||||
# Cookbook Name:: postfix
|
||||
# Recipe:: server
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: Copyright (c) 2012, Opscode, Inc.
|
||||
# Copyright:: Copyright (c) 2012, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: Copyright (c) 2012, Opscode, Inc.
|
||||
# Copyright:: Copyright (c) 2012, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# encoding: utf-8
|
||||
# Copyright:: Copyright (c) 2012, Opscode, Inc.
|
||||
# Copyright:: Copyright (c) 2012, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
11
cookbooks/postfix/templates/default/relay_restrictions.erb
Normal file
11
cookbooks/postfix/templates/default/relay_restrictions.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# Attribute name is the domain name, Attribute value is either OK or REJECT
|
||||
|
||||
<% node['postfix']['relay_restrictions'].each do |name, value| %>
|
||||
<%= name %> <%= value %>
|
||||
<% end unless node['postfix']['relay_restrictions'].nil? %>
|
||||
* REJECT
|
||||
Reference in New Issue
Block a user