@@ -1,5 +1,8 @@ | |||||
--- | --- | ||||
- name: postmap transport_maps | |||||
command: postmap /etc/postfix/transport_maps | |||||
- name: postmap virtual_alias_domains | - name: postmap virtual_alias_domains | ||||
command: postmap /etc/postfix/virtual_alias_domains | command: postmap /etc/postfix/virtual_alias_domains | ||||
@@ -23,6 +23,12 @@ | |||||
dest: /etc/postfix/main.cf | dest: /etc/postfix/main.cf | ||||
notify: reload postfix | notify: reload postfix | ||||
- name: postfix transport_maps | |||||
template: | |||||
src: transport_maps.j2 | |||||
dest: /etc/postfix/transport_maps | |||||
notify: postmap transport_maps | |||||
- name: postfix virtual_alias_domains | - name: postfix virtual_alias_domains | ||||
template: | template: | ||||
src: virtual_alias_domains.j2 | src: virtual_alias_domains.j2 | ||||
@@ -44,7 +44,7 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache | |||||
### transport configuration | ### transport configuration | ||||
#transport_maps = hash:/etc/postfix/transport | |||||
transport_maps = hash:/etc/postfix/transport_maps | |||||
### rules and restricitons | ### rules and restricitons | ||||
@@ -0,0 +1,7 @@ | |||||
{{ansible_managed|comment}} | |||||
{% if postfix_transport_maps is defined %} | |||||
{% for m in postfix_transport_maps %} | |||||
{{m.domain}} {{m.transport}} | |||||
{% endfor %} | |||||
{% endif %} |