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