[Exim] A question about MySQL lookup.

Top Page
Delete this message
Reply to this message
Author: Levin Lee
Date:  
To: exim-users
Subject: [Exim] A question about MySQL lookup.
Hello,

I have a question here about MySQL lookup. I put everything into MySQL, such
as localpart, domain, password, uid, gid, home, and quota. In deliveries, I
have to use three or more queries to fetch variables from MySQL database.
Can I fetch uid, gid, home, and quota in one single query and use them
everywhere in Exim configure file?

For example, in my configure now:
...
directory = \
    ${lookup mysql{select home from user where status=1 and
account='$local_part@$domain'}}/Maildir
quota = \
    ${lookup mysql{select diskquota from user where status=1 and
account='$local_part@$domain'}}
...


Is there any way to make:
...
query = "select home,diskquota from user where status=1 and
account='$local_part@$domain'"
...
...
directory = ${variable_from_query_refer_to_home}/Maildir
quota = ${variable_from_query_refer_to_diskquota}
...


Thanks a lot!
Levin