Commit | Line | Data |
---|---|---|
2e2a30b4 | 1 | $Cambridge: exim/doc/doc-txt/NewStuff,v 1.39 2005/05/03 14:20:00 ph10 Exp $ |
495ae4b0 PH |
2 | |
3 | New Features in Exim | |
4 | -------------------- | |
5 | ||
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. | |
10 | ||
11 | ||
b5aea5e1 PH |
12 | Version 4.51 |
13 | ------------ | |
14 | ||
1a46a8c5 PH |
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. | |
20 | ||
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. | |
24 | ||
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: | |
29 | ||
30 | # rm -f new.params | |
31 | # touch new.params | |
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 | |
38 | ||
39 | If Exim never has to generate the parameters itself, the possibility of | |
40 | stalling is removed. | |
41 | ||
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 | |
44 | ||
45 | EXPAND_DLFUNC=yes | |
46 | ||
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.) | |
4754440d PH |
49 | |
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. | |
55 | ||
56 | You load and call an external function like this: | |
1a46a8c5 PH |
57 | |
58 | ${dlfunc{/some/file}{function}{arg1}{arg2}...} | |
59 | ||
4754440d PH |
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). | |
1a46a8c5 PH |
63 | |
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: | |
69 | ||
70 | int dlfunction(uschar **yield, int argc, uschar *argv[]) | |
71 | ||
72 | Where "uschar" is a typedef for "unsigned char" in local_scan.h. The | |
73 | function should return one of the following values: | |
74 | ||
75 | OK Success. The string that is placed in "yield" is put into | |
76 | the expanded string that is being built. | |
77 | ||
78 | FAIL A non-forced expansion failure occurs, with the error | |
79 | message taken from "yield", if it is set. | |
80 | ||
81 | FAIL_FORCED A forced expansion failure occurs, with the error message | |
82 | taken from "yield" if it is set. | |
83 | ||
84 | ERROR Same as FAIL, except that a panic log entry is written. | |
85 | ||
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. | |
b5aea5e1 | 89 | |
7dbf77c9 PH |
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. | |
b5aea5e1 | 93 | |
7766a4f0 PH |
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. | |
98 | ||
54cdb463 PH |
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 | |
101 | acl_smtp_mime | |
102 | ||
cf00dad6 PH |
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: | |
109 | ||
110 | MAC1 = initial value | |
111 | ... | |
112 | MAC1 == updated value | |
113 | ||
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. | |
118 | For example: | |
119 | ||
120 | MAC1 = initial value | |
121 | ... | |
122 | MAC1 == MAC1 and something added | |
123 | ||
124 | This can be helpful in situations where the configuration file is built | |
125 | from a number of other files. | |
126 | ||
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 | |
131 | configuration. | |
132 | ||
475fe28a PH |
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: | |
136 | ||
137 | warn !verify = sender | |
138 | set acl_m0 = $acl_verify_message | |
139 | ||
140 | Previously, $acl_verify_message was set only while expanding "message" | |
141 | and "log_message" when a very denied access. | |
142 | ||
e4a89c47 PH |
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. | |
475fe28a | 149 | |
be22d70e PH |
150 | PH/09 Quota values can be followed by G as well as K and M. |
151 | ||
2e0c1448 PH |
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 | |
161 | DATA ACL: | |
162 | ||
163 | deny message = Too many lines in message header | |
164 | condition = \ | |
165 | ${if <{250}{${eval: $message_linecount - $body_linecount}}} | |
166 | ||
167 | In the MAIL and RCPT ACLs, the value is zero because at that stage the | |
168 | message has not yet been received. | |
169 | ||
d20976dc PH |
170 | PH/11 In a ${run expansion, the variable $value (which contains the standard |
171 | output) is now also usable in the "else" string. | |
172 | ||
2e2a30b4 PH |
173 | PH/12 In a pipe transport, although a timeout while waiting for the pipe |
174 | process to complete was treated as a delivery failure, a timeout while | |
175 | writing the message to the pipe was logged, but erroneously treated as a | |
176 | successful delivery. Such timeouts include transport filter timeouts. For | |
177 | consistency with the overall process timeout, these timeouts are now | |
178 | treated as errors, giving rise to delivery failures by default. However, | |
179 | there is now a new Boolean option for the pipe transport called | |
180 | timeout_defer, which, if set TRUE, converts the failures into defers for | |
181 | both kinds of timeout. A transport filter timeout is now identified in | |
182 | the log output. | |
183 | ||
7766a4f0 | 184 | |
f7b63901 | 185 | Version 4.50 |
35edf2ff PH |
186 | ------------ |
187 | ||
b9e40c51 | 188 | The documentation is up-to-date for the 4.50 release. |
495ae4b0 PH |
189 | |
190 | **** |