[Exim] Using both fields of a multi-field lookup

Pàgina inicial
Delete this message
Reply to this message
Autor: Ed Symanzik
Data:  
A: exim-users
Assumpte: [Exim] Using both fields of a multi-field lookup
I want to use a single database lookup to retrieve both the
uid and home directory.

I can do this with:

  ${lookup mysql {SELECT DISTINCT uid,homedir FROM account 
    WHERE username = '${quote_mysql:$local_part}'} {$value} fail}


I can get the directory with extract like so:

directory = ${extract{homedir}{lookup thing} fail}

But, how do I get the uid without having to do another lookup?

This:

foo = ${lookup...
directory = ${extract{homedir}{$foo} fail}
user = ${extract{uid}{$foo} fail}

doesn't work.