postfix-cookbook/recipes/virtual_aliases.rb
Harm de Wit 80d37848cb #55 - Add support for virtual aliases
Signed-off-by: Sean OMeara <someara@opscode.com>
2014-06-11 13:39:39 -04:00

32 lines
996 B
Ruby

# encoding: utf-8
# Copyright:: Copyright (c) 2012, Opscode, 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'
execute 'postmap-virtual-alias' do
command "postmap #{node['postfix']['main']['virtual_alias_maps']}"
action :nothing
end
template node['postfix']['virtual_alias_db'] do
source 'virtual_aliases.erb'
owner 'root'
group 'root'
mode 0400
notifies :run, 'execute[postmap-virtual-alias]', :immediately
notifies :restart, 'service[postfix]'
end