X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fexim%2Ftemplates%2Feximconf.erb;h=774e38950b2c562e3984e20a61155cfe9f6e0c36;hb=1a18b394bd4661e2abf68adedb41f5d760830bc2;hp=131550e771d3343121ec85956ea016de1117eb86;hpb=a3cb066139d0248b252a880ce7518ef3ca05bcf1;p=mirror%2Fdsa-puppet.git diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 131550e77..774e38950 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -119,7 +119,7 @@ localpartlist local_only_users = lsearch;/etc/exim4/localusers localpartlist postmasterish = postmaster : abuse : hostmaster -hostlist debianhosts = <; ; 127.0.0.1 ; ::1 ; /var/lib/misc/thishost/debianhosts +hostlist debianhosts = <; ; 127.0.0.1 ; ::1 ; /var/lib/misc/thishost/debianhosts ; 89.16.166.49 ; 82.195.75.76 ; 2001:41b8:202:deb:bab5:0:52c3:4b4c hostlist reservedaddrs = <%= nodeinfo['reservedaddrs'] %> @@ -520,7 +520,7 @@ check_recipient: accept verify = certificate <%- end -%> - accept hosts = : 127.0.0.1 : @ + accept hosts = <; ::1 ; 127.0.0.1 ; @ warn acl = acl_getprofile condition = ${if eq{$acl_m_prf}{}} set acl_m_prf = $acl_m_rprf @@ -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}} @@ -902,7 +905,8 @@ check_message: } message = Mail to this address needs to be PGP-signed - accept verify = certificate + accept verify = certificate + accept hosts = +debianhosts deny condition = ${if eq {$acl_m_prf}{PopconMail}{no}{yes}} !verify = header_syntax @@ -994,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 @@ -1180,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 @@ -1296,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) @@ -1312,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" @@ -1324,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 -%>