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