X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/exim-config/blobdiff_plain/3e031e77077b40a0334fd4c41ea1f0f25ee73158..5d2f8b656ffbe668f50ac5354dc0b37210032576:/local.m4 diff --git a/local.m4 b/local.m4 index c403876..fd212a7 100644 --- a/local.m4 +++ b/local.m4 @@ -37,27 +37,6 @@ m4_define(<:FILTER_LOCALUSER:>, SECTION(global, priv)m4_dnl local_from_suffix = CONF_user_suffix_list -SECTION(global, process)m4_dnl -## Restrict users to plausible envelope sender addresses. This is -## surprisingly fiddly. What I actually want to say is that the local part -## must match ^$sender_ident(\$|-) and the domain part must match an -## appropriate domain; but writing a conjunction is rather tricky. And so we -## must burn some addresslist variables. -addresslist wrong_local = ! +user_extaddr -addresslist wrong_domain = ! *@+public -addresslist wrong_address = +wrong_local : +wrong_domain -untrusted_set_sender = : \ - ${if exists {CONF_sysconf_dir/auth-sender.conf} \ - {${lookup {$sender_ident} \ - lsearch {CONF_sysconf_dir/auth-sender.conf} \ - {$value}}}} : \ - ${LOOKUP_DOMAIN($sender_address_domain, - {${if and {{match_local_part {$sender_ident} {+dom_users}} \ - {match_local_part {$sender_address_local_part} \ - {+dom_locals}}} \ - {*}}})} : \ - ! +wrong_address - ###-------------------------------------------------------------------------- ### Forwarding and redirection for incoming mail. @@ -90,7 +69,7 @@ FILTER_ROUTER(dot_forward, SECTION(routers, deliver)m4_dnl ## Deliver mail to a user, in the absence of any other instructions. -m4_define(<:STRIP_HEADERS:>, <:m4_dnl +m4_define(<:DOVECOT_HEADERS:>, <:m4_dnl Content-Length, Status, X-IMAP, X-IMAPbase, m4_dnl X-Keywords, X-Status, X-UID:>)m4_dnl deliver: @@ -100,10 +79,8 @@ deliver: cannot_route_message = Unknown local part ## Strip headers used by Dovecot for its own purposes. - headers_remove = CLRSEP<::>FOREACH(<:SEP(:)$1:>, <:STRIP_HEADERS:>) - headers_add = CLRSEP<::>FOREACH(<:\ - ${if def:h_$1:{X-Distorted-Renamed-$1: $h_$1:\n}}:>, - <:STRIP_HEADERS:>) + headers_remove = RENAME_HEADERS_REMOVE(<:DOVECOT_HEADERS:>) + headers_add = RENAME_HEADERS_ADD(<:DOVECOT_HEADERS:>) DIVERT(null) ###----- That's all, folks --------------------------------------------------