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

This is the Exim configuration file of a machine which delivers
mail to several local domains, where the mail is delivered
locally, several hairy domains, handled as described below, and a
half-virtual domain, which is first processed by its special
alias file, then processed as other local domains (including the
processing by the global alias file).

/var/exim/halfvirt is a database translating the name of the
half-virtual domain to the portion of the domain alias file name,
such as:
	half.dom:	half
which results in /etc/aliases.half being the alias file for
the domain.

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

For hairy.dom, say, /var/exim/domains/hairy.aliases.raw is a
plain alias file, which _must_ contain a postmaster address, and
may contain may contain other aliases for users:
	postmaster:	admin-postmaster
	user:		user@another.dom
	another:	somebody@yet.another.dom

/var/exim/domains/hairy.rewrite.raw is a rewrite database for the
domain.  It contains lines such as:
	admin:		admin@some-other.dom
	foo:		bar@baz.dom

Thus, foo@hairy.dom gets rewritten as bar@baz.dom, as if it were
in the alias file.  However, foo-quux@hairy.dom gets rewritten as
bar-quux@baz.dom.  Likewise, the postmaster address gets
rewritten twice:
	postmaster@hairy.dom
	  -> admin-postmaster@hairy.dom
	  -> admin-postmaster@remote.dom

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 hairy
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 hairy domain, preserving
suffixes:
	deliver user$local_part_suffix@hairy.dom

When I send mail from that machine, I want envelope sender and
From: header to be rewritten to the most appropriate address.
For this, domains/rwdb.raw exists.

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 an i486
Linux 2.0 machine, but I, being a BSD junkie, wrote a BSD
Makefile.  To make this Makefile work on other systems, you will
probably have to change the suffixes and some rules.

There is an example of the domain databases in the domains
directory.

Finally, scripts/newaliases rebuilds everything.
