Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class {'postfix':
* `relayhost_port` This sets the port for the relay host specified with the `relayhost` parameter. The default is `undef` which leaves the port specifier off the end of the relayhost setting. This parameter does nothing if the `relayhost` parameter is not set.
* `daemon_directory` Sets the directory with Postfix support programs and daemon programs are installed. The default is specific for each operating system. It's _not_ recommended that this parameter be changed.
* `inet_interfaces` Sets the network interface for postfix to bind do. The default value is `localhost`
* `inet_protocols` Sets the network internet protocol for postfix to utilise. The default value is `all`

# Attribution

Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
$relayhost_port = undef,
$daemon_directory = $::postfix::params::daemon_directory,
$inet_interfaces = $::postfix::params::inet_interfaces,
$inet_protocols = $::postfix::params::inet_protocols,
) inherits postfix::params {

if $remove_sendmail {
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@
$sendmailcf_package = 'sendmail-cf'
$sendmail_service = 'sendmail'
$inet_interfaces = 'localhost'
$inet_protocols = 'all'
}
9 changes: 9 additions & 0 deletions spec/classes/postfix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,15 @@
) }
end

describe 'when setting inet_protocols' do
let :params do
{ :inet_protocols => 'all' }
end
it { should contain_file('postfix_config').with_content(
%r{^inet_protocols = all$}
) }
end

end
end

Expand Down
8 changes: 6 additions & 2 deletions templates/main.cf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,12 @@ myorigin = <%= @myorigin %>
#inet_interfaces = $myhostname, localhost
inet_interfaces = <%= @inet_interfaces %>

# Enable IPv4, and IPv6 if supported
inet_protocols = all
# Enable IPv4 and/or IPv6
# Options:
# all - IPv4 and IPv6
# ipv4 - IPv4 only
# ipv6 - IPv6 only
inet_protocols = <%= @inet_protocols %>

# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
Expand Down