On Sat, 2009-02-14 at 21:31 -0800, Marc Perkel wrote:
> Trying to do a DBM lookup.
>
> condition =
> ${lookup{$domain}dbm{/etc/exim/control/run/alllocal.db}{yes}{no}}
>
> But - if example.com is in the file it will also match xxx.example.com
Are you sure?
> How do I do a lookup where xxx.example.com won't match if example.com is
> in the file but will match if xxx.example.com is in the file.
Taking your example, I created a two-line text file and converted it to
DBM format using exim_dbmbuild:
example.com
xxx.example.com
Then using exim -be I tried:
> ${lookup{example.com}dbm{alllocal}{yes}{no}}
yes
> ${lookup{xxx.example.com}dbm{alllocal}{yes}{no}}
yes
> ${lookup{marcperkel.example.com}dbm{alllocal}{yes}{no}}
no
Looks to my (untrained, I try not to use DBM files much) eye that your
assertin is invalid. But you did try this before posting, right?
Graeme
--
## List details at http://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/