DEFDIVERSION(routers/route, 402)
DEFDIVERSION(routers/remote, 404)
DEFDIVERSION(routers/virtual, 406)
-DEFDIVERSION(routers/real, 408)
-DEFDIVERSION(routers/alias, 410)
-DEFDIVERSION(routers/allspam, 412)
-DEFDIVERSION(routers/dispatch, 414)
-DEFDIVERSION(routers/forward, 416)
-DEFDIVERSION(routers/deliver, 418)
+DEFDIVERSION(routers/virtual-hooks, 408)
+DEFDIVERSION(routers/virtual-tail, 410)
+DEFDIVERSION(routers/real, 412)
+DEFDIVERSION(routers/alias, 414)
+DEFDIVERSION(routers/allspam, 416)
+DEFDIVERSION(routers/dispatch, 418)
+DEFDIVERSION(routers/forward, 420)
+DEFDIVERSION(routers/deliver, 422)
DEFDIVERSION(transports, 500)
localpartlist user_extaddr = ^CONF_user_extaddr_regexp
addresslist user_extaddr = ^CONF_user_extaddr_regexp
+## All of the `standard' local parts which ought to be provided by a domain.
+localpartlist required = postmaster : abuse
+
DIVERT(null)
###----- That's all, folks --------------------------------------------------
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})
<:VHOST_FILTER(file, filter):>,, <:
VHOST_USER:>)
+SECTION(routers, virtual-tail)m4_dnl
+## Last ditch effort for required local parts. This is a bit strange because
+## we should only try this for `final' domains -- where we're not going to
+## route using the system-wide rules -- and we want the router to decline if
+## the local part isn't one of our required set so that routing as a whole
+## fails.
+virtual_endstop:
+ VHOST
+ condition = DOMKV(final, {$value}{true})
+ driver = redirect
+ no_more
+ data = ${if match_local_part{$local_part}{+required} \
+ {DOMKV(errors_to, \
+ {$value} \
+ {DOMKV(owner, \
+ {$value} \
+ {postmaster})})} \
+ {:unknown:}}
+
DIVERT(null)
###----- That's all, folks --------------------------------------------------