X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Ftemplates%2Feximconf.erb;h=774e38950b2c562e3984e20a61155cfe9f6e0c36;hb=1a18b394bd4661e2abf68adedb41f5d760830bc2;hp=de0c2ab918fe44ab6295dbb7a97414f57f3b68fe;hpb=bd99267c6cb1f4802806809562a9b1cfb31b882a;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index de0c2ab91..774e38950 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -845,6 +845,9 @@ check_recipient: <%- if nodeinfo.has_key?('heavy_exim') and nodeinfo['heavy_exim'] -%> acl_check_mime: + accept verify = certificate + accept hosts = +debianhosts + discard condition = ${if <{$message_size}{256000}} condition = ${if eq {$acl_m_prf}{blackhole}} set acl_m_srb = ${perl{surblspamcheck}} @@ -995,7 +998,6 @@ check_message: begin rewrite \N^buildd_(.*)@franck\.debian\.org$\N buildd_$1@buildd.debian.org T -\N^buildd_(.*)@klecker\.debian\.org$\N buildd_$1@buildd.debian.org T *@debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T *@people.debian.org ${lookup{$1}cdb{/var/lib/misc/${primary_hostname}/mail-forward.cdb}{$value}fail} T #*@${primary_hostname} "${if exists{/etc/exim4/email-addresses}{${lookup{$1}lsearch{/etc/exim4/email-addresses}{$value}fail}}fail}" fFs @@ -1181,6 +1183,31 @@ virt_aliases: transport_home_directory = ${extract{directory}{VDOMAINDATA}} user = ${extract{user}{VDOMAINDATA}} +# No direct match, so try doing a regex match if there's an +# aliases.regex +virt_aliases_regex: + debug_print = "R: virt_aliases_regex for $local_part$local_part_suffix@$domain" + driver = redirect + allow_defer + allow_fail + data = ${if exists{\ + ${extract{directory}{VDOMAINDATA}{${value}/aliases.regex}}}\ + {${lookup{$local_part}nwildlsearch*{\ + ${extract{directory}{VDOMAINDATA}{$value/aliases.regex}}\ + }}}} + directory_transport = address_directory + domains = +virtual_domains + file_transport = ${if eq {${extract{group_writable}{VDOMAINDATA}}}{true}{address_file_group}{address_file}} + cannot_route_message = Unknown user + group = ${extract{group}{VDOMAINDATA}} + headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}" + pipe_transport = address_pipe + qualify_preserve_domain + retry_use_local_part + transport_current_directory = ${extract{directory}{VDOMAINDATA}} + transport_home_directory = ${extract{directory}{VDOMAINDATA}} + user = ${extract{user}{VDOMAINDATA}} + userforward: debug_print = "R: userforward for $local_part${local_part_suffix}@$domain" driver = redirect @@ -1297,7 +1324,8 @@ rt_force_new_verbose: local_part_suffix = +new pipe_transport = rt_pipe data = "|/usr/bin/rt-mailgate --queue '${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}' --url https://rt.debian.org/ --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}" - headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}" + headers_remove = Subject + headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nSubject: ${if and {{first_delivery}{match {$h_subject:}{(?i)(.*?)\\\\[?debian rt\\\\]?[:\\s]*(.*)}}} {$1$2}{$h_subject:}}" # FIXME: figure out how to generalize this approach so that all of the following would work # - rt+NNNN@rt.debian.org : attach correspondence to ticket (verbose) @@ -1313,7 +1341,8 @@ rt_force_new_quiesce: local_part_suffix = +new-quiesce pipe_transport = rt_pipe data = "|/usr/bin/rt-mailgate --queue '${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}' --url https://rt.debian.org/ --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}" - headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nX-RT-Mode: quiesce" + headers_remove = Subject + headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nX-RT-Mode: quiesce\nSubject: ${if and {{first_delivery}{match {$h_subject:}{(?i)(.*?)\\\\[?debian rt\\\\]?[:\\s]*(.*)}}} {$1$2}{$h_subject:}}" rt_otherwise: debug_print = "R: rt for $local_part@$domain" @@ -1325,7 +1354,8 @@ rt_otherwise: local_part_suffix_optional pipe_transport = rt_pipe data = "|/usr/bin/rt-mailgate --queue '${lookup{${sg{$local_part}{-comment}{}}}lsearch{RT_QUEUE_MAP}}' --url https://rt.debian.org/ --extension ticket --action ${if match{$local_part}{.*-comment.*}{comment}{correspond}}" - headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}" + headers_remove = Subject + headers_add = "Delivered-To: ${local_part}${local_part_suffix}@${domain}\nSubject: ${if and {{first_delivery}{match {$h_subject:}{(?i)(.*?)\\\\[?debian rt\\\\]?[:\\s]*(.*)}}} {$1$2}{$h_subject:}}" <%- end -%>