--- a/postfix/pgsql-relocated_maps.cf Mon Dec 05 12:34:29 2011 +0000
+++ b/postfix/pgsql-relocated_maps.cf Mon Dec 05 16:17:01 2011 +0000
@@ -11,4 +11,9 @@
dbname = mailsys
# The SQL query template used to search the database
-query = SELECT destination FROM postfix_relocated WHERE address='%s'
+# Use this VIEW-based template if you didn't create the pgsql function
+# `postfix_relocated_map'.
+#query = SELECT destination FROM postfix_relocated WHERE address='%s'
+
+# the recommended, function-based template
+query = SELECT destination FROM postfix_relocated_map('%u', '%d')