X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Fmanifests%2Fmailrelay.pp;h=b84b13fbf31d147e7d72ef18476aea485c3f76ca;hb=28f397a5c62193d2a7ba3f48a2d5a118a7d9a90a;hp=41352cf7c68f0d775f5204d4057a258f4d65d135;hpb=4ace76bfb0e17d0b4618667063ac2f6fed6652a4;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/manifests/mailrelay.pp b/modules/roles/manifests/mailrelay.pp index 41352cf7c..b84b13fbf 100644 --- a/modules/roles/manifests/mailrelay.pp +++ b/modules/roles/manifests/mailrelay.pp @@ -1,8 +1,32 @@ +# = Class: roles::mailrelay +# +# Setup for mailrelay hosts +# +# == Sample Usage: +# +# include roles::mailrelay +# class roles::mailrelay { - exim::vdomain { 'admin.debian.org': - user => mail_admin, - group => mail_admin, - maildir => '/srv/admin.debian.org/', - alias_file => 'puppet:///modules/exim/admin.debian.org/aliases' - } + 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::from::mailrelay', + description => 'Allow smtp access from a mailrelay', + port => '25', + saddr => $base::public_addresses, + } }