From f8a4023f4c6b927801b0150d34b14a426aafd653 Mon Sep 17 00:00:00 2001 From: "Adam D. Barratt" Date: Sat, 5 Oct 2019 12:32:33 +0100 Subject: [PATCH] eximconf: put the escapes in the right places in RT_SUBJECT Signed-off-by: Adam D. Barratt --- modules/exim/templates/eximconf.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/exim/templates/eximconf.erb b/modules/exim/templates/eximconf.erb index 589219ed2..1b5a80231 100644 --- a/modules/exim/templates/eximconf.erb +++ b/modules/exim/templates/eximconf.erb @@ -305,8 +305,10 @@ GREYLIST_LOCAL_PARTS = ${if match_domain{$domain}{+virtual_domains}\ <%- if @is_rtmaster -%> # This subject rewrite is embedded in double-quoted strings. As such, some of # the items need more escaping than usual, otherwise \N becomes simply "N" and -# the following \n a literal newline. -RT_SUBJECT = Subject: ${if and {{first_delivery}{match {${sg{$rh_Subject:}{\\N\\n\[\\t \]\+\\N}{ }}}{\\N(?i)(.*?)\[?debian rt\]?[:\t ]*(.*)\\N}}} {$1$2}{$h_subject:}} +# the following "\[" a literal "[". +# Note that the lack of space in "Subject:${" is intentional, as the raw Subject +# header will include the leading space, if present. +RT_SUBJECT = Subject:${if and {{first_delivery}{match {${sg {$rh_Subject:}{\\n([ \\t])}{ }}}{\\N(?i)(.*?)\\[?debian rt\\]?[:\\t ]*(.*)\\N}}}{$1$2}{$h_subject:}} RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map <%- end -%> -- 2.20.1