summaryrefslogtreecommitdiff
path: root/puppet/modules/site_postfix/templates
diff options
context:
space:
mode:
authorMicah Anderson <micah@leap.se>2015-09-15 11:01:29 -0400
committerMicah Anderson <micah@leap.se>2015-09-15 11:01:29 -0400
commit4c622c1b6d652effdc84899befa98c36c37d10a2 (patch)
treec9a27b79ec8e7ad71eb2175bd33cdbd8cde39d61 /puppet/modules/site_postfix/templates
parent36fea3b7f448f50d500c0ec1a30b8c745b6f8c4c (diff)
parent2b1911f17b0ed5ee5ad2384e176b84b84243802f (diff)
Merge branch 'feature/rewrite_openpgp_header_7413' into develop
Change-Id: I42a1ef661dc55fb8110e82e930f67679c3dff1f8
Diffstat (limited to 'puppet/modules/site_postfix/templates')
-rw-r--r--puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb13
1 files changed, 13 insertions, 0 deletions
diff --git a/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb b/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb
new file mode 100644
index 00000000..7af14f7d
--- /dev/null
+++ b/puppet/modules/site_postfix/templates/checks/rewrite_openpgp_headers.erb
@@ -0,0 +1,13 @@
+# THIS FILE IS MANAGED BY PUPPET
+#
+# This will replace the OpenPGP header that the client adds, because it is
+# sometimes incorrect (due to the client not always knowing what the proper URL
+# is for the webapp).
+# e.g. This will rewrite this header:
+# OpenPGP: id=4C0E01CD50E2F653; url="https://leap.se/key/elijah"; preference="signencrypt
+# with this replacement:
+# OpenPGP: id=4C0E01CD50E2F653; url="https://user.leap.se/key/elijah"; preference="signencrypt
+#
+# Note: whitespace in the pattern is represented by [[:space:]] to avoid these warnings from postmap:
+# "record is in "key: value" format; is this an alias file?" and "duplicate entry"
+/^(OpenPGP:[[:space:]]id=[[:alnum:]]+;[[:space:]]url="https:\/\/)<%= @domain %>(\/key\/[[:alpha:]]+";.*)/i REPLACE ${1}<%= @correct_domain %>${2}