1 |
misc |
33 |
class postfix { |
2 |
misc |
2221 |
class base { |
3 |
|
|
package { [postfix,nail]: } |
4 |
misc |
33 |
|
5 |
|
|
service { postfix: |
6 |
misc |
2292 |
subscribe => Package['postfix'], |
7 |
misc |
33 |
} |
8 |
|
|
|
9 |
misc |
1952 |
file { '/etc/postfix/main.cf': |
10 |
|
|
require => Package["postfix"], |
11 |
|
|
content => "", |
12 |
misc |
2292 |
notify => Service['postfix'], |
13 |
misc |
1952 |
} |
14 |
|
|
} |
15 |
misc |
33 |
|
16 |
|
|
|
17 |
misc |
34 |
class simple_relay inherits base { |
18 |
misc |
1952 |
File['/etc/postfix/main.cf'] { |
19 |
misc |
36 |
content => template("postfix/simple_relay_main.cf"), |
20 |
misc |
33 |
} |
21 |
|
|
} |
22 |
misc |
265 |
|
23 |
misc |
285 |
class smtp_server inherits base { |
24 |
|
|
include postgrey |
25 |
misc |
475 |
include amavis |
26 |
|
|
include spamassassin |
27 |
misc |
2221 |
|
28 |
misc |
1952 |
File['/etc/postfix/main.cf'] { |
29 |
misc |
288 |
content => template("postfix/main.cf"), |
30 |
|
|
} |
31 |
|
|
|
32 |
|
|
file { '/etc/postfix/transport_regexp': |
33 |
|
|
content => template("postfix/transport_regexp"), |
34 |
|
|
} |
35 |
|
|
|
36 |
misc |
285 |
} |
37 |
|
|
|
38 |
|
|
class primary_smtp inherits smtp_server { |
39 |
misc |
1287 |
|
40 |
misc |
2221 |
package { "postfix-ldap": } |
41 |
|
|
|
42 |
misc |
1642 |
# 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 |
misc |
1645 |
# 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 |
misc |
2037 |
'mga-alumni','mga-i18n-committers', |
49 |
misc |
1645 |
] |
50 |
misc |
1287 |
$ldap_password = extlookup("postfix_ldap",'x') |
51 |
misc |
1347 |
|
52 |
misc |
2221 |
file { |
53 |
|
|
'/etc/postfix/master.cf': content => template("postfix/primary_master.cf"); |
54 |
|
|
'/etc/postfix/ldap_aliases.conf': content => template("postfix/ldap_aliases.conf"); |
55 |
|
|
# TODO merge the file with the previous one, for common part (ldap, etc) |
56 |
|
|
'/etc/postfix/group_aliases.conf': content => template("postfix/group_aliases.conf"); |
57 |
|
|
# TODO make it conditional to the presence of sympa |
58 |
|
|
'/etc/postfix/sympa_aliases': content => template("postfix/sympa_aliases"); |
59 |
|
|
'/etc/postfix/virtual_aliases': content => template("postfix/virtual_aliases"); |
60 |
misc |
1378 |
} |
61 |
|
|
|
62 |
misc |
1347 |
exec { "postmap /etc/postfix/virtual_aliases": |
63 |
|
|
refreshonly => true, |
64 |
|
|
subscribe => File['/etc/postfix/virtual_aliases'], |
65 |
|
|
} |
66 |
misc |
265 |
} |
67 |
|
|
|
68 |
misc |
285 |
class secondary_smtp inherits smtp_server { |
69 |
misc |
265 |
} |
70 |
misc |
33 |
} |