]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/exim/templates/eximconf.erb
Merge branch 'master' of ssh://puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet
[dsa-puppet.git] / modules / exim / templates / eximconf.erb
index 547cf6d7a7d8ad205150b3111715229dc0f59968..2a557adf6168c4a2f698c6e0e5534ee9a24a7388 100644 (file)
@@ -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
@@ -1180,6 +1184,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 +1325,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 +1342,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 +1355,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 -%>