Testsuite: account for (now) properly working Perl locale
[exim.git] / src / src / configure.default
CommitLineData
059ec3d9
PH
1######################################################################
2# Runtime configuration file for Exim #
3######################################################################
4
5
6# This is a default configuration file which will operate correctly in
7# uncomplicated installations. Please see the manual for a complete list
8# of all the runtime configuration options that can be included in a
9# configuration file. There are many more than are mentioned here. The
10# manual is in the file doc/spec.txt in the Exim distribution as a plain
11# ASCII file. Other formats (PostScript, Texinfo, HTML, PDF) are available
12# from the Exim ftp sites. The manual is also online at the Exim web sites.
13
14
15# This file is divided into several parts, all but the first of which are
16# headed by a line starting with the word "begin". Only those parts that
17# are required need to be present. Blank lines, and lines starting with #
18# are ignored.
19
20
21########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
22# #
23# Whenever you change Exim's configuration file, you *must* remember to #
24# HUP the Exim daemon, because it will not pick up the new configuration #
25# until you do. However, any other Exim processes that are started, for #
26# example, a process started by an MUA in order to send a message, will #
27# see the new configuration as soon as it is in place. #
28# #
29# You do not need to HUP the daemon for changes in auxiliary files that #
30# are referenced from this file. They are read every time they are used. #
31# #
32# It is usually a good idea to test a new configuration for syntactic #
33# correctness before installing it (for example, by running the command #
34# "exim -C /config/file.new -bV"). #
35# #
36########### IMPORTANT ########## IMPORTANT ########### IMPORTANT ###########
37
38
39
40######################################################################
41# MAIN CONFIGURATION SETTINGS #
42######################################################################
f26587cb 43#
059ec3d9
PH
44
45# Specify your host's canonical name here. This should normally be the fully
46# qualified "official" name of your host. If this option is not set, the
47# uname() function is called to obtain the name. In many cases this does
48# the right thing and you need not set anything explicitly.
49
50# primary_hostname =
51
52
53# The next three settings create two lists of domains and one list of hosts.
54# These lists are referred to later in this configuration using the syntax
55# +local_domains, +relay_to_domains, and +relay_from_hosts, respectively. They
56# are all colon-separated lists:
57
58domainlist local_domains = @
59domainlist relay_to_domains =
ff284120
PP
60hostlist relay_from_hosts = localhost
61# (We rely upon hostname resolution working for localhost, because the default
62# uncommented configuration needs to work in IPv4-only environments.)
059ec3d9
PH
63
64# Most straightforward access control requirements can be obtained by
53394084 65# appropriate settings of the above options. In more complicated situations,
92db8b2d 66# you may need to modify the Access Control Lists (ACLs) which appear later in
53394084 67# this file.
059ec3d9
PH
68
69# The first setting specifies your local domains, for example:
70#
71# domainlist local_domains = my.first.domain : my.second.domain
72#
73# You can use "@" to mean "the name of the local host", as in the default
74# setting above. This is the name that is specified by primary_hostname,
75# as specified above (or defaulted). If you do not want to do any local
76# deliveries, remove the "@" from the setting above. If you want to accept mail
77# addressed to your host's literal IP address, for example, mail addressed to
78# "user@[192.168.23.44]", you can add "@[]" as an item in the local domains
79# list. You also need to uncomment "allow_domain_literals" below. This is not
80# recommended for today's Internet.
81
82# The second setting specifies domains for which your host is an incoming relay.
83# If you are not doing any relaying, you should leave the list empty. However,
84# if your host is an MX backup or gateway of some kind for some domains, you
85# must set relay_to_domains to match those domains. For example:
86#
87# domainlist relay_to_domains = *.myco.com : my.friend.org
88#
89# This will allow any host to relay through your host to those domains.
90# See the section of the manual entitled "Control of relaying" for more
91# information.
92
93# The third setting specifies hosts that can use your host as an outgoing relay
94# to any other host on the Internet. Such a setting commonly refers to a
95# complete local network as well as the localhost. For example:
96#
ff284120 97# hostlist relay_from_hosts = <; 127.0.0.1 ; ::1 ; 192.168.0.0/16
059ec3d9
PH
98#
99# The "/16" is a bit mask (CIDR notation), not a number of hosts. Note that you
100# have to include 127.0.0.1 if you want to allow processes on your host to send
101# SMTP mail by using the loopback address. A number of MUAs use this method of
ff284120
PP
102# sending mail. Often, connections are made to "localhost", which might be ::1
103# on IPv6-enabled hosts. Do not forget CIDR for your IPv6 networks.
059ec3d9 104
059ec3d9
PH
105# All three of these lists may contain many different kinds of item, including
106# wildcarded names, regular expressions, and file lookups. See the reference
74e0617f
PH
107# manual for details. The lists above are used in the access control lists for
108# checking incoming messages. The names of these ACLs are defined here:
059ec3d9 109
b220576b
JH
110acl_smtp_rcpt = acl_check_rcpt
111acl_smtp_data_prdr = acl_check_prdr
112acl_smtp_data = acl_check_data
74e0617f
PH
113
114# You should not change those settings until you understand how ACLs work.
115
116
117# If you are running a version of Exim that was compiled with the content-
118# scanning extension, you can cause incoming messages to be automatically
119# scanned for viruses. You have to modify the configuration in two places to
120# set this up. The first of them is here, where you define the interface to
121# your scanner. This example is typical for ClamAV; see the manual for details
122# of what to set for other virus scanners. The second modification is in the
123# acl_check_data access control list (see below).
059ec3d9 124
74e0617f
PH
125# av_scanner = clamd:/tmp/clamd
126
127
128# For spam scanning, there is a similar option that defines the interface to
129# SpamAssassin. You do not need to set this if you are using the default, which
130# is shown in this commented example. As for virus scanning, you must also
131# modify the acl_check_data access control list to enable spam scanning.
132
133# spamd_address = 127.0.0.1 783
059ec3d9
PH
134
135
6083aca0
TF
136# If Exim is compiled with support for TLS, you may want to enable the
137# following options so that Exim allows clients to make encrypted
138# connections. In the authenticators section below, there are template
139# configurations for plaintext username/password authentication. This kind
140# of authentication is only safe when used within a TLS connection, so the
141# authenticators will only work if the following TLS settings are turned on
142# as well.
143
144# Allow any client to use TLS.
145
146# tls_advertise_hosts = *
147
148# Specify the location of the Exim server's TLS certificate and private key.
149# The private key must not be encrypted (password protected). You can put
150# the certificate and private key in the same file, in which case you only
151# need the first setting, or in separate files, in which case you need both
152# options.
153
154# tls_certificate = /etc/ssl/exim.crt
155# tls_privatekey = /etc/ssl/exim.pem
156
ba86e143 157# For OpenSSL, prefer EC- over RSA-authenticated ciphers
1fa62f99 158# tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT
ba86e143 159
6083aca0
TF
160# In order to support roaming users who wish to send email from anywhere,
161# you may want to make Exim listen on other ports as well as port 25, in
162# case these users need to send email from a network that blocks port 25.
163# The standard port for this purpose is port 587, the "message submission"
164# port. See RFC 4409 for details. Microsoft MUAs cannot be configured to
165# talk the message submission protocol correctly, so if you need to support
166# them you should also allow TLS-on-connect on the traditional but
167# non-standard port 465.
168
169# daemon_smtp_ports = 25 : 465 : 587
170# tls_on_connect_ports = 465
171
172
059ec3d9
PH
173# Specify the domain you want to be added to all unqualified addresses
174# here. An unqualified address is one that does not contain an "@" character
175# followed by a domain. For example, "caesar@rome.example" is a fully qualified
176# address, but the string "caesar" (i.e. just a login name) is an unqualified
177# email address. Unqualified addresses are accepted only from local callers by
178# default. See the recipient_unqualified_hosts option if you want to permit
179# unqualified addresses from remote sources. If this option is not set, the
180# primary_hostname value is used for qualification.
181
182# qualify_domain =
183
184
185# If you want unqualified recipient addresses to be qualified with a different
186# domain to unqualified sender addresses, specify the recipient domain here.
187# If this option is not set, the qualify_domain value is used.
188
189# qualify_recipient =
190
191
192# The following line must be uncommented if you want Exim to recognize
193# addresses of the form "user@[10.11.12.13]" that is, with a "domain literal"
194# (an IP address) instead of a named domain. The RFCs still require this form,
195# but it makes little sense to permit mail to be sent to specific hosts by
196# their IP address in the modern Internet. This ancient format has been used
197# by those seeking to abuse hosts by using them for unwanted relaying. If you
198# really do want to support domain literals, uncomment the following line, and
199# see also the "domain_literal" router below.
200
201# allow_domain_literals
202
203
92db8b2d
PH
204# No deliveries will ever be run under the uids of users specified by
205# never_users (a colon-separated list). An attempt to do so causes a panic
206# error to be logged, and the delivery to be deferred. This is a paranoic
207# safety catch. There is an even stronger safety catch in the form of the
208# FIXED_NEVER_USERS setting in the configuration for building Exim. The list of
209# users that it specifies is built into the binary, and cannot be changed. The
210# option below just adds additional users to the list. The default for
211# FIXED_NEVER_USERS is "root", but just to be absolutely sure, the default here
212# is also "root".
059ec3d9
PH
213
214# Note that the default setting means you cannot deliver mail addressed to root
215# as if it were a normal user. This isn't usually a problem, as most sites have
216# an alias for root that redirects such mail to a human administrator.
217
218never_users = root
219
220
221# The setting below causes Exim to do a reverse DNS lookup on all incoming
222# IP calls, in order to get the true host name. If you feel this is too
223# expensive, you can specify the networks for which a lookup is done, or
224# remove the setting entirely.
225
226host_lookup = *
227
228
bdf9ce82
PP
229# The setting below causes Exim to try to initialize the system resolver
230# library with DNSSEC support. It has no effect if your library lacks
231# DNSSEC support.
232
233dns_dnssec_ok = 1
234
235
f926e272
JH
236# The settings below cause Exim to make RFC 1413 (ident) callbacks
237# for all incoming SMTP calls. You can limit the hosts to which these
238# calls are made, and/or change the timeout that is used. If you set
239# the timeout to zero, all RFC 1413 calls are disabled. RFC 1413 calls
240# are cheap and can provide useful information for tracing problem
241# messages, but some hosts and firewalls have problems with them.
242# This can result in a timeout instead of an immediate refused
243# connection, leading to delays on starting up SMTP sessions.
244# (The default was reduced from 30s to 5s for release 4.61. and to
245# disabled for release 4.86)
246#
247#rfc1413_hosts = *
248#rfc1413_query_timeout = 5s
059ec3d9
PH
249
250
ff1c79bc
JH
251# Enable an efficiency feature. We advertise the feature; clients
252# may request to use it. For multi-recipient mails we then can
253# reject or accept per-user after the message is received.
254#
255prdr_enable = true
256
257
059ec3d9
PH
258# By default, Exim expects all envelope addresses to be fully qualified, that
259# is, they must contain both a local part and a domain. If you want to accept
260# unqualified addresses (just a local part) from certain hosts, you can specify
261# these hosts by setting one or both of
262#
263# sender_unqualified_hosts =
264# recipient_unqualified_hosts =
265#
266# to control sender and recipient addresses, respectively. When this is done,
267# unqualified addresses are qualified using the settings of qualify_domain
268# and/or qualify_recipient (see above).
269
270
df081f7a
JH
271# Unless you run a high-volume site you probably want more logging
272# detail than the default. Adjust to suit.
273
274log_selector = +smtp_protocol_error +smtp_syntax_error \
275 +tls_certificate_verified
276
277
059ec3d9
PH
278# If you want Exim to support the "percent hack" for certain domains,
279# uncomment the following line and provide a list of domains. The "percent
280# hack" is the feature by which mail addressed to x%y@z (where z is one of
281# the domains listed) is locally rerouted to x@y and sent on. If z is not one
282# of the "percent hack" domains, x%y is treated as an ordinary local part. This
283# hack is rarely needed nowadays; you should not enable it unless you are sure
284# that you really need it.
285#
286# percent_hack_domains =
287#
288# As well as setting this option you will also need to remove the test
289# for local parts containing % in the ACL definition below.
290
291
292# When Exim can neither deliver a message nor return it to sender, it "freezes"
293# the delivery error message (aka "bounce message"). There are also other
294# circumstances in which messages get frozen. They will stay on the queue for
295# ever unless one of the following options is set.
296
297# This option unfreezes frozen bounce messages after two days, tries
298# once more to deliver them, and ignores any delivery failures.
299
300ignore_bounce_errors_after = 2d
301
302# This option cancels (removes) frozen messages that are older than a week.
303
304timeout_frozen_after = 7d
305
306
92db8b2d
PH
307# By default, messages that are waiting on Exim's queue are all held in a
308# single directory called "input" which it itself within Exim's spool
309# directory. (The default spool directory is specified when Exim is built, and
310# is often /var/spool/exim/.) Exim works best when its queue is kept short, but
311# there are circumstances where this is not always possible. If you uncomment
312# the setting below, messages on the queue are held in 62 subdirectories of
313# "input" instead of all in the same directory. The subdirectories are called
314# 0, 1, ... A, B, ... a, b, ... z. This has two benefits: (1) If your file
315# system degrades with many files in one directory, this is less likely to
316# happen; (2) Exim can process the queue one subdirectory at a time instead of
317# all at once, which can give better performance with large queues.
318
319# split_spool_directory = true
320
321
6901c596
PP
322# If you're in a part of the world where ASCII is not sufficient for most
323# text, then you're probably familiar with RFC2047 message header extensions.
324# By default, Exim adheres to the specification, including a limit of 76
325# characters to a line, with encoded words fitting within a line.
326# If you wish to use decoded headers in message filters in such a way
327# that successful decoding of malformed messages matters, you may wish to
328# configure Exim to be more lenient.
329#
330# check_rfc2047_length = false
331#
332# In particular, the Exim maintainers have had multiple reports of problems
333# from Russian administrators of issues until they disable this check,
334# because of some popular, yet buggy, mail composition software.
335
059ec3d9 336
9cbad13b
PP
337# If you wish to be strictly RFC compliant, or if you know you'll be
338# exchanging email with systems that are not 8-bit clean, then you may
339# wish to disable advertising 8BITMIME. Uncomment this option to do so.
340
341# accept_8bitmime = false
342
343
f26587cb
HSHR
344# Exim does not make use of environment variables itself. However,
345# libraries that Exim uses (e.g. LDAP) depend on specific environment settings.
346# There are two lists: keep_environment for the variables we trust, and
347# add_environment for variables we want to set to a specific value.
4c04137d 348# Note that TZ is handled separately by the timezone runtime option
f26587cb
HSHR
349# and TIMEZONE_DEFAULT buildtime option.
350
351# keep_environment = ^LDAP
352# add_environment = PATH=/usr/bin::/bin
353
354
355
059ec3d9
PH
356######################################################################
357# ACL CONFIGURATION #
358# Specifies access control lists for incoming SMTP mail #
359######################################################################
360
361begin acl
362
363# This access control list is used for every RCPT command in an incoming
364# SMTP message. The tests are run in order until the address is either
365# accepted or denied.
366
367acl_check_rcpt:
368
369 # Accept if the source is local SMTP (i.e. not over TCP/IP). We do this by
370 # testing for an empty sending host field.
371
372 accept hosts = :
94f85d3e 373 control = dkim_disable_verify
059ec3d9
PH
374
375 #############################################################################
376 # The following section of the ACL is concerned with local parts that contain
377 # @ or % or ! or / or | or dots in unusual places.
378 #
379 # The characters other than dots are rarely found in genuine local parts, but
380 # are often tried by people looking to circumvent relaying restrictions.
381 # Therefore, although they are valid in local parts, these rules lock them
382 # out, as a precaution.
383 #
384 # Empty components (two dots in a row) are not valid in RFC 2822, but Exim
385 # allows them because they have been encountered. (Consider local parts
386 # constructed as "firstinitial.secondinitial.familyname" when applied to
387 # someone like me, who has no second initial.) However, a local part starting
388 # with a dot or containing /../ can cause trouble if it is used as part of a
389 # file name (e.g. for a mailing list). This is also true for local parts that
390 # contain slashes. A pipe symbol can also be troublesome if the local part is
391 # incorporated unthinkingly into a shell command line.
392 #
393 # Two different rules are used. The first one is stricter, and is applied to
394 # messages that are addressed to one of the local domains handled by this
53394084
PH
395 # host. The line "domains = +local_domains" restricts it to domains that are
396 # defined by the "domainlist local_domains" setting above. The rule blocks
397 # local parts that begin with a dot or contain @ % ! / or |. If you have
398 # local accounts that include these characters, you will have to modify this
399 # rule.
059ec3d9
PH
400
401 deny message = Restricted characters in address
402 domains = +local_domains
403 local_parts = ^[.] : ^.*[@%!/|]
404
53394084
PH
405 # The second rule applies to all other domains, and is less strict. The line
406 # "domains = !+local_domains" restricts it to domains that are NOT defined by
407 # the "domainlist local_domains" setting above. The exclamation mark is a
408 # negating operator. This rule allows your own users to send outgoing
409 # messages to sites that use slashes and vertical bars in their local parts.
410 # It blocks local parts that begin with a dot, slash, or vertical bar, but
411 # allows these characters within the local part. However, the sequence /../
412 # is barred. The use of @ % and ! is blocked, as before. The motivation here
413 # is to prevent your users (or your users' viruses) from mounting certain
414 # kinds of attack on remote sites.
059ec3d9
PH
415
416 deny message = Restricted characters in address
417 domains = !+local_domains
418 local_parts = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
419 #############################################################################
420
421 # Accept mail to postmaster in any local domain, regardless of the source,
422 # and without verifying the sender.
423
424 accept local_parts = postmaster
425 domains = +local_domains
426
427 # Deny unless the sender address can be verified.
428
429 require verify = sender
430
5de37277 431 # Accept if the message comes from one of the hosts for which we are an
cc38ddbf
PH
432 # outgoing relay. It is assumed that such hosts are most likely to be MUAs,
433 # so we set control=submission to make Exim treat the message as a
434 # submission. It will fix up various errors in the message, for example, the
435 # lack of a Date: header line. If you are actually relaying out out from
436 # MTAs, you may want to disable this. If you are handling both relaying from
437 # MTAs and submissions from MUAs you should probably split them into two
438 # lists, and handle them differently.
439
440 # Recipient verification is omitted here, because in many cases the clients
441 # are dumb MUAs that don't cope well with SMTP error responses. If you are
442 # actually relaying out from MTAs, you should probably add recipient
443 # verification here.
444
445 # Note that, by putting this test before any DNS black list checks, you will
446 # always accept from these hosts, even if they end up on a black list. The
447 # assumption is that they are your friends, and if they get onto a black
448 # list, it is a mistake.
5de37277
PH
449
450 accept hosts = +relay_from_hosts
cc38ddbf 451 control = submission
94f85d3e 452 control = dkim_disable_verify
5de37277
PH
453
454 # Accept if the message arrived over an authenticated connection, from
455 # any host. Again, these messages are usually from MUAs, so recipient
cc38ddbf
PH
456 # verification is omitted, and submission mode is set. And again, we do this
457 # check before any black list tests.
5de37277
PH
458
459 accept authenticated = *
cc38ddbf 460 control = submission
94f85d3e 461 control = dkim_disable_verify
5de37277 462
731c6a90
JH
463 # Insist that a HELO/EHLO was accepted.
464
465 require message = nice hosts say HELO first
466 condition = ${if def:sender_helo_name}
467
9ecb03f3
PH
468 # Insist that any other recipient address that we accept is either in one of
469 # our local domains, or is in a domain for which we explicitly allow
470 # relaying. Any other domain is rejected as being unacceptable for relaying.
471
472 require message = relay not permitted
8bffe342 473 domains = +local_domains : +relay_to_domains
9ecb03f3
PH
474
475 # We also require all accepted addresses to be verifiable. This check will
476 # do local part verification for local domains, but only check the domain
477 # for remote domains. The only way to check local parts for the remote
478 # relay domains is to use a callout (add /callout), but please read the
479 # documentation about callouts before doing this.
480
481 require verify = recipient
482
059ec3d9 483 #############################################################################
5de37277
PH
484 # There are no default checks on DNS black lists because the domains that
485 # contain these lists are changing all the time. However, here are two
486 # examples of how you can get Exim to perform a DNS black list lookup at this
487 # point. The first one denies, whereas the second just warns.
059ec3d9
PH
488 #
489 # deny message = rejected because $sender_host_address is in a black list at $dnslist_domain\n$dnslist_text
490 # dnslists = black.list.example
491 #
42119b09
PH
492 # warn dnslists = black.list.example
493 # add_header = X-Warning: $sender_host_address is in a black list at $dnslist_domain
059ec3d9 494 # log_message = found in $dnslist_domain
059ec3d9
PH
495 #############################################################################
496
a4e3111f
PH
497 #############################################################################
498 # This check is commented out because it is recognized that not every
499 # sysadmin will want to do it. If you enable it, the check performs
500 # Client SMTP Authorization (csa) checks on the sending host. These checks
501 # do DNS lookups for SRV records. The CSA proposal is currently (May 2005)
502 # an Internet draft. You can, of course, add additional conditions to this
503 # ACL statement to restrict the CSA checks to certain hosts only.
504 #
505 # require verify = csa
506 #############################################################################
507
b220576b
JH
508 #############################################################################
509 # If doing per-user content filtering then recipients with filters different
510 # to the first recipient must be deferred unless the sender talks PRDR.
511 #
512 # defer !condition = $prdr_requested
513 # condition = ${if > {0}{$receipients_count}}
514 # condition = ${if !eq {$acl_m_content_filter} \
515 # {${lookup PER_RCPT_CONTENT_FILTER}}}
516 # warn !condition = $prdr_requested
517 # condition = ${if > {0}{$receipients_count}}
518 # set acl_m_content_filter = ${lookup PER_RCPT_CONTENT_FILTER}
519 #############################################################################
520
9ecb03f3
PH
521 # At this point, the address has passed all the checks that have been
522 # configured, so we accept it unconditionally.
059ec3d9 523
9ecb03f3 524 accept
059ec3d9
PH
525
526
b220576b
JH
527# This ACL is used once per recipient, for multi-recipient messages, if
528# we advertised PRDR. It can be used to perform receipient-dependent
529# header- and body- based filtering and rejections.
530# We set a variable to record that PRDR was active used, so that checking
531# in the data ACL can be skipped.
532
533acl_check_prdr:
534 warn set acl_m_did_prdr = y
535
536 #############################################################################
537 # do lookup on filtering, with $local_part@$domain, deny on filter match
538 #
539 # deny set acl_m_content_filter = ${lookup PER_RCPT_CONTENT_FILTER}
540 # condition = ...
541 #############################################################################
542
543 accept
544
74e0617f
PH
545# This ACL is used after the contents of a message have been received. This
546# is the ACL in which you can test a message's headers or body, and in
547# particular, this is where you can invoke external virus or spam scanners.
548# Some suggested ways of configuring these tests are shown below, commented
549# out. Without any tests, this ACL accepts all messages. If you want to use
550# such tests, you must ensure that Exim is compiled with the content-scanning
551# extension (WITH_CONTENT_SCAN=yes in Local/Makefile).
552
553acl_check_data:
554
8c952127
JH
555 # Deny if the message contains an overlong line. Per the standards
556 # we should never receive one such via SMTP.
557 #
adb278a5
HSHR
558 deny message = maximum allowed line length is 998 octets, \
559 got $max_received_linelength
560 condition = ${if > {$max_received_linelength}{998}}
8c952127 561
4b7a7471
JH
562 # Deny if the headers contain badly-formed addresses.
563 #
564 deny !verify = header_syntax
565 message = header syntax
566 log_message = header syntax ($acl_verify_message)
567
74e0617f
PH
568 # Deny if the message contains a virus. Before enabling this check, you
569 # must install a virus scanner and set the av_scanner option above.
570 #
42119b09
PH
571 # deny malware = *
572 # message = This message contains a virus ($malware_name).
74e0617f
PH
573
574 # Add headers to a message if it is judged to be spam. Before enabling this,
575 # you must install SpamAssassin. You may also need to set the spamd_address
576 # option above.
577 #
42119b09
PH
578 # warn spam = nobody
579 # add_header = X-Spam_score: $spam_score\n\
580 # X-Spam_score_int: $spam_score_int\n\
581 # X-Spam_bar: $spam_bar\n\
582 # X-Spam_report: $spam_report
74e0617f 583
b220576b
JH
584 #############################################################################
585 # No more tests if PRDR was actively used.
586 # accept condition = ${if def:acl_m_did_prdr}
587 #
588 # To get here, all message recipients must have identical per-user
589 # content filtering (enforced by RCPT ACL). Do lookup for filter
590 # and deny on match.
591 #
592 # deny set acl_m_content_filter = ${lookup PER_RCPT_CONTENT_FILTER}
593 # condition = ...
594 #############################################################################
595
596
74e0617f
PH
597 # Accept the message.
598
599 accept
600
601
059ec3d9
PH
602
603######################################################################
604# ROUTERS CONFIGURATION #
605# Specifies how addresses are handled #
606######################################################################
607# THE ORDER IN WHICH THE ROUTERS ARE DEFINED IS IMPORTANT! #
608# An address is passed to each router in turn until it is accepted. #
609######################################################################
610
611begin routers
612
613# This router routes to remote hosts over SMTP by explicit IP address,
614# when an email address is given in "domain literal" form, for example,
615# <user@[192.168.35.64]>. The RFCs require this facility. However, it is
616# little-known these days, and has been exploited by evil people seeking
617# to abuse SMTP relays. Consequently it is commented out in the default
618# configuration. If you uncomment this router, you also need to uncomment
619# allow_domain_literals above, so that Exim can recognize the syntax of
620# domain literal addresses.
621
622# domain_literal:
623# driver = ipliteral
624# domains = ! +local_domains
625# transport = remote_smtp
626
627
628# This router routes addresses that are not in local domains by doing a DNS
53394084
PH
629# lookup on the domain name. The exclamation mark that appears in "domains = !
630# +local_domains" is a negating operator, that is, it can be read as "not". The
631# recipient's domain must not be one of those defined by "domainlist
632# local_domains" above for this router to be used.
633#
634# If the router is used, any domain that resolves to 0.0.0.0 or to a loopback
635# interface address (127.0.0.0/8) is treated as if it had no DNS entry. Note
636# that 0.0.0.0 is the same as 0.0.0.0/32, which is commonly treated as the
637# local host inside the network stack. It is not 0.0.0.0/0, the default route.
638# If the DNS lookup fails, no further routers are tried because of the no_more
639# setting, and consequently the address is unrouteable.
059ec3d9
PH
640
641dnslookup:
642 driver = dnslookup
643 domains = ! +local_domains
644 transport = remote_smtp
645 ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
ff284120
PP
646# if ipv6-enabled then instead use:
647# ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
bdf9ce82 648 dnssec_request_domains = *
059ec3d9
PH
649 no_more
650
651
4eae92ae
PP
652# This alternative router can be used when you want to send all mail to a
653# server which handles DNS lookups for you; an ISP will typically run such
654# a server for their customers. If you uncomment "smarthost" then you
655# should comment out "dnslookup" above. Setting a real hostname in route_data
656# wouldn't hurt either.
657
658# smarthost:
659# driver = manualroute
660# domains = ! +local_domains
26739076 661# transport = smarthost_smtp
4eae92ae 662# route_data = MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
ff284120 663# ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
4eae92ae
PP
664# no_more
665
666
53394084
PH
667# The remaining routers handle addresses in the local domain(s), that is those
668# domains that are defined by "domainlist local_domains" above.
059ec3d9
PH
669
670
671# This router handles aliasing using a linearly searched alias file with the
672# name SYSTEM_ALIASES_FILE. When this configuration is installed automatically,
673# the name gets inserted into this file from whatever is set in Exim's
674# build-time configuration. The default path is the traditional /etc/aliases.
675# If you install this configuration by hand, you need to specify the correct
676# path in the "data" setting below.
677#
678##### NB You must ensure that the alias file exists. It used to be the case
679##### NB that every Unix had that file, because it was the Sendmail default.
680##### NB These days, there are systems that don't have it. Your aliases
681##### NB file should at least contain an alias for "postmaster".
682#
683# If any of your aliases expand to pipes or files, you will need to set
684# up a user and a group for these deliveries to run under. You can do
685# this by uncommenting the "user" option below (changing the user name
686# as appropriate) and adding a "group" option if necessary. Alternatively, you
687# can specify "user" on the transports that are used. Note that the transports
688# listed below are the same as are used for .forward files; you might want
689# to set up different ones for pipe and file deliveries from aliases.
690
691system_aliases:
692 driver = redirect
693 allow_fail
694 allow_defer
695 data = ${lookup{$local_part}lsearch{SYSTEM_ALIASES_FILE}}
696# user = exim
697 file_transport = address_file
698 pipe_transport = address_pipe
699
700
701# This router handles forwarding using traditional .forward files in users'
702# home directories. If you want it also to allow mail filtering when a forward
703# file starts with the string "# Exim filter" or "# Sieve filter", uncomment
704# the "allow_filter" option.
705
059ec3d9
PH
706# The no_verify setting means that this router is skipped when Exim is
707# verifying addresses. Similarly, no_expn means that this router is skipped if
708# Exim is processing an EXPN command.
709
d9108297
PP
710# If you want this router to treat local parts with suffixes introduced by "-"
711# or "+" characters as if the suffixes did not exist, uncomment the two local_
712# part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
713# in the same way as xxxx@your.domain by this router. Because this router is
714# not used for verification, if you choose to uncomment those options, then you
715# will *need* to make the same change to the localuser router. (There are
716# other approaches, if this is undesirable, but they add complexity).
717
059ec3d9
PH
718# The check_ancestor option means that if the forward file generates an
719# address that is an ancestor of the current one, the current one gets
720# passed on instead. This covers the case where A is aliased to B and B
721# has a .forward file pointing to A.
722
723# The three transports specified at the end are those that are used when
724# forwarding generates a direct delivery to a file, or to a pipe, or sets
725# up an auto-reply, respectively.
726
727userforward:
728 driver = redirect
729 check_local_user
730# local_part_suffix = +* : -*
731# local_part_suffix_optional
732 file = $home/.forward
733# allow_filter
734 no_verify
735 no_expn
736 check_ancestor
737 file_transport = address_file
738 pipe_transport = address_pipe
739 reply_transport = address_reply
740
741
742# This router matches local user mailboxes. If the router fails, the error
743# message is "Unknown user".
744
745# If you want this router to treat local parts with suffixes introduced by "-"
746# or "+" characters as if the suffixes did not exist, uncomment the two local_
747# part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
748# in the same way as xxxx@your.domain by this router.
749
750localuser:
751 driver = accept
752 check_local_user
753# local_part_suffix = +* : -*
754# local_part_suffix_optional
755 transport = local_delivery
756 cannot_route_message = Unknown user
757
758
759
760######################################################################
761# TRANSPORTS CONFIGURATION #
762######################################################################
763# ORDER DOES NOT MATTER #
764# Only one appropriate transport is called for each delivery. #
765######################################################################
766
767# A transport is used only when referenced from a router that successfully
768# handles an address.
769
770begin transports
771
772
773# This transport is used for delivering messages over SMTP connections.
85ffcba6
AM
774# Refuse to send any message with over-long lines, which could have
775# been received other than via SMTP. The use of message_size_limit to
8c952127 776# enforce this is a red herring.
059ec3d9
PH
777
778remote_smtp:
779 driver = smtp
57a7b15e 780 hosts_try_prdr = *
8c952127 781 message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
bdf9ce82
PP
782.ifdef _HAVE_DANE
783 dnssec_request_domains = *
784 hosts_try_dane = *
785.endif
059ec3d9
PH
786
787
26739076
PP
788# This transport is used for delivering messages to a smarthost, if the
789# smarthost router is enabled. This starts from the same basis as
790# "remote_smtp" but then turns on various security options, because
791# we assume that if you're told "use smarthost.example.org as the smarthost"
792# then there will be TLS available, with a verifiable certificate for that
793# hostname, using decent TLS.
794
795smarthost_smtp:
796 driver = smtp
57a7b15e 797 hosts_try_prdr = *
26739076
PP
798 message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
799 multi_domain
800 #
801.ifdef _HAVE_TLS
802 # Comment out any of these which you have to, then file a Support
803 # request with your smarthost provider to get things fixed:
804 hosts_require_tls = *
805 tls_sni = $host
806 tls_verify_hosts = *
807 # As long as tls_verify_hosts is enabled, this won't matter, but if you
808 # have to comment it out then this will at least log whether you succeed
809 # or not:
810 tls_try_verify_hosts = *
811 #
812.ifdef _HAVE_OPENSSL
bdf9ce82 813 tls_require_ciphers = HIGH:!aNULL:@STRENGTH
26739076
PP
814.endif
815.ifdef _HAVE_GNUTLS
bdf9ce82 816 tls_require_ciphers = SECURE192:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1
26739076
PP
817.endif
818.endif
819
820
059ec3d9
PH
821# This transport is used for local delivery to user mailboxes in traditional
822# BSD mailbox format. By default it will be run under the uid and gid of the
823# local user, and requires the sticky bit to be set on the /var/mail directory.
824# Some systems use the alternative approach of running mail deliveries under a
825# particular group instead of using the sticky bit. The commented options below
826# show how this can be done.
827
828local_delivery:
829 driver = appendfile
830 file = /var/mail/$local_part
831 delivery_date_add
832 envelope_to_add
833 return_path_add
834# group = mail
835# mode = 0660
836
837
838# This transport is used for handling pipe deliveries generated by alias or
839# .forward files. If the pipe generates any standard output, it is returned
840# to the sender of the message as a delivery error. Set return_fail_output
841# instead of return_output if you want this to happen only when the pipe fails
842# to complete normally. You can set different transports for aliases and
843# forwards if you want to - see the references to address_pipe in the routers
844# section above.
845
846address_pipe:
847 driver = pipe
848 return_output
849
850
851# This transport is used for handling deliveries directly to files that are
852# generated by aliasing or forwarding.
853
854address_file:
855 driver = appendfile
856 delivery_date_add
857 envelope_to_add
858 return_path_add
859
860
861# This transport is used for handling autoreplies generated by the filtering
862# option of the userforward router.
863
864address_reply:
865 driver = autoreply
866
867
868
869######################################################################
870# RETRY CONFIGURATION #
871######################################################################
872
873begin retry
874
875# This single retry rule applies to all domains and all errors. It specifies
876# retries every 15 minutes for 2 hours, then increasing retry intervals,
877# starting at 1 hour and increasing each time by a factor of 1.5, up to 16
878# hours, then retries every 6 hours until 4 days have passed since the first
879# failed delivery.
880
c46cc0a4
PH
881# WARNING: If you do not have any retry rules at all (this section of the
882# configuration is non-existent or empty), Exim will not do any retries of
883# messages that fail to get delivered at the first attempt. The effect will
884# be to treat temporary errors as permanent. Therefore, DO NOT remove this
885# retry rule unless you really don't want any retries.
886
059ec3d9
PH
887# Address or Domain Error Retries
888# ----------------- ----- -------
889
890* * F,2h,15m; G,16h,1h,1.5; F,4d,6h
891
892
893
894######################################################################
895# REWRITE CONFIGURATION #
896######################################################################
897
898# There are no rewriting specifications in this default configuration file.
899
900begin rewrite
901
902
903
904######################################################################
905# AUTHENTICATION CONFIGURATION #
906######################################################################
907
6083aca0
TF
908# The following authenticators support plaintext username/password
909# authentication using the standard PLAIN mechanism and the traditional
910# but non-standard LOGIN mechanism, with Exim acting as the server.
911# PLAIN and LOGIN are enough to support most MUA software.
912#
913# These authenticators are not complete: you need to change the
914# server_condition settings to specify how passwords are verified.
915# They are set up to offer authentication to the client only if the
916# connection is encrypted with TLS, so you also need to add support
917# for TLS. See the global configuration options section at the start
918# of this file for more about TLS.
919#
920# The default RCPT ACL checks for successful authentication, and will accept
921# messages from authenticated users from anywhere on the Internet.
059ec3d9
PH
922
923begin authenticators
924
6083aca0
TF
925# PLAIN authentication has no server prompts. The client sends its
926# credentials in one lump, containing an authorization ID (which we do not
927# use), an authentication ID, and a password. The latter two appear as
928# $auth2 and $auth3 in the configuration and should be checked against a
929# valid username and password. In a real configuration you would typically
930# use $auth2 as a lookup key, and compare $auth3 against the result of the
931# lookup, perhaps using the crypteq{}{} condition.
932
933#PLAIN:
934# driver = plaintext
935# server_set_id = $auth2
936# server_prompts = :
937# server_condition = Authentication is not yet configured
d9b2312b 938# server_advertise_condition = ${if def:tls_in_cipher }
6083aca0
TF
939
940# LOGIN authentication has traditional prompts and responses. There is no
941# authorization ID in this mechanism, so unlike PLAIN the username and
942# password are $auth1 and $auth2. Apart from that you can use the same
943# server_condition setting for both authenticators.
944
945#LOGIN:
946# driver = plaintext
947# server_set_id = $auth1
948# server_prompts = <| Username: | Password:
949# server_condition = Authentication is not yet configured
d9b2312b 950# server_advertise_condition = ${if def:tls_in_cipher }
059ec3d9
PH
951
952
953######################################################################
954# CONFIGURATION FOR local_scan() #
955######################################################################
956
957# If you have built Exim to include a local_scan() function that contains
958# tables for private options, you can define those options here. Remember to
959# uncomment the "begin" line. It is commented by default because it provokes
960# an error with Exim binaries that are not built with LOCAL_SCAN_HAS_OPTIONS
961# set in the Local/Makefile.
962
963# begin local_scan
964
965
966# End of Exim configuration file