### -*-m4-*- ### ### Local senders and recipients 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(<:FILTER_LOCALUSER:>, <:FILTER_BASE check_local_user ignore_enotdir sieve_useraddress = $local_part sieve_subaddress = CONF_user_extaddr_fixup sieve_vacation_directory = CONF_userconf_dir/vacation condition = ${if exists {<:$1:>}} file = <:$1:>:>) ###-------------------------------------------------------------------------- ### Be flexible about originator addresses, as long as they probably work. SECTION(global, priv)m4_dnl local_from_suffix = CONF_user_suffix_list ###-------------------------------------------------------------------------- ### Forwarding and redirection for incoming mail. SECTION(routers, real)m4_dnl ## A special hack to get mail to a user who has a forward file. Only for ## special effects. real: driver = accept check_local_user local_part_prefix = real- transport = deliver condition = ${if match_ip {$sender_host_address} \ {<; ; 127.0.0.1 ; ::1}} SECTION(routers, forward)m4_dnl ## Handle user forward files. Each user is granted an arbitrary number of ## additional mailboxes named USER-SUFFIX. Such addresses are handled by a ## filter file `~/.mail/forward.suffix' in the USER's home directory. The ## filter may reject the incoming message (which is reported as an SMTP ## rejection if possible). Mail sent directly to the user is handled through ## `~/.mail/forward', or `~/.forward', or if neither of those exists, by ## writing the message to `/var/mail/USER'. FILTER_ROUTER(filter_suffix, <:FILTER_LOCALUSER(CONF_userconf_dir/forward.suffix) local_part_suffix = CONF_user_suffix_list:>) FILTER_ROUTER(filter, <:FILTER_LOCALUSER(CONF_userconf_dir/forward):>) FILTER_ROUTER(dot_forward, <:FILTER_LOCALUSER($home/.forward):>) SECTION(routers, deliver)m4_dnl ## Deliver mail to a user, in the absence of any other instructions. m4_define(<:DOVECOT_HEADERS:>, <:m4_dnl Content-Length, Status, X-IMAP, X-IMAPbase, m4_dnl X-Keywords, X-Status, X-UID:>)m4_dnl deliver: driver = accept check_local_user transport = deliver cannot_route_message = Unknown local part ## Strip headers used by Dovecot for its own purposes. headers_remove = RENAME_HEADERS_REMOVE(<:DOVECOT_HEADERS:>) headers_add = RENAME_HEADERS_ADD(<:DOVECOT_HEADERS:>) DIVERT(null) ###----- That's all, folks --------------------------------------------------