Created
February 13, 2018 21:30
-
-
Save lordcirth/41f242b7578e2c61f8cc14a6fc83011b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Manage /root/.forward to forward emails | |
# Configure local postfix to forward root's email to a logging address | |
# Pillar var 'common:root_forward_to' must be set if this is used | |
common_root_forward_pkgs: | |
pkg.installed: | |
- pkgs: | |
- postfix | |
- mailutils | |
common_root_forward: | |
file.managed: | |
- name: /root/.forward | |
- source: salt://{{tpldir}}/forward | |
- template: jinja | |
common_root_forward_service: | |
service.running: | |
- name: postfix | |
- enable: True | |
- reload: True | |
- require: | |
- pkg: common_root_forward_pkgs | |
- watch: | |
- file: common_root_forward | |
- file: common_root_forward_localonly | |
# postfix should only listen to localhost | |
common_root_forward_localonly: | |
file.replace: | |
- name: /etc/postfix/main.cf | |
- pattern: '^inet_interfaces = all$' | |
- repl: 'inet_interfaces = loopback-only' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment