[exim] domainlist & mysql

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Stephen Gran
Dátum:  
Címzett: exim-users
Tárgy: [exim] domainlist & mysql
Hello all,

I know I am just doing something wrong, and I get the feeling it must be
a common error. I am in the process of setting up virtuser routing in
mysql for exim4, and I am just not getting it right. What I have in
mysql is a simple table with username, domain, and forward information
in seperate columns. I would like to generate a domainlist based on
this table, so that I can use it in conditions later.

This was my first idea, but it does not work:
domainlist virt_domains = mysql; select distinct domain from Virtusers

What this returns is a long list that is truncated by debug output, and
every domain thrown at it matches, whether it's in the list or not. No
good - open relay material there.

Trying this:
domainlist virt_domains = mysql; select distinct domain from Virtusers \
                          where domain = '$domain'


works fine, but is more overhead than I would like, since it does not
cache the entire domain list. If I dump the domains to a file, it does
read the whole list and cache it just fine, so this leads me to the
inevitable conclusion I am just doing somethign stupid.

I have a router that is working nicely, but if anyone can help me with
the domainlist generation, I would be very appreciative. I can send
quite a bit of debug output, but I didn;t think it was necessary just
yet.

TIA,
--
--------------------------------------------------------------------------
|  Stephen Gran                  | The Celts invented two things, Whiskey  |
|  steve@???             | and self-destruction.                   |
|  http://www.lobefin.net/~steve |                                         |

--------------------------------------------------------------------------