1 $Cambridge: exim/doc/doc-txt/NewStuff,v 1.37 2005/04/27 13:29:32 ph10 Exp $
6 This file contains descriptions of new features that have been added to Exim,
7 but have not yet made it into the main manual (which is most conveniently
8 updated when there is a relatively large batch of changes). The doc/ChangeLog
9 file contains a listing of all changes, including bug fixes.
15 PH/01 The format in which GnuTLS parameters are written to the gnutls-param
16 file in the spool directory has been changed. This change has been made
17 to alleviate problems that some people had with the generation of the
18 parameters by Exim when /dev/random was exhausted. In this situation,
19 Exim would hang until /dev/random acquired some more entropy.
21 The new code exports and imports the DH and RSA parameters in PEM
22 format. This means that the parameters can be generated externally using
23 the certtool command that is part of GnuTLS.
25 To replace the parameters with new ones, instead of deleting the file
26 and letting Exim re-create it, you can generate new parameters using
27 certtool and, when this has been done, replace Exim's cache file by
28 renaming. The relevant commands are something like this:
32 # chown exim:exim new.params
33 # chmod 0400 new.params
34 # certtool --generate-privkey --bits 512 >new.params
35 # echo "" >>new.params
36 # certtool --generate-dh-params --bits 1024 >> new.params
37 # mv new.params params
39 If Exim never has to generate the parameters itself, the possibility of
42 PH/02 A new expansion item for dynamically loading and calling a locally-
43 written C function is now provided, if Exim is compiled with
47 set in Local/Makefile. The facility is not included by default (a
48 suitable error is given if you try to use it when it is not there.)
50 If you enable EXPAND_DLFUNC, you should also be aware of the new redirect
51 router option forbid_filter_dlfunc. If you have unprivileged users on
52 your system who are permitted to create filter files, you might want to
53 set forbid_filter_dlfunc=true in the appropriate router, to stop them
54 using ${dlfunc to run code within Exim.
56 You load and call an external function like this:
58 ${dlfunc{/some/file}{function}{arg1}{arg2}...}
60 Once loaded, Exim remembers the dynamically loaded object so that it
61 doesn't reload the same object file in the same Exim process (but of
62 course Exim does start new processes frequently).
64 There may be from zero to eight arguments to the function. When compiling
65 a local function that is to be called in this way, local_scan.h should be
66 included. The Exim variables and functions that are defined by that API
67 are also available for dynamically loaded functions. The function itself
68 must have the following type:
70 int dlfunction(uschar **yield, int argc, uschar *argv[])
72 Where "uschar" is a typedef for "unsigned char" in local_scan.h. The
73 function should return one of the following values:
75 OK Success. The string that is placed in "yield" is put into
76 the expanded string that is being built.
78 FAIL A non-forced expansion failure occurs, with the error
79 message taken from "yield", if it is set.
81 FAIL_FORCED A forced expansion failure occurs, with the error message
82 taken from "yield" if it is set.
84 ERROR Same as FAIL, except that a panic log entry is written.
86 When compiling a function that is to be used in this way with gcc,
87 you need to add -shared to the gcc command. Also, in the Exim build-time
88 configuration, you must add -export-dynamic to EXTRALIBS.
90 TF/01 $received_time is a new expansion variable containing the time and date
91 as a number of seconds since the start of the Unix epoch when the
92 current message was received.
94 PH/03 There is a new value for RADIUS_LIB_TYPE that can be set in
95 Local/Makefile. It is RADIUSCLIENTNEW, and it requests that the new API,
96 in use from radiusclient 0.4.0 onwards, be used. It does not appear to be
97 possible to detect the different versions automatically.
99 PH/04 There is a new option called acl_not_smtp_mime that allows you to scan
100 MIME parts in non-SMTP messages. It operates in exactly the same way as
103 PH/05 It is now possible to redefine a macro within the configuration file.
104 The macro must have been previously defined within the configuration (or
105 an included file). A definition on the command line using the -D option
106 causes all definitions and redefinitions within the file to be ignored.
107 In other words, -D overrides any values that are set in the file.
108 Redefinition is specified by using '==' instead of '='. For example:
112 MAC1 == updated value
114 Redefinition does not alter the order in which the macros are applied to
115 the subsequent lines of the configuration file. It is still the same
116 order in which the macros were originally defined. All that changes is
117 the macro's value. Redefinition makes it possible to accumulate values.
122 MAC1 == MAC1 and something added
124 This can be helpful in situations where the configuration file is built
125 from a number of other files.
127 PH/06 Macros may now be defined or redefined between router, transport,
128 authenticator, or ACL definitions, as well as in the main part of the
129 configuration. They may not, however, be changed within an individual
130 driver or ACL, or in the local_scan, retry, or rewrite sections of the
133 PH/07 $acl_verify_message is now set immediately after the failure of a
134 verification in an ACL, and so is available in subsequent modifiers. In
135 particular, the message can be preserved by coding like this:
137 warn !verify = sender
138 set acl_m0 = $acl_verify_message
140 Previously, $acl_verify_message was set only while expanding "message"
141 and "log_message" when a very denied access.
143 PH/08 The redirect router has two new options, sieve_useraddress and
144 sieve_subaddress. These are passed to a Sieve filter to specify the :user
145 and :subaddress parts of an address. Both options are unset by default.
146 However, when a Sieve filter is run, if sieve_useraddress is unset, the
147 entire original local part (including any prefix or suffix) is used for
148 :user. An unset subaddress is treated as an empty subaddress.
150 PH/09 Quota values can be followed by G as well as K and M.
152 PH/10 $message_linecount is a new variable that contains the total number of
153 lines in the header and body of the message. Compare $body_linecount,
154 which is the count for the body only. During the DATA and
155 content-scanning ACLs, $message_linecount contains the number of lines
156 received. Before delivery happens (that is, before filters, routers, and
157 transports run) the count is increased to include the Received: header
158 line that Exim standardly adds, and also any other header lines that are
159 added by ACLs. The blank line that separates the message header from the
160 body is not counted. Here is an example of the use of this variable in a
163 deny message = Too many lines in message header
165 ${if <{250}{${eval: $message_linecount - $body_linecount}}}
167 In the MAIL and RCPT ACLs, the value is zero because at that stage the
168 message has not yet been received.
174 The documentation is up-to-date for the 4.50 release.