move exim vs. postfix, heavy vs. not, into hiera
[mirror/dsa-puppet.git] / modules / roles / manifests / mailrelay.pp
1 # = Class: roles::mailrelay
2 #
3 # Setup for mailrelay hosts
4 #
5 # == Sample Usage:
6 #
7 #   include roles::mailrelay
8 #
9 class roles::mailrelay {
10   include exim::mx
11
12   include roles::pubsub::parameters
13
14   $rabbit_password = $roles::pubsub::parameters::rabbit_password
15
16   roles::pubsub::config { 'emailvdomains':
17     key      => 'dsa-emailvdomains-receive',
18     exchange => dsa,
19     queue    => "email-${::fqdn}",
20     topic    => 'dsa.email.update',
21     vhost    => dsa,
22     username => $::fqdn,
23     password => $rabbit_password
24   }
25
26   # smtp firewalling setup
27   ###
28   @@ferm::rule::simple { "dsa-smtp-from-mailrelay-${::fqdn}":
29     tag         => 'smtp::server::from::mailrelay',
30     description => 'Allow smtp access from a mailrelay',
31     port        => '25',
32     saddr       => $base::public_addresses,
33   }
34 }