From: Tollef Fog Heen Date: Wed, 3 Aug 2011 07:30:14 +0000 (+0200) Subject: Strip out "debian rt" from subjects going into RT X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=45e2b3ae1d8932b48a8920e131900014ca57d8e0;p=mirror%2Fdsa-puppet.git Strip out "debian rt" from subjects going into RT --- diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 2605ace0c..7811b4804 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -1300,7 +1300,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)