[COOK-1520] Added support for enabling procmail to postfix cookbook
This commit is contained in:
parent
e2a1a3079a
commit
f231f8b408
@ -57,6 +57,9 @@ See `attributes/default.rb` for default values.
|
|||||||
* `node['postfix']['aliases']` - hash of aliases to create with
|
* `node['postfix']['aliases']` - hash of aliases to create with
|
||||||
`recipe[postfix::aliases]`, see below under __Recipes__ for more
|
`recipe[postfix::aliases]`, see below under __Recipes__ for more
|
||||||
information.
|
information.
|
||||||
|
* `node['postfix']['use_procmail']` - set to true if nodes should use
|
||||||
|
procmail as the delivery agent (mailbox_command).
|
||||||
|
|
||||||
|
|
||||||
Recipes
|
Recipes
|
||||||
=======
|
=======
|
||||||
|
@ -33,4 +33,6 @@ default['postfix']['smtp_use_tls'] = "yes"
|
|||||||
default['postfix']['smtp_sasl_user_name'] = ""
|
default['postfix']['smtp_sasl_user_name'] = ""
|
||||||
default['postfix']['smtp_sasl_passwd'] = ""
|
default['postfix']['smtp_sasl_passwd'] = ""
|
||||||
|
|
||||||
|
default['postfix']['use_procmail'] = false
|
||||||
|
|
||||||
default['postfix']['aliases'] = {}
|
default['postfix']['aliases'] = {}
|
||||||
|
@ -102,3 +102,8 @@ attribute "postfix/multi_environment_relay",
|
|||||||
:display_name => "Postfix Search for relayhost in any environment",
|
:display_name => "Postfix Search for relayhost in any environment",
|
||||||
:description => "If true, then the client recipe will search any environment instead of just the node's",
|
:description => "If true, then the client recipe will search any environment instead of just the node's",
|
||||||
:default => ""
|
:default => ""
|
||||||
|
|
||||||
|
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"
|
||||||
|
@ -22,6 +22,13 @@ package "postfix" do
|
|||||||
action :install
|
action :install
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if node['postfix']['use_procmail'] then
|
||||||
|
package "procmail" do
|
||||||
|
action :install
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
service "postfix" do
|
service "postfix" do
|
||||||
supports :status => true, :restart => true, :reload => true
|
supports :status => true, :restart => true, :reload => true
|
||||||
action :enable
|
action :enable
|
||||||
|
@ -37,5 +37,8 @@ relayhost = <%= node['postfix']['relayhost'] %>
|
|||||||
mynetworks = <%= node['postfix']['mail_relay_networks'] %>
|
mynetworks = <%= node['postfix']['mail_relay_networks'] %>
|
||||||
inet_interfaces = loopback-only
|
inet_interfaces = loopback-only
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if node['postfix']['use_procmail'] -%>
|
||||||
|
mailbox_command = /usr/bin/procmail -a "$EXTENSION"
|
||||||
|
<% end -%>
|
||||||
mailbox_size_limit = 0
|
mailbox_size_limit = 0
|
||||||
recipient_delimiter = +
|
recipient_delimiter = +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user