You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hetzner-ansible/roles/postfix/handlers/main.yml

48 lines
1.7 KiB
YAML

# handlers file
---
- name: new aliases
command: newaliases
when: postfix_default_database_type != 'regexp'
- name: new virtual aliases
command: postmap {{ postfix_default_database_type }}:{{ postfix_virtual_aliases_file }}
when: postfix_default_database_type != 'regexp'
- name: postmap sasl_passwd
command: postmap -p {{ postfix_default_database_type }}:{{ postfix_sasl_passwd_file }}
when: postfix_default_database_type != 'regexp'
- name: postmap sender_canonical_maps
command: postmap {{ postfix_sender_canonical_maps_database_type }}:{{ postfix_sender_canonical_maps_file }}
when: postfix_sender_canonical_maps_database_type != 'regexp'
- name: postmap recipient_canonical_maps
command: postmap {{ postfix_recipient_canonical_maps_database_type }}:{{ postfix_recipient_canonical_maps_file }}
when: postfix_recipient_canonical_maps_database_type != 'regexp'
- name: postmap transport_maps
command: postmap {{ postfix_transport_maps_database_type }}:{{ postfix_transport_maps_file }}
when: postfix_transport_maps_database_type != 'regexp'
- name: postmap sender_dependent_relayhost_maps
command: postmap {{ postfix_default_database_type }}:{{ postfix_sender_dependent_relayhost_maps_file }}
when: postfix_default_database_type != 'regexp'
- name: postmap generic
command: postmap {{ postfix_smtp_generic_maps_database_type }}:{{ postfix_smtp_generic_maps_file }}
when: postfix_smtp_generic_maps_database_type != 'regexp'
- name: remove pid
file:
path: "~postfix/pid/master.pid"
state: absent
listen: restart postfix
when: is_docker_guest
- name: restart service
service:
name: postfix
state: restarted
listen: restart postfix
when: service_default_state | default('started') == 'started'