-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpostfix.sls
60 lines (52 loc) · 1.12 KB
/
postfix.sls
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
postgrey:
pkg:
- installed
service:
- running
postfix:
pkg:
- installed
service.running:
- require:
- pkg: postfix
- file: /etc/postfix/main.cf
- file: /etc/aliases
- watch:
- file: /etc/postfix/main.cf
/etc/postfix/main.cf:
file.managed:
- source: salt://configs/mail/main.cf
- template: jinja
- require:
- pkg: postfix
/etc/aliases:
file.managed:
- contents_pillar: aliases
- require:
- pkg: postfix
update-aliases:
cmd.wait:
- name: newaliases
- watch:
- file: /etc/aliases
/etc/postfix/access:
file.managed:
- contents_pillar: postfix_access
- require:
- pkg: postfix
update-access:
cmd.wait:
- name: postmap /etc/postfix/access
- watch:
- file: /etc/postfix/access
# TODO create array of dict with source, output, and map commands...
/etc/postfix/sender_access:
file.managed:
- contents_pillar: postfix_sender_access
- require:
- pkg: postfix
update-sender-access:
cmd.wait:
- name: postmap /etc/postfix/sender_access
- watch:
- file: /etc/postfix/sender_access