### -*-m4-*- ### ### Virtual host support for distorted.org.uk Exim configuration ### ### (c) 2012 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. m4_define(<:VHOST:>, <:domains = partial0-lsearch; CONF_sysconf_dir/domains.conf condition = DOMKV($1):>) m4_define(<:VHOST_FILTER:>, <:FILTER_BASE VHOST(<:$1:>) $2 = ${expand:DOMKV($1, {$value} fail)}:>) m4_define(<:VHOST_USER:>, <:user = DOMKV(owner, {$value}{CONF_filter_user}) errors_to = DOMKV(errors_to, {$value} fail):>) ###-------------------------------------------------------------------------- ### Routers and transports for virtual hosting. 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: driver = manualroute self = fail VHOST(route) route_data = DOMKV(route, {$value} fail) same_domain_copy_routing = true transport = smtp no_more SECTION(routers, virtual)m4_dnl ## 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 DIVERT(null) ###----- That's all, folks --------------------------------------------------