[EXIM] relay domains and DBM files - wildcarding

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Paul Mansfield
Fecha:  
A: Philip Hazel
Cc: Exim users mailing list
Temas antiguos: Re: [EXIM] virtual domain help
Asunto: [EXIM] relay domains and DBM files - wildcarding

This is very interesting and I guess would be useful in the FAQ, but I'd also
like to improve the way we've done subdomains for "relay_domains" where we
have a DBM database. Hopefully my question will also be useful to the
"cookbook" since it explains how to do something as well as raises a Q.

On Thu, 29 Oct 1998, Philip Hazel wrote:
> On Thu, 29 Oct 1998, Mark Seuffert (Pirates) wrote:
> > How about a better RE... as in perl... '^*another.de:*.another.de'
> > the ^ stands for the beginning of the line. Is it understandable what I
> and thereby make the matching as complicated as you like. If a pattern 
> item starts with ^ it is interpreted as a regular expression. You could 
> say
>    relay_domains = ^(.*\.|)another\.de$
>if you want to. That would match 'another.de' and any domain of the form 
>'x.another.de' where x is any number of characters.


if you had a DBM database of domains to accept, and didn't want wildcard
subdomains, you'd have a file called 'accept-domains' which lists the domains
one per line, like this:
    customer.com
    customer.co.uk
    ...etc...


which you build into a DBM file like this:
    exim_dbmbuild accept-domains accept-domains


and tell Exim about it in the configure file with this line:
    relay_domains = dbm;/...blah.../accept-domains


Now, I've been worrying about the way you can do wildcard subdomains. If you
use 'partial-dbm' instead of 'dbm' to do wildcard lookups, then 'customer.com'
and 'sub.customer.com' would both work as intended, but also you'd have the
side-effect that 'noncustomer.com' would also work!

Is there a better way of doing this? Have I got my head round way DBM works OK?

Thanks!

Paul


--
*** Exim information can be found at http://www.exim.org/ ***