[exim] DB lookup caching and multiple columns/fields

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Robert Blayzor
Datum:  
To: exim-users@exim.org
Betreff: [exim] DB lookup caching and multiple columns/fields
I am looking for a way to optimize/limit the number of queries that need to be executed to the database server for single email transactions. Currently there are several different individual queries that lookup homedir, auto responder, user forward, quota, etc.

These can all be done with a single SQL query using multiple columns and assuming taking advantage of Exim's built in lookup caching.

Per the Exim doc:
-8<---
If the result of the query contains more than one field, the data for each field in the row is returned, preceded by its name, so the result of

${lookup pgsql{select home,name from users where id='foobar'}{$value}}

might be

home=/home/foobar name="User Foo"
-8<---


That said, is there a build in function in Exim that allows you to grab those multiple elements out of the string without having to create some crazy regex match to get the fields your looking for on each one?

ie: does something like this work or make sense?

${lookup pgsql{select home,name from users where id='foobar'}{$value:home}}



--
Robert Blayzor
INOC, LLC
rblayzor@???
http://www.inoc.net/~rblayzor/