[Exim] I had a dream..(with queries and variables) *HELP*

Pàgina inicial
Delete this message
Reply to this message
Autor: abaddon
Data:  
A: exim-users
Assumpte: [Exim] I had a dream..(with queries and variables) *HELP*
Hello...

Pieces of my configure file:

MYSQL_DOMAIN = select name from domains where name='${quote_mysql:
$domain}'

local_domains = mysql;MYSQL_DOMAIN

virtual_local_user:

condition = ${lookup mysql{select dom_id from mail where dom_id='$DOMAIN_ID'
\
and mail_name LIKE '${quote_mysql:$local_part}'}{$value}fail}

domains = ${lookup mysql{select name from domains where id='$DOMAIN_ID'}{$value}fail}
driver = smartuser


The question is..

$DOMAIN_ID = select dom_id from domains where name='${quote_mysql:
$domain}'

1. Where/Can i put the $DOMAIN_ID query "..." ?
2. "..." So the result of the $DOMAIN_ID query would be used in the
virtual_local_user directive ?

The dream :

select dom_id from domains where name='some-local-host.com'

$dom_id=10

and than in the virtual_local_user:

domains = select name from domains where id='$dom_id'
(select name from domains where id='10')

End of the dream.

Can my dream come true ??

Thanks in advance..

Abaddon



===================================================================
EASY and FREE access to your email anywhere: http://kralweb.com/mail
===================================================================