X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmailrelay.pp;h=6be074edcc01aec823f3cdbaf62cc5def2bf4cd3;hb=d37aae2f20083c472de30925ff3e16a692408a11;hp=57e2f4461f69183848406dba069db05310a6045a;hpb=53d4eeef534be151a7194e0a43b75879e205a01f;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mailrelay.pp b/modules/roles/manifests/mailrelay.pp index 57e2f4461..6be074edc 100644 --- a/modules/roles/manifests/mailrelay.pp +++ b/modules/roles/manifests/mailrelay.pp @@ -1,2 +1,48 @@ +# = Class: roles::mailrelay +# +# Setup for mailrelay hosts +# +# == Sample Usage: +# +# include roles::mailrelay +# class roles::mailrelay { + include exim::mailrelay + + include roles::pubsub::parameters + + $rabbit_password = $roles::pubsub::parameters::rabbit_password + + roles::pubsub::config { 'emailvdomains': + key => 'dsa-emailvdomains-receive', + exchange => dsa, + queue => "email-${::fqdn}", + topic => 'dsa.email.update', + vhost => dsa, + 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, + } }