changeset 176:048bc4d6af43 puppet-3.6

Make Postfix IPv4 only We have IPv6 on the server, but not publicly routable. Disabling IPv6 through sysctl didn't work
author IBBoard <dev@ibboard.co.uk>
date Sat, 31 Mar 2018 10:19:53 +0100
parents c76ba5e3685f
children 1b605c38b375
files manifests/templates.pp modules/postfix/manifests/init.pp modules/postfix/templates/main.cf.erb
diffstat 3 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/manifests/templates.pp	Sat Mar 31 10:19:03 2018 +0100
+++ b/manifests/templates.pp	Sat Mar 31 10:19:53 2018 +0100
@@ -615,6 +615,7 @@
 	){
 	class { 'postfix':
 		mailserver => $mailserver,
+		protocols  => 'ipv4',
 	}
 	class { 'dovecot':
 		imapserver => $imapserver,
--- a/modules/postfix/manifests/init.pp	Sat Mar 31 10:19:03 2018 +0100
+++ b/modules/postfix/manifests/init.pp	Sat Mar 31 10:19:53 2018 +0100
@@ -1,5 +1,6 @@
 class postfix (
   $mailserver,
+  $protocols='all'
   ){
   package { 'sendmail':
     ensure => 'absent',
--- a/modules/postfix/templates/main.cf.erb	Sat Mar 31 10:19:03 2018 +0100
+++ b/modules/postfix/templates/main.cf.erb	Sat Mar 31 10:19:53 2018 +0100
@@ -6,6 +6,7 @@
 myhostname = <%= @mailserver %>
 myorigin = $mydomain
 inet_interfaces = all
+inet_protocols = <%= @protocols %>
 mydestination = $myhostname, localhost.$mydomain, localhost
 unknown_local_recipient_reject_code = 550
 mynetworks = 127.0.0.0/8