1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
class postfix::server::primary inherits postfix::server {
# Adding DKIM server
include opendkim
opendkim::domain{['mageia.org', 'sucuk.mageia.org', 'duvel.mageia.org', 'forums.mageia.org', 'madb.mageia.org','rabbit.mageia.org', 'fiona.mageia.org','identity.mageia.org', 'group.mageia.org', 'neru.mageia.org']:}
opendkim::trusted{['127.0.0.0/8', '212.85.158.0/24']:}
package { ['postfix-ldap', 'sqlite3-tools', 'dovecot-plugins-sqlite','rspamd']: }
# council is here until we fully decide who has aliases in com team,
# see https://bugs.mageia.org/show_bug.cgi?id=1345
# alumni is a special group for tracking previous members of
# the project, so they keep their aliases for a time
$aliases_group = ['mga-founders',
'mga-packagers',
'mga-sysadmin',
'mga-council',
'mga-alumni',
'mga-i18n-committers']
$ldap_password = extlookup('postfix_ldap','x')
$ldap_servers = get_ldap_servers()
file {
'/etc/postfix/master.cf':
content => template('postfix/primary_master.cf');
'/etc/postfix/ldap_aliases.conf':
content => template('postfix/ldap_aliases.conf');
# TODO merge the file with the previous one, for common part (ldap, etc)
'/etc/postfix/group_aliases.conf':
content => template('postfix/group_aliases.conf');
# TODO make it conditional to the presence of sympa
'/etc/postfix/sympa_aliases':
content => template('postfix/sympa_aliases');
'/etc/postfix/virtual_aliases':
content => template('postfix/virtual_aliases');
}
exec { 'postmap /etc/postfix/virtual_aliases':
refreshonly => true,
subscribe => File['/etc/postfix/virtual_aliases'],
}
}
|