eximstats DATA reject detection regexps improved. Fixes: #1093
[exim.git] / src / README.UPDATING
1 This document contains detailed information about incompatibilities that might
2 be encountered when upgrading from one release of Exim to another. The
3 information is in reverse order of release numbers. Mostly these are relatively
4 small points, and the configuration file is normally upwards compatible, but
5 there have been two big upheavals...
6
7
8 **************************************************************************
9 * There was a big reworking of the way mail routing works for release *
10 * 4.00. Previously used "directors" were abolished, and all routing is *
11 * now done by routers. Policy controls for incoming mail are now done by *
12 * Access Control Lists instead of separate options. All this means that *
13 * pre-4.00 configuration files have to be massively converted. If you *
14 * are coming from a 3.xx release, please read the document in the file *
15 * doc/Exim4.upgrade, and allow some time to complete the upgrade. *
16 * *
17 * There was a big reworking of the way domain/host/net/address lists are *
18 * handled at release 3.00. If you are coming from a pre-3.00 release, it *
19 * might be easier to start again from a default configuration. Otherwise *
20 * you need to read doc/Exim3.upgrade and do a double conversion of your *
21 * configuration file. *
22 **************************************************************************
23
24
25 The rest of this document contains information about changes in 4.xx releases
26 that might affect a running system.
27
28
29 Exim version 4.77
30 -----------------
31
32 * GnuTLS will now attempt to use TLS 1.2 and TLS 1.1 before TLS 1.0 and SSL3,
33 if supported by your GnuTLS library. Use the existing
34 "gnutls_require_protocols" option to downgrade this if that will be a
35 problem. Prior to this release, supported values were "TLS1" and "SSL3",
36 so you should be able to update configuration prior to update.
37
38 * The match_<type>{string1}{string2} expansion conditions no longer subject
39 string2 to string expansion, unless Exim was built with the new
40 "EXPAND_LISTMATCH_RHS" option. Too many people have inadvertently created
41 insecure configurations that way. If you need the functionality and turn on
42 that build option, please let the developers know, and know why, so we can
43 try to provide a safer mechanism for you.
44
45 The match{}{} expansion condition (for regular expressions) is NOT affected.
46 For match_<type>{s1}{s2}, all list functionality is unchanged. The only
47 change is that a '$' appearing in s2 will not trigger expansion, but instead
48 will be treated as a literal $ sign; the effect is very similar to having
49 wrapped s2 with \N...\N. If s2 contains a named list and the list definition
50 uses $expansions then those _will_ be processed as normal. It is only the
51 point at which s2 is read where expansion is inhibited.
52
53 If you are trying to test if two email addresses are equal, use eqi{s1}{s2}.
54 If you are testing if the address in s1 occurs in the list of items given
55 in s2, either use the new inlisti{s1}{s2} condition (added in 4.77) or use
56 the pre-existing forany{s2}{eqi{$item}{s1}} condition.
57
58
59 Exim version 4.74
60 -----------------
61
62 * The integrated support for dynamically loadable lookup modules has an ABI
63 change from the modules supported by some OS vendors through an unofficial
64 patch. Don't try to mix & match.
65
66 * Some parts of the build system are now beginning to assume that the host
67 environment is POSIX. If you're building on a system where POSIX tools are
68 not the default, you might have an easier time if you switch to the POSIX
69 tools. Feel free to report non-POSIX issues as a request for a feature
70 enhancement, but if the POSIX variants are available then the fix will
71 probably just involve some coercion. See the README instructions for
72 building on such hosts.
73
74
75 Exim version 4.73
76 -----------------
77
78 * The Exim run-time user can no longer be root; this was always
79 strongly discouraged, but is now prohibited both at build and
80 run-time. If you need Exim to run routinely as root, you'll need to
81 patch the source and accept the risk. Here be dragons.
82
83 * Exim will no longer accept a configuration file owned by the Exim
84 run-time user, unless that account is explicitly the value in
85 CONFIGURE_OWNER, which we discourage. Exim now checks to ensure that
86 files are not writeable by other accounts.
87
88 * The ALT_CONFIG_ROOT_ONLY build option is no longer optional and is forced
89 on; the Exim user can, by default, no longer use -C/-D and retain privilege.
90 Two new build options mitigate this.
91
92 * TRUSTED_CONFIG_LIST defines a file containing a whitelist of config
93 files that are trusted to be selected by the Exim user; one per line.
94 This is the recommended approach going forward.
95
96 * WHITELIST_D_MACROS defines a colon-separated list of macro names which
97 the Exim run-time user may safely pass without dropping privileges.
98 Because changes to this involve a recompile, this is not the recommended
99 approach but may ease transition. The values of the macros, when
100 overridden, are constrained to match this regex: ^[A-Za-z0-9_/.-]*$
101
102 * The system_filter_user option now defaults to the Exim run-time user,
103 rather than root. You can still set it explicitly to root and this
104 can be done with prior versions too, letting you roll versions
105 without needing to change this configuration option.
106
107 * ClamAV must be at least version 0.95 unless WITH_OLD_CLAMAV_STREAM is
108 defined at build time.
109
110
111 Exim version 4.70
112 -----------------
113
114 1. Experimental Yahoo! Domainkeys support has been dropped in this release.
115 It has been superceded by a native implementation of its successor DKIM.
116
117 2. Up to version 4.69, Exim came with an embedded version of the PCRE library.
118 As of 4.70, this is no longer the case. To compile Exim, you will need PCRE
119 installed. Most OS distributions have ready-made library and development
120 packages.
121
122
123 Exim version 4.68
124 -----------------
125
126 1. The internal implementation of the database keys that are used for ACL
127 ratelimiting has been tidied up. This means that an update to 4.68 might cause
128 Exim to "forget" previous rates that it had calculated, and reset them to zero.
129
130
131 Exim version 4.64
132 -----------------
133
134 1. Callouts were setting the name used for EHLO/HELO from $smtp_active_
135 hostname. This is wrong, because it relates to the incoming message (and
136 probably the interface on which it is arriving) and not to the outgoing
137 callout (which could be using a different interface). This has been
138 changed to use the value of the helo_data option from the smtp transport
139 instead - this is what is used when a message is actually being sent. If
140 there is no remote transport (possible with a router that sets up host
141 addresses), $smtp_active_hostname is used. This change is mentioned here in
142 case somebody is relying on the use of $smtp_active_hostname.
143
144 2. A bug has been fixed that might just possibly be something that is relied on
145 in some configurations. In expansion items such as ${if >{xxx}{yyy}...} an
146 empty string (that is {}) was being interpreted as if it was {0} and therefore
147 treated as the number zero. From release 4.64, such strings cause an error
148 because a decimal number, possibly followed by K or M, is required (as has
149 always been documented).
150
151 3. There has been a change to the GnuTLS support (ChangeLog/PH/20) to improve
152 Exim's performance. Unfortunately, this has the side effect of being slightly
153 non-upwards compatible for versions 4.50 and earlier. If you are upgrading from
154 one of these earlier versions and you use GnuTLS, you must remove the file
155 called gnutls-params in Exim's spool directory. If you don't do this, you will
156 see this error:
157
158 TLS error on connection from ... (DH params import): Base64 decoding error.
159
160 Removing the file causes Exim to recompute the relevant encryption parameters
161 and cache them in the new format that was introduced for release 4.51 (May
162 2005). If you are upgrading from release 4.51 or later, there should be no
163 problem.
164
165
166 Exim version 4.63
167 -----------------
168
169 When an SMTP error message is specified in a "message" modifier in an ACL, or
170 in a :fail: or :defer: message in a redirect router, Exim now checks the start
171 of the message for an SMTP error code. This consists of three digits followed
172 by a space, optionally followed by an extended code of the form n.n.n, also
173 followed by a space. If this is the case and the very first digit is the same
174 as the default error code, the code from the message is used instead. If the
175 very first digit is incorrect, a panic error is logged, and the default code is
176 used. This is an incompatible change, but it is not expected to affect many (if
177 any) configurations. It is possible to suppress the use of the supplied code in
178 a redirect router by setting the smtp_error_code option false. In this case,
179 any SMTP code is quietly ignored.
180
181
182 Exim version 4.61
183 -----------------
184
185 1. The default number of ACL variables of each type has been increased to 20,
186 and it's possible to compile Exim with more. You can safely upgrade to this
187 release if you already have messages on the queue with saved ACL variable
188 values. However, if you downgrade from this release with messages on the queue,
189 any saved ACL values they may have will be lost.
190
191 2. The default value for rfc1413_query_timeout has been changed from 30s to 5s.
192
193
194 Exim version 4.54
195 -----------------
196
197 There was a problem with 4.52/TF/02 in that a "name=" option on control=
198 submission terminated at the next slash, thereby not allowing for slashes in
199 the name. This has been changed so that "name=" takes the rest of the string as
200 its data. It must therefore be the last option.
201
202
203 Version 4.53
204 ------------
205
206 If you are using the experimental Domain Keys support, you must upgrade to
207 at least libdomainkeys 0.67 in order to run this release of Exim.
208
209
210 Version 4.51
211 ------------
212
213 1. The format in which GnuTLS parameters are cached (in the file gnutls-params
214 in the spool directory) has been changed. The new format can also be generated
215 externally, so it is now possible to update the values from outside Exim. This
216 has been implemented in an upwards, BUT NOT downwards, compatible manner.
217 Upgrading should be seamless: when Exim finds that it cannot understand an
218 existing cache file, it generates new parameters and writes them to the cache
219 in the new format. If, however, you downgrade from 4.51 to a previous release,
220 you MUST delete the gnutls-params file in the spool directory, because the
221 older Exim will not recognize the new format.
222
223 2. When doing a callout as part of verifying an address, Exim was not paying
224 attention to any local part prefix or suffix that was matched by the router
225 that accepted the address. It now behaves in the same way as it does for
226 delivery: the affixes are removed from the local part unless
227 rcpt_include_affixes is set on the transport. If you have a configuration that
228 uses prefixes or suffixes on addresses that could be used for callouts, and you
229 want the affixes to be retained, you must make sure that rcpt_include_affixes
230 is set on the transport.
231
232 3. Bounce and delay warning messages no longer contain details of delivery
233 errors, except for explicit messages (e.g. generated by :fail:) and SMTP
234 responses from remote hosts.
235
236
237 Version 4.50
238 ------------
239
240 The exicyclog script has been updated to use three-digit numbers in rotated log
241 files if the maximum number to keep is greater than 99. If you are already
242 keeping more than 99, there will be an incompatible change when you upgrade.
243 You will probably want to rename your old log files to the new form before
244 running the new exicyclog.
245
246
247 Version 4.42
248 ------------
249
250 RFC 3848 specifies standard names for the "with" phrase in Received: header
251 lines when AUTH and/or TLS are in use. This is the "received protocol"
252 field. Exim used to use "asmtp" for authenticated SMTP, without any
253 indication (in the protocol name) for TLS use. Now it follows the RFC and
254 uses "esmtpa" if the connection is authenticated, "esmtps" if it is
255 encrypted, and "esmtpsa" if it is both encrypted and authenticated. These names
256 appear in log lines as well as in Received: header lines.
257
258
259 Version 4.34
260 ------------
261
262 Change 4.31/2 gave problems to data ACLs and local_scan() functions that
263 expected to see a Received: header. I have changed to yet another scheme. The
264 Received: header is now generated after the body is received, but before the
265 ACL or local_scan() is called. After they have run, the timestamp in the
266 Received: header is updated.
267
268 Thus, change (a) of 4.31/2 has been reversed, but change (b) is still true,
269 which is lucky, since I decided it was a bug fix.
270
271
272 Version 4.33
273 ------------
274
275 If an expansion in a condition on a "warn" statement fails because a lookup
276 defers, the "warn" statement is abandoned, and the next ACL statement is
277 processed. Previously this caused the whole ACL to be aborted.
278
279
280 Version 4.32
281 ------------
282
283 Change 4.31/2 has been reversed, as it proved contentious. Recipient callout
284 verification now uses <> in the MAIL command by default, as it did before. A
285 new callout option, "use_sender", has been added to request the other
286 behaviour.
287
288
289 Version 4.31
290 ------------
291
292 1. If you compile Exim to use GnuTLS, it now requires the use of release 1.0.0
293 or greater. The interface to the obsolete 0.8.x releases is no longer
294 supported. There is one externally visible change: the format for the
295 display of Distinguished Names now uses commas as a separator rather than a
296 slash. This is to comply with RFC 2253.
297
298 2. When a message is received, the Received: header line is now generated when
299 reception is complete, instead of at the start of reception. For messages
300 that take a long time to come in, this changes the meaning of the timestamp.
301 There are several side-effects of this change:
302
303 (a) If a message is rejected by a DATA or non-SMTP ACL, or by local_scan(),
304 the logged header lines no longer include the local Received: line,
305 because it has not yet been created. If the message is a non-SMTP one,
306 and the error is processed by sending a message to the sender, the copy
307 of the original message that is returned does not have an added
308 Received: line.
309
310 (b) When a filter file is tested using -bf, no additional Received: header
311 is added to the test message. After some thought, I decided that this
312 is a bug fix.
313
314 The contents of $received_for are not affected by this change. This
315 variable still contains the single recipient of a message, copied after
316 addresses have been rewritten, but before local_scan() is run.
317
318 2. Recipient callout verification, like sender verification, was using <> in
319 the MAIL FROM command. This isn't really the right thing, since the actual
320 sender may affect whether the remote host accepts the recipient or not. I
321 have changed it to use the actual sender in the callout; this means that
322 the cache record is now keyed on a recipient/sender pair, not just the
323 recipient address. There doesn't seem to be a real danger of callout loops,
324 since a callout by the remote host to check the sender would use <>.
325
326
327 Version 4.30
328 ------------
329
330 1. I have abolished timeout_DNS as an error that can be detected in retry
331 rules, because it has never worked. Despite the fact that it has been
332 documented since at least release 1.62, there was no code to support it.
333 If you have used it in your retry rules, you will now get a warning message
334 to the log and panic log. It is now treated as plain "timeout".
335
336 2. After discussion on the mailing list, Exim no longer adds From:, Date:, or
337 Message-Id: header lines to messages that do not originate locally, that is,
338 messages that have an associated sending host address.
339
340 3. When looking up a host name from an IP address, Exim now tries the DNS
341 first, and only if that fails does it use gethostbyaddr() (or equivalent).
342 This change was made because on some OS, not all the names are given for
343 addresses with multiple PTR records via the gethostbyaddr() interface. The
344 order of lookup can be changed by setting host_lookup_order.
345
346
347 Version 4.23
348 ------------
349
350 1. The new FIXED_NEVER_USERS build-time option creates a list of "never users"
351 that cannot be overridden. The default in the distributed EDITME is "root".
352 If for some reason you were (against advice) running deliveries as root, you
353 will have to ensure that FIXED_NEVER_USERS is not set in your
354 Local/Makefile.
355
356 2. The ${quote: operator now quotes an empty string, which it did not before.
357
358 3. Version 4.23 saves the contents of the ACL variables with the message, so
359 that they can be used later. If one of these variables contains a newline,
360 there will be a newline character in the spool that will not be interpreted
361 correctely by a previous version of Exim. (Exim ignores keyed spool file
362 items that it doesn't understand - precisely for this kind of problem - but
363 it expects them all to be on one line.)
364
365 So the bottom line is: if you have newlines in your ACL variables, you
366 cannot retreat from 4.23.
367
368
369 Version 4.21
370 ------------
371
372 1. The idea of the "warn" ACL verb is that it adds a header or writes to the
373 log only when "message" or "log_message" are set. However, if one of the
374 conditions was an address verification, or a call to a nested ACL, the
375 messages generated by the underlying test were being passed through. This
376 no longer happens. The underlying message is available in $acl_verify_
377 message for both "message" and "log_message" expansions, so it can be
378 passed through if needed.
379
380 2. The way that the $h_ (and $header_) expansions work has been changed by the
381 addition of RFC 2047 decoding. See the main documentation (the NewStuff file
382 until release 4.30, then the manual) for full details. Briefly, there are
383 now three forms:
384
385 $rh_xxx: and $rheader_xxx: give the original content of the header
386 line(s), with no processing at all.
387
388 $bh_xxx: and $bheader_xxx: remove leading and trailing white space, and
389 then decode base64 or quoted-printable "words" within the header text,
390 but do not do charset translation.
391
392 $h_xxx: and $header_xxx: attempt to translate the $bh_ string to a
393 standard character set.
394
395 If you have previously been using $h_ expansions to access the raw
396 characters, you should change to $rh_ instead.
397
398 3. When Exim creates an RFC 2047 encoded word in a header line, it labels it
399 with the default character set from the headers_charset option instead of
400 always using iso-8859-1.
401
402 4. If TMPDIR is defined in Local/Makefile (default in src/EDITME is
403 TMPDIR="/tmp"), Exim checks for the presence of an environment variable
404 called TMPDIR, and if it finds it is different, it changes its value.
405
406 5. Following a discussion on the list, the rules by which Exim recognises line
407 endings on incoming messages have been changed. The -dropcr and drop_cr
408 options are now no-ops, retained only for backwards compatibility. The
409 following line terminators are recognized: LF CRLF CR. However, special
410 processing applies to CR:
411
412 (i) The sequence CR . CR does *not* terminate an incoming SMTP message,
413 nor a local message in the state where . is a terminator.
414
415 (ii) If a bare CR is encountered in a header line, an extra space is added
416 after the line terminator so as not to end the header. The reasoning
417 behind this is that bare CRs in header lines are most likely either
418 to be mistakes, or people trying to play silly games.
419
420 6. The code for using daemon_smtp_port, local_interfaces, and the -oX options
421 has been reorganized. It is supposed to be backwards compatible, but it is
422 mentioned here just in case I've screwed up.
423
424
425
426 Version 4.20
427 ------------
428
429 1. I have tidied and re-organized the code that uses alarm() for imposing time
430 limits on various things. It shouldn't affect anything, but if you notice
431 processes getting stuck, it may be that I've broken something.
432
433 2. The "arguments" log selector now also logs the current working directory
434 when Exim is called.
435
436 3. An incompatible change has been made to the appendfile transport. This
437 affects the case when it is used for file deliveries that are set up by
438 .forward and filter files. Previously, any settings of the "file" or
439 "directory" options were ignored. It is hoped that, like the address_file
440 transport in the default configuration, these options were never in fact set
441 on such transports, because they were of no use.
442
443 Now, if either of these options is set, it is used. The path that is passed
444 by the router is in $address_file (this is not new), so it can be used as
445 part of a longer path, or modified in any other way that expansion permits.
446
447 If neither "file" nor "directory" is set, the behaviour is unchanged.
448
449 4. Related to the above: in a filter, if a "save" command specifies a non-
450 absolute path, the value of $home/ is pre-pended. This no longer happens if
451 $home is unset or is set to an empty string.
452
453 5. Multiple file deliveries from a filter or .forward file can never be
454 batched; the value of batch_max on the transport is ignored for file
455 deliveries. I'm assuming that nobody ever actually set batch_max on the
456 address_file transport - it would have had odd effects previously.
457
458 6. DESTDIR is the more common variable that ROOT for use when installing
459 software under a different root filing system. The Exim install script now
460 recognizes DESTDIR first; if it is not set, ROOT is used.
461
462 7. If DESTDIR is set when installing Exim, it no longer prepends its value to
463 the path of the system aliases file that appears in the default
464 configuration (when a default configuration is installed). If an aliases
465 file is actually created, its name *does* use the prefix.
466
467
468 Version 4.14
469 ------------
470
471 1. The default for the maximum number of unknown SMTP commands that Exim will
472 accept before dropping a connection has been reduced from 5 to 3. However, you
473 can now change the value by setting smtp_max_unknown_commands.
474
475 2. The ${quote: operator has been changed so that it turns newline and carriage
476 return characters into \n and \r, respectively.
477
478 3. The file names used for maildir messages now include the microsecond time
479 fraction as well as the time in seconds, to cope with systems where the process
480 id can be re-used within the same second. The format is now
481
482 <time>.H<microsec>P<pid>.<host>
483
484 This should be a compatible change, but is noted here just in case.
485
486 4. The rules for creating message ids have changed, to cope with systems where
487 the process id can be re-used within the same second. The format, however, is
488 unchanged, so this should not cause any problems, except as noted in the next
489 item.
490
491 5. The maximum value for localhost_number has been reduced from 255 to 16, in
492 order to implement the new message id rules. For operating systems that have
493 case-insensitive file systems (Cygwin and Darwin), the limit is 10.
494
495 6. verify = header_syntax was allowing unqualified addresses in all cases. Now
496 it allows them only for locally generated messages and from hosts that match
497 sender_unqualified_hosts or recipient_unqualified_hosts, respectively.
498
499 7. For reasons lost in the mists of time, when a pipe transport was run, the
500 environment variable MESSAGE_ID was set to the message ID preceded by 'E' (the
501 form used in Message-ID: header lines). The 'E' has been removed.
502
503
504 Version 4.11
505 ------------
506
507 1. The handling of lines in the configuration file has changed. Previously,
508 macro expansion was applied to logical lines, after continuations had been
509 joined on. This meant that it could not be used in .include lines, which are
510 handled as physical rather than logical lines. Macro expansion is now done on
511 physical lines rather than logical lines. This means there are two
512 incompatibilities:
513
514 (a) A macro that expands to # to turn a line into a comment now applies only
515 to the physical line where it appears. Previously, it would have caused
516 any following continuations also to be ignored.
517
518 (b) A macro name can no longer be split over the boundary between a line and
519 its continuation. Actually, this is more of a bug fix. :-)
520
521 2. The -D command line option must now all be within one command line item.
522 This makes it possible to use -D to set a macro to the empty string by commands
523 such as
524
525 exim -DABC ...
526 exim -DABC= ...
527
528 Previously, these items would have moved on to the next item on the command
529 line. To include spaces in a macro definition item, quotes must be used, in
530 which case you can also have spaces after -D and surrounding the equals. For
531 example:
532
533 exim '-D ABC = something' ...
534
535 3. The way that addresses that redirect to themselves are handled has been
536 changed, in order to fix an obscure bug. This should not cause any problems
537 except in the case of wanting to go back from a 4.11 (or later) release to an
538 earlier release. If there are undelivered messages on the spool that contain
539 addresses which redirect to themselves, and the redirected addresses have
540 already been delivered, you might get a duplicate delivery if you revert to an
541 earlier Exim.
542
543 4. The default way of looking up IP addresses for hosts in the manualroute and
544 queryprogram routers has been changed. If "byname" or "bydns" is explicitly
545 specified, there is no change, but if no method is specified, Exim now behaves
546 as follows:
547
548 First, a DNS lookup is done. If this yields anything other than
549 HOST_NOT_FOUND, that result is used. Otherwise, Exim goes on to try a call to
550 getipnodebyname() (or gethostbyname() on older systems) and the result of the
551 lookup is the result of that call.
552
553 This change has been made because it has been discovered that on some systems,
554 if a DNS lookup called via getipnodebyname() times out, HOST_NOT_FOUND is
555 returned instead of TRY_AGAIN. Thus, it is safest to try a DNS lookup directly
556 first, and only if that gives a definite "no such host" to try the local
557 function.
558
559 5. In fixing the minor security problem with pid_file_path, I have removed some
560 backwards-compatible (undocumented) code which was present to ease conversion
561 from Exim 3. In Exim 4, pid_file_path is a literal; in Exim 3 it was allowed to
562 contain "%s", which was replaced by the port number for daemons listening on
563 non-standard ports. In Exim 4, such daemons do not write a pid file. The
564 backwards compatibility feature was to replace "%s" by nothing if it occurred
565 in an Exim 4 setting of pid_file_path. The bug was in this code. I have solved
566 the problem by removing the backwards compatibility feature. Thus, if you still
567 have "%s" somewhere in a setting of pid_file_path, you should remove it.
568
569 6. There has been an extension to lsearch files. The keys in these files may
570 now be quoted in order to allow for whitespace and colons in them. This means
571 that if you were previously using keys that began with a doublequote, you will
572 now have to wrap them with extra quotes and escape the internal quotes. The
573 possibility that anybody is actually doing this seems extremely remote, but it
574 is documented just in case.
575
576
577 Version 4.10
578 ------------
579
580 The build-time parameter EXIWHAT_KILL_ARG has been renamed EXIWHAT_KILL_SIGNAL
581 to better reflect its function. The OS-specific files have been updated. Only
582 if you have explicitly set this in your Makefile (highly unlikely) do you need
583 to change anything.
584
585 ****