m4_define(<:VHOST:>,
<:domains = ${if exists{CONF_sysconf_dir/domains.conf} \
{partial0-lsearch; CONF_sysconf_dir/domains.conf} \
- {}}
- condition = DOMKV($1):>)
+ {}}:>)
m4_define(<:VHOST_FILTER:>,
<:FILTER_BASE
- VHOST(<:$1:>)
- $2 = ${expand:DOMKV($1, {$value} fail)}:>)
+ VHOST
+ condition = DOMKV($2, {true}{false})
+ router_home_directory = DOMKV(home, {$value} fail)
+ more = ${if bool{DOMKV(final, {$value}{true})} {false} {true}}
+ $1 = ${expand:DOMKV($2)}:>)
m4_define(<:VHOST_USER:>,
<:user = DOMKV(owner, {$value}{CONF_filter_user})
errors_to = DOMKV(errors_to, {$value} fail):>)
SECTION(routers, route)m4_dnl
## If we're a front-end for some other domain, or we have special information
## about the domain, then pass stuff along as instructed.
-route:
+virtual_route:
driver = manualroute
self = fail
- VHOST(route)
- route_data = DOMKV(route, {$value} fail)
+ VHOST
+ condition = DOMKV(route, {true}{false})
+ route_data = DOMKV(route)
same_domain_copy_routing = true
transport = smtp
no_more
## Remap recipients according to the virtual host's instructions. This must
## be done in two passes, so that we can identify the correct user's spam
## threshold during address verification.
-virtual_verify_data:
- VHOST_FILTER(redirect, data)
- FILTER_VERIFY
-virtual_verify_file:
- VHOST_FILTER(filter, file)
- FILTER_VERIFY
-
-virtual_filter_data:
- VHOST_FILTER(redirect, data)
- VHOST_USER
-virtual_filter_file:
- VHOST_FILTER(filter, file)
- VHOST_USER
+FILTER_ROUTER(virtual_data,
+ <:VHOST_FILTER(data, redirect):>,, <:
+ VHOST_USER:>)
+FILTER_ROUTER(virtual_file,
+ <:VHOST_FILTER(file, filter):>,, <:
+ VHOST_USER:>)
DIVERT(null)
###----- That's all, folks --------------------------------------------------