1 |
misc |
33 |
class postfix { |
2 |
|
|
|
3 |
misc |
34 |
class base { |
4 |
misc |
33 |
package { postfix: |
5 |
|
|
ensure => installed |
6 |
|
|
} |
7 |
misc |
265 |
package { 'nail': |
8 |
dams |
225 |
ensure => installed |
9 |
|
|
} |
10 |
misc |
33 |
service { postfix: |
11 |
|
|
ensure => running, |
12 |
|
|
subscribe => [ Package['postfix']], |
13 |
|
|
path => "/etc/init.d/postfix" |
14 |
|
|
} |
15 |
|
|
} |
16 |
|
|
|
17 |
|
|
file { '/etc/postfix/main.cf': |
18 |
|
|
ensure => present, |
19 |
|
|
owner => root, |
20 |
|
|
group => root, |
21 |
|
|
mode => 644, |
22 |
|
|
require => Package["postfix"], |
23 |
|
|
content => "", |
24 |
|
|
notify => [Service['postfix']] |
25 |
|
|
} |
26 |
|
|
|
27 |
|
|
|
28 |
misc |
34 |
class simple_relay inherits base { |
29 |
misc |
33 |
file { '/etc/postfix/main.cf': |
30 |
misc |
36 |
content => template("postfix/simple_relay_main.cf"), |
31 |
misc |
33 |
} |
32 |
|
|
} |
33 |
misc |
265 |
|
34 |
misc |
285 |
class smtp_server inherits base { |
35 |
|
|
include postgrey |
36 |
misc |
475 |
include amavis |
37 |
|
|
include spamassassin |
38 |
misc |
288 |
file { '/etc/postfix/main.cf': |
39 |
|
|
content => template("postfix/main.cf"), |
40 |
|
|
} |
41 |
|
|
|
42 |
|
|
file { '/etc/postfix/transport_regexp': |
43 |
|
|
ensure => present, |
44 |
|
|
owner => root, |
45 |
|
|
group => root, |
46 |
|
|
mode => 644, |
47 |
|
|
content => template("postfix/transport_regexp"), |
48 |
|
|
} |
49 |
|
|
|
50 |
misc |
285 |
} |
51 |
|
|
|
52 |
|
|
class primary_smtp inherits smtp_server { |
53 |
boklm |
272 |
file { '/etc/postfix/master.cf': |
54 |
misc |
328 |
ensure => present, |
55 |
|
|
owner => root, |
56 |
|
|
group => root, |
57 |
|
|
mode => 644, |
58 |
boklm |
272 |
content => template("postfix/primary_master.cf"), |
59 |
|
|
} |
60 |
misc |
1287 |
|
61 |
misc |
1289 |
package { "postfix-ldap": |
62 |
|
|
ensure => installed |
63 |
|
|
} |
64 |
misc |
1288 |
|
65 |
misc |
1553 |
$aliases_group = ['mga-founders','mga-packagers','mga-sysadmin'] |
66 |
misc |
1287 |
$ldap_password = extlookup("postfix_ldap",'x') |
67 |
|
|
file { '/etc/postfix/ldap_aliases.conf': |
68 |
|
|
ensure => present, |
69 |
|
|
owner => root, |
70 |
|
|
group => root, |
71 |
|
|
mode => 644, |
72 |
|
|
content => template("postfix/ldap_aliases.conf"), |
73 |
|
|
} |
74 |
misc |
1347 |
|
75 |
misc |
1378 |
# TODO merge the file with the previous one, for common part (ldap, etc) |
76 |
|
|
file { '/etc/postfix/group_aliases.conf': |
77 |
|
|
ensure => present, |
78 |
|
|
owner => root, |
79 |
|
|
group => root, |
80 |
|
|
mode => 644, |
81 |
|
|
content => template("postfix/group_aliases.conf"), |
82 |
|
|
} |
83 |
|
|
|
84 |
misc |
1401 |
# TODO make it conditional to the presence of sympa |
85 |
|
|
file { '/etc/postfix/sympa_aliases': |
86 |
|
|
ensure => present, |
87 |
|
|
owner => root, |
88 |
|
|
group => root, |
89 |
|
|
mode => 644, |
90 |
|
|
content => template("postfix/sympa_aliases"), |
91 |
|
|
} |
92 |
misc |
1378 |
|
93 |
|
|
|
94 |
|
|
|
95 |
misc |
1401 |
|
96 |
misc |
1347 |
file { '/etc/postfix/virtual_aliases': |
97 |
|
|
ensure => present, |
98 |
|
|
owner => root, |
99 |
|
|
group => root, |
100 |
|
|
mode => 644, |
101 |
|
|
content => template("postfix/virtual_aliases"), |
102 |
|
|
} |
103 |
|
|
|
104 |
|
|
exec { "postmap /etc/postfix/virtual_aliases": |
105 |
|
|
refreshonly => true, |
106 |
|
|
subscribe => File['/etc/postfix/virtual_aliases'], |
107 |
|
|
} |
108 |
misc |
265 |
} |
109 |
|
|
|
110 |
misc |
1347 |
|
111 |
misc |
285 |
class secondary_smtp inherits smtp_server { |
112 |
misc |
265 |
} |
113 |
|
|
|
114 |
misc |
33 |
} |