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