summaryrefslogtreecommitdiffstats
path: root/roles/IMAP/files/etc/postfix
diff options
context:
space:
mode:
Diffstat (limited to 'roles/IMAP/files/etc/postfix')
-rw-r--r--roles/IMAP/files/etc/postfix/recipient_canonical.pcre4
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/IMAP/files/etc/postfix/recipient_canonical.pcre b/roles/IMAP/files/etc/postfix/recipient_canonical.pcre
new file mode 100644
index 0000000..07c5859
--- /dev/null
+++ b/roles/IMAP/files/etc/postfix/recipient_canonical.pcre
@@ -0,0 +1,4 @@
+# Restore the original envelope recipient (drop our internal domain).
+# Extensions are preserved as they are included in $2.
+
+/^([^\/]+)\/(.+)@[^@]+$/ $2@$1