Copyright (c) 1999, 2002
	Vadim Vygonets <vadik-domains@vygo.net>.  All rights reserved.

These are the Exim 4 routers which handle mail to virtual
domains, as described below.  The routers should be put after the
dnslookup router but before the routers for local domains.

/var/exim/domains/list.raw is a database translating the name of
the virtual domain to the base name of the domain config files,
such as:
	virtual.dom:	virtual
	*.virtual.dom:	virtual
	another.dom:	another
	*.another.dom:	another

For all virtual domains, privileged aliases (such as Poasmaster)
should be recorded in the file /var/exim/domains/admin.raw.  This
is a canonical alias file, with no which does not preserves
domains (i.e., domainless aliases are qualified with the domain
specified in qualify_domain).

For virtual.dom, say, /var/exim/domains/virtual.raw is an alias
file, contains aliases for users.  It also has special entries
ending with with a hyphen or a plus sign, for local parts ending
with suffixes.  The difference between the two is that for
entries ending with a hyphen the suffixes get stripped during the
redirection, and for those ending with a plus the suffixes are
preserved.  Note that these entries are processed later than the
others, which enables the administrator to redirect, e.g., 'foo',
'foo-bar' and other local parts starting with 'foo' (the latter
by the entry 'foo-') to different unrelated addresses.  Examples
may be found in the files in the domains/ directory.

The rewrite rule works only for suffixes matching '-*', because
the target remote domain for which it was implemented only
supports '-*' suffixes.  Adding suffixes matching '+*' and
translating minuses to pluses and vice versa when needed is left
as an exercise to the reader.

Note that it was possible to implement this using the exim filter
in the user's .forward file, but not all the users of the virtual
domains have shell accounts on this box.  And nobody wants them
to.  When they want to change their e-mail forwarding address,
they just contact me.

Note also that I, having a shell account there, have a .forward
file forwarding all my mail to the virtual domain, preserving
suffixes:
	deliver user$local_part_suffix@virtual.dom

The .raw suffix on the database files was added to simplify the
Makefile rules that make the dbm databases.  The Makefile is for
4.4BSD make(1) (Sprite pmake), although the box itself is a Linux
machine, but I, being a BSD junkie, wrote a BSD Makefile.  It has
has variable definitions that you might need to change to make it
work on other systems and with other DBM libraries.

Finally, scripts/newaliases rebuilds everything.
