new images
[exim-website.git] / config.samples / C031
1 Date: Tue, 23 Nov 1999 02:49:32 +0200
2 From: Vadim Vygonets <vadik@cs.huji.ac.il>
3
4 Something Hans Matzen and I did.
5
6 # These are config file snippets for handling certain remote
7 # addresses as local, and making only real external addresses
8 # visible to users.
9
10
11 # Copyright (c) 1999
12 #       Hans Matzen <hans@tm.informatik.uni-frankfurt.de>,
13 #       Vadim Vygonets <vadik@vygo.net>.  All rights reserved.
14
15 #################################################################
16 # These are config file snippets for handling certain remote
17 # addresses as local, and making only real external addresses
18 # visible to users.
19 #
20 # First, adjust values of the following definitions, which will
21 # be used in configuration snippets below:
22
23 EXIM_DIR        = /var/exim
24 LOCAL_DOM       = home.dom
25 LOCAL_NET       = 192.168.0.0/16
26 SMART_HOST      = cc.huji.ac.il
27
28
29 # The scheme is to use global addresses everywhere, which is done
30 # by rewriting envelope sender and all headers, using a dbm file
31 # EXIM_DIR/in2ex, which maps internal local parts to external
32 # e-mail addresses using entries like:
33 #       user:   someone@remote.dom
34 #
35 # To do this, it good to hide hostnames in all envelope and
36 # header addresses first, using this rewriting rule:
37
38 *@*.LOCAL_DOM   $1@LOCAL_DOM                                            Eh
39
40 # Then, rewrite envelope sender and all headers to external
41 # addresses with this rule:
42
43 *@LOCAL_DOM     ${lookup{${lc:$1}}dbm{EXIM_DIR/in2ex}{$value}fail}      Fh
44
45
46 # This means that envelope recipients must be somehow rewritten
47 # back to local addresses, which is done in one of the two
48 # proposed ways (you choose).
49 #
50 # One way to do it is by rewriting, using a dbm file
51 # EXIM_DIR/ex2in, which maps external e-mail addresses to
52 # internal local parts using entries like:
53 #       someone@remote.dom:     user
54 #
55 # This is done with the rewriting rule:
56 #
57 # *@*   ${lookup{${lc:$0}}dbm{EXIM_DIR/ex2in}{$value@LOCAL_DOM}fail}    T
58
59
60 # The preferred way to do it is by treating certain e-mail
61 # addresses on remote domains as local, using route_list and self
62 # options to the domainlist routers, looking up e-mail addresses
63 # in dbm file EXIM_DIR/ex2in and throwing values away.  This is
64 # an example of such router.  It should probably the only router
65 # in the configuration.
66
67 smart_route:
68    driver = domainlist
69    transport = remote_smtp
70    route_list = "*      ${lookup{$local_part@$domain}dbm\
71                           {EXIM_DIR/ex2in}{@}{SMART_HOST}}      bydns_a"
72    self = local
73
74
75 # Then, IF local parts of some of your users are different in
76 # their internal and external addresses, it's nice to have the
77 # internal_adjust smartuser director to rewrite the address.  It
78 # should probably be the first director.
79
80 internal_adjust:
81   driver = smartuser
82   new_address = "${lookup{${lc:$local_part@$domain}}dbm{EXIM_DIR/ex2in}\
83                    {$value@LOCAL_DOM}fail}"
84