X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Fmanifests%2Finit.pp;h=d7229bcb3ffb7f1b411baf12695fab22af822be8;hb=fc8a2e887766e10b6c33a00c547049d6bf38801c;hp=50484f9086f7be81a23d1a2dce62e311e34971da;hpb=c8b227a46c1eb4651e6e892b899d26d30c668e20;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/manifests/init.pp b/modules/exim/manifests/init.pp index 50484f908..d7229bcb3 100644 --- a/modules/exim/manifests/init.pp +++ b/modules/exim/manifests/init.pp @@ -106,6 +106,11 @@ class exim { source => [ "puppet:///exim/per-host/$fqdn/whitelist", "puppet:///exim/common/whitelist" ] ; + "/etc/exim4/submission-domains": + require => Package["exim4-daemon-heavy"], + source => [ "puppet:///exim/per-host/$fqdn/submission-domains", + "puppet:///exim/common/submission-domains" ] + ; "/etc/logrotate.d/exim4-base": require => Package["exim4-daemon-heavy"], source => [ "puppet:///exim/per-host/$fqdn/logrotate-exim4-base", @@ -156,10 +161,20 @@ 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": - 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, @@ -170,3 +185,6 @@ class exim { rule => "&SERVICE(tcp, 113)" } } +# vim:set et: +# vim:set sts=4 ts=4: +# vim:set shiftwidth=4: