postfix/pgsql-virtual_mailbox_domains.cf
author martin f. krafft <madduck@madduck.net>
Sun, 15 Apr 2012 17:51:00 +0200
branchv0.6.x
changeset 550 867d950ce7b7
parent 159 78b6b06188d3
permissions -rw-r--r--
Fix transport_maps function for non-existent domains The postfix_transport_maps function had a bug causing 2012-04-15 17:40:22 CEST LOG: statement: SELECT transport FROM postfix_transport_map('logcheck', 'domine.madduck.net'); 2012-04-15 17:40:22 CEST ERROR: query returned no rows when the domain was not in the database. This would make did be NULL and make the query fail. This patch moves the tid query until after a check for did. If the latter is NULL, the function RETURNs (rather than fails).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
105
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
     1
# All parameters are described in pgsql_table(5) / PGSQL PARAMETERS
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
     2
#
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
     3
# The hosts that Postfix will try to connect to and query from.
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
     4
hosts = localhost
11
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     5
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     6
# The user name and password to log into the pgsql server.
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     7
user = postfix
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     8
password = some_password
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
     9
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    10
# The database name on the servers.
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    11
dbname = mailsys
7a5bd38c5b98 * 'pgsql-virtual_mailbox_domains.cf'
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff changeset
    12
105
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
    13
# The SQL query template used to search the database
0332b85f55e1 Updated Postfix PostgreSQL client configuration files
Pascal Volk <neverseen@users.sourceforge.net>
parents: 76
diff changeset
    14
query = SELECT gid FROM postfix_gid WHERE domainname='%s'