2013-06-13 07:55:32 +02:00
|
|
|
postfix:
|
2014-12-13 08:19:59 +01:00
|
|
|
pkg.installed: []
|
2013-06-13 07:55:32 +02:00
|
|
|
service.running:
|
|
|
|
- enable: True
|
|
|
|
- require:
|
|
|
|
- pkg: postfix
|
2014-04-23 21:02:09 +02:00
|
|
|
- watch:
|
|
|
|
- pkg: postfix
|
|
|
|
|
2015-02-05 09:57:18 +01:00
|
|
|
postfix-policyd-spf-python:
|
|
|
|
pkg.installed: []
|
|
|
|
|
2014-04-23 21:02:09 +02:00
|
|
|
# manage /etc/aliases if data found in pillar
|
|
|
|
{% if 'aliases' in pillar.get('postfix', '') %}
|
|
|
|
/etc/aliases:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://postfix/aliases
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
|
|
|
- template: jinja
|
|
|
|
- require:
|
|
|
|
- pkg: postfix
|
|
|
|
|
|
|
|
run-newaliases:
|
|
|
|
cmd.wait:
|
|
|
|
- name: newaliases
|
|
|
|
- cwd: /
|
|
|
|
- watch:
|
|
|
|
- file: /etc/aliases
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
# manage /etc/postfix/virtual if data found in pillar
|
|
|
|
{% if 'virtual' in pillar.get('postfix', '') %}
|
|
|
|
/etc/postfix/virtual:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://postfix/virtual
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
|
|
|
- template: jinja
|
|
|
|
- require:
|
|
|
|
- pkg: postfix
|
|
|
|
|
|
|
|
run-postmap:
|
|
|
|
cmd.wait:
|
|
|
|
- name: /usr/sbin/postmap /etc/postfix/virtual
|
|
|
|
- cwd: /
|
|
|
|
- watch:
|
|
|
|
- file: /etc/postfix/virtual
|
|
|
|
{% endif %}
|