Start
[exim.git] / src / src / configure.default
1 # $Cambridge: exim/src/src/configure.default,v 1.1 2004/10/07 10:39:01 ph10 Exp $
2
3 ######################################################################
4 #                  Runtime configuration file for Exim               #
5 ######################################################################
6
7
8 # This is a default configuration file which will operate correctly in
9 # uncomplicated installations. Please see the manual for a complete list
10 # of all the runtime configuration options that can be included in a
11 # configuration file. There are many more than are mentioned here. The
12 # manual is in the file doc/spec.txt in the Exim distribution as a plain
13 # ASCII file. Other formats (PostScript, Texinfo, HTML, PDF) are available
14 # from the Exim ftp sites. The manual is also online at the Exim web sites.
15
16
17 # This file is divided into several parts, all but the first of which are
18 # headed by a line starting with the word "begin". Only those parts that
19 # are required need to be present. Blank lines, and lines starting with #
20 # are ignored.
21
22
23 ########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
24 #                                                                          #
25 # Whenever you change Exim's configuration file, you *must* remember to    #
26 # HUP the Exim daemon, because it will not pick up the new configuration   #
27 # until you do. However, any other Exim processes that are started, for    #
28 # example, a process started by an MUA in order to send a message, will    #
29 # see the new configuration as soon as it is in place.                     #
30 #                                                                          #
31 # You do not need to HUP the daemon for changes in auxiliary files that    #
32 # are referenced from this file. They are read every time they are used.   #
33 #                                                                          #
34 # It is usually a good idea to test a new configuration for syntactic      #
35 # correctness before installing it (for example, by running the command    #
36 # "exim -C /config/file.new -bV").                                         #
37 #                                                                          #
38 ########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
39
40
41
42 ######################################################################
43 #                    MAIN CONFIGURATION SETTINGS                     #
44 ######################################################################
45
46 # Specify your host's canonical name here. This should normally be the fully
47 # qualified "official" name of your host. If this option is not set, the
48 # uname() function is called to obtain the name. In many cases this does
49 # the right thing and you need not set anything explicitly.
50
51 # primary_hostname =
52
53
54 # The next three settings create two lists of domains and one list of hosts.
55 # These lists are referred to later in this configuration using the syntax
56 # +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
57 # are all colon-separated lists:
58
59 domainlist local_domains = @
60 domainlist relay_to_domains =
61 hostlist   relay_from_hosts = 127.0.0.1
62
63 # Most straightforward access control requirements can be obtained by
64 # appropriate settings of the above options. In more complicated situations, you
65 # may need to modify the Access Control List (ACL) which appears later in this
66 # file.
67
68 # The first setting specifies your local domains, for example:
69 #
70 #   domainlist local_domains = my.first.domain : my.second.domain
71 #
72 # You can use "@" to mean "the name of the local host", as in the default
73 # setting above. This is the name that is specified by primary_hostname,
74 # as specified above (or defaulted). If you do not want to do any local
75 # deliveries, remove the "@" from the setting above. If you want to accept mail
76 # addressed to your host's literal IP address, for example, mail addressed to
77 # "user@[192.168.23.44]", you can add "@[]" as an item in the local domains
78 # list. You also need to uncomment "allow_domain_literals" below. This is not
79 # recommended for today's Internet.
80
81 # The second setting specifies domains for which your host is an incoming relay.
82 # If you are not doing any relaying, you should leave the list empty. However,
83 # if your host is an MX backup or gateway of some kind for some domains, you
84 # must set relay_to_domains to match those domains. For example:
85 #
86 # domainlist relay_to_domains = *.myco.com : my.friend.org
87 #
88 # This will allow any host to relay through your host to those domains.
89 # See the section of the manual entitled "Control of relaying" for more
90 # information.
91
92 # The third setting specifies hosts that can use your host as an outgoing relay
93 # to any other host on the Internet. Such a setting commonly refers to a
94 # complete local network as well as the localhost. For example:
95 #
96 # hostlist relay_from_hosts = 127.0.0.1 : 192.168.0.0/16
97 #
98 # The "/16" is a bit mask (CIDR notation), not a number of hosts. Note that you
99 # have to include 127.0.0.1 if you want to allow processes on your host to send
100 # SMTP mail by using the loopback address. A number of MUAs use this method of
101 # sending mail.
102
103
104 # All three of these lists may contain many different kinds of item, including
105 # wildcarded names, regular expressions, and file lookups. See the reference
106 # manual for details. The lists above are used in the access control list for
107 # incoming messages. The name of this ACL is defined here:
108
109 acl_smtp_rcpt = acl_check_rcpt
110
111 # You should not change that setting until you understand how ACLs work.
112
113
114 # Specify the domain you want to be added to all unqualified addresses
115 # here. An unqualified address is one that does not contain an "@" character
116 # followed by a domain. For example, "caesar@rome.example" is a fully qualified
117 # address, but the string "caesar" (i.e. just a login name) is an unqualified
118 # email address. Unqualified addresses are accepted only from local callers by
119 # default. See the recipient_unqualified_hosts option if you want to permit
120 # unqualified addresses from remote sources. If this option is not set, the
121 # primary_hostname value is used for qualification.
122
123 # qualify_domain =
124
125
126 # If you want unqualified recipient addresses to be qualified with a different
127 # domain to unqualified sender addresses, specify the recipient domain here.
128 # If this option is not set, the qualify_domain value is used.
129
130 # qualify_recipient =
131
132
133 # The following line must be uncommented if you want Exim to recognize
134 # addresses of the form "user@[10.11.12.13]" that is, with a "domain literal"
135 # (an IP address) instead of a named domain. The RFCs still require this form,
136 # but it makes little sense to permit mail to be sent to specific hosts by
137 # their IP address in the modern Internet. This ancient format has been used
138 # by those seeking to abuse hosts by using them for unwanted relaying. If you
139 # really do want to support domain literals, uncomment the following line, and
140 # see also the "domain_literal" router below.
141
142 # allow_domain_literals
143
144
145 # No deliveries will ever be run under the uids of these users (a colon-
146 # separated list). An attempt to do so causes a panic error to be logged, and
147 # the delivery to be deferred. This is a paranoic safety catch. There is an
148 # even stronger safety catch in the form of the FIXED_NEVER_USERS setting
149 # in the configuration for building Exim. The list of users that it specifies
150 # is built into the binary, and cannot be changed. The option below just adds
151 # additional users to the list. The default for FIXED_NEVER_USERS is "root",
152 # but just to be absolutely sure, the default here is also "root".
153
154 # Note that the default setting means you cannot deliver mail addressed to root
155 # as if it were a normal user. This isn't usually a problem, as most sites have
156 # an alias for root that redirects such mail to a human administrator.
157
158 never_users = root
159
160
161 # The setting below causes Exim to do a reverse DNS lookup on all incoming
162 # IP calls, in order to get the true host name. If you feel this is too
163 # expensive, you can specify the networks for which a lookup is done, or
164 # remove the setting entirely.
165
166 host_lookup = *
167
168
169 # The settings below, which are actually the same as the defaults in the
170 # code, cause Exim to make RFC 1413 (ident) callbacks for all incoming SMTP
171 # calls. You can limit the hosts to which these calls are made, and/or change
172 # the timeout that is used. If you set the timeout to zero, all RFC 1413 calls
173 # are disabled. RFC 1413 calls are cheap and can provide useful information
174 # for tracing problem messages, but some hosts and firewalls have problems
175 # with them. This can result in a timeout instead of an immediate refused
176 # connection, leading to delays on starting up an SMTP session.
177
178 rfc1413_hosts = *
179 rfc1413_query_timeout = 30s
180
181
182 # By default, Exim expects all envelope addresses to be fully qualified, that
183 # is, they must contain both a local part and a domain. If you want to accept
184 # unqualified addresses (just a local part) from certain hosts, you can specify
185 # these hosts by setting one or both of
186 #
187 # sender_unqualified_hosts =
188 # recipient_unqualified_hosts =
189 #
190 # to control sender and recipient addresses, respectively. When this is done,
191 # unqualified addresses are qualified using the settings of qualify_domain
192 # and/or qualify_recipient (see above).
193
194
195 # If you want Exim to support the "percent hack" for certain domains,
196 # uncomment the following line and provide a list of domains. The "percent
197 # hack" is the feature by which mail addressed to x%y@z (where z is one of
198 # the domains listed) is locally rerouted to x@y and sent on. If z is not one
199 # of the "percent hack" domains, x%y is treated as an ordinary local part. This
200 # hack is rarely needed nowadays; you should not enable it unless you are sure
201 # that you really need it.
202 #
203 # percent_hack_domains =
204 #
205 # As well as setting this option you will also need to remove the test
206 # for local parts containing % in the ACL definition below.
207
208
209 # When Exim can neither deliver a message nor return it to sender, it "freezes"
210 # the delivery error message (aka "bounce message"). There are also other
211 # circumstances in which messages get frozen. They will stay on the queue for
212 # ever unless one of the following options is set.
213
214 # This option unfreezes frozen bounce messages after two days, tries
215 # once more to deliver them, and ignores any delivery failures.
216
217 ignore_bounce_errors_after = 2d
218
219 # This option cancels (removes) frozen messages that are older than a week.
220
221 timeout_frozen_after = 7d
222
223
224
225 ######################################################################
226 #                       ACL CONFIGURATION                            #
227 #         Specifies access control lists for incoming SMTP mail      #
228 ######################################################################
229
230 begin acl
231
232 # This access control list is used for every RCPT command in an incoming
233 # SMTP message. The tests are run in order until the address is either
234 # accepted or denied.
235
236 acl_check_rcpt:
237
238   # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
239   # testing for an empty sending host field.
240
241   accept  hosts = :
242
243   #############################################################################
244   # The following section of the ACL is concerned with local parts that contain
245   # @ or % or ! or / or | or dots in unusual places.
246   #
247   # The characters other than dots are rarely found in genuine local parts, but
248   # are often tried by people looking to circumvent relaying restrictions.
249   # Therefore, although they are valid in local parts, these rules lock them
250   # out, as a precaution.
251   #
252   # Empty components (two dots in a row) are not valid in RFC 2822, but Exim
253   # allows them because they have been encountered. (Consider local parts
254   # constructed as "firstinitial.secondinitial.familyname" when applied to
255   # someone like me, who has no second initial.) However, a local part starting
256   # with a dot or containing /../ can cause trouble if it is used as part of a
257   # file name (e.g. for a mailing list). This is also true for local parts that
258   # contain slashes. A pipe symbol can also be troublesome if the local part is
259   # incorporated unthinkingly into a shell command line.
260   #
261   # Two different rules are used. The first one is stricter, and is applied to
262   # messages that are addressed to one of the local domains handled by this
263   # host. It blocks local parts that begin with a dot or contain @ % ! / or |.
264   # If you have local accounts that include these characters, you will have to
265   # modify this rule.
266
267   deny    message       = Restricted characters in address
268           domains       = +local_domains
269           local_parts   = ^[.] : ^.*[@%!/|]
270
271   # The second rule applies to all other domains, and is less strict. This
272   # allows your own users to send outgoing messages to sites that use slashes
273   # and vertical bars in their local parts. It blocks local parts that begin
274   # with a dot, slash, or vertical bar, but allows these characters within the
275   # local part. However, the sequence /../ is barred. The use of @ % and ! is
276   # blocked, as before. The motivation here is to prevent your users (or
277   # your users' viruses) from mounting certain kinds of attack on remote sites.
278
279   deny    message       = Restricted characters in address
280           domains       = !+local_domains
281           local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
282   #############################################################################
283
284   # Accept mail to postmaster in any local domain, regardless of the source,
285   # and without verifying the sender.
286
287   accept  local_parts   = postmaster
288           domains       = +local_domains
289
290   # Deny unless the sender address can be verified.
291
292   require verify        = sender
293
294   #############################################################################
295   # There are no checks on DNS "black" lists because the domains that contain
296   # these lists are changing all the time. However, here are two examples of
297   # how you could get Exim to perform a DNS black list lookup at this point.
298   # The first one denies, while the second just warns.
299   #
300   # deny    message       = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
301   #         dnslists      = black.list.example
302   #
303   # warn    message       = X-Warning: $sender_host_address is in a black list at $dnslist_domain
304   #         log_message   = found in $dnslist_domain
305   #         dnslists      = black.list.example
306   #############################################################################
307
308   # Accept if the address is in a local domain, but only if the recipient can
309   # be verified. Otherwise deny. The "endpass" line is the border between
310   # passing on to the next ACL statement (if tests above it fail) or denying
311   # access (if tests below it fail).
312
313   accept  domains       = +local_domains
314           endpass
315           verify        = recipient
316
317   # Accept if the address is in a domain for which we are relaying, but again,
318   # only if the recipient can be verified.
319
320   accept  domains       = +relay_to_domains
321           endpass
322           verify        = recipient
323
324   # If control reaches this point, the domain is neither in +local_domains
325   # nor in +relay_to_domains.
326
327   # Accept if the message comes from one of the hosts for which we are an
328   # outgoing relay. Recipient verification is omitted here, because in many
329   # cases the clients are dumb MUAs that don't cope well with SMTP error
330   # responses. If you are actually relaying out from MTAs, you should probably
331   # add recipient verification here.
332
333   accept  hosts         = +relay_from_hosts
334
335   # Accept if the message arrived over an authenticated connection, from
336   # any host. Again, these messages are usually from MUAs, so recipient
337   # verification is omitted.
338
339   accept  authenticated = *
340
341   # Reaching the end of the ACL causes a "deny", but we might as well give
342   # an explicit message.
343
344   deny    message       = relay not permitted
345
346
347
348 ######################################################################
349 #                      ROUTERS CONFIGURATION                         #
350 #               Specifies how addresses are handled                  #
351 ######################################################################
352 #     THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT!       #
353 # An address is passed to each router in turn until it is accepted.  #
354 ######################################################################
355
356 begin routers
357
358 # This router routes to remote hosts over SMTP by explicit IP address,
359 # when an email address is given in "domain literal" form, for example,
360 # <user@[192.168.35.64]>. The RFCs require this facility. However, it is
361 # little-known these days, and has been exploited by evil people seeking
362 # to abuse SMTP relays. Consequently it is commented out in the default
363 # configuration. If you uncomment this router, you also need to uncomment
364 # allow_domain_literals above, so that Exim can recognize the syntax of
365 # domain literal addresses.
366
367 # domain_literal:
368 #   driver = ipliteral
369 #   domains = ! +local_domains
370 #   transport = remote_smtp
371
372
373 # This router routes addresses that are not in local domains by doing a DNS
374 # lookup on the domain name. Any domain that resolves to 0.0.0.0 or to a
375 # loopback interface address (127.0.0.0/8) is treated as if it had no DNS
376 # entry. Note that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated
377 # as the local host inside the network stack. It is not 0.0.0.0/0, the default
378 # route. If the DNS lookup fails, no further routers are tried because of
379 # the no_more setting, and consequently the address is unrouteable.
380
381 dnslookup:
382   driver = dnslookup
383   domains = ! +local_domains
384   transport = remote_smtp
385   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
386   no_more
387
388
389 # The remaining routers handle addresses in the local domain(s).
390
391
392 # This router handles aliasing using a linearly searched alias file with the
393 # name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,
394 # the name gets inserted into this file from whatever is set in Exim's
395 # build-time configuration. The default path is the traditional /etc/aliases.
396 # If you install this configuration by hand, you need to specify the correct
397 # path in the "data" setting below.
398 #
399 ##### NB  You must ensure that the alias file exists. It used to be the case
400 ##### NB  that every Unix had that file, because it was the Sendmail default.
401 ##### NB  These days, there are systems that don't have it. Your aliases
402 ##### NB  file should at least contain an alias for "postmaster".
403 #
404 # If any of your aliases expand to pipes or files, you will need to set
405 # up a user and a group for these deliveries to run under. You can do
406 # this by uncommenting the "user" option below (changing the user name
407 # as appropriate) and adding a "group" option if necessary. Alternatively, you
408 # can specify "user" on the transports that are used. Note that the transports
409 # listed below are the same as are used for .forward files; you might want
410 # to set up different ones for pipe and file deliveries from aliases.
411
412 system_aliases:
413   driver = redirect
414   allow_fail
415   allow_defer
416   data = ${lookup{$local_part}lsearch{SYSTEM_ALIASES_FILE}}
417 # user = exim
418   file_transport = address_file
419   pipe_transport = address_pipe
420
421
422 # This router handles forwarding using traditional .forward files in users'
423 # home directories. If you want it also to allow mail filtering when a forward
424 # file starts with the string "# Exim filter" or "# Sieve filter", uncomment
425 # the "allow_filter" option.
426
427 # If you want this router to treat local parts with suffixes introduced by "-"
428 # or "+" characters as if the suffixes did not exist, uncomment the two local_
429 # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
430 # in the same way as xxxx@your.domain by this router. You probably want to make
431 # the same change to the localuser router.
432
433 # The no_verify setting means that this router is skipped when Exim is
434 # verifying addresses. Similarly, no_expn means that this router is skipped if
435 # Exim is processing an EXPN command.
436
437 # The check_ancestor option means that if the forward file generates an
438 # address that is an ancestor of the current one, the current one gets
439 # passed on instead. This covers the case where A is aliased to B and B
440 # has a .forward file pointing to A.
441
442 # The three transports specified at the end are those that are used when
443 # forwarding generates a direct delivery to a file, or to a pipe, or sets
444 # up an auto-reply, respectively.
445
446 userforward:
447   driver = redirect
448   check_local_user
449 # local_part_suffix = +* : -*
450 # local_part_suffix_optional
451   file = $home/.forward
452 # allow_filter
453   no_verify
454   no_expn
455   check_ancestor
456   file_transport = address_file
457   pipe_transport = address_pipe
458   reply_transport = address_reply
459
460
461 # This router matches local user mailboxes. If the router fails, the error
462 # message is "Unknown user".
463
464 # If you want this router to treat local parts with suffixes introduced by "-"
465 # or "+" characters as if the suffixes did not exist, uncomment the two local_
466 # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
467 # in the same way as xxxx@your.domain by this router.
468
469 localuser:
470   driver = accept
471   check_local_user
472 # local_part_suffix = +* : -*
473 # local_part_suffix_optional
474   transport = local_delivery
475   cannot_route_message = Unknown user
476
477
478
479 ######################################################################
480 #                      TRANSPORTS CONFIGURATION                      #
481 ######################################################################
482 #                       ORDER DOES NOT MATTER                        #
483 #     Only one appropriate transport is called for each delivery.    #
484 ######################################################################
485
486 # A transport is used only when referenced from a router that successfully
487 # handles an address.
488
489 begin transports
490
491
492 # This transport is used for delivering messages over SMTP connections.
493
494 remote_smtp:
495   driver = smtp
496
497
498 # This transport is used for local delivery to user mailboxes in traditional
499 # BSD mailbox format. By default it will be run under the uid and gid of the
500 # local user, and requires the sticky bit to be set on the /var/mail directory.
501 # Some systems use the alternative approach of running mail deliveries under a
502 # particular group instead of using the sticky bit. The commented options below
503 # show how this can be done.
504
505 local_delivery:
506   driver = appendfile
507   file = /var/mail/$local_part
508   delivery_date_add
509   envelope_to_add
510   return_path_add
511 # group = mail
512 # mode = 0660
513
514
515 # This transport is used for handling pipe deliveries generated by alias or
516 # .forward files. If the pipe generates any standard output, it is returned
517 # to the sender of the message as a delivery error. Set return_fail_output
518 # instead of return_output if you want this to happen only when the pipe fails
519 # to complete normally. You can set different transports for aliases and
520 # forwards if you want to - see the references to address_pipe in the routers
521 # section above.
522
523 address_pipe:
524   driver = pipe
525   return_output
526
527
528 # This transport is used for handling deliveries directly to files that are
529 # generated by aliasing or forwarding.
530
531 address_file:
532   driver = appendfile
533   delivery_date_add
534   envelope_to_add
535   return_path_add
536
537
538 # This transport is used for handling autoreplies generated by the filtering
539 # option of the userforward router.
540
541 address_reply:
542   driver = autoreply
543
544
545
546 ######################################################################
547 #                      RETRY CONFIGURATION                           #
548 ######################################################################
549
550 begin retry
551
552 # This single retry rule applies to all domains and all errors. It specifies
553 # retries every 15 minutes for 2 hours, then increasing retry intervals,
554 # starting at 1 hour and increasing each time by a factor of 1.5, up to 16
555 # hours, then retries every 6 hours until 4 days have passed since the first
556 # failed delivery.
557
558 # Address or Domain    Error       Retries
559 # -----------------    -----       -------
560
561 *                      *           F,2h,15m; G,16h,1h,1.5; F,4d,6h
562
563
564
565 ######################################################################
566 #                      REWRITE CONFIGURATION                         #
567 ######################################################################
568
569 # There are no rewriting specifications in this default configuration file.
570
571 begin rewrite
572
573
574
575 ######################################################################
576 #                   AUTHENTICATION CONFIGURATION                     #
577 ######################################################################
578
579 # There are no authenticator specifications in this default configuration file.
580
581 begin authenticators
582
583
584
585 ######################################################################
586 #                   CONFIGURATION FOR local_scan()                   #
587 ######################################################################
588
589 # If you have built Exim to include a local_scan() function that contains
590 # tables for private options, you can define those options here. Remember to
591 # uncomment the "begin" line. It is commented by default because it provokes
592 # an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS
593 # set in the Local/Makefile.
594
595 # begin local_scan
596
597
598 # End of Exim configuration file