New things for a mail redirection service, with randomized local parts.
[odin-cgi] / exim-filter.in
diff --git a/exim-filter.in b/exim-filter.in
new file mode 100644 (file)
index 0000000..0a6b477
--- /dev/null
@@ -0,0 +1,11 @@
+# Exim filter -*-conf-*-
+
+if "${lookup pgsql { \
+       servers=db/odin/exim/@PASSWORD@; \
+       SELECT recip FROM odin_maildeliver \
+       WHERE lpart = '${quote_pgsql:$local_part}' AND \
+       dom = '$domain' } {!$value}{}}" matches "^(.+)\\$"
+then
+       deliver ${s_1:$1}
+       finish
+endif