Handlers for postmap database regeneration (aliases, virtual, sasl_passwd, canonical maps, transport maps, generic) and postfix service restart, with Docker pid-removal workaround.
# handlers file
---
- name: new aliases
ansible.builtin.command: >
newaliases
when: postfix_aliases_database_type != 'regexp'
changed_when: true
- name: new virtual aliases
ansible.builtin.command: >
postmap {{ postfix_default_database_type }}:{{ postfix_virtual_aliases_file }}
when: postfix_default_database_type != 'regexp'
changed_when: true
- name: postmap sasl_passwd
ansible.builtin.command: >
postmap {{ postfix_default_database_type }}:{{ postfix_sasl_passwd_file }}
when: postfix_default_database_type != 'regexp'
changed_when: true
- name: postmap sender_canonical_maps
ansible.builtin.command: >
postmap {{ postfix_sender_canonical_maps_database_type }}:{{ postfix_sender_canonical_maps_file }}
when: postfix_sender_canonical_maps_database_type !=
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key