New Features in Exim
--------------------

This file contains descriptions of new features that have been added to Exim,
but have not yet made it into the main manual (which is most conveniently
updated when there is a relatively large batch of changes). The ChangeLog file
contains a brief listing of *all* changes, including bug fixes.


Version 3.03
------------

1. The GNU/Hurd operating system is now supported.

2. If quota is specified on an appendfile transport, then quota_warn_threshold
may optionally be specified as a percentage, for example,

  quota_warn_threshold = 75%

instead of as an absolute value.

3. There's an alternative hashing function for expanded strings, called "nhash"
for "numeric hash". An item of the form  ${nhash_<n>:string}  produces a number
in the range 0-n, while an item of the form ${nhash_<n>_<m>:string} produces
two numbers, separated by a '/', in the ranges 0-n and 0-m respectively, using
a div/mod hash.

4. The expansion variable $host_lookup_failed contains "1" if there has been an
attempt to look up the sending host's name from its IP address, and this has
failed to find the name. Otherwise $host_lookup_failed contains "0".

5. The exim_dbmbuild utility now warns if it encounters a duplicate key. By
default, only the first of a set of duplicates is used - this is a change from
the previous state, but it does make it compatible with lsearch lookups. There
is an option -lastdup which causes it to use the last instead, which is
compatible with what it did before. There is also an option -nowarn, which
stops it listing duplicate keys to stderr. If any duplicates are encountered,
the return code is 1. For other errors, where it doesn't actually make a new
file, the return code is 2.

6. There is a new option called ldap_default_servers which can be used to
supply a colon-separated list of replicated LDAP servers. If an LDAP lookup has
no server mentioned in the URL, that is, the URL begins "ldap:///...", and
ldap_default_servers is set, then the query is passed to each of the listed
servers in turn until one successfully handles a query, or there is a serious
error. Successful handling either returns the requested data, or indicates that
it does not exist. Serious errors are syntactical, or multiple values when only
a single value is expected. Errors which cause the next server to be tried are
connection failures, bind failures, and timeouts.

For each server name in the list, a port number can be given. The standard way
of specifing a host and port is to use a colon separator (RFC 1738). Because
ldap_default_servers is a colon-separated list, such colons have to be doubled.
For example

ldap_default_servers = ldap1.example.com::145:ldap2.example.com

If ldap_default_servers is unset, then a URL with no server name is passed to
the LDAP library with no server name, and the library's default (normally the
local host) is used.

7. There is now a variant of the dbm lookup type called dbmnz, which does not
include a trailing binary zero in the keystring that is looked up. This is
available in Exim when LOOKUP_DBM is defined - there isn't a separate
compilation option. An option called -nozero has been added to exim_dbmbuild to
request that it build the DBM file without trailing zeros either in the key
strings or in the data strings.

8. Support for MYSQL is now available when LOOKUP_MYSQL is defined. It operates
as follows:

. mysql_servers must be set to a list of host/database/user/password
  tuples, for example:

    mysql_servers = localhost/users/root/xxxx : otherhost/users/root/xxxx

  These are tried in order until a connection and a query succeeds. No database
  need be supplied - if it is absent, it must be given in the queries. A host
  may be specified as name:port but because this is a colon-separated list, the
  colon has to be doubled.

. connections to the database are cached, based on mysql_servers
  strings.

. The format of the query is an SQL statement, so an example might be

  ${lookup mysql{select mailbox from users where id='ph10'}{$value}fail}

. If the result of the query contains more than one field, the data for
  each field in the row is returned, preceded by its name, so the result
  of a lookup such as

    ${lookup mysql{select home,name from users where id='ph10'}{$value}fail}

  might be

    home=/home/ph10 name="Philip Hazel"

  Values containing spaces and empty values are double quoted, with
  embedded quotes escaped by \.

. If the result of the query contains just one field, the value is
  passed back verbatim, without a field name, e.g.

    Philip Hazel

. If the result of the query yields more than one row, it is all
  concatenated, with a newline between the data for each row.

9. In a system filter file (but not in a user filter) a "deliver" command may
now be followed by "errors_to <some address>" in order to change the envelope
sender (and hence the error reporting) for that delivery. For example, if some
mail was being monitored, you might use

  unseen deliver monitor@spying.example errors_to root@local.domain

10. The number can now be omitted from host list net searches, in which case
the IP address is looked up without masking and without any additional text.
For example, if an item in a host list is

  net-lsearch;/some/file

and the calling host has IP address 10.9.8.7 then the key that is used in the
lookup is "10.9.8.7". This is not the same as specifying "net0", which would
cause the key to be "0.0.0.0/0".

11. When IPv6 addresses are used in net lookups, the separator between the
components is "." rather than the conventional ":" because colon is the key
terminator in lsearch files. The full, unabbreviated IPv6 address is always
used.


Version 3.00
------------

The documentation is up-to-date for the 3.00 release.
