OCSP description: minor nits
[exim.git] / doc / doc-txt / Exim3.upgrade
1This document contains information about upgrading Exim to the last of the 3.xx
2releases. It is provided to help anybody who is upgrading to release 4.xx from
3a release that is earlier than 3.33. It goes back as far as release 2.12. If
4you are upgrading to release 4.xx from an even earlier release, it is probably
5best to start again from the default configuration.
8Upgrading from release 3.16
111. The way LDAP returns values for multiple attributes has been changed to be
12the same as the NIS+ lookup.
14If you specify multiple attributes, they are returned as space-separated
15strings, quoted if necessary.
17e.g. ldap:///o=base?attr1,attr2?sub?(uid=fred)
19 used to give: attr1=value one, attr2=value2
20 now gives: attr1="value one" attr2=value2
22If you don't specify any attributes in the search, you now get them in
23the tagged format as well.
25e.g. ldap:///o=base??sub?(uid=fred)
27 used to give: top, value one, value2
28 now gives: objectClass=top attr1="value one" attr2=value2
30The reason for these changes is so that the results can be safely parsed -
31in fact, the existing ${extract{key}{val}} function does this nicely.
32This in turn allows a single LDAP query to be reused - one query can return
33the destination delivery address, the quota, and so forth.
35This is NOT a backwards compatible change, so there is a compile-time option
36to reverse it in the src/lookups/ldap.c module, for use in emergency. But it is
37not thought that the old behaviour was particularly useful as it stood, because
38a field that contained ',' or '=' would make the result unparseable.
40In the common case where you explicitly ask for a single attribute in your
41LDAP query, the behaviour is unchanged - the result is not quoted, and if there
42are multiple values they are comma-separated.
442. The hosts_max_try option in the smtp transport limits the number of IP
45addresses that will actually be tried during one delivery attempt. The default
46is 5. Previously, all available addresses were tried.
483. The extension of the "extract" expansion item has resulted in a change to
49the way Exim decides between the keyed form and the numeric form. If the first
50argument consists entirely of digits, the numeric form is assumed. This means
51that it is impossible to have keys that are digit strings, without manipulating
52the data first (e.g. by using ${sg} to add a letter to each key).
55Upgrading from release 3.15
581. The handling of "freeze" and "fail" in system filter files has changed.
59Previously, any deliveries set up by a filter that ended with "freeze" or
60"fail" were discarded. This no longer happens; such deliveries are honoured.
61A consequence of this is that first_delivery becomes false after freezing in a
62system filter; previously it remained true until a real delivery attempt
66Upgrading from release 3.13
691. The handling of maildir_tag has been changed (see NewStuff). There are two
70small incompatibilities: (a) Exim now inserts a leading colon only if the
71string begins with an alphanumeric character. So if you were using a string
72starting with a special character, you will have to add the leading colon to
73it to remain compatible. (b) The expansion of maildir_tag now happens after the
74file has been written, and $message_size is updated to the correct file size
75before the expansion. The tag is not used on the temporary file (it was
782. The handling of Exim's configuration has changed in two ways:
80 (a) Any line may be continued by ending it with a backslash. Trailing white
81 space after the backslash, and leading white space on continuation lines is
82 ignored. This means that quotes are no longer needed just to make it possible
83 to continue an option setting. The difference between quoted and non-quoted
84 strings is that quoted strings are processed for internal backslashed items
85 such as \n. The only possible incompatibility of this change is if any
86 existing configuration has a non-quoted line ended in backslash, which seems
87 a very remote possibility.
89 (b) All lists, with the exception of log_file_path, can now use a different
90 character to colon as the separator. This is specified by starting the list
91 with <x where x is any punctuation character. For example:
93 local_interfaces = <; ; ::1
95 The new feature is provided to make life easier with IPv6 addresses. It is
96 recommended that its use be confined to circumstances where it really is
97 needed, and that colon be used in most cases. I don't believe this change
98 is incompatible, because I don't think any list item can legitimately begin
99 with a '<' character.
1013. Previously, Exim took no action to ensure that the timestamps in its log
102files were "wall clock time". If the TZ environment variable was set when Exim
103was called, it could cause strange times to be logged. For the majority of
104operating systems, I have been able to fix this problem by deleting the entire
105environment. However, this doesn't work in some systems, and a macro called
106HANDS_OFF_ENVIRONMENT is defined in their OS/os.h files to suppress the action.
107These OS are: AIX, DGUX, HP-UX, IRIX, and SCO, and their behaviour should be
108unchanged from previous releases. On any other OS, if you find you are getting
109weird timestamps, it may be that your OS needs HANDS_OFF_ENVIRONMENT.
1114. As a result of the change described in 3, there may be some cases where Exim
112runs an external program that previously got passed the environment, and now do
113not. This does *not* apply to the pipe transport, where the environment has
114always been set up specifically, as described in the manual.
1165. The way in which Exim scans its queue when split_spool_directory is set has
117changed, but this shouldn't make any noticeable difference. See doc/NewStuff
118for defails.
121Upgrading from release 3.03
124The from_hack option in the appendfile and pipe transports has been replace by
125two string options, check_string and escape_string. If your configuration
126contains any references to from_hack they should be replaced. Exim continues to
127recognize from_hack as a transitional measure. If no_from_hack is specified in
128an appendfile transport, the two new options are forced to be unset. Otherwise
129the setting of from_hack is ignored.
132Upgrading from release 3.02
135The exim_dbmbuild utility has been changed to write a warning to stderr on
136encountering a duplicate key, and to return a value of 1. Formerly, it ignored
137all but the last of a set of duplicates; now it ignores all but the first, to
138make dbm-searched files behave the same way as lsearch-searched files. However,
139there is an option -lastdup which makes it behave as before. The -nowarn option
140suppresses the individual warnings, but the number of duplicates is always
141listed on stdout at the end.
144Updating from a release prior to 3.00
147Prior to release 3.00 a lot of options which contained lists of various kinds
148came in groups such as sender_accept, sender_reject, sender_reject_except. This
149style of configuration has been abolished. Instead, it is now possible to put
150negative entries in such lists, so that a single option is all that is
151required. In addition to this, net lists have been abolished, and instead,
152host lists can now contain items that specify networks as well as hosts. The
153names of some of these options have also been changed.
155As a result of these changes, most configuration files used for earlier
156versions of Exim need to be changed. The opportunity has therefore been taken
157to remove a number of other obsolete features and options.
159A Perl script is built in the file util/convert4r3 to assist in updating Exim
160configuration files. It reads a configuration file on the standard input,
161writes a modified file on the standard output, and writes comments about what
162it has done to the standard error file. It assumes that the input is a valid
163Exim configuration file. A typical call to the conversion script might be
165 util/convert4r3 </opt/exim/configure >/opt/exim/configure.new
167The way the script merges an accept/reject/reject_except triple into a single
168accept option is to put the reject_except list first, followed by the reject
169list with every item negated, followed by the accept list. For example, if an
170old configuration file contains
172 sender_host_accept_relay = *.c.d : e.f.g
173 sender_host_reject_relay = *.b.c.d
174 sender_host_reject_relay_except = a.b.c.d
176the new configuration will contain
178 host_accept_relay = a.b.c.d : ! *.b.c.d : *.c.d : e.f.g
180The same ordering is used to merge a triple into a reject option, but this time
181the first and third sublists are negated. For example, if an old configuration
182file contains
184 sender_host_accept = *.c.d : e.f.g
185 sender_host_reject = *.b.c.d
186 sender_host_reject_except = a.b.c.d
188the new configuration file will contain
190 host_reject = ! a.b.c.d : *.b.c.d : ! *.c.d : ! e.f.g : *
192The output file should be checked before trying to use it. Each option change
193is preceded by an identifying comment. There are several specific things that
194you should look out for when checking:
196(1) If you are using macros to contain lists of items, and these have to be
197 negated in the new world, convert4r3 won't get it right. For example, if
198 the old configuration contains
200 ACCEPTHOSTS = *.c.d : e.f.g
201 sender_host_reject = ACCEPTHOSTS
203 then the rewritten configuration will be
205 ACCEPTHOSTS = *.c.d : e.f.g
206 host_reject = !ACCEPTHOSTS
208 but because this is just textual macro handling, that is equivalent to
210 host_reject = !*.c.d : e.f.g
212 which is not the correct translation, because the second item is not
213 negated. There is unfortunately no easy way to use a macro to provide a
214 list of things that are sometimes negated.
216(2) The conversion adds some settings of file_transport, pipe_transport, and
217 reply_transport to aliasfile and forwardfile directors. This is done
218 because the global implicit defaults for these options have been removed.
219 The default configuration now contains explicit settings, so convert4r3
220 makes these additions to be compatible with that. If your aliasfile and
221 forwardfile directors do not make use of the pipe, file, or autoreply
222 facilities, you can remove these new settings.
224(3) If you are using +allow_unknown in a host list which also has an exception
225 list, you may need to move +allow_unknown in the new configuration. For
226 example, if the old configuration contains
228 sender_host_reject = +allow_unknown : *.b.c
229 sender_host_reject_except = *.a.b.c
231 then the rewritten configuration will be
233 host_reject = ! *.a.b.c : +allow_unknown : *.b.c
235 Because the negated item contains a wild card, the reverse lookup for the
236 host name will occur before +allow_unknown is encountered, and therefore
237 +allow_unknown will have no effect. It should be moved to the start of the
238 list.
240One way of upgrading Exim from a pre-3.00 release to a post-3.00 release is as
2431. Suppose your configuration file is called /opt/exim/configure, and you want
244 to continue with this name after upgrading. The first thing to do is to make
245 another copy of this file called, say, /opt/exim/configure.pre-3.00.
2472. Rebuild your existing Exim to use the copy of the configuration file instead
248 of the standard file. Install this version of Exim under a special name such
249 as exim-2.12, and point a symbolic link called "exim" at it. Then HUP your
250 daemon. You can check on the name of the configuration file by running
252 exim -bP configure_file
254 Ensure that everything is running smoothly.
2563. Build the new release, configured to use the standard configuration file.
2584. Use the convert4r3 utility to upgrade your configuration file for the new
259 release. After running it, check the file by hand.
2615. If any of the options that convert4r3 rewrote contained regular expressions
262 that had backslashes in them, and were not previously in quotes, they will
263 need modification if convert4r3 has put them into quotes. Either re-arrange
264 the option to remove the quoting, or escape each backslash. For example, if
265 you had
267 sender_reject_recipients = ^\d{8}@
268 sender_reject_except = ^\d{8}@x.y.z
270 convert4r3 will have combined the two settings into
272 sender_reject_recipients = "! ^\d{8}@x.y.z : \
273 ^\d{8}@"
275 This must be changed to
277 sender_reject_recipients = ! ^\d{8}@x.y.z : ^\d{8}@
278 or
279 sender_reject_recipients = "! ^\\d{8}@x.y.z : ^\\d{8}@"
281 In the second case, the quoted string could of course still be split
282 over several lines.
2846. If your configuration refers to any external lists of networks, check them
285 to ensure that all the masks are in the single-number form, because Exim no
286 longer recognizes the dotted quad form of mask. For example, if an item in
287 a netlist file is
291 you must change it to
295 Otherwise Exim will not recognize it as a masked IP address, and will treat
296 it as a host name. The convert4r3 utility makes this conversion for networks
297 that are mentioned inline in the configuration, but it does not handle
298 referenced files.
3007. Check the newly-built Exim as much as possible without installing; you can,
301 for example, use a command such as
303 ./exim -bV
305 in the build directory to test that it successfully reads the new
306 configuration file. You can also do tests using -bt and -bh.
3088. Install the new release under a special name such as exim-3.00.
3109. You can then easily change between the new and old releases simply by moving
311 the symbolic link and HUPping your daemon.
314Details of syntax changes at 3.00
3171. A bare file name without a preceding search type may appear in a domain
318list; this causes each line of the file to be read and processed as if it were
319an item in the list, except that it cannot itself be a bare file name (that is,
320this facility cannot be used recursively). Wild cards and regular expressions
321may be used in the lines of the file just as in the main list.
322For example, if
324 local_domains = /etc/local-domains
326then the file could contain lines like
328 *.mydomain.com
330This is different to an lsearch file, which operates like any other lookup type
331and does an exact search for the key. If a # character appears anywhere in a
332line of the file, it and all following characters are ignored. Blank lines are
333also ignored.
3352. Any item in a domain list (including a bare file name) can be preceded by an
336exclamation mark character, to indicate negation. White space after the ! is
337ignored. If the domain matches the rest of the item, it is *not* in the set of
338domains that the option is defining. If the end of the list is reached, the
339domain is accepted if the last item was a negative one, but not if it was a
340positive one. If ! precedes a bare file name, then all items in the file are
341negated, unless they are preceded by another exclamation mark. For example:
343 relay_domains = !a.b.c : *.b.c
345sets up a.b.c as an exception to the more general item *.b.c, because lists are
346processed from left to right. If the domain that is being checked matches
347neither a.b.c nor *.b.c, then it is not accepted as a relay domain, because the
348last item in the list is a positive item. However, if the option were just
350 relay_domains = !a.b.c
352then all domains other than a.b.c would be relay domains, because the last item
353in the list is a negative item. In effect, a list that ends with a negative
354item has ": *" appended to it.
3563. Negation and bare file names are available as above in lists of local parts
357(e.g. in local_parts options) and complete addresses (address lists). For the
358special "@@" lookup form in address lists, negation also can be used in the
359list of local parts that is looked up for the domain. For example, with
361 sender_reject_recipients = @@dbm;/etc/reject-by-domain
363the file could contain lines like this:
365 baddomain.com: !postmaster : !hostmaster : *
367If a local part that actually begins with ! is required, it has to be specified
368using a regular expression. Because local parts may legitimately contain #
369characters, a comment in the file is recognized only if # is followed by white
370space or the end of the line.
3724. Host lists may now contain network items, as in the former net list options,
373which have all been abolished. The only form of network masking is the /n
374variety. Negation and bare file names can appear in host lists, and there is a
375new type of item which allows masked network numbers to be used as keys in
376lookups, thus making it possible to used DBM files for faster checking when the
377list of networks is large.
379The complete list of types of item which can now appear in a host list is:
381. An item may be a bare file name; each line of the file may take the form of
382 any of the items below, but it may not itself be another bare file name. If
383 the file name is preceded by ! then all items in the file are negated, unless
384 they are preceded by another exclamation mark. Comments in the file are
385 introduced by # and blank lines are ignored.
387. If the entire item is "*" it matches any host.
389. If the item is in the form of an IP address, it is matched against the IP
390 address of the incoming call.
392. If the item is in the form of an IP address followed by a slash and a mask
393 length (e.g. then it is matched against the IP address of the
394 incoming call, subject to the mask.
396. If the item is of the form "net<number>-<search-type>;<search-data>", for
397 example:
399 net24-dbm;/networks.db
401 then the IP address of the incoming call is masked using <number> as the mask
402 length; a textual string is then constructed from the masked value, followed
403 by the mask, and this is then used as the key for the lookup. For example, if
404 the incoming IP address is then the key that is looked up for
405 the above example is "".
407. If the entire item is "@" the primary host name is used as the the match
408 item, and the following applies:
410. If the item is a plain domain name, then a forward DNS lookup is done on that
411 name to find its IP address(es), and the result is compared with the IP
412 address of the incoming call.
414The remaining items require the host name to be obtained by a reverse DNS
415lookup. If the lookup fails, Exim takes a hard line by default and access is
416not permitted. If the list is an "accept" list, Exim behaves as if the current
417host is not in the set defined by the list, whereas if it is a "reject" list,
418it behaves as if it is.
420To change this behaviour, the special item "+allow_unknown" may appear in the
421list (at top level - it is not recognized in an indirected file); if any
422subsequent items require a host name, and the reverse DNS lookup fails, Exim
423permits the access, that is, its behaviour is the opposite to the default.
425. If the item starts with "*" then the remainder of the item must match the end
426 of the host name. For example, *.b.c matches all hosts whose names end in
427 .b.c. This special simple form is provided because this is a very common
428 requirement. Other kinds of wildcarding require the use of a regular
429 expression.
431. If the item starts with "^" then it is taken to be a regular expression which
432 is matched against the host name. For example, ^(a|b)\.c\.d$ matches either
433 of the two hosts a.c.d or b.c.d. If the option string in which this occurs is
434 given in quotes, then the backslash characters must be doubled, because they
435 are significant in quoted strings. The following two settings are exactly
436 equivalent:
438 host_accept = ^(a|b)\.c\.d$
439 host_accept = "^(a|b)\\.c\\.d$"
441. If the item is of the form <search-type>;<filename or query>, for example
443 dbm;/host/accept/list
445 then the host name is looked up using the search type and file name or query
446 (as appropriate). The actual data that is looked up is not used.
4485. Early versions of Exim required commas and semicolons to terminate option
449settings in drivers. This hasn't been the case for quite some time. The code to
450handle them has now been removed.
453Details of option changes at 3.00
456Main options
459 * address_directory_transport, address_directory2_transport,
460 address_file_transport, address_pipe_transport, and address_reply_transport
461 have been abolished as obsolete. The aliasfile and forwardfile directors
462 have been able for some time to set the transports they want to use for
463 these special kinds of delivery; there seems little need for global
464 defaults. The default configuration has been altered to add settings for
465 file_transport and pipe_transport to the aliasfile and forwardfile
466 directors, and to add reply_transport to forwardfile.
468 * check_dns_names, a deprecated synonym for dns_check_names, has been
469 abolished.
471 * helo_accept_junk_nets is abolished; nets can now appear in
472 helo_accept_junk_hosts.
474 * helo_verify_except_hosts and helo_verify_except_nets have been abolished,
475 and helo_verify has been changed from a boolean to a host list, listing
476 those hosts for which HELO verification is required.
478 * the obsolete option helo_verify_nets (a synonym for host_lookup_nets) has
479 been abolished. Note that host_lookup_nets itself has been replaced by
480 host_lookup.
482 * hold_domains_except has been abolished. Use negated items in hold_domains.
484 * host_lookup_nets has been replaced by host_lookup, which can contain hosts
485 and nets.
487 * ignore_fromline_nets has been replaced by ignore_fromline_hosts.
489 * If message_filter is set and the filter generates any deliveries to files,
490 pipes, or any autoreplies, then the appropriate message_filter_*_transport
491 options must be set to define the transports, following the abolition of
492 the global defaults (see above).
494 * queue_remote and queue_remote_except have been abolished and replaced by
495 queue_remote_domains, which lists those domains that should be queued. The
496 effect of queue_remote=true is now obtained by queue_remote_domains=*.
498 * queue_smtp and queue_smtp_except have been abolished and replaced by
499 queue_smtp_domains, which lists those domains that should be queued after
500 routing. The effect of queue_smtp=true is now obtained by
501 queue_smtp_domains=*.
503 * rbl_except_nets has been abolished and replaced by rbl_hosts, which can
504 contain hosts and nets. This defaults to "*" and defines the set of hosts
505 for which RBL checking is done.
507 * receiver_unqualified_nets is abolished; nets can now appear in
508 receiver_unqualified_hosts.
510 * receiver_verify_except_hosts and receiver_verify_except_nets have been
511 abolished and replaced by receiver_verify_hosts, which defaults to "*".
512 This is used, however, only when receiver_verify is set - together with the
513 other conditions (receiver_verify_addresses, receiver_verify_senders).
515 * receiver_verify_senders_except has been abolished; the functionality is now
516 available by using negation in receiver_verify_senders.
518 * rfc1413_except_hosts and rfc1413_except_nets have been abolished, and
519 replaced by rfc1413_hosts, which defaults to "*".
521 * sender_accept, sender_accept_recipients and sender_reject_except have
522 been abolished; the functionality is now available via sender_reject and
523 sender_reject_recipients.
525 * sender_host_accept, sender_net_accept, sender_host_reject,
526 sender_net_reject, sender_host_reject_except, sender_net_reject_except,
527 sender_host_reject_recipients and sender_net_reject_recipients
528 have all been abolished, and replaced by the options host_reject and
529 host_reject_recipients.
531 * sender_host_accept_relay, sender_net_accept_relay,
532 sender_host_reject_relay, sender_host_reject_relay_except,
533 sender_net_reject_relay, and sender_net_reject_relay_except are abolished,
534 and replaced by host_accept_relay. This defaults unset, and this means that
535 all relaying is now by default locked out in the Exim binary. Previously,
536 if no relaying options were set, relaying was permitted.
538 * sender_unqualified_nets has been abolished; nets can now appear in
539 sender_unqualified_hosts.
541 * sender_verify_except_hosts and sender_verify_except_nets have been
542 abolished and replaced by sender_verify_hosts, which defaults to "*". This
543 is used, however, only when sender_verify is set (to make it similar to
544 receiver_verify, even though there aren't at present any other conditions.)
546 * sender_verify_log_details has been abolished. This was a little-used
547 debugging option.
549 * smtp_etrn_nets has been abolished; nets can now appear in smtp_etrn_hosts.
551 * smtp_expn_nets has been abolished; nets can now appear in smtp_expn_hosts.
553 * smtp_log_connections, a deprecated synonym for log_smtp_connections, has
554 been abolished.
556 * smtp_reserve_nets is abolished; nets can now appear in smtp_reserve_hosts.
558Generic director and router options
561 * except_domains, except_local_parts, and except_senders have been abolished.
562 Use negated items in domains, local_parts, and senders instead, for
563 example, replace
565 except_domains = a.b.c
567 with
569 domains = !a.b.c
571 If you already have a domains setting, add any negative items to the front
572 of it.
574The aliasfile director
577 * The option "directory", an obsolete synonym for home_directory, has been
578 abolished.
580The forwardfile director
583 * The option "directory", an obsolete synonym for file_directory, has been
584 abolished.
586 * The option forbid_filter_log, an obsolete synonym for
587 forbid_filter_logwrite, has been abolished.
589The localuser director
592 * The option "directory", an obsolete synonym for match_directory, has been
593 abolished.
595The lookuphost router
598 * mx_domains_except and its obsolete old name non_mx_domains have been
599 abolished. Use negated items in mx_domains.
601The pipe transport
604 * The option "directory", an obsolete synonym for home_directory, has been
605 abolished.
607The smtp transport
610 * mx_domains_except and its obsolete old name non_mx_domains have been
611 abolished. Use negated items in mx_domains.
613 * serialize_nets has been abolished; nets may now appear in serialize_hosts.
616Other items relevant to upgrading from Exim 2.12
6191. RFC 2505 (Anti-Spam Recommendations for SMTP MTAs) recommends that the
620checking of addresses for spam blocks should be done entirely caselessly.
621Previously, although Exim retained the case of the local part, in accordance
622with the RFC 821 rule that local parts are case sensitive, some of the string
623comparisons were nevertheless done caselessly, but file lookups used the
624unmodified address.
626The way addresses are compared with options whose values are address lists has
627been changed. At the start of the comparison, both the local part and the
628domain are now forced to lower case, and any comparisons that are done with
629in-line strings are done caselessly. For example,
631 sender_reject = A@b.c
633rejects both A@b.c and a@b.c. Any lookups that occur use lowercased strings as
634their keys. If the @@ lookup facility is used, the lookup is done on the lower
635cased domain name, but any subsequent string comparisons on local parts are
636done caselessly.
638To retain possibility of caseful matching, the pseudo-item "+caseful" can
639appear in an address list. It causes any subsequent items to do caseful matches
640on local parts. The domain, however, remains lower cased.
6422. The handling of incoming batched SMTP has been re-worked so as to behave in
643a more useful way in cases of error:
645 (i) The option sender_verify_batch now defaults false.
646 (ii) EOF is no longer interpreted as end-of-message; the "." line must be
647 present.
648 (iii) Exim stops immediately in cases of error, writing information to stdout
649 and stderr, and setting the return code to 1 if some messages have been
650 accepted, and 2 otherwise.
6523. The first message delivered by -R, and all messages delivered by -Rf and -qf
653are "forced" in the sense that retry information is over-ridden. Previously,
654Exim also forcibly thawed any of these messages that was frozen. This no longer
655happens. Additional options -Rff and -qff have been implemented to force
656thawing as well as delivery.
6584. When recipients are being rejected because the sending host is in an RBL
659list, Exim used just to show the RBL text, if any, as part of the rejection
660response. Now, if prohibition_message is set, it expands that string instead,
661with the RBL message available in $rbl_text, and $prohibition_reason set to
6645. When a trusted caller passed a message to Exim, it used to check the From:
665header against the caller's login (even though the caller was trusted) unless
666the -f option had been used to supply a different sender. This has been changed
667so that From: is never checked if the caller is trusted.
669Philip Hazel
670May 1999