[prev in list] [next in list] [prev in thread] [next in thread] 

List:       exim-users
Subject:    Re: [EXIM] Virtual Domain Wildcards.
From:       Peter Radcliffe <pir () pir ! net>
Date:       1998-05-27 16:49:26
[Download RAW message or body]

Mark Lowes <hamster@lspace.org> probably said:
> The entity claiming to be Julian wrote...
> [...]
> > > I am runnign exim with virtual domain aliases.  But I need to know if I
> > > can use wildcards in the domain dbm file.
> [...]
> > > *@foo.com      blah@isp.com
> > > 
> > > so everything @foo.com goes to blah@isp.com
> [...]
> > There are several ways of doing that.
> > You can do it with rewrite rules, but a number of different people have 
> > independantly come up with a scheme such that you have an entry in your
> > aliases file for that domain called something like
> 
> I think what he's trying to do is integrate it into a virtual domain
> database lookup.  The easiest way I've found to do this (from an idea
> off the list, backed up with some horrible scripts.) is to use two
> directors.

I do this somewhat differently.
The only requirement is you have a seperate db file for each virtual
domain - I don't have a problem with this, some people do but I think
it is more efficiant and nicer.
(I also break it down to sub directories of the first character of the
domain to be slightly more efficient and so it scales better).

>From my config file:
# does your db implientation require .db at the end of db file names ?
# uncomment whichever you need.
DBEXT = .db
#DBEXT = 

# add dbm;/usr/local/etc/exim/dbm/virtualDBEXT to your local_domains

# director:
# deal with virtual domains.
virtual:
  driver = aliasfile
  domains = dbm;/usr/local/etc/exim/dbm/virtualDBEXT
  no_more
  rewrite = false
  file = /usr/local/etc/exim/domains/${lc:${length_1:${domain}}/${domain}}DBEXT
  search_type = dbm*

All you have to do to enable a domain is add it to 
/usr/local/etc/exim/dbm/virtual
and make sure the db file in /usr/local/etc/exim/domains exists.

Since the search_type is dbm* if there is a * entry it is used as a default.

I have alias files along the lines of:
foo.pir.net:
*: pir@pir.net
info: fred@pir.net

P.

-- 
pir               pir@pir.net      pir@shore.net      pir@leftbank.com


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic