From 4806403d9530b7c0eb5b7e048e6a2caac136addf Mon Sep 17 00:00:00 2001 Message-Id: <4806403d9530b7c0eb5b7e048e6a2caac136addf.1714526959.git.mdw@distorted.org.uk> From: Mark Wooding Date: Thu, 2 Apr 2015 02:35:19 +0100 Subject: [PATCH] exchange.m4, lists.m4: Standard routing for `service=no' domains. Organization: Straylight/Edgeware From: Mark Wooding Domains listed in `domains.conf' with `service = false' or similar get the standard routing arrangements, and aren't subject to virtual-host processing. --- exchange.m4 | 12 ++++++++++-- lists.m4 | 4 ---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/exchange.m4 b/exchange.m4 index 1e82249..cfdcf9a 100644 --- a/exchange.m4 +++ b/exchange.m4 @@ -70,7 +70,12 @@ SECTION(routers, remote)m4_dnl ## Send mail on to a host in our own network. We must apply extra security. local: driver = dnslookup - domains = ! +known : CONF_master_domain : *.CONF_master_domain + domains = ${if bool {${LOOKUP_DOMAIN($domain, + {KV(service, {$value}{true})}, + {false})}} \ + {}{ ! +public : \ + CONF_master_domain : \ + *.CONF_master_domain }} self = fail transport = smtp_local no_more @@ -78,7 +83,10 @@ local: ## Send mail on to unknown hosts. remote: driver = dnslookup - domains = ! +known + domains = ${if bool {${LOOKUP_DOMAIN($domain, + {KV(service, {$value}{true})}, + {false})}} \ + {}{ ! +public }} self = fail transport = smtp no_more diff --git a/lists.m4 b/lists.m4 index 58cb948..42427af 100644 --- a/lists.m4 +++ b/lists.m4 @@ -44,10 +44,6 @@ domainlist thishost = @ : @[] : \ stratocaster=strat }}} \ {$item.$qualify_domain}} domainlist public = +thishost : CONF_sysdomains -domainlist known = +public : \ - ${if exists{CONF_sysconf_dir/domains.conf} \ - {partial0-lsearch; CONF_sysconf_dir/domains.conf} \ - {}} ## Some magic lists used because `match_local_parts' and friends don't expand ## their right-hand sides. -- [mdw]