fixed FAQ url
[exim-website.git] / config.samples / C015
1 From: Andromeda <andromeda@htmlworkshop.com> 
2 Date: Sun, 15 Nov 1998 23:24:05 +0200  (original)  
3 Date: Wed, 14 Jul 1999 21:42:18 +0200  (small change)
4
5 This approach to virtual domains has helped me a great deal, and is so easy
6 to maintain (add and modify as appropriate):
7
8 Under the main configuration settings (in your configure file):
9
10 local_domains = "domain1.com:mydomain.com:\
11                lsearch;/usr/exim/aliases/domains"
12
13 Under transports:
14
15 local_delivery:
16   driver = appendfile
17   file = /var/spool/mail/${local_part}
18
19 Under the directors settings:
20
21 system_aliases:
22   except_domains = "lsearch;/usr/exim/aliases/domains"
23   driver = aliasfile
24   file = /etc/aliases
25   search_type = lsearch
26
27 userforward:
28   except_domains = "lsearch;/usr/exim/aliases/domains"
29   no_verify
30   driver = forwardfile
31   file = .forward
32
33 localuser:
34   except_domains = "lsearch;/usr/exim/aliases/domains"
35   driver = localuser
36   transport = local_delivery
37
38 virtual:
39   domains = "lsearch;/usr/exim/aliases/domains"
40   driver = aliasfile
41   no_more
42   file = /usr/exim/aliases/$domain-aliases
43   search_type = lsearch*@
44
45 Voila. Done. This requires the following files from you:
46
47 1. domains (contains the domains that you do virtual hosting for. Its format is
48 as follows:
49
50 domain1.com
51 domain2.com
52 .
53 .
54 etc.
55
56 2. domain1.com-aliases (contains the addresses in domain1.com that you want
57 to redirect). The format is as follows:
58
59 bob: bob@ibm.net
60 adam: adam@otherdomain.com
61 .
62 .
63 etc.
64
65 /usr/exim/aliases/ is my directory where I store those files to make it
66 easier for administration.
67
68 This way it works just fine, and mail to non-existent aliases gets bounced.
69
70 The "search_type = lsearch*@" line in the "virtual" director allows you to
71 specify a default mailbox at the end of each domain file, as shown below
72 for domain1.com-aliases:
73
74 bob: bob@ibm.net
75 adam: adam@otherdomain.com
76 *: mike
77
78 All other email sent to the domain gets sent to the local user "mike".