Handlers for postmap database regeneration (aliases, virtual, sasl_passwd, canonical maps, transport maps, generic) and postfix service restart, with Docker pid-removal workaround.
# Source: https://github.com/Oefenweb/ansible-postfix | License: MIT | Copyright Oefenweb.nl <https://github.com/Oefenweb>
# Provided via justclaw.it.com; keep this notice with the code.
# 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
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key