[prev in list] [next in list] [prev in thread] [next in thread]
List: exim-users
Subject: Re: [Exim] Modifying Key For Database Lookups
From: Oliver Cook <ollie () uk ! clara ! net>
Date: 2001-02-28 14:51:00
[Download RAW message or body]
On Wed, Feb 28, 2001 at 02:31:09PM +0000, Philip Hazel wrote:
> You don't mean that literally, I presume. What you really mean, I think
> (after some thought), is "If the domain is of the form *.domain.com, how
> can I then check it's a local domain by looking up just the first
> component?"
Indeed that is what I meant. :)
> I cannot offhand think of an easy way of achieving precisely what (I
> think) you want. If you just want to treat *.domain.com as local, then
> just put *.domain.com - that will be very fast. Assuming that domain.com
> is your domain, it may not matter if you treat x.domain.com as local
> when x isn't actually valid. You can always put this as your first
> director if it matters:
>
> check_domain:
> driver = smartuser
> domains = *.domain.com
> condition = ${lookup {${extract{1}{.}{$domain}}} cdb {/usr/exim/users.cdb}\
> {no}{yes}}
> new_address = :fail: Unknown domain
That is an ideal solution, thanks Philip.
It also occurred to me that my previous idea would have mistakenly treated
localpart@subdomain.otherisp.com as local if subdomain was a valid username
in users.cdb - d'oh!
Ollie
--
Oliver Cook Systems Administrator, ClaraNET
ollie@uk.clara.net 020 7903 3000 ext. 291
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic