From 1b744e0e6320dabaa62bc369addf7f0b89cdc107 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 10 Jul 2016 04:53:37 +0200 Subject: Postfix: don't share the master.cf between the instances. --- roles/out/tasks/main.yml | 7 +++++-- roles/out/templates/etc/postfix/main.cf.j2 | 12 ++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to 'roles/out') diff --git a/roles/out/tasks/main.yml b/roles/out/tasks/main.yml index 10429b1..0b68c83 100644 --- a/roles/out/tasks/main.yml +++ b/roles/out/tasks/main.yml @@ -2,10 +2,13 @@ apt: pkg=postfix - name: Configure Postfix - template: src=etc/postfix/main.cf.j2 - dest=/etc/postfix-{{ postfix_instance[inst].name }}/main.cf + template: src=etc/postfix/{{ item }}.j2 + dest=/etc/postfix-{{ postfix_instance[inst].name }}/{{ item }} owner=root group=root mode=0644 + with_items: + - main.cf + - master.cf notify: - Reload Postfix diff --git a/roles/out/templates/etc/postfix/main.cf.j2 b/roles/out/templates/etc/postfix/main.cf.j2 index c3281cb..98c0185 100644 --- a/roles/out/templates/etc/postfix/main.cf.j2 +++ b/roles/out/templates/etc/postfix/main.cf.j2 @@ -17,9 +17,10 @@ myhostname = outgoing{{ outgoingno | default('') }}.$mydomain mydomain = fripost.org append_dot_mydomain = no -# Turn off all TCP/IP listener ports except that necessary for the -# outgoing SMTP proxy. -master_service_disable = !{{ postfix_instance.out.port }}.inet !127.0.0.1:10025.inet inet +mynetworks = 127.0.0.0/8, [::1]/128 +{%- if groups.all | length > 1 -%} + , {{ ipsec_subnet }} +{% endif %} queue_directory = /var/spool/postfix-{{ postfix_instance[inst].name }} data_directory = /var/lib/postfix-{{ postfix_instance[inst].name }} @@ -27,11 +28,6 @@ multi_instance_group = {{ postfix_instance[inst].group | default('') }} multi_instance_name = postfix-{{ postfix_instance[inst].name }} multi_instance_enable = yes -mynetworks = 127.0.0.0/8, [::1]/128 -{%- if groups.all | length > 1 -%} - , {{ ipsec_subnet }} -{% endif %} - # No local delivery mydestination = local_transport = error:5.1.1 Mailbox unavailable -- cgit v1.2.3