postfix: Add relay support to specific domains

This commit is contained in:
Timo Makinen 2021-03-20 14:17:14 +00:00
parent bf39708fac
commit d55c77c30f

View file

@ -0,0 +1,14 @@
---
- name: listen to all interfaces
lineinfile:
path: /etc/postfix/main.cf
state: absent
regexp: "^#?inet_interfaces = .*"
notify: restart postfix
- name: add relayed domains
lineinfile:
path: /etc/postfix/main.cf
regexp: "^#?relay_domains = .*"
line: "relay_domains = $mydestination, {{ relay_domains|join(',') }}"
notify: restart postfix