MODES += hub
OPTIONS_hub = auth.m4 exchange.m4 local.m4 spam.m4
-OPTIONS_hub += user-spam.m4 vhost.m4
+OPTIONS_hub += user-spam.m4 vhost.m4 vhost-local.m4
MODES += usersat
OPTIONS_usersat = auth.m4 local.m4 satellite.m4
measure, mail to the special local-parts =postmaster= and =abuse= is
redirected to the global administrator.) If false, local parts not
routed using the =domains.conf= machinery are handled as for the
- main system domain.
+ main system domain. You probably don't want to turn this off; see
+ =sysusers= instead.
+ home :: The home directory for the virtual domain administrator.
This is available to other expansions as =$home=.
service should be invoked to find the spam-score limit for a message
sent to the virtual domain.
+ + sysusers :: If true, then mail can be delivered to general system
+ users. Local part suffixes are supported, as for the primary
+ domain. Spam limit customization can be done in the usual way.
+ Users can opt into virtual hosts by writing a
+ =~/.mail/forward.vhost=.
+
+ tls-certificate :: The name (subject to expansion) of a file
containing the TLS client certificate list to present when sending
mail to this domain. Requires a *route* entry for the target
DEFDIVERSION(routers, 400)
DEFDIVERSION(routers/virtual-spam, 402)
-DEFDIVERSION(routers/route, 404)
-DEFDIVERSION(routers/remote, 406)
-DEFDIVERSION(routers/virtual, 408)
-DEFDIVERSION(routers/virtual-hooks, 410)
-DEFDIVERSION(routers/virtual-tail, 412)
-DEFDIVERSION(routers/real, 414)
-DEFDIVERSION(routers/alias, 416)
-DEFDIVERSION(routers/alias-opts, 418)
-DEFDIVERSION(routers/smarthost, 420)
-DEFDIVERSION(routers/allspam, 422)
-DEFDIVERSION(routers/dispatch, 424)
-DEFDIVERSION(routers/forward, 426)
-DEFDIVERSION(routers/deliver, 428)
+DEFDIVERSION(routers/virtual-sysusers-spam, 404)
+DEFDIVERSION(routers/route, 406)
+DEFDIVERSION(routers/remote, 408)
+DEFDIVERSION(routers/virtual, 410)
+DEFDIVERSION(routers/virtual-sysusers, 412)
+DEFDIVERSION(routers/virtual-hooks, 414)
+DEFDIVERSION(routers/virtual-tail, 416)
+DEFDIVERSION(routers/real, 418)
+DEFDIVERSION(routers/alias, 420)
+DEFDIVERSION(routers/alias-opts, 422)
+DEFDIVERSION(routers/smarthost, 424)
+DEFDIVERSION(routers/allspam, 426)
+DEFDIVERSION(routers/dispatch, 428)
+DEFDIVERSION(routers/forward, 430)
+DEFDIVERSION(routers/deliver, 432)
DEFDIVERSION(transports, 500)
--- /dev/null
+### -*-m4-*-
+###
+### Delivery to users via vhosts for distorted.org.uk Exim configuration
+###
+### (c) 2016 Mark Wooding
+###
+
+###----- Licensing notice ---------------------------------------------------
+###
+### This program is free software; you can redistribute it and/or modify
+### it under the terms of the GNU General Public License as published by
+### the Free Software Foundation; either version 2 of the License, or
+### (at your option) any later version.
+###
+### This program is distributed in the hope that it will be useful,
+### but WITHOUT ANY WARRANTY; without even the implied warranty of
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+### GNU General Public License for more details.
+###
+### You should have received a copy of the GNU General Public License
+### along with this program; if not, write to the Free Software Foundation,
+### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+SECTION(routers, virtual-sysusers)m4_dnl
+## If the vhost delivers to system users, see if any of them match.
+FILTER_ROUTER(filter_vhost,
+ <:FILTER_LOCALUSER(CONF_userconf_dir/forward.vhost)
+ VHOST
+ condition = DOMKV(sysusers, {$value}{false})
+ local_part_suffix = CONF_user_suffix_list
+ local_part_suffix_optional = true:>)
+
+SECTION(routers, virtual-sysusers-spam)m4_dnl
+## If we're letting general system users receive mail through this vhost then
+## we should ask them about their spam-limit rules.
+USER_SPAMLIMIT_ROUTERS(<:vhost:>,
+ <:CURRENT_LOCAL_PART:>, <:$domain:>, <:$sender_address:>,
+ <:VHOST
+ condition = DOMKV(sysusers, {$value}{false}):>)
+
+###----- That's all, folks --------------------------------------------------