-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathpostgres.pp
81 lines (73 loc) · 1.96 KB
/
postgres.pp
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# == Class: postfix::postgres
#
# Set up postgres backend for postfix
#
# === Parameters
#
# === Variables
#
# === Authors
#
# mjhas@github
class postfix::postgres (
$dbname = undef,
$dbuser = undef,
$dbpassword = undef,
$hosts = 'localhost',
) {
include postfix
package { 'postfix-pgsql':
ensure => 'installed',
require => Package['postfix'],
notify => Service['postfix'],
}
file { '/etc/postfix/postgresql':
ensure => directory,
mode => '0750',
owner => root,
group => postfix,
require=> Package['postfix-pgsql'],
}
file { '/etc/postfix/postgresql/virtual_email2email.cf':
content => template('postfix/virtual_email2email.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
file { '/etc/postfix/postgresql/virtual_domains.cf':
content => template('postfix/virtual_domains.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
file { '/etc/postfix/postgresql/virtual_forwardings.cf':
content => template('postfix/virtual_forwardings.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
file { '/etc/postfix/postgresql/virtual_limit_maps.cf':
content => template('postfix/virtual_limit_maps.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
file { '/etc/postfix/postgresql/virtual_mailboxes.cf':
content => template('postfix/virtual_mailboxes.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
file { '/etc/postfix/postgresql/virtual_transports.cf':
content => template('postfix/virtual_transports.cf'),
require => File['/etc/postfix/postgresql'],
mode => '0640',
owner => root,
group => postfix,
}
}