diff options
Diffstat (limited to 'roles/common')
-rw-r--r-- | roles/common/tasks/mail.yml | 5 | ||||
-rw-r--r-- | roles/common/templates/etc/postfix/main.cf.j2 | 7 |
2 files changed, 5 insertions, 7 deletions
diff --git a/roles/common/tasks/mail.yml b/roles/common/tasks/mail.yml index c562c42..e8d61a8 100644 --- a/roles/common/tasks/mail.yml +++ b/roles/common/tasks/mail.yml @@ -33,7 +33,6 @@ dest=/etc/postfix/{{ item }} owner=root group=root mode=0644 - register: r3 with_items: - master.cf - generic.pcre @@ -45,7 +44,7 @@ dest=/etc/postfix/main.cf owner=root group=root mode=0644 - register: r4 + register: r3 notify: - Restart Postfix @@ -60,6 +59,6 @@ - name: Start Postfix service: name=postfix state=started - when: not (r1.changed or r2.changed or r3.changed or r4.changed) + when: not (r1.changed or r2.changed or r3.changed) - meta: flush_handlers diff --git a/roles/common/templates/etc/postfix/main.cf.j2 b/roles/common/templates/etc/postfix/main.cf.j2 index a856843..10d4244 100644 --- a/roles/common/templates/etc/postfix/main.cf.j2 +++ b/roles/common/templates/etc/postfix/main.cf.j2 @@ -35,12 +35,11 @@ smtp_generic_maps = pcre:$config_directory/generic.pcre # Forward everything to our internal mailhub {% if 'MTA-out' in group_names %} -# TODO: use a UNIX socket instead -relay_transport = lmtp:unix:private/mta-out +relayhost = [127.0.0.1]:{{ MTA_out.port }} {% else %} -relayhost = [{{ MTA_out.IPv4 }}]:{{ MTA_out.port }} +relayhost = [{{ MTA_out.IPv4 }}]:{{ MTA_out.port }} {% endif %} -relay_domains = +relay_domains = # Tunnel everything through IPSec smtp_tls_security_level = none |