/[adm]/puppet/modules/postfix/manifests/init.pp
ViewVC logotype

Contents of /puppet/modules/postfix/manifests/init.pp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2335 - (show annotations) (download)
Sun Jan 22 23:57:57 2012 UTC (12 years, 2 months ago) by misc
File size: 2351 byte(s)
use get_ldap_servers() instead of hardcoding the servers
1 class postfix {
2 class base {
3 package { [postfix,nail]: }
4
5 service { postfix:
6 subscribe => Package['postfix'],
7 }
8
9 file { '/etc/postfix/main.cf':
10 require => Package["postfix"],
11 content => "",
12 notify => Service['postfix'],
13 }
14 }
15
16
17 class simple_relay inherits base {
18 File['/etc/postfix/main.cf'] {
19 content => template("postfix/simple_relay_main.cf"),
20 }
21 }
22
23 class smtp_server inherits base {
24 include postgrey
25 include amavis
26 include spamassassin
27
28 File['/etc/postfix/main.cf'] {
29 content => template("postfix/main.cf"),
30 }
31
32 file { '/etc/postfix/transport_regexp':
33 content => template("postfix/transport_regexp"),
34 }
35
36 }
37
38 class primary_smtp inherits smtp_server {
39
40 package { "postfix-ldap": }
41
42 # council is here until we fully decide who has aliases in com team,
43 # see https://bugs.mageia.org/show_bug.cgi?id=1345
44 # alumini is a special group for tracking previous members of
45 # the project, so they keep their aliases for a time
46 $aliases_group = ['mga-founders','mga-packagers',
47 'mga-sysadmin','mga-council',
48 'mga-alumni','mga-i18n-committers',
49 ]
50 $ldap_password = extlookup("postfix_ldap",'x')
51 $ldap_servers = get_ldap_servers()
52
53 file {
54 '/etc/postfix/master.cf': content => template("postfix/primary_master.cf");
55 '/etc/postfix/ldap_aliases.conf': content => template("postfix/ldap_aliases.conf");
56 # TODO merge the file with the previous one, for common part (ldap, etc)
57 '/etc/postfix/group_aliases.conf': content => template("postfix/group_aliases.conf");
58 # TODO make it conditional to the presence of sympa
59 '/etc/postfix/sympa_aliases': content => template("postfix/sympa_aliases");
60 '/etc/postfix/virtual_aliases': content => template("postfix/virtual_aliases");
61 }
62
63 exec { "postmap /etc/postfix/virtual_aliases":
64 refreshonly => true,
65 subscribe => File['/etc/postfix/virtual_aliases'],
66 }
67 }
68
69 class secondary_smtp inherits smtp_server {
70 }
71 }

  ViewVC Help
Powered by ViewVC 1.1.30