eximconf: add explanatory comment for RT_SUBJECT's escaping
authorAdam D. Barratt <adam@adam-barratt.org.uk>
Thu, 3 Oct 2019 18:29:17 +0000 (19:29 +0100)
committerAdam D. Barratt <adam@adam-barratt.org.uk>
Sat, 5 Oct 2019 11:33:02 +0000 (12:33 +0100)
Signed-off-by: Adam D. Barratt <adam@adam-barratt.org.uk>
modules/exim/templates/eximconf.erb

index 4b57ec4..589219e 100644 (file)
@@ -303,6 +303,9 @@ 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 -%>
+# 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:}}
 RT_QUEUE_MAP = /srv/rt.debian.org/mail/rt_queue_map
 <%- end -%>