Update cookbooks and add wordpress cookbook
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user