Exim 4.72 release
[exim-website.git] / config.samples / C001
1 Date: Thu, 4 Dec 1997 14:16:22 -0800
2 From: Stuart Lynne <sl@poste.com>
3
4 This config will support delivery across multiple systems using
5 NIS to lookup delivery addresses from the mail.aliases database.
6
7 It seems to be working fairly well. I'm including a sample mail.aliases
8 file. It shows a setup for four different domains. With mail being
9 delivered to three different systems.
10
11 Mail is delivered to two different types of mailboxes. If you alias
12 mail to user@machine then it gets delivered to mailbox in /var/mail
13 as normal. If you alias to user%virtual.domain@machine then it
14 gets delivered to /var/mail/virtual.domain/user.
15
16 Each of the domains you want to handle should have MX records like:
17
18         IN MX 10 virtual0.fireplug.net
19         IN MX 10 virtual1.fireplug.net
20         IN MX 20 relay.fireplug.net
21
22 The two virtualN systems are the ones to use the included config.
23
24
25 ######################################################################
26 #                  Runtime configuration file for Exim               #
27 ######################################################################
28
29
30 # This is a default configuration file which will operate correctly in
31 # uncomplicated installations. Please see the manual for a complete list
32 # of all the runtime configuration options.
33
34
35 # This file is divided into several parts, all but the last of which are
36 # terminated by a line containing the word "end". The parts must appear
37 # in the correct order, and all must be present (even if some of them are
38 # in fact empty). Blank lines, and lines starting with # are ignored.
39
40
41
42 ######################################################################
43 #                    MAIN CONFIGURATION SETTINGS                     #
44 ######################################################################
45
46 # Specify your host's canonical name here. If this option is not set, the
47 # uname() function is called to obtain the name.
48 # primary_hostname =
49
50 # Specify the domain you want to be added to all unqualified addresses
51 # here. If this option is not set, the primary_hostname value is used.
52 # qualify_domain =
53
54 # If you want unqualified recipient addresses to be qualified with a different
55 # domain to unqualified sender addresses, specify the recipient domain here.
56 # If this option is not set, the qualify_domain value is used.
57 # qualify_recipient =
58
59 # Specify your local domains as a colon-separated list here. If this option
60 # is not set, the qualify_recipient value is used as the only local domain.
61 # If you do not want to do any local deliveries, uncomment the following line,
62 # but do not supply any data for it.
63 # local_domains =
64
65 # No local deliveries will ever be run under the uids of these users.
66 never_users = root
67
68 # If you want Exim to support the "percent hack" for all your local domains,
69 # uncomment the following line. This is the feature by which mail addressed
70 # to x%y@z (where z is one of your local domains) is locally rerouted to
71 # x@y and sent on. Otherwise x%y is treated as an ordinary local part.
72 # percent_hack_domains=*
73
74 # If you are running Exim under its own uid (recommended), then you should
75 # set up that uid as a trusted user by de-commenting the following and
76 # changing the name if necessary.
77
78 trusted_users = uucp
79
80 # required to allow customer domains mx'd to here to use us
81 relay_domains_include_local_mx
82
83 spool_directory = /var/spool/exim
84 log_file_path = "/var/log/exim/%slog"
85
86
87 # rbl configuration
88 prohibition_message = contact postmaster@fireplug.net for further info
89 recipients_reject_except = postmaster@fireplug.net
90 rbl_domains = "rbl.maps.vix.com.:rbl.fireplug.net."
91
92 end
93
94
95 ######################################################################
96 #                      TRANPORTS CONFIGURATION                       #
97 ######################################################################
98
99 ###################################
100 # 1. These transports are used for local delivery to user mailboxes.
101
102 procmail_pipe:
103   driver = pipe
104   from_hack
105   command = "/usr/bin/procmail -t -o -d ${local_part}"
106
107 mbox_delivery:
108   driver = appendfile
109   #maildir_format
110   #create_directory
111   file = /var/mail/${domain}/${local_part}
112   user = mail
113   group = mail
114 # mode = 0660
115
116 ###################################
117 # 2. This transport is used for delivering messages over SMTP connections.
118 smtp:
119   driver = smtp
120
121 ###################################
122 # 3. this is for forwarding uucp mail
123 uux_domain:
124   driver =  pipe
125   command = "/usr/bin/uux - -r ${domain}!rmail ${local_part}@${domain}"
126   pipe_as_creator
127   return_output
128
129 ###################################
130 # 4. Misc transports used internally
131
132 # This transport is used for handling pipe addresses generated by alias
133 # or .forward files. It has a conventional name, since it is not actually
134 # mentioned elsewhere in this configuration file.
135 address_pipe:
136   driver = pipe
137   ignore_status
138   return_output
139
140 # This transport is used for handling file addresses generated by alias
141 # or .forward files. It has a conventional name, since it is not actually
142 # mentioned elsewhere in this configuration file.
143 address_file:
144   driver = appendfile
145
146 # This transport is used for handling autoreplies generated by the filtering
147 # option of the forwardfile director. It has a conventional name, since it
148 # is not actually mentioned elsewhere in this configuration file.
149 address_reply:
150   driver = autoreply
151
152 end
153
154
155 ######################################################################
156 #                      DIRECTORS CONFIGURATION                       #
157 ######################################################################
158
159 #################################
160 # 1. Check for domains aliased to virtual*.fireplug.net
161
162 # if local mx was to virtual.fireplug.net, lookup in NIS mail.aliases, eventually ldap
163 # partial0 requires fixed exim, allows for per domain wildcard
164 virtual_fireplug_net:
165   condition = "${if match{$self_hostname}{virtual..fireplug.net}{$domain}}"
166   driver = aliasfile
167   search_type = partial0-nis*
168   file = mail.aliases
169   expand
170   include_domain
171
172 #################################
173 # 2. Check for domains aliased to uucp.fireplug.net
174
175 # if local mx was to uucp.fireplug.net then forward via uux_domain transport
176 uucp_fireplug_net:
177   condition = "${if match{$self_hostname}{uucp.fireplug.net}{$domain}}"
178   driver = smartuser
179   transport = uux_domain
180
181
182 #################################
183 # 3. Conventional mail processing, may not be required for fireplug
184
185 system_aliases:
186   domains = @
187   driver = aliasfile
188   file = /var/etc/aliases
189   search_type = lsearch
190
191 userforward:
192   domains = @
193   no_verify
194   driver = forwardfile
195   file = .forward
196
197 #################################
198 # 4. Deliver local mailboxes
199
200 local_mbox:
201   condition = "${if match{$local_part}{.*%.*}{$domain}}"
202   driver = smartuser
203   transport = mbox_delivery
204   new_address = "${if match{$local_part}{(.*)%.*}{$1}{$domain}}@${if match{$local_part}{.*%(.*)}{$1}{$domain}}"
205
206 # This director matches local user mailboxes.
207 procmail:
208   domains = @
209   driver = localuser
210   transport = procmail_pipe
211
212 end
213
214
215
216 ######################################################################
217 #                      ROUTERS CONFIGURATION                         #
218 ######################################################################
219
220 #################################
221 # 1. Check to see if we can get rid of it by sending it to someone lese
222 #
223 # This router routes to remote hosts over SMTP using a DNS lookup with default options.
224 #
225 # The self option tells exim to continue looking at additional
226 # routers if the MX for a domain points at the local host.
227
228 lookuphost:
229   driver = lookuphost
230   self = fail_soft
231   transport = smtp
232
233 #################################
234 # 2. Special cases here - keep to a bare minimum
235 #
236 # if domain is nwnet.org && primary_hostname is nero.fireplug.net
237 nwnet_org:
238   condition = "${if match{$primary_hostname}{nero.fireplug.net}{$domain}}"
239   domains = "nwnet.org"
240   driver = domainlist
241   transport = smtp
242   route_list = "* nwnet.nwnet.org"
243
244 #
245 # End of Special cases here - keep to a bare minimum
246
247 #################################
248 # 3. We have something that seems to be MX'd to here
249 #
250 # by default, anything that is a local MX will get matched here
251 # This must be set to something reasonable.
252 #
253 # Currently we punt to local director's for further processing
254 self:
255   driver = lookuphost
256   self = local
257   transport = smtp
258
259 #################################
260 # 4. IP literal - required by RFC's
261
262 # This router routes to remote hosts over SMTP by explicit IP address
263 # given as a "domain literal" in the form [nnn.nnn.nnn.nnn]. The RFCs
264 # require this facility, which is why it is enabled by default in Exim.
265 literal:
266   driver = ipliteral
267   transport = smtp
268
269 end
270
271
272 ######################################################################
273 #                      RETRY CONFIGURATION                           #
274 ######################################################################
275
276 # This single retry rule applies to all domains and all errors. It specifies
277 # retries every 15 minutes for 2 hours, then increasing retry intervals,
278 # starting at 2 hours and increasing each time by a factor of 1.5, up to 16
279 # hours, then retries every 8 hours until 4 days have passed since the first
280 # failed delivery.
281
282 # Domain               Error       Retries
283 # ------               -----       -------
284
285 *                      *           F,2h,15m; G,16h,2h,1.5; F,4d,8h
286
287 end
288
289
290
291 ######################################################################
292 #                      REWRITE CONFIGURATION                         #
293 ######################################################################
294
295 # There are no rewriting specifications in this default configuration file.
296
297 # End of Exim configuration file
298
299
300 Sample mail.aliases file:
301 -------------------------
302
303 # Record Description: /etc/alias record
304 # Record Explanation: aliasname  alias
305 # Record Example:     postmaster user@mydomain.com
306 #
307 #
308 # Wildcard record is entered as:      *@domain alias
309 #
310 # Special expansion values:
311 #
312 #     @xxx  replace  with original localpart
313 #     :FAIL:          message will fail as if user did not exist
314 #     :DEFER:         message will be held in mail spool
315 #     :DROP:          message will be silently dropped
316 #
317
318
319 # System Aliases
320 #
321 abuse root
322 postmaster root
323
324 # Wildcard Aliases
325 #
326 * FAIL
327 *@fireplug.net FAIL
328 *@galarie.bc.ca $local_part@galarie.com
329 *@galarie.com FAIL
330 *@poste.com FAIL
331
332 # Abuse Aliases
333 #
334 abuse root
335 abuse@fireplug.net sl@fireplug.net
336 abuse@galarie.bc.ca abuse
337 abuse@galarie.com abuse
338 abuse@poste.com abuse
339
340 # Postmaster Aliases
341 #
342 postmaster root
343 postmaster@fireplug.net sl@fireplug.net
344 postmaster@galarie.bc.ca postmaster
345 postmaster@galarie.com postmaster
346 postmaster@poste.com postmaster
347
348 # Domain based aliases
349 #
350
351 # fireplug.net
352 #
353 bobe@fireplug.net bobe@webtide.com
354 info@fireplug.net richard@fireplug.net, sl@fireplug.net
355 jsavage@fireplug.net jsavage%fireplug.net@wilt.fireplug.net
356 ken@fireplug.net ken%fireplug.net@wilt.fireplug.net
357 lsavage@fireplug.net lsavage%fireplug.net@wilt.fireplug.net
358 msavage@fireplug.net msavage%fireplug.net@wilt.fireplug.net
359 richard@fireplug.net richard%fireplug.net@nero.fireplug.net
360 rshand@fireplug.net rshand%fireplug.net@wilt.fireplug.net
361 sales@fireplug.net richard@fireplug.net
362 sl@fireplug.net sl@poste.com
363 ted@fireplug.net ted@nero.fireplug.net
364 webmaster@fireplug.net richard@fireplug.net
365 wsavage@fireplug.net wsavage%fireplug.net@wilt.fireplug.net
366
367 # galarie.com
368 #
369 galarie@galarie.com galarie%galarie.com@wilt.fireplug.net
370 test@galarie.com test%galarie.com@wilt.fireplug.net
371
372 # poste.com
373 #
374 cl@poste.com cl@whiskey.poste.com
375 donna@poste.com donna@whiskey.poste.com
376 rl@poste.com rl@whiskey.poste.com
377 sl@poste.com sl@nero.fireplug.net