b84b13fbf31d147e7d72ef18476aea485c3f76ca
[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 roles::pubsub::parameters
11
12   $rabbit_password = $roles::pubsub::parameters::rabbit_password
13
14   roles::pubsub::config { 'emailvdomains':
15     key      => 'dsa-emailvdomains-receive',
16     exchange => dsa,
17     queue    => "email-${::fqdn}",
18     topic    => 'dsa.email.update',
19     vhost    => dsa,
20     username => $::fqdn,
21     password => $rabbit_password
22   }
23
24   # smtp firewalling setup
25   ###
26   @@ferm::rule::simple { "dsa-smtp-from-mailrelay-${::fqdn}":
27     tag         => 'smtp::server::from::mailrelay',
28     description => 'Allow smtp access from a mailrelay',
29     port        => '25',
30     saddr       => $base::public_addresses,
31   }
32 }