Skip to content

Commit

Permalink
#68 -Properly handle binding to loopback on mixed IPV4/IPV6 systems
Browse files Browse the repository at this point in the history
Signed-off-by: Sean OMeara <someara@opscode.com>
  • Loading branch information
tas50 authored and Sean OMeara committed Jun 11, 2014
1 parent e4c9b11 commit e6b58b2
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -39,7 +39,7 @@ This change in namespace to `node['postfix']['main']` should allow for greater f
* `node['postfix']['main']['myhostname']` - defaults to fqdn from Ohai
* `node['postfix']['main']['mydomain']` - defaults to domain from Ohai
* `node['postfix']['main']['myorigin']` - defaults to $myhostname
* `node['postfix']['main']['mynetworks']` - default is `127.0.0.0/8`
* `node['postfix']['main']['mynetworks']` - default is nil, which forces Postfix to default to loopback addresses.
* `node['postfix']['main']['inet_interfaces']` - set to `loopback-only`, or `all` for server recipe
* `node['postfix']['main']['alias_maps']` - set to `hash:/etc/aliases`
* `node['postfix']['main']['mailbox_size_limit']` - set to `0` (disabled)
Expand Down Expand Up @@ -250,10 +250,10 @@ override_attributes(

License & Authors
-----------------
- Author:: Joshua Timberman <joshua@opscode.com>
- Author:: Joshua Timberman <joshua@getchef.com>

```text
Copyright:: 2009-2012, Opscode, Inc
Copyright:: 2009-2014, 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.
Expand Down
6 changes: 3 additions & 3 deletions attributes/default.rb
@@ -1,6 +1,6 @@
# encoding: utf-8
# Author:: Joshua Timberman <joshua@opscode.com>
# Copyright:: Copyright (c) 2009, Opscode, Inc.
# Author:: Joshua Timberman <joshua@getchef.com>
# Copyright:: Copyright 2009-2014, Chef Software, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -64,7 +64,7 @@
default['postfix']['main']['access_maps'] = ["hash:#{node['postfix']['access_db']}"]
default['postfix']['main']['mailbox_size_limit'] = 0
default['postfix']['main']['smtp_sasl_auth_enable'] = 'no'
default['postfix']['main']['mynetworks'] = '127.0.0.0/8'
default['postfix']['main']['mynetworks'] = nil
default['postfix']['main']['inet_interfaces'] = 'loopback-only'

# Conditional attributes
Expand Down
2 changes: 1 addition & 1 deletion files/default/tests/minitest/support/helpers.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
# Copyright 2012, Opscode, Inc.
# Copyright 2012-2014, 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.
Expand Down
4 changes: 2 additions & 2 deletions metadata.rb
@@ -1,8 +1,8 @@
# encoding: utf-8
name 'postfix'
description 'Installs and configures postfix for client or outbound relayhost, or to do SASL auth'
maintainer 'Opscode, Inc.'
maintainer_email 'cookbooks@opscode.com'
maintainer 'Chef Software, Inc.'
maintainer_email 'cookbooks@getchef.com'
license 'Apache 2.0'
version '3.2.1'
recipe 'postfix', 'Installs and configures postfix'
Expand Down
2 changes: 1 addition & 1 deletion recipes/aliases.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
# Copyright:: Copyright (c) 2012, Opscode, Inc.
# Copyright:: Copyright 2012-2014, 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.
Expand Down
4 changes: 2 additions & 2 deletions recipes/client.rb
@@ -1,9 +1,9 @@
# encoding: utf-8
# Author:: Joshua Timberman(<joshua@opscode.com>)
# Author:: Joshua Timberman(<joshua@getchef.com>)
# Cookbook Name:: postfix
# Recipe:: client
#
# Copyright 2009-2012, Opscode, Inc.
# Copyright 2009-2014, 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.
Expand Down
8 changes: 4 additions & 4 deletions recipes/default.rb
@@ -1,9 +1,9 @@
# encoding: utf-8
# Author:: Joshua Timberman(<joshua@opscode.com>)
# Author:: Joshua Timberman(<joshua@getchef.com>)
# Cookbook Name:: postfix
# Recipe:: default
#
# Copyright 2009-2012, Opscode, Inc.
# Copyright 2009-2014, 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.
Expand Down Expand Up @@ -59,7 +59,7 @@
source 'manifest-postfix.xml.erb'
owner 'root'
group 'root'
mode 00644
mode '0644'
notifies :run, 'execute[load postfix manifest]', :immediately
end

Expand Down Expand Up @@ -113,7 +113,7 @@
source "#{cfg}.cf.erb"
owner 'root'
group 0
mode 00644
mode '0644'
notifies :restart, 'service[postfix]'
variables(settings: node['postfix'][cfg])
cookbook node['postfix']["#{cfg}_template_source"]
Expand Down
4 changes: 2 additions & 2 deletions recipes/sasl_auth.rb
@@ -1,10 +1,10 @@
# encoding: utf-8
#
# Author:: Joshua Timberman(<joshua@opscode.com>)
# Author:: Joshua Timberman(<joshua@getchef.com>)
# Cookbook Name:: postfix
# Recipe:: sasl_auth
#
# Copyright 2009, Opscode, Inc.
# Copyright 2009-2014, 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.
Expand Down
4 changes: 2 additions & 2 deletions recipes/server.rb
@@ -1,10 +1,10 @@
# encoding: utf-8
#
# Author:: Joshua Timberman(<joshua@opscode.com>)
# Author:: Joshua Timberman(<joshua@getchef.com>)
# Cookbook Name:: postfix
# Recipe:: server
#
# Copyright 2009-2012, Opscode, Inc.
# Copyright 2009-2014, 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.
Expand Down
1 change: 1 addition & 0 deletions templates/default/main.cf.erb
Expand Up @@ -4,6 +4,7 @@
###

<% @settings.sort.map do |key, value| -%>
<% next if value.nil? -%>
<% if value.kind_of? Array -%>
<%= "#{key} = #{value.join(', ')}"%>
<% else -%>
Expand Down

0 comments on commit e6b58b2

Please sign in to comment.