[Exim] Modifying Key For Database Lookups

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Oliver Cook
日付:  
To: exim-users
題目: [Exim] Modifying Key For Database Lookups
Is it possible to change what key is used for a lookup in any way?

For example something similar to:

local_domains = cdb;/usr/exim/domains.cdb

... is what we use at the moment, but we also have a users.cdb
which is much smaller. domains.cdb is just users.cdb with an
extension on the end of every username.

I am trying to get local_domains to do a lookup on the 'username'
part of the domain. (domains are like username.domain.com)

I tried this:

local_domains = ${lookup {${extract{1}{.}{$key}}} cdb {/usr/exim/users.cdb}}

... but that failed to work. As far as I can tell Exim was just
ignoring the lookup (I guess because it's in the wrong format):

Exim version 3.22 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=System Administrator
sender address = root@hostname
Address testing: uid=0 gid=0 euid=5000 egid=5000
>>>>>>>>>>>>>>>>>>>>>>>>

Testing ollie@???
olliecook.domain.com in local_domains? no (end of list) Exim version 3.22 debug level 9 uid=0 gid=0
probably Berkeley DB version 1.8x (native mode)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=System Administrator
sender address = root@hostname
Address testing: uid=0 gid=0 euid=5000 egid=5000
>>>>>>>>>>>>>>>>>>>>>>>>

Testing ollie@???
olliecook.domain.com in local_domains? no (end of list)

It would be nice if I could get this to work because domains.cdb is
basically just 300meg of redundant data.

I think I'm on the right track, but just 'not quite there', so any
help would be gratefully received!

Ollie

-- 
Oliver Cook    Systems Administrator, ClaraNET
ollie@???      020 7903 3000 ext. 291