X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmailrelay.pp;h=6be074edcc01aec823f3cdbaf62cc5def2bf4cd3;hb=f637b06b86d3158d08102a000722ce2ddb54fd23;hp=f7c1a047a5e56787d57947ba1f3d4cca31c095e9;hpb=3b9e600c947d00500a4f3e4d566aac3bc907a936;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mailrelay.pp b/modules/roles/manifests/mailrelay.pp index f7c1a047a..6be074edc 100644 --- a/modules/roles/manifests/mailrelay.pp +++ b/modules/roles/manifests/mailrelay.pp @@ -7,6 +7,8 @@ # include roles::mailrelay # class roles::mailrelay { + include exim::mailrelay + include roles::pubsub::parameters $rabbit_password = $roles::pubsub::parameters::rabbit_password @@ -20,4 +22,27 @@ class roles::mailrelay { username => $::fqdn, password => $rabbit_password } + + # smtp firewalling setup + ### + @@ferm::rule::simple { "dsa-smtp-from-mailrelay-${::fqdn}": + tag => 'smtp::server::to::mail-satellite', + description => 'Allow smtp access from a mailrelay', + port => '7', # will be overwritten on collection + saddr => $base::public_addresses, + } + + ferm::rule::simple { 'submission-from-satellites': + target => 'submission', + port => 'submission', + } + Ferm::Rule::Simple <<| tag == 'smtp::server::submission::to::mail-relay' |>> + + $autocertdir = hiera('paths.auto_certs_dir') + dnsextras::tlsa_record{ 'tlsa-submission': + zone => 'debian.org', + certfile => "${autocertdir}/${::fqdn}.crt", + port => 587, + hostname => $::fqdn, + } }