From 2a2333cdfb016bb884887f46fbcbfdce6e064d74 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 25 Jun 2014 02:37:48 +0200 Subject: Assume a DNS entry for each role. E.g., ldap.fripost.org, ntp.fripost.org, etc. (Ideally the DNS zone would be provisioned by ansible, too.) It's a bit unclear how to index the subdomains (mx{1,2,3}, etc), though. --- roles/MX/templates/etc/postfix/main.cf.j2 | 6 +++--- roles/MX/templates/etc/postfix/virtual/list.cf.j2 | 2 +- roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 | 2 +- roles/MX/templates/etc/postfix/virtual/transport.j2 | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'roles/MX/templates') diff --git a/roles/MX/templates/etc/postfix/main.cf.j2 b/roles/MX/templates/etc/postfix/main.cf.j2 index 8bed701..e842537 100644 --- a/roles/MX/templates/etc/postfix/main.cf.j2 +++ b/roles/MX/templates/etc/postfix/main.cf.j2 @@ -14,7 +14,7 @@ maximal_queue_lifetime = 5d myorigin = /etc/mailname myhostname = mx{{ mxno | default('') }}.$mydomain -mydomain = {{ ansible_domain }} +mydomain = fripost.org append_dot_mydomain = no # Turn off all TCP/IP listener ports except that necessary for the mail @@ -44,9 +44,9 @@ recipient_delimiter = + # Forward everything to our internal mailhub {% if 'MTA-out' in group_names %} -relayhost = [127.0.0.1]:{{ MTA_out.port }} +relayhost = [127.0.0.1]:{{ postfix_instance["MTA-out"].port }} {% else %} -relayhost = [{{ MTA_out.host }}]:{{ MTA_out.port }} +relayhost = [outgoing.fripost.org]:{{ postfix_instance["MTA-out"].port }} {% endif %} relay_domains = diff --git a/roles/MX/templates/etc/postfix/virtual/list.cf.j2 b/roles/MX/templates/etc/postfix/virtual/list.cf.j2 index 6100c01..5988159 100644 --- a/roles/MX/templates/etc/postfix/virtual/list.cf.j2 +++ b/roles/MX/templates/etc/postfix/virtual/list.cf.j2 @@ -8,4 +8,4 @@ query_filter = (&(objectClass=FripostVirtualList)(fvl=%u)) result_attribute = fvl # Use a dedicated "virtual" domain to decongestion potential bottlenecks # on trivial_rewrite(8) due to slow LDAP lookups in tranport_maps. -result_format = %D/%U@lists.guilhem.org +result_format = %D/%U@lists.fripost.org diff --git a/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 b/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 index fe27124..a108c0d 100644 --- a/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 +++ b/roles/MX/templates/etc/postfix/virtual/mailbox.cf.j2 @@ -8,4 +8,4 @@ query_filter = (&(objectClass=FripostVirtualUser)(fvl=%u)) result_attribute = fvl # Use a dedicated "virtual" domain to decongestion potential bottlenecks # on trivial_rewrite(8) due to slow LDAP lookups in tranport_maps. -result_format = %D/%U@mda.guilhem.org +result_format = %D/%U@mda.fripost.org diff --git a/roles/MX/templates/etc/postfix/virtual/transport.j2 b/roles/MX/templates/etc/postfix/virtual/transport.j2 index 6d244dc..2250a71 100644 --- a/roles/MX/templates/etc/postfix/virtual/transport.j2 +++ b/roles/MX/templates/etc/postfix/virtual/transport.j2 @@ -1,13 +1,13 @@ reserved.locahost.localdomain reserved-alias: {% if 'LDA' in group_names %} -mda.guilhem.org smtpl:[127.0.0.1]:{{ LDA.port }} +mda.fripost.org smtpl:[127.0.0.1]:{{ postfix_instance.IMAP.port }} {% else %} -mda.guilhem.org smtps:[{{ LDA.host }}]:{{ LDA.port }} +mda.fripost.org smtps:[mda.fripost.org]:{{ postfix_instance.IMAP.port }} {% endif %} {% if 'lists' in group_names %} -lists.guilhem.org smtpl:[127.0.0.1]:{{ lists.port }} +lists.fripost.org smtpl:[127.0.0.1]:{{ postfix_instance.lists.port }} {% else %} -lists.guilhem.org smtps:[{{ lists.host }}]:{{ lists.port }} +lists.fripost.org smtps:[lists.fripost.org]:{{ postfix_instance.lists.port }} {% endif %} -- cgit v1.2.3