33 lines
953 B
YAML
33 lines
953 B
YAML
---
|
|
- name: restart postfix
|
|
service: name=postfix state=restarted
|
|
|
|
- name: reload postfix
|
|
service: name=postfix state=restarted
|
|
|
|
- name: newaliases
|
|
command: newaliases
|
|
|
|
- name: postmap hash aliases
|
|
command: "postmap hash:{{ dc[item]['alias_lookup']['file'] }}"
|
|
when:
|
|
- "dc[item]['alias_lookup']['provider'] == 'file'"
|
|
with_items: "{{ postfix_mail_domains|belist }}"
|
|
|
|
- name: postmap hash users
|
|
command: "postmap hash:{{ dc[item]['user_lookup']['file'] }}"
|
|
when:
|
|
- "dc[item]['user_lookup']['provider'] == 'file'"
|
|
with_items: "{{ postfix_mail_domains|belist }}"
|
|
|
|
- name: postmap no reply aliases
|
|
command: "postmap hash:{{ dc[item]['noreply_file'] }}"
|
|
with_items: "{{ postfix_mail_domains|belist }}"
|
|
|
|
- name: postmap access lists
|
|
command: postmap {{item}}
|
|
with_items:
|
|
- "{{ postfix_rules_dir }}/helo_access_list"
|
|
- "{{ postfix_rules_dir }}/recipient_access_list"
|
|
- "{{ postfix_rules_dir }}/sender_access_list"
|