# HG changeset patch # User Pascal Volk # Date 1323101821 0 # Node ID ccdfbbb1bb01ad171bf0eb4b674eefbae0a3ed5e # Parent 10e9b4855173393091ad0f10bd4d52858519963b postfix: Use pgsql functions in query templates where possible. diff -r 10e9b4855173 -r ccdfbbb1bb01 postfix/pgsql-relocated_maps.cf --- 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') diff -r 10e9b4855173 -r ccdfbbb1bb01 postfix/pgsql-transport.cf --- a/postfix/pgsql-transport.cf Mon Dec 05 12:34:29 2011 +0000 +++ b/postfix/pgsql-transport.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 transport FROM postfix_transport WHERE address='%s' +# Use this VIEW-based template if you didn't create the pgsql function +# `postfix_transport_map'. +#query = SELECT transport FROM postfix_transport WHERE address='%s' + +# the recommended, function-based template +query = SELECT transport FROM postfix_transport_map('%u', '%d') diff -r 10e9b4855173 -r ccdfbbb1bb01 postfix/pgsql-virtual_alias_maps.cf --- a/postfix/pgsql-virtual_alias_maps.cf Mon Dec 05 12:34:29 2011 +0000 +++ b/postfix/pgsql-virtual_alias_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_alias WHERE address='%s' +# Use this VIEW-based template if you didn't create the pgsql function +# `postfix_virtual_alias_map'. +#query = SELECT destination FROM postfix_alias WHERE address='%s' + +# the recommended, function-based template +query = SELECT destination FROM postfix_virtual_alias_map('%u', '%d') diff -r 10e9b4855173 -r ccdfbbb1bb01 postfix/pgsql-virtual_mailbox_maps.cf --- a/postfix/pgsql-virtual_mailbox_maps.cf Mon Dec 05 12:34:29 2011 +0000 +++ b/postfix/pgsql-virtual_mailbox_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 maildir FROM postfix_maildir WHERE address='%s' +# Use this VIEW-based template if you didn't create the pgsql function +# `postfix_virtual_mailbox_map'. +#query = SELECT maildir FROM postfix_maildir WHERE address='%s' + +# the recommended, function-based template +query = SELECT maildir FROM postfix_virtual_mailbox_map('%u', '%d') diff -r 10e9b4855173 -r ccdfbbb1bb01 postfix/pgsql-virtual_uid_maps.cf --- a/postfix/pgsql-virtual_uid_maps.cf Mon Dec 05 12:34:29 2011 +0000 +++ b/postfix/pgsql-virtual_uid_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 uid FROM postfix_uid WHERE address='%s' +# Use this VIEW-based template if you didn't create the pgsql function +# `postfix_virtual_uid_map'. +#query = SELECT uid FROM postfix_uid WHERE address='%s' + +# the recommended, function-based template +query = SELECT uid FROM postfix_virtual_uid_map('%u', '%d')