X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Fmanifests%2Finit.pp;h=171e453fc4e5edaf0f2f936326cec7deceabc930;hb=fe5c5a3adcbd8921dd4cf1f1e7430b4a5618e0b7;hp=43dd108df4f6e3302d144f333cb01129a1d5d6f4;hpb=9d0a0d6b1a3c39a75b6ca0f3e50bf8eab26fc41b;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 43dd108df..171e453fc 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -156,4 +156,27 @@ class exim { path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true, } + + case extractnodeinfo($nodeinfo, 'mail_port') { + /^(\d+)$/: { $mail_port = $1 } + default: { $mail_port = 'smtp' } + } + + @ferm::rule { "dsa-exim": + 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, + # though. + @ferm::rule { "dsa-ident": + domain => "(ip ip6)", + description => "Allow ident access", + rule => "&SERVICE(tcp, 113)" + } }