eximconf: fix escaping in RT_SUBJECT macro
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Thu, 3 Oct 2019 15:16:45 +0000 (16:16 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Thu, 3 Oct 2019 15:18:41 +0000 (16:18 +0100)
It's included in a doule-quoted string, which imposes extra escaping
requirements

Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index 6dc0a59..4b57ec4 100644 (file)
@@ -303,7 +303,7 @@ GREYLIST_LOCAL_PARTS = ${if match_domain{$domain}{+virtual_domains}\
                        {${lookup{$local_part}lsearch{/etc/exim4/grey_users}{$local_part}{}}}} : \
                        ${lookup{$local_part}lsearch{/var/lib/misc/$primary_hostname/mail-greylist}{$local_part}{}}
 <%- if @is_rtmaster -%>
-RT_SUBJECT = Subject: ${if and {{first_delivery}{match {${sg {$rh_Subject:}{\N\n\s+\N}{ }}}{\N(?is)(.*?)\[?debian rt\]?[:\s]*(.*)\N}}} {$1$2}{$h_subject:}}
+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:}}
 RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map
 <%- end -%>