diff --git a/handlers/main.yml b/handlers/main.yml index 616a24b..696e140 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -11,5 +11,8 @@ - name: postmap sender relay command: /usr/sbin/postmap /etc/postfix/sender_relay +- name: postmap transport maps + command: /usr/sbin/postmap /etc/postfix/transport + - name: postmap sasl passwd command: /usr/sbin/postmap /etc/postfix/sasl_passwd diff --git a/tasks/configure.yml b/tasks/configure.yml index 66aa576..bc5e9e5 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -37,6 +37,18 @@ - restart postfix when: postfix_sender_relay is defined +- name: postfix | transport maps + template: + src: transport.j2 + dest: /etc/postfix/transport + owner: root + group: root + mode: 0644 + notify: + - postmap transport + - restart postfix + when: postfix_transport_maps is defined + - name: postfix | sasl passwd template: src: sasl_passwd.j2 diff --git a/templates/transport.j2 b/templates/transport.j2 new file mode 100644 index 0000000..4c02362 --- /dev/null +++ b/templates/transport.j2 @@ -0,0 +1,5 @@ +{% if postfix_transport_maps is defined %} +{% for map in postfix_transport_maps %} +{{ map }} +{% endfor %} +{% endif %}