add creation of white list
This commit is contained in:
parent
1e01166fdb
commit
4c41a3f4df
2 changed files with 18 additions and 4 deletions
|
@ -6,3 +6,9 @@
|
||||||
service:
|
service:
|
||||||
name: postfix
|
name: postfix
|
||||||
state: restarted
|
state: restarted
|
||||||
|
|
||||||
|
- name: Postmap whitelist
|
||||||
|
shell: /usr/sbin/postmap /etc/postfix/maps/whitelist_senders.map
|
||||||
|
|
||||||
|
- name: Postmap blacklist
|
||||||
|
shell: /usr/sbin/postmap /etc/postfix/blacklist
|
||||||
|
|
|
@ -207,6 +207,16 @@
|
||||||
group: postfix
|
group: postfix
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
|
- name: Ensure white list senders file exists
|
||||||
|
file:
|
||||||
|
state: touch
|
||||||
|
path: /etc/postfix/maps/whitelist_senders.map
|
||||||
|
owner: root
|
||||||
|
group: postfix
|
||||||
|
mode: 0644
|
||||||
|
notify: Postmap whitelist
|
||||||
|
|
||||||
|
|
||||||
- name: Create local aliases
|
- name: Create local aliases
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/aliases
|
path: /etc/aliases
|
||||||
|
@ -260,6 +270,4 @@
|
||||||
backup: true
|
backup: true
|
||||||
create: true
|
create: true
|
||||||
loop: "{{ postfix_blacklist }}"
|
loop: "{{ postfix_blacklist }}"
|
||||||
|
notify: Postmap blacklist
|
||||||
- name: Postmap blacklist
|
|
||||||
shell: /usr/sbin/postmap /etc/postfix/blacklist
|
|
||||||
|
|
Loading…
Reference in a new issue