X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=modules%2Fexim%2Fmanifests%2Finit.pp;h=075d55276f360be760e07dd84cc5fd07d0a90dee;hb=14275a7a8892845f59f12a86945da4c7effc643c;hp=50484f9086f7be81a23d1a2dce62e311e34971da;hpb=094989a00988fda048202d65a10fc1cc75156025;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 50484f908..075d55276 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -156,10 +156,15 @@ class exim { path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true, } + $mail_port = extractnodeinfo($nodeinfo, 'mail_port') @ferm::rule { "dsa-exim": - domain => "(ip ip6)", - description => "Allow smtp access", - rule => "&SERVICE(tcp, 25)" + description => "Allow SMTP", + rule => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_SOURCES)" + } + @ferm::rule { "dsa-exim-v6": + description => "Allow SMTP", + domain => "ip6", + rule => "&SERVICE_RANGE(tcp, $mail_port, \$SMTP_V6_SOURCES)" } # Do we actually want this? I'm only doing it because it's harmless # and makes the logs quiet. There are better ways of making logs quiet,