. /////////////////////////////////////////////////////////////////////////////
. This is the primary source of the Exim Manual. It is an xfpt document that is
-. converted into DocBook XML for subsequent conversion into printing and online
+. converted into DocBook XML for subsequent conversion into printable and online
. formats. The markup used herein is "standard" xfpt markup, with some extras.
. The markup is summarized in a file called Markup.txt.
.
.literal off
. /////////////////////////////////////////////////////////////////////////////
-. This generate the outermost <book> element that wraps then entire document.
+. This generates the outermost <book> element that wraps the entire document.
. /////////////////////////////////////////////////////////////////////////////
.book
. Update the Copyright year (only) when changing content.
. /////////////////////////////////////////////////////////////////////////////
-.set previousversion "4.91"
+.set previousversion "4.92"
.include ./local_params
.set ACL "access control lists (ACLs)"
.set I " "
.macro copyyear
-2018
+2018, 2019
.endmacro
. /////////////////////////////////////////////////////////////////////////////
. provided in the xfpt library.
. /////////////////////////////////////////////////////////////////////////////
-. --- Override the &$ flag to automatically insert a $ with the variable name
+. --- Override the &$ flag to automatically insert a $ with the variable name.
.flag &$ $& "<varname>$" "</varname>"
. --- Short flags for daggers in option headings. They will always be inside
-. --- an italic string, but we want the daggers to be roman.
+. --- an italic string, but we want the daggers to be in Roman.
.flag &!! "</emphasis>†<emphasis>"
.flag &!? "</emphasis>‡<emphasis>"
. --- A macro for the common 2-column tables. The width of the first column
. --- is suitable for the many tables at the start of the main options chapter;
-. --- the small number of other 2-column tables override it.
+. --- a small number of other 2-column tables override it.
.macro table2 196pt 254pt
.itable none 0 0 2 $1 left $2 left
. ////////////////////////////////////////////////////////////////////////////
-. The <bookinfo> element is removed from the XML before processing for Ascii
+. The <bookinfo> element is removed from the XML before processing for ASCII
. output formats.
. ////////////////////////////////////////////////////////////////////////////
BSD/OS (aka BSDI), Darwin (Mac OS X), DGUX, Dragonfly, FreeBSD, GNU/Hurd,
GNU/Linux, HI-OSF (Hitachi), HI-UX, HP-UX, IRIX, MIPS RISCOS, NetBSD, OpenBSD,
OpenUNIX, QNX, SCO, SCO SVR4.2 (aka UNIX-SV), Solaris (aka SunOS5), SunOS4,
-Tru64-Unix (formerly Digital UNIX, formerly DEC-OSF1), Ultrix, and Unixware.
+Tru64-Unix (formerly Digital UNIX, formerly DEC-OSF1), Ultrix, and UnixWare.
Some of these operating systems are no longer current and cannot easily be
tested, so the configuration files may no longer work in practice.
the file &_NOTICE_&. Exim is distributed under the terms of the GNU General
Public Licence, a copy of which may be found in the file &_LICENCE_&.
-The use, supply or promotion of Exim for the purpose of sending bulk,
-unsolicited electronic mail is incompatible with the basic aims of the program,
+The use, supply, or promotion of Exim for the purpose of sending bulk,
+unsolicited electronic mail is incompatible with the basic aims of Exim,
which revolve around the free provision of a service that enhances the quality
of personal communications. The author of Exim regards indiscriminate
mass-mailing as an antisocial, irresponsible abuse of the Internet.
.section "Exim documentation" "SECID1"
. Keep this example change bar when updating the documentation!
-.new
.cindex "documentation"
This edition of the Exim specification applies to version &version() of Exim.
Substantive changes from the &previousversion; edition are marked in some
-renditions of the document; this paragraph is so marked if the rendition is
+renditions of this document; this paragraph is so marked if the rendition is
capable of showing a change indicator.
-.wen
This document is very much a reference manual; it is not a tutorial. The reader
is expected to have some familiarity with the SMTP mail transfer protocol and
with general Unix system administration. Although there are some discussions
and examples in places, the information is mostly organized in a way that makes
it easy to look up, rather than in a natural order for sequential reading.
-Furthermore, the manual aims to cover every aspect of Exim in detail, including
+Furthermore, this manual aims to cover every aspect of Exim in detail, including
a number of rarely-used, special-purpose features that are unlikely to be of
very wide interest.
SMTP Mail Server'& (second edition, 2007), published by UIT Cambridge
(&url(https://www.uit.co.uk/exim-book/)).
-This book also contains a chapter that gives a general introduction to SMTP and
+The book also contains a chapter that gives a general introduction to SMTP and
Internet mail. Inevitably, however, the book is unlikely to be fully up-to-date
with the latest release of Exim. (Note that the earlier book about Exim,
published by O'Reilly, covers Exim 3, and many things have changed in Exim 4.)
.cindex "&_doc/NewStuff_&"
.cindex "&_doc/ChangeLog_&"
.cindex "change log"
-As the program develops, there may be features in newer versions that have not
+As Exim develops, there may be features in newer versions that have not
yet made it into this document, which is updated only when the most significant
digit of the fractional part of the version number changes. Specifications of
new features that are not yet in this manual are placed in the file
they are not documented in this manual. Information about experimental features
can be found in the file &_doc/experimental.txt_&.
-All changes to the program (whether new features, bug fixes, or other kinds of
+All changes to Exim (whether new features, bug fixes, or other kinds of
change) are noted briefly in the file called &_doc/ChangeLog_&.
.cindex "&_doc/spec.txt_&"
-.section "FTP and web sites" "SECID2"
-.cindex "web site"
+.section "FTP site and websites" "SECID2"
+.cindex "website"
.cindex "FTP site"
The primary site for Exim source distributions is the &%exim.org%& FTP site,
available over HTTPS, HTTP and FTP. These services, and the &%exim.org%&
.cindex "wiki"
.cindex "FAQ"
-As well as Exim distribution tar files, the Exim web site contains a number of
+As well as Exim distribution tar files, the Exim website contains a number of
differently formatted versions of the documentation. A recent addition to the
online information is the Exim wiki (&url(https://wiki.exim.org)),
which contains what used to be a separate FAQ, as well as various other
.display
&url(https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-exim4-users)
.endd
-Please ask Debian-specific questions on this list and not on the general Exim
+Please ask Debian-specific questions on that list and not on the general Exim
lists.
.section "Bug reports" "SECID5"
.section "Where to find the Exim distribution" "SECTavail"
.cindex "FTP site"
.cindex "HTTPS download site"
-.cindex "distribution" "ftp site"
+.cindex "distribution" "FTP site"
.cindex "distribution" "https site"
The master distribution site for the Exim distribution is
.display
Coordinator. This key will have a uid containing an email address in the
&'exim.org'& domain and will have signatures from other people, including
other Exim maintainers. We expect that the key will be in the "strong set" of
-PGP keys. There should be a trust path to that key from Nigel Metheringham's
-PGP key, a version of which can be found in the release directory in the file
-&_nigel-pubkey.asc_&. All keys used will be available in public keyserver pools,
+PGP keys. There should be a trust path to that key from the Exim Maintainer's
+PGP keys, a version of which can be found in the release directory in the file
+&_Exim-Maintainers-Keyring.asc_&. All keys used will be available in public keyserver pools,
such as &'pool.sks-keyservers.net'&.
-At time of last update, releases were being made by Jeremy Harris and signed
+At the time of the last update, releases were being made by Jeremy Harris and signed
with key &'0xBCE58C8CE41F32DF'&. Other recent keys used for signing are those
of Heiko Schlittermann, &'0x26101B62F69376CE'&,
and of Phil Pennock, &'0x4D1E900E14C1CC04'&.
&_exim-n.nn.tar.gz.asc_&
&_exim-n.nn.tar.bz2.asc_&
.endd
-For each released version, the log of changes is made separately available in a
+For each released version, the log of changes is made available in a
separate file in the directory &_ChangeLogs_& so that it is possible to
find out what has changed without having to download the entire distribution.
.endlist
-.section "Run time configuration" "SECID7"
-Exim's run time configuration is held in a single text file that is divided
+.section "Runtime configuration" "SECID7"
+Exim's runtime configuration is held in a single text file that is divided
into a number of sections. The entries in this file consist of keywords and
values, in the style of Smail 3 configuration files. A default configuration
file which is suitable for simple online installations is provided in the
&_/usr/sbin/sendmail_& when sending mail, but you do not need to know anything
about Sendmail in order to run Exim. For actions other than sending messages,
Sendmail-compatible options also exist, but those that produce output (for
-example, &%-bp%&, which lists the messages on the queue) do so in Exim's own
+example, &%-bp%&, which lists the messages in the queue) do so in Exim's own
format. There are also some additional options that are compatible with Smail
3, and some further options that are new to Exim. Chapter &<<CHAPcommandline>>&
documents all Exim's command line options. This information is automatically
made into the man page that forms part of the Exim distribution.
-Control of messages on the queue can be done via certain privileged command
+Control of messages in the queue can be done via certain privileged command
line options. There is also an optional monitor program called &'eximon'&,
which displays current information in an X window, and which contains a menu
interface to Exim's command line administration options.
.cindex "terminology definitions"
.cindex "body of message" "definition of"
The &'body'& of a message is the actual data that the sender wants to transmit.
-It is the last part of a message, and is separated from the &'header'& (see
+It is the last part of a message and is separated from the &'header'& (see
below) by a blank line.
.cindex "bounce message" "definition of"
.cindex "local part" "definition of"
.cindex "domain" "definition of"
-The term &'local part'&, which is taken from RFC 2822, is used to refer to that
+The term &'local part'&, which is taken from RFC 2822, is used to refer to the
part of an email address that precedes the @ sign. The part that follows the
@ sign is called the &'domain'& or &'mail domain'&.
message's envelope.
.cindex "queue" "definition of"
-The term &'queue'& is used to refer to the set of messages awaiting delivery,
+The term &'queue'& is used to refer to the set of messages awaiting delivery
because this term is in widespread use in the context of MTAs. However, in
-Exim's case the reality is more like a pool than a queue, because there is
+Exim's case, the reality is more like a pool than a queue, because there is
normally no ordering of waiting messages.
.cindex "queue runner" "definition of"
The term &'queue runner'& is used to describe a process that scans the queue
and attempts to deliver those messages whose retry times have come. This term
-is used by other MTAs, and also relates to the command &%runq%&, but in Exim
+is used by other MTAs and also relates to the command &%runq%&, but in Exim
the waiting messages are normally processed in an unpredictable order.
.cindex "spool directory" "definition of"
The term &'spool directory'& is used for a directory in which Exim keeps the
-messages on its queue &-- that is, those that it is in the process of
+messages in its queue &-- that is, those that it is in the process of
delivering. This should not be confused with the directory in which local
mailboxes are stored, which is called a &"spool directory"& by some people. In
the Exim documentation, &"spool"& is always used in the first sense.
.next
Many people have contributed code fragments, some large, some small, that were
-not covered by any specific licence requirements. It is assumed that the
+not covered by any specific license requirements. It is assumed that the
contributors are happy to see their code incorporated into Exim under the GPL.
.endlist
.section "Policy control" "SECID11"
.cindex "policy control" "overview"
Policy controls are now an important feature of MTAs that are connected to the
-Internet. Perhaps their most important job is to stop MTAs being abused as
+Internet. Perhaps their most important job is to stop MTAs from being abused as
&"open relays"& by misguided individuals who send out vast amounts of
-unsolicited junk, and want to disguise its source. Exim provides flexible
+unsolicited junk and want to disguise its source. Exim provides flexible
facilities for specifying policy controls on incoming mail:
.ilist
normally encoding numbers in base 62. However, in the Darwin operating
system (Mac OS X) and when Exim is compiled to run under Cygwin, base 36
(avoiding the use of lower case letters) is used instead, because the message
-id is used to construct file names, and the names of files in those systems are
+id is used to construct filenames, and the names of files in those systems are
not always case-sensitive.
.cindex "pid (process id)" "re-use of"
If the process runs Exim with the &%-bS%& option, the message is also read
non-interactively, but in this case the recipients are listed at the start of
the message in a series of SMTP RCPT commands, terminated by a DATA
-command. This is so-called &"batch SMTP"& format,
+command. This is called &"batch SMTP"& format,
but it isn't really SMTP. The SMTP commands are just another way of passing
envelope addresses in a non-interactive submission.
.next
qualification domain (which can be set by the &%qualify_domain%& configuration
option). For local or batch SMTP, a sender address that is passed using the
SMTP MAIL command is ignored. However, the system administrator may allow
-certain users (&"trusted users"&) to specify a different sender address
+certain users (&"trusted users"&) to specify a different sender addresses
unconditionally, or all users to specify certain forms of different sender
address. The &%-f%& option or the SMTP MAIL command is used to specify these
different addresses. See section &<<SECTtrustedadmin>>& for details of trusted
users to change sender addresses.
Messages received by either of the non-interactive mechanisms are subject to
-checking by the non-SMTP ACL, if one is defined. Messages received using SMTP
-(either over TCP/IP, or interacting with a local process) can be checked by a
+checking by the non-SMTP ACL if one is defined. Messages received using SMTP
+(either over TCP/IP or interacting with a local process) can be checked by a
number of ACLs that operate at different times during the SMTP session. Either
-individual recipients, or the entire message, can be rejected if local policy
+individual recipients or the entire message can be rejected if local policy
requirements are not met. The &[local_scan()]& function (see chapter
&<<CHAPlocalscan>>&) is run for all incoming messages.
file containing the envelope and header, and &`-D`& for the data file.
.cindex "spool directory" "&_input_& sub-directory"
-By default all these message files are held in a single directory called
+By default, all these message files are held in a single directory called
&_input_& inside the general Exim spool directory. Some operating systems do
not perform very well if the number of files in a directory gets large; to
improve performance in such cases, the &%split_spool_directory%& option can be
A message remains in the spool directory until it is completely delivered to
its recipients or to an error address, or until it is deleted by an
administrator or by the user who originally created it. In cases when delivery
-cannot proceed &-- for example, when a message can neither be delivered to its
+cannot proceed &-- for example when a message can neither be delivered to its
recipients nor returned to its sender, the message is marked &"frozen"& on the
spool, and no more deliveries are attempted.
.oindex "&%ignore_bounce_errors_after%&"
There are options called &%ignore_bounce_errors_after%& and
&%timeout_frozen_after%&, which discard frozen messages after a certain time.
-The first applies only to frozen bounces, the second to any frozen messages.
+The first applies only to frozen bounces, the second to all frozen messages.
.cindex "message" "log file for"
.cindex "log" "file for each message"
attempt to its main log file. This includes successful, unsuccessful, and
delayed deliveries for each recipient (see chapter &<<CHAPlog>>&). The log
lines are also written to a separate &'message log'& file for each message.
-These logs are solely for the benefit of the administrator, and are normally
+These logs are solely for the benefit of the administrator and are normally
deleted along with the spool files when processing of a message is complete.
The use of individual message logs can be disabled by setting
&%no_message_logs%&; this might give an improvement in performance on very busy
Updating the spool file is done by writing a new file and renaming it, to
minimize the possibility of data loss.
-Should the system or the program crash after a successful delivery but before
+Should the system or Exim crash after a successful delivery but before
the spool file has been updated, the journal is left lying around. The next
time Exim attempts to deliver the message, it reads the journal file and
updates the spool file before proceeding. This minimizes the chances of double
The main delivery processing elements of Exim are called &'routers'& and
&'transports'&, and collectively these are known as &'drivers'&. Code for a
number of them is provided in the source distribution, and compile-time options
-specify which ones are included in the binary. Run time options specify which
+specify which ones are included in the binary. Runtime options specify which
ones are actually used for delivering messages.
.cindex "drivers" "instance definition"
-Each driver that is specified in the run time configuration is an &'instance'&
+Each driver that is specified in the runtime configuration is an &'instance'&
of that particular driver type. Multiple instances are allowed; for example,
you can set up several different &(smtp)& transports, each with different
option values that might specify different ports or different timeouts. Each
configuration.
The first router that is specified in a configuration is often one that handles
-addresses in domains that are not recognized specially by the local host. These
-are typically addresses for arbitrary domains on the Internet. A precondition
+addresses in domains that are not recognized specifically by the local host.
+Typically these are addresses for arbitrary domains on the Internet. A precondition
is set up which looks for the special domains known to the host (for example,
its own domain name), and the router is run for addresses that do &'not'&
match. Typically, this is a router that looks up domains in the DNS in order to
does not affect the way the routers work, but it is a state that can be
detected. By this means, a router can be skipped or made to behave differently
when verifying. A common example is a configuration in which the first router
-sends all messages to a message-scanning program, unless they have been
+sends all messages to a message-scanning program unless they have been
previously scanned. Thus, the first router accepts all addresses without any
checking, making it useless for verifying. Normally, the &%no_verify%& option
would be set for such a router, causing it to be skipped in verify mode.
.ilist
&'accept'&: The router accepts the address, and either assigns it to a
-transport, or generates one or more &"child"& addresses. Processing the
-original address ceases,
+transport or generates one or more &"child"& addresses. Processing the
+original address ceases
.oindex "&%unseen%&"
unless the &%unseen%& option is set on the router. This option
can be used to set up multiple deliveries with different routing (for example,
&%redirect_router%& may be anywhere in the router configuration.
.next
&'pass'&: The router recognizes the address, but cannot handle it itself. It
-requests that the address be passed to another router. By default the address
+requests that the address be passed to another router. By default, the address
is passed to the next router, but this can be changed by setting the
&%pass_router%& option. However, (unlike &%redirect_router%&) the named router
must be below the current router (to avoid loops).
.cindex "address duplicate, discarding"
.cindex "duplicate addresses"
Once routing is complete, Exim scans the addresses that are assigned to local
-and remote transports, and discards any duplicates that it finds. During this
-check, local parts are treated as case-sensitive. This happens only when
+and remote transports and discards any duplicates that it finds. During this
+check, local parts are treated case-sensitively. This happens only when
actually delivering a message; when testing routers with &%-bt%&, all the
routed addresses are shown.
condition &%first_delivery%& can be used to detect the first run of the system
filter.
.next
-Each recipient address is offered to each configured router in turn, subject to
+Each recipient address is offered to each configured router, in turn, subject to
its preconditions, until one is able to handle it. If no router can handle the
address, that is, if they all decline, the address is failed. Because routers
can be targeted at particular domains, several locally handled domains can be
Exim's mechanism for retrying messages that fail to get delivered at the first
attempt is the queue runner process. You must either run an Exim daemon that
uses the &%-q%& option with a time interval to start queue runners at regular
-intervals, or use some other means (such as &'cron'&) to start them. If you do
+intervals or use some other means (such as &'cron'&) to start them. If you do
not arrange for queue runners to be run, messages that fail temporarily at the
-first attempt will remain on your queue for ever. A queue runner process works
+first attempt will remain in your queue forever. A queue runner process works
its way through the queue, one message at a time, trying each delivery that has
passed its retry time.
You can run several queue runners at once.
.section "Failures to deliver bounce messages" "SECID22"
.cindex "bounce message" "failure to deliver"
If a bounce message (either locally generated or received from a remote host)
-itself suffers a permanent delivery failure, the message is left on the queue,
+itself suffers a permanent delivery failure, the message is left in the queue,
but it is frozen, awaiting the attention of an administrator. There are options
that can be used to make Exim discard such failed messages, or to keep them
for only a short time (see &%timeout_frozen_after%& and
.irow &_util_& "independent utilities"
.endtable
-The main utility programs are contained in the &_src_& directory, and are built
+The main utility programs are contained in the &_src_& directory and are built
with the Exim binary. The &_util_& directory contains a few optional scripts
that may be useful to some sites.
.section "PCRE library" "SECTpcre"
.cindex "PCRE library"
Exim no longer has an embedded PCRE library as the vast majority of
-modern systems include PCRE as a system library, although you may need
-to install the PCRE or PCRE development package for your operating
+modern systems include PCRE as a system library, although you may need to
+install the PCRE package or the PCRE development package for your operating
system. If your system has a normal PCRE installation the Exim build
process will need no further configuration. If the library or the
headers are in an unusual location you will need to either set the PCRE_LIBS
The GNU library, &'gdbm'&, operates on a single file. If used via its &'ndbm'&
compatibility interface it makes two different hard links to it with names
&_dbmfile.dir_& and &_dbmfile.pag_&, but if used via its native interface, the
-file name is used unmodified.
+filename is used unmodified.
.next
.cindex "Berkeley DB library"
The Berkeley DB package, if called via its &'ndbm'& compatibility interface,
&_src/EDITME_& to &_Local/Makefile_&, then read it and edit it appropriately.
There are three settings that you must supply, because Exim will not build
-without them. They are the location of the run time configuration file
+without them. They are the location of the runtime configuration file
(CONFIGURE_FILE), the directory in which Exim binaries will be installed
(BIN_DIRECTORY), and the identity of the Exim user (EXIM_USER and
maybe EXIM_GROUP as well). The value of CONFIGURE_FILE can in fact be
-a colon-separated list of file names; Exim uses the first of them that exists.
+a colon-separated list of filenames; Exim uses the first of them that exists.
There are a few other parameters that can be specified either at build time or
-at run time, to enable the same binary to be used on a number of different
+at runtime, to enable the same binary to be used on a number of different
machines. However, if the locations of Exim's spool directory and log file
directory (if not within the spool directory) are fixed, it is recommended that
-you specify them in &_Local/Makefile_& instead of at run time, so that errors
+you specify them in &_Local/Makefile_& instead of at runtime, so that errors
detected early in Exim's execution (such as a malformed configuration file) can
be logged.
This is all the configuration that is needed in straightforward cases for known
operating systems. However, the building process is set up so that it is easy
to override options that are set by default or by operating-system-specific
-configuration files, for example to change the name of the C compiler, which
+configuration files, for example, to change the C compiler, which
defaults to &%gcc%&. See section &<<SECToverride>>& below for details of how to
do this.
.section "Including TLS/SSL encryption support" "SECTinctlsssl"
.cindex "TLS" "including support for TLS"
.cindex "encryption" "including support for"
-.cindex "SUPPORT_TLS"
.cindex "OpenSSL" "building Exim with"
.cindex "GnuTLS" "building Exim with"
-Exim can be built to support encrypted SMTP connections, using the STARTTLS
-command as per RFC 2487. It can also support legacy clients that expect to
+Exim is usually built to support encrypted SMTP connections, using the STARTTLS
+command as per RFC 2487. It can also support clients that expect to
start a TLS session immediately on connection to a non-standard port (see the
&%tls_on_connect_ports%& runtime option and the &%-tls-on-connect%& command
line option).
OpenSSL or GnuTLS library. There is no cryptographic code in Exim itself for
implementing SSL.
+.new
+If you do not want TLS support you should set
+.code
+DISABLE_TLS=yes
+.endd
+in &_Local/Makefile_&.
+.wen
+
If OpenSSL is installed, you should set
.code
-SUPPORT_TLS=yes
+USE_OPENSL=yes
TLS_LIBS=-lssl -lcrypto
.endd
in &_Local/Makefile_&. You may also need to specify the locations of the
OpenSSL library and include files. For example:
.code
-SUPPORT_TLS=yes
+USE_OPENSL=yes
TLS_LIBS=-L/usr/local/openssl/lib -lssl -lcrypto
TLS_INCLUDE=-I/usr/local/openssl/include/
.endd
.cindex "pkg-config" "OpenSSL"
If you have &'pkg-config'& available, then instead you can just use:
.code
-SUPPORT_TLS=yes
+USE_OPENSL=yes
USE_OPENSSL_PC=openssl
.endd
.cindex "USE_GNUTLS"
If GnuTLS is installed, you should set
.code
-SUPPORT_TLS=yes
USE_GNUTLS=yes
TLS_LIBS=-lgnutls -ltasn1 -lgcrypt
.endd
in &_Local/Makefile_&, and again you may need to specify the locations of the
library and include files. For example:
.code
-SUPPORT_TLS=yes
USE_GNUTLS=yes
TLS_LIBS=-L/usr/gnu/lib -lgnutls -ltasn1 -lgcrypt
TLS_INCLUDE=-I/usr/gnu/include
.cindex "pkg-config" "GnuTLS"
If you have &'pkg-config'& available, then instead you can just use:
.code
-SUPPORT_TLS=yes
USE_GNUTLS=yes
USE_GNUTLS_PC=gnutls
.endd
However, there are some optional lookup types (such as cdb) for which
the code is entirely contained within Exim, and no external include
files or libraries are required. When a lookup type is not included in the
-binary, attempts to configure Exim to use it cause run time configuration
+binary, attempts to configure Exim to use it cause runtime configuration
errors.
.cindex "pkg-config" "lookups"
&_OS/eximon.conf-Default_& can be overridden dynamically by setting environment
variables of the same name, preceded by EXIMON_. For example, setting
EXIMON_LOG_DEPTH in the environment overrides the value of
-LOG_DEPTH at run time.
+LOG_DEPTH at runtime.
.ecindex IIDbuex
chapter &<<CHAPsecurity>>& for details).
.cindex "CONFIGURE_FILE"
-Exim's run time configuration file is named by the CONFIGURE_FILE setting
+Exim's runtime configuration file is named by the CONFIGURE_FILE setting
in &_Local/Makefile_&. If this names a single file, and the file does not
exist, the default configuration file &_src/configure.default_& is copied there
-by the installation script. If a run time configuration file already exists, it
+by the installation script. If a runtime configuration file already exists, it
is left alone. If CONFIGURE_FILE is a colon-separated list, naming several
alternative files, no default is installed.
For the utility programs, old versions are renamed by adding the suffix &_.O_&
to their names. The Exim binary itself, however, is handled differently. It is
installed under a name that includes the version number and the compile number,
-for example &_exim-&version()-1_&. The script then arranges for a symbolic link
+for example, &_exim-&version()-1_&. The script then arranges for a symbolic link
called &_exim_& to point to the binary. If you are updating a previous version
of Exim, the script takes care to ensure that the name &_exim_& is never absent
from the directory (as seen by other processes).
.cindex "installing Exim" "&'info'& documentation"
Not all systems use the GNU &'info'& system for documentation, and for this
reason, the Texinfo source of Exim's documentation is not included in the main
-distribution. Instead it is available separately from the ftp site (see section
+distribution. Instead it is available separately from the FTP site (see section
&<<SECTavail>>&).
If you have defined INFO_DIRECTORY in &_Local/Makefile_& and the Texinfo
.section "Testing" "SECID34"
.cindex "testing" "installation"
-Having installed Exim, you can check that the run time configuration file is
+Having installed Exim, you can check that the runtime configuration file is
syntactically valid by running the following command, which assumes that the
Exim binary directory is within your PATH environment variable:
.code
Testing a new version on a system that is already running Exim can most easily
be done by building a binary with a different CONFIGURE_FILE setting. From
-within the run time configuration, all other file and directory names
+within the runtime configuration, all other file and directory names
that Exim uses can be altered, in order to keep it entirely clear of the
production version.
If you are already running Exim on your host, building and installing a new
version automatically makes it available to MUAs, or any other programs that
call the MTA directly. However, if you are running an Exim daemon, you do need
+.cindex restart "on HUP signal"
+.cindex signal "HUP, to restart"
to send it a HUP signal, to make it re-execute itself, and thereby pick up the
new binary. You do not need to stop processing mail in order to install a new
version of Exim. The install script does not modify an existing runtime
configuration option. Note that the Exim group is not automatically trusted.
.cindex '&"From"& line'
+.cindex "envelope from"
.cindex "envelope sender"
Trusted users are always permitted to use the &%-f%& option or a leading
&"From&~"& line to specify the envelope sender of a message that is passed to
The SIGHUP signal
.cindex "SIGHUP"
+.cindex restart "on HUP signal"
+.cindex signal "HUP, to restart"
.cindex "daemon" "restarting"
+.cindex signal "to reload configuration"
+.cindex daemon "reload configuration"
+.cindex reload configuration
can be used to cause the daemon to re-execute itself. This should be done
whenever Exim's configuration file, or any file that is incorporated into it by
means of the &%.include%& facility, is changed, and also whenever a new version
test data. A line history is supported.
Long expansion expressions can be split over several lines by using backslash
-continuations. As in Exim's run time configuration, white space at the start of
+continuations. As in Exim's runtime configuration, white space at the start of
continuation lines is ignored. Each argument or data line is passed through the
string expansion mechanism, and the result is output. Variable values from the
configuration file (for example, &$qualify_domain$&) are available, but no
When testing a filter file,
.cindex "&""From""& line"
+.cindex "envelope from"
.cindex "envelope sender"
.oindex "&%-f%&" "for filter testing"
the envelope sender can be set by the &%-f%& option,
If &%config%& is given as an argument, the config is
output, as it was parsed, any include file resolved, any comment removed.
-If &%config_file%& is given as an argument, the name of the run time
+If &%config_file%& is given as an argument, the name of the runtime
configuration file is output. (&%configure_file%& works too, for
backward compatibility.)
If a list of configuration files was supplied, the value that is output here
.vitem &%-bp%&
.oindex "&%-bp%&"
-.cindex "queue" "listing messages on"
-.cindex "listing" "messages on the queue"
+.cindex "queue" "listing messages in"
+.cindex "listing" "messages in the queue"
This option requests a listing of the contents of the mail queue on the
standard output. If the &%-bp%& option is followed by a list of message ids,
just those messages are listed. By default, this option can be used only by an
admin user. However, the &%queue_list_requires_admin%& option can be set false
to allow any user to see the queue.
-Each message on the queue is displayed as in the following example:
+Each message in the queue is displayed as in the following example:
.code
25m 2.9K 0t5C6f-0000c8-00 <alice@wonderland.fict.example>
red.king@looking-glass.fict.example
.endd
.cindex "message" "size in queue listing"
.cindex "size" "of message"
-The first line contains the length of time the message has been on the queue
+The first line contains the length of time the message has been in the queue
(in this case 25 minutes), the size of the message (2.9K), the unique local
identifier for the message, and the message sender, as contained in the
envelope. For bounce messages, the sender address is empty, and appears as
.vitem &%-bpc%&
.oindex "&%-bpc%&"
.cindex "queue" "count of messages on"
-This option counts the number of messages on the queue, and writes the total
+This option counts the number of messages in the queue, and writes the total
to the standard output. It is restricted to admin users, unless
&%queue_list_requires_admin%& is set false.
.oindex "&%-bpr%&"
This option operates like &%-bp%&, but the output is not sorted into
chronological order of message arrival. This can speed it up when there are
-lots of messages on the queue, and is particularly useful if the output is
+lots of messages in the queue, and is particularly useful if the output is
going to be post-processed in a way that doesn't need the sorting.
.vitem &%-bpra%&
number, and compilation date of the &'exim'& binary to the standard output.
It also lists the DBM library that is being used, the optional modules (such as
specific lookup types), the drivers that are included in the binary, and the
-name of the run time configuration file that is in use.
+name of the runtime configuration file that is in use.
As part of its operation, &%-bV%& causes Exim to read and syntax check its
configuration file. However, this is a static check only. It cannot check
.cindex "configuration file" "alternate"
.cindex "CONFIGURE_FILE"
.cindex "alternate configuration file"
-This option causes Exim to find the run time configuration file from the given
+This option causes Exim to find the runtime configuration file from the given
list instead of from the list specified by the CONFIGURE_FILE
-compile-time setting. Usually, the list will consist of just a single file
-name, but it can be a colon-separated list of names. In this case, the first
+compile-time setting. Usually, the list will consist of just a single filename,
+but it can be a colon-separated list of names. In this case, the first
file that exists is used. Failure to open an existing file stops Exim from
proceeding any further along the list, and an error is generated.
running as the Exim user, so when it re-executes to regain privilege for the
delivery, the use of &%-C%& causes privilege to be lost. However, root can
test reception and delivery using two separate commands (one to put a message
-on the queue, using &%-odq%&, and another to do the delivery, using &%-M%&).
+in the queue, using &%-odq%&, and another to do the delivery, using &%-M%&).
If ALT_CONFIG_PREFIX is defined &_in Local/Makefile_&, it specifies a
prefix string with which any file named in a &%-C%& command line option
-must start. In addition, the file name must not contain the sequence &`/../`&.
+must start. In addition, the filename must not contain the sequence &`/../`&.
However, if the value of the &%-C%& option is identical to the value of
CONFIGURE_FILE in &_Local/Makefile_&, Exim ignores &%-C%& and proceeds as
usual. There is no default setting for ALT_CONFIG_PREFIX; when it is
-unset, any file name can be used with &%-C%&.
+unset, any filename can be used with &%-C%&.
ALT_CONFIG_PREFIX can be used to confine alternative configuration files
to a directory to which only root has access. This prevents someone who has
of all debug output lines. This can be useful when trying to track down delays
in processing.
-.new
.cindex debugging "UTF-8 in"
.cindex UTF-8 "in debug output"
The &`noutf8`& selector disables the use of
UTF-8 line-drawing characters to group related information.
When disabled. ascii-art is used instead.
Using the &`+all`& option does not set this modifier,
-.wen
If the &%debug_print%& option is set in any driver, it produces output whenever
any debugging is selected, or if &%-v%& is used.
.cindex "sender" "address"
.cindex "address" "sender"
.cindex "trusted users"
+.cindex "envelope from"
.cindex "envelope sender"
.cindex "user" "trusted"
This option sets the address of the envelope sender of a locally-generated
.oindex "&%-Mc%&"
.cindex "hints database" "not overridden by &%-Mc%&"
.cindex "delivery" "manually started &-- not forced"
-This option requests Exim to run a delivery attempt on each message in turn,
+This option requests Exim to run a delivery attempt on each message, in turn,
but unlike the &%-M%& option, it does check for retry hints, and respects any
that are found. This option is not very useful to external callers. It is
provided mainly for internal use by Exim when it needs to re-invoke itself in
Bounce messages are just discarded. This option can be used only by an admin
user.
+.new
+.vitem &%-MG%&&~<&'queue&~name'&&~<&'message&~id'&>&~<&'message&~id'&>&~...
+.oindex "&%-MG%&"
+.cindex queue named
+.cindex "named queues"
+.cindex "queue" "moving messages"
+This option requests that each listed message be moved from its current
+queue to the given named queue.
+The destination queue name argument is required, but can be an empty
+string to define the default queue.
+If the messages are not currently located in the default queue,
+a &%-qG<name>%& option will be required to define the source queue.
+.wen
+
.vitem &%-Mmad%&&~<&'message&~id'&>&~<&'message&~id'&>&~...
.oindex "&%-Mmad%&"
.cindex "delivery" "cancelling all"
bounce messages are sent; each message is simply forgotten. However, if any of
the messages are active, their status is not altered. This option can be used
only by an admin user or by the user who originally caused the message to be
-placed on the queue.
+placed in the queue.
. .new
. .vitem &%-MS%&
.oindex "&%-oA%&"
.cindex "Sendmail compatibility" "&%-oA%& option"
This option is used by Sendmail in conjunction with &%-bi%& to specify an
-alternative alias file name. Exim handles &%-bi%& differently; see the
+alternative alias filename. Exim handles &%-bi%& differently; see the
description above.
.vitem &%-oB%&&~<&'n'&>
false and one of the queueing options in the configuration file is in effect.
If there is a temporary delivery error during foreground delivery, the
-message is left on the queue for later delivery, and the original reception
+message is left in the queue for later delivery, and the original reception
process exits. See chapter &<<CHAPnonqueueing>>& for a way of setting up a
restricted configuration that never queues messages.
This option applies to all modes in which Exim accepts incoming messages,
including the listening daemon. It specifies that the accepting process should
not automatically start a delivery process for each message received. Messages
-are placed on the queue, and remain there until a subsequent queue runner
+are placed in the queue, and remain there until a subsequent queue runner
process encounters them. There are several configuration options (such as
&%queue_only%&) that can be used to queue incoming messages under certain
conditions. This option overrides all of them and also &%-odqs%&. It always
message, in the background by default, but in the foreground if &%-odi%& is
also present. The recipient addresses are routed, and local deliveries are done
in the normal way. However, if any SMTP deliveries are required, they are not
-done at this time, so the message remains on the queue until a subsequent queue
+done at this time, so the message remains in the queue until a subsequent queue
runner process encounters it. Because routing was done, Exim knows which
messages are waiting for which hosts, and so a number of messages for the same
host can be sent in a single SMTP connection. The &%queue_smtp_domains%&
is also given. It controls which ports and interfaces the daemon uses. Details
of the syntax, and how it interacts with configuration file options, are given
in chapter &<<CHAPinterfaces>>&. When &%-oX%& is used to start a daemon, no pid
-file is written unless &%-oP%& is also present to specify a pid file name.
+file is written unless &%-oP%& is also present to specify a pid filename.
.vitem &%-pd%&
.oindex "&%-pd%&"
.cindex "queue" "initial delivery"
If the &'i'& flag is present, the queue runner runs delivery processes only for
those messages that haven't previously been tried. (&'i'& stands for &"initial
-delivery"&.) This can be helpful if you are putting messages on the queue using
+delivery"&.) This can be helpful if you are putting messages in the queue using
&%-odq%& and want a queue runner just to process the new messages.
.vitem &%-q[q][i]f...%&
.oindex "&%-ql%&"
.cindex "queue" "local deliveries only"
The &'l'& (the letter &"ell"&) flag specifies that only local deliveries are to
-be done. If a message requires any remote deliveries, it remains on the queue
+be done. If a message requires any remote deliveries, it remains in the queue
for later delivery.
.vitem &%-q[q][i][f[f]][l][G<name>[/<time>]]]%&
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The Exim run time configuration file" "CHAPconf" &&&
+.chapter "The Exim runtime configuration file" "CHAPconf" &&&
"The runtime configuration file"
-.cindex "run time configuration"
+.cindex "runtime configuration"
.cindex "configuration file" "general description"
.cindex "CONFIGURE_FILE"
.cindex "configuration file" "errors in"
.cindex "error" "in configuration file"
.cindex "return code" "for bad configuration"
-Exim uses a single run time configuration file that is read whenever an Exim
+Exim uses a single runtime configuration file that is read whenever an Exim
binary is executed. Note that in normal operation, this happens frequently,
because Exim is designed to operate in a distributed manner, without central
control.
The name of the configuration file is compiled into the binary for security
reasons, and is specified by the CONFIGURE_FILE compilation option. In
most configurations, this specifies a single file. However, it is permitted to
-give a colon-separated list of file names, in which case Exim uses the first
+give a colon-separated list of filenames, in which case Exim uses the first
existing file in the list.
.cindex "EXIM_USER"
.cindex "CONFIGURE_GROUP"
.cindex "configuration file" "ownership"
.cindex "ownership" "configuration file"
-The run time configuration file must be owned by root or by the user that is
+The runtime configuration file must be owned by root or by the user that is
specified at compile time by the CONFIGURE_OWNER option (if set). The
configuration file must not be world-writeable, or group-writeable unless its
group is the root group or the one specified at compile time by the
CONFIGURE_GROUP option.
&*Warning*&: In a conventional configuration, where the Exim binary is setuid
-to root, anybody who is able to edit the run time configuration file has an
+to root, anybody who is able to edit the runtime configuration file has an
easy way to run commands as root. If you specify a user or group in the
CONFIGURE_OWNER or CONFIGURE_GROUP options, then that user and/or any users
who are members of that group will trivially be able to obtain root privileges.
-Up to Exim version 4.72, the run time configuration file was also permitted to
+Up to Exim version 4.72, the runtime configuration file was also permitted to
be writeable by the Exim user and/or group. That has been changed in Exim 4.73
since it offered a simple privilege escalation for any attacker who managed to
compromise the Exim user account.
A default configuration file, which will work correctly in simple situations,
is provided in the file &_src/configure.default_&. If CONFIGURE_FILE
-defines just one file name, the installation process copies the default
+defines just one filename, the installation process copies the default
configuration to a new file of that name if it did not previously exist. If
CONFIGURE_FILE is a list, no default is automatically installed. Chapter
&<<CHAPdefconfil>>& is a &"walk-through"& discussion of the default
Exim is running as the Exim user, so when it re-execs to regain privilege for
the delivery, the use of &%-C%& causes privilege to be lost. However, root
can test reception and delivery using two separate commands (one to put a
-message on the queue, using &%-odq%&, and another to do the delivery, using
+message in the queue, using &%-odq%&, and another to do the delivery, using
&%-M%&).
If ALT_CONFIG_PREFIX is defined &_in Local/Makefile_&, it specifies a
prefix string with which any file named in a &%-C%& command line option must
-start. In addition, the file name must not contain the sequence &"&`/../`&"&.
-There is no default setting for ALT_CONFIG_PREFIX; when it is unset, any file
-name can be used with &%-C%&.
+start. In addition, the filename must not contain the sequence &"&`/../`&"&.
+There is no default setting for ALT_CONFIG_PREFIX; when it is unset, any
+filename can be used with &%-C%&.
One-off changes to a configuration can be specified by the &%-D%& command line
option, which defines and overrides values for macros used inside the
Some sites may wish to use the same Exim binary on different machines that
share a file system, but to use different configuration files on each machine.
If CONFIGURE_FILE_USE_NODE is defined in &_Local/Makefile_&, Exim first
-looks for a file whose name is the configuration file name followed by a dot
+looks for a file whose name is the configuration filename followed by a dot
and the machine's node name, as obtained from the &[uname()]& function. If this
file does not exist, the standard name is tried. This processing occurs for
-each file name in the list given by CONFIGURE_FILE or &%-C%&.
+each filename in the list given by CONFIGURE_FILE or &%-C%&.
In some esoteric situations different versions of Exim may be run under
different effective uids and the CONFIGURE_FILE_USE_EUID is defined to
.cindex "configuration file" "including other files"
.cindex "&`.include`& in configuration file"
.cindex "&`.include_if_exists`& in configuration file"
-You can include other files inside Exim's run time configuration file by
+You can include other files inside Exim's runtime configuration file by
using this syntax:
.display
-&`.include`& <&'file name'&>
-&`.include_if_exists`& <&'file name'&>
+&`.include`& <&'filename'&>
+&`.include_if_exists`& <&'filename'&>
.endd
-on a line by itself. Double quotes round the file name are optional. If you use
+on a line by itself. Double quotes round the filename are optional. If you use
the first form, a configuration error occurs if the file does not exist; the
second form does nothing for non-existent files.
The first form allows a relative name. It is resolved relative to
-the directory of the including file. For the second form an absolute file
-name is required.
+the directory of the including file. For the second form an absolute filename
+is required.
Includes may be nested to any depth, but remember that Exim reads its
configuration file often, so it is a good idea to keep them to a minimum.
.section "Macro substitution" "SECID42"
Once a macro is defined, all subsequent lines in the file (and any included
files) are scanned for the macro name; if there are several macros, the line is
-scanned for each in turn, in the order in which the macros are defined. The
+scanned for each, in turn, in the order in which the macros are defined. The
replacement text is not re-scanned for the current macro, though it is scanned
for subsequently defined macros. For this reason, a macro name may not contain
the name of a previously defined macro as a substring. You could, for example,
+.section "Macros" "SECTdefconfmacros"
+All macros should be defined before any options.
+
+One macro is specified, but commented out, in the default configuration:
+.code
+# ROUTER_SMARTHOST=MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
+.endd
+If all off-site mail is expected to be delivered to a "smarthost", then set the
+hostname here and uncomment the macro. This will affect which router is used
+later on. If this is left commented out, then Exim will perform direct-to-MX
+deliveries using a &(dnslookup)& router.
+
+In addition to macros defined here, Exim includes a number of built-in macros
+to enable configuration to be guarded by a binary built with support for a
+given feature. See section &<<SECTbuiltinmacros>>& for more details.
+
+
.section "Main configuration settings" "SECTdefconfmain"
-The main (global) configuration option settings must always come first in the
-file. The first thing you'll see in the file, after some initial comments, is
-the line
+The main (global) configuration option settings section must always come first
+in the file, after the macros.
+The first thing you'll see in the file, after some initial comments, is the line
.code
# primary_hostname =
.endd
These are example settings that can be used when Exim is compiled with
support for TLS (aka SSL) as described in section &<<SECTinctlsssl>>&. The
first one specifies the list of clients that are allowed to use TLS when
-connecting to this server; in this case the wildcard means all clients. The
+connecting to this server; in this case, the wildcard means all clients. The
other options specify where Exim should find its TLS certificate and private
key, which together prove the server's identity to any clients that connect.
More details are given in chapter &<<CHAPTLS>>&.
timeout_frozen_after = 7d
.endd
The first of these options specifies that failing bounce messages are to be
-discarded after 2 days on the queue. The second specifies that any frozen
+discarded after 2 days in the queue. The second specifies that any frozen
message (whether a bounce message or not) is to be timed out (and discarded)
after a week. In this configuration, the first setting ensures that no failing
bounce message ever lasts a week.
&"&'first-initial.second-initial.family-name'&"& when applied to someone like
the author of Exim, who has no second initial.) However, a local part starting
with a dot or containing &"/../"& can cause trouble if it is used as part of a
-file name (for example, for a mailing list). This is also true for local parts
+filename (for example, for a mailing list). This is also true for local parts
that contain slashes. A pipe symbol can also be troublesome if the local part
is incorporated unthinkingly into a shell command line.
begin routers
.endd
Routers are the modules in Exim that make decisions about where to send
-messages. An address is passed to each router in turn, until it is either
+messages. An address is passed to each router, in turn, until it is either
accepted, or failed. This means that the order in which you define the routers
matters. Each router is fully described in its own chapter later in this
manual. Here we give only brief overviews.
support domain literal addresses (those of the form &'user@[10.9.8.7]'&). If
you uncomment this router, you also need to uncomment the setting of
&%allow_domain_literals%& in the main part of the configuration.
+
+Which router is used next depends upon whether or not the ROUTER_SMARTHOST
+macro has been defined, per
.code
+.ifdef ROUTER_SMARTHOST
+smarthost:
+#...
+.else
dnslookup:
- driver = dnslookup
+#...
+.endif
+.endd
+
+If ROUTER_SMARTHOST has been defined, either at the top of the file or on the
+command-line, then we route all non-local mail to that smarthost; otherwise, we'll
+perform DNS lookups for direct-to-MX lookup. Any mail which is to a local domain will
+skip these routers because of the &%domains%& option.
+
+.code
+smarthost:
+ driver = manualroute
domains = ! +local_domains
- transport = remote_smtp
- ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+ transport = smarthost_smtp
+ route_data = ROUTER_SMARTHOST
+ ignore_target_hosts = <; 0.0.0.0 ; 127.0.0.0/8 ; ::1
no_more
.endd
-The first uncommented router handles addresses that do not involve any local
-domains. This is specified by the line
+This router only handles mail which is not to any local domains; this is
+specified by the line
.code
domains = ! +local_domains
.endd
indicates that it is referring to a named list. Addresses in other domains are
passed on to the following routers.
+The name of the router driver is &(manualroute)& because we are manually
+specifying how mail should be routed onwards, instead of using DNS MX.
+While the name of this router instance is arbitrary, the &%driver%& option must
+be one of the driver modules that is in the Exim binary.
+
+With no pre-conditions other than &%domains%&, all mail for non-local domains
+will be handled by this router, and the &%no_more%& setting will ensure that no
+other routers will be used for messages matching the pre-conditions. See
+&<<SECTrouprecon>>& for more on how the pre-conditions apply. For messages which
+are handled by this router, we provide a hostname to deliver to in &%route_data%&
+and the macro supplies the value; the address is then queued for the
+&(smarthost_smtp)& transport.
+
+.code
+dnslookup:
+ driver = dnslookup
+ domains = ! +local_domains
+ transport = remote_smtp
+ ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+ no_more
+.endd
+The &%domains%& option behaves as per smarthost, above.
+
The name of the router driver is &(dnslookup)&,
and is specified by the &%driver%& option. Do not be confused by the fact that
the name of this router instance is the same as the name of the driver. The
.code
begin transports
.endd
-One remote transport and four local transports are defined.
+Two remote transports and four local transports are defined.
.code
remote_smtp:
driver = smtp
+ message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
+.ifdef _HAVE_PRDR
hosts_try_prdr = *
+.endif
.endd
This transport is used for delivering messages over SMTP connections.
The list of remote hosts comes from the router.
-The &%hosts_try_prdr%& option enables an efficiency SMTP option.
-It is negotiated between client and server
-and not expected to cause problems but can be disabled if needed.
+The &%message_size_limit%& usage is a hack to avoid sending on messages
+with over-long lines. The built-in macro _HAVE_DANE guards configuration
+to use DANE for delivery;
+see section &<<SECDANE>>& for more details.
+
+The &%hosts_try_prdr%& option enables an efficiency SMTP option. It is
+negotiated between client and server and not expected to cause problems
+but can be disabled if needed. The built-in macro _HAVE_PRDR guards the
+use of the &%hosts_try_prdr%& configuration option.
+
+The other remote transport is used when delivering to a specific smarthost
+with whom there must be some kind of existing relationship, instead of the
+usual federated system.
+
+.code
+smarthost_smtp:
+ driver = smtp
+ message_size_limit = ${if > {$max_received_linelength}{998} {1}{0}}
+ multi_domain
+ #
+.ifdef _HAVE_TLS
+ # Comment out any of these which you have to, then file a Support
+ # request with your smarthost provider to get things fixed:
+ hosts_require_tls = *
+ tls_verify_hosts = *
+ # As long as tls_verify_hosts is enabled, this won't matter, but if you
+ # have to comment it out then this will at least log whether you succeed
+ # or not:
+ tls_try_verify_hosts = *
+ #
+ # The SNI name should match the name which we'll expect to verify;
+ # many mail systems don't use SNI and this doesn't matter, but if it does,
+ # we need to send a name which the remote site will recognize.
+ # This _should_ be the name which the smarthost operators specified as
+ # the hostname for sending your mail to.
+ tls_sni = ROUTER_SMARTHOST
+ #
+.ifdef _HAVE_OPENSSL
+ tls_require_ciphers = HIGH:!aNULL:@STRENGTH
+.endif
+.ifdef _HAVE_GNUTLS
+ tls_require_ciphers = SECURE192:-VERS-SSL3.0:-VERS-TLS1.0:-VERS-TLS1.1
+.endif
+.endif
+.ifdef _HAVE_PRDR
+ hosts_try_prdr = *
+.endif
+.endd
+After the same &%message_size_limit%& hack, we then specify that this Transport
+can handle messages to multiple domains in one run. The assumption here is
+that you're routing all non-local mail to the same place and that place is
+happy to take all messages from you as quickly as possible.
+All other options depend upon built-in macros; if Exim was built without TLS support
+then no other options are defined.
+If TLS is available, then we configure "stronger than default" TLS ciphersuites
+and versions using the &%tls_require_ciphers%& option, where the value to be
+used depends upon the library providing TLS.
+Beyond that, the options adopt the stance that you should have TLS support available
+from your smarthost on today's Internet, so we turn on requiring TLS for the
+mail to be delivered, and requiring that the certificate be valid, and match
+the expected hostname. The &%tls_sni%& option can be used by service providers
+to select an appropriate certificate to present to you and here we re-use the
+ROUTER_SMARTHOST macro, because that is unaffected by CNAMEs present in DNS.
+You want to specify the hostname which you'll expect to validate for, and that
+should not be subject to insecure tampering via DNS results.
+
+For the &%hosts_try_prdr%& option see the previous transport.
+
All other options are defaulted.
.code
local_delivery:
tools for building the files can be found in several places:
.display
&url(https://cr.yp.to/cdb.html)
-&url(http://www.corpit.ru/mjt/tinycdb.html)
+&url(https://www.corpit.ru/mjt/tinycdb.html)
&url(https://packages.debian.org/stable/utils/freecdb)
&url(https://github.com/philpennock/cdbtools) (in Go)
.endd
-. --- 2018-09-07: corpit.ru http:-only
A cdb distribution is not needed in order to build Exim with cdb support,
because the code for reading cdb files is included directly in Exim itself.
However, no means of building or testing cdb files is provided with Exim, so
&*Warning 2*&: In a host list, you must always use &(net-iplsearch)& so that
the implicit key is the host's IP address rather than its name (see section
&<<SECThoslispatsikey>>&).
+
+.new
+&*Warning 3*&: Do not use an IPv4-mapped IPv6 address for a key; use the
+IPv4, in dotted-quad form. (Exim converts IPv4-mapped IPv6 addresses to this
+notation before executing the lookup.)
+.wen
+.next
+.new
+.cindex lookup json
+.cindex json "lookup type"
+.cindex JSON expansions
+&(json)&: The given file is a text file with a JSON structure.
+An element of the structure is extracted, defined by the search key.
+The key is a list of subelement selectors
+(colon-separated by default but changeable in the usual way)
+which are applied in turn to select smaller and smaller portions
+of the JSON structure.
+If a selector is numeric, it must apply to a JSON array; the (zero-based)
+nunbered array element is selected.
+Otherwise it must apply to a JSON object; the named element is selected.
+The final resulting element can be a simple JSON type or a JSON object
+or array; for the latter two a string-representation os the JSON
+is returned.
+For elements of type string, the returned value is de-quoted.
+.wen
.next
.cindex "linear search"
.cindex "lookup" "lsearch"
.next
.cindex "sqlite lookup type"
.cindex "lookup" "sqlite"
-&(sqlite)&: The format of the query is a file name followed by an SQL statement
+&(sqlite)&: The format of the query is a filename followed by an SQL statement
that is passed to an SQLite database. See section &<<SECTsqlite>>&.
.next
With &"strict"& a response from the DNS resolver that
is not labelled as authenticated data
is treated as equivalent to a temporary DNS error.
-The default is &"never"&.
+The default is &"lax"&.
See also the &$lookup_dnssec_authenticated$& variable.
.section "More about SQLite" "SECTsqlite"
.cindex "lookup" "SQLite"
.cindex "sqlite lookup type"
-SQLite is different to the other SQL lookups because a file name is required in
+SQLite is different to the other SQL lookups because a filename is required in
addition to the SQL query. An SQLite database is a single file, and there is no
daemon as in the other SQL databases. The interface to Exim requires the name
of the file, as an absolute path, to be given at the start of the query. It is
.section "File names in lists" "SECTfilnamlis"
-.cindex "list" "file name in"
-If an item in a domain, host, address, or local part list is an absolute file
-name (beginning with a slash character), each line of the file is read and
+.cindex "list" "filename in"
+If an item in a domain, host, address, or local part list is an absolute
+filename (beginning with a slash character), each line of the file is read and
processed as if it were an independent item in the list, except that further
-file names are not allowed,
+filenames are not allowed,
and no expansion of the data from the file takes place.
Empty lines in the file are ignored, and the file may also contain comment
lines:
.endd
.endlist
-Putting a file name in a list has the same effect as inserting each line of the
+Putting a filename in a list has the same effect as inserting each line of the
file as an item in the list (blank lines and comments excepted). However, there
is one important difference: the file is read each time the list is processed,
so if its contents vary over time, Exim's behaviour changes.
-If a file name is preceded by an exclamation mark, the sense of any match
+If a filename is preceded by an exclamation mark, the sense of any match
within the file is inverted. For example, if
.code
hold_domains = !/etc/nohold-domains
always fixed strings, just as for any other single-key lookup type.
If you want to use a file to contain wild-card patterns that form part of a
-list, just give the file name on its own, without a search type, as described
+list, just give the filename on its own, without a search type, as described
in the previous section. You could also use the &(wildlsearch)& or
&(nwildlsearch)&, but there is no advantage in doing this.
.cindex "domain list" "matching by lookup"
If a pattern starts with the name of a single-key lookup type followed by a
semicolon (for example, &"dbm;"& or &"lsearch;"&), the remainder of the pattern
-must be a file name in a suitable format for the lookup type. For example, for
+must be a filename in a suitable format for the lookup type. For example, for
&"cdb;"& it must be an absolute path:
.code
domains = cdb;/etc/mail/local_domains.cdb
recently implemented &(iplsearch)& files do require colons in IPv6 keys
(notated using the quoting facility) so as to distinguish them from IPv4 keys.
For this reason, when the lookup type is &(iplsearch)&, IPv6 addresses are
-converted using colons and not dots. In all cases, full, unabbreviated IPv6
+converted using colons and not dots.
+.new
+In all cases except IPv4-mapped IPv6, full, unabbreviated IPv6
addresses are always used.
+The latter are converted to IPv4 addresses, in dotted-quad form.
+.wen
Ideally, it would be nice to tidy up this anomalous situation by changing to
colons in all cases, given that quoting is now available for &(lsearch)&.
The domain portion of an address is always lowercased before matching it to an
address list. The local part is lowercased by default, and any string
comparisons that take place are done caselessly. This means that the data in
-the address list itself, in files included as plain file names, and in any file
+the address list itself, in files included as plain filenames, and in any file
that is looked up using the &"@@"& mechanism, can be in any case. However, the
keys in files that are looked up by a search type other than &(lsearch)& (which
works caselessly) must be in lower case, because these lookups are not
.chapter "String expansions" "CHAPexpand"
.scindex IIDstrexp "expansion" "of strings"
-Many strings in Exim's run time configuration are expanded before use. Some of
+Many strings in Exim's runtime configuration are expanded before use. Some of
them are expanded every time they are used; others are expanded only once.
When a string is being expanded it is copied verbatim from left to right except
+.cindex expansion "string concatenation"
when a dollar or backslash character is encountered. A dollar specifies the
start of a portion of the string that is interpreted and replaced as described
below in section &<<SECTexpansionitems>>& onwards. Backslash is used as an
options for which string expansion is performed are marked with † after
the data type. ACL rules always expand strings. A couple of expansion
conditions do not expand some of the brace-delimited branches, for security
-reasons.
+reasons,
+.new
+.cindex "tainted data" expansion
+.cindex expansion "tainted data"
+and expansion of data deriving from the sender (&"tainted data"&)
+is not permitted.
+.wen
.oindex "&%-bem%&"
If you want to test expansions that include variables whose values are taken
from a message, there are two other options that can be used. The &%-bem%&
-option is like &%-be%& except that it is followed by a file name. The file is
+option is like &%-be%& except that it is followed by a filename. The file is
read as a message before doing the test expansions. For example:
.code
exim -bem /tmp/test.message '$h_subject:'
.cindex headers "authentication-results:"
.cindex authentication "expansion item"
This item returns a string suitable for insertion as an
-&'Authentication-Results"'&
+&'Authentication-Results:'&
header line.
The given <&'authserv-id'&> is included in the result; typically this
will be a domain name identifying the system performing the authentications.
This forces an expansion failure (see section &<<SECTforexpfai>>&);
{<&'string2'&>} must be present for &"fail"& to be recognized.
-.new
.vitem "&*${extract json{*&<&'key'&>&*}{*&<&'string1'&>&*}{*&<&'string2'&>&*}&&&
+ {*&<&'string3'&>&*}}*&" &&&
+ "&*${extract jsons{*&<&'key'&>&*}{*&<&'string1'&>&*}{*&<&'string2'&>&*}&&&
{*&<&'string3'&>&*}}*&"
.cindex "expansion" "extracting from JSON object"
.cindex JSON expansions
The braces, commas and colons, and the quoting of the member name are required;
the spaces are optional.
Matching of the key against the member names is done case-sensitively.
+For the &"json"& variant,
+if a returned value is a JSON string, it retains its leading and
+trailing quotes.
+.new
+For the &"jsons"& variant, which is intended for use with JSON strings, the
+leading and trailing quotes are removed from the returned value.
+.wen
. XXX should be a UTF-8 compare
The results of matching are handled as above.
-.wen
.vitem "&*${extract{*&<&'number'&>&*}{*&<&'separators'&>&*}&&&
empty (for example, the fifth field above).
-.new
-.vitem "&*${extract json{*&<&'number'&>&*}}&&&
+.vitem "&*${extract json {*&<&'number'&>&*}}&&&
+ {*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&" &&&
+ "&*${extract jsons{*&<&'number'&>&*}}&&&
{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&"
.cindex "expansion" "extracting from JSON array"
.cindex JSON expansions
Field selection and result handling is as above;
there is no choice of field separator.
+For the &"json"& variant,
+if a returned value is a JSON string, it retains its leading and
+trailing quotes.
+.new
+For the &"jsons"& variant, which is intended for use with JSON strings, the
+leading and trailing quotes are removed from the returned value.
.wen
.cindex "expansion" "selecting from list by condition"
.vindex "&$item$&"
After expansion, <&'string'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way. For each item
+default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+For each item
in this list, its value is place in &$item$&, and then the condition is
evaluated. If the condition is true, &$item$& is added to the output as an
item in a new list; if the condition is false, the item is discarded. The
${filter{a:b:c}{!eq{$item}{b}}}
.endd
yields &`a:c`&. At the end of the expansion, the value of &$item$& is restored
-to what it was before. See also the &*map*& and &*reduce*& expansion items.
+to what it was before. See also the &%map%& and &%reduce%& expansion items.
.vitem &*${hash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
&'X-Spam-Scanned:'& header line. If you know the secret, you can check that
this header line is authentic by recomputing the authentication code from the
host name, message ID and the &'Message-id:'& header line. This can be done
-using Exim's &%-be%& option, or by other means, for example by using the
+using Exim's &%-be%& option, or by other means, for example, by using the
&'hmac_md5_hex()'& function in Perl.
and leading and trailing white space (which is ignored).
After expansion, <&'string1'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way.
+default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
The first field of the list is numbered one.
If the number is negative, the fields are
.cindex "expansion" "list creation"
.vindex "&$item$&"
After expansion, <&'string1'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way. For each item
+default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+For each item
in this list, its value is place in &$item$&, and then <&'string2'&> is
expanded and added to the output as an item in a new list. The separator used
for the output list is the same as the one used for the input, but a separator
${map{a:b:c}{[$item]}} ${map{<- x-y-z}{($item)}}
.endd
expands to &`[a]:[b]:[c] (x)-(y)-(z)`&. At the end of the expansion, the
-value of &$item$& is restored to what it was before. See also the &*filter*&
-and &*reduce*& expansion items.
+value of &$item$& is restored to what it was before. See also the &%filter%&
+and &%reduce%& expansion items.
.vitem &*${nhash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
.cindex "expansion" "numeric hash"
.cindex "expansion" "inserting an entire file"
.cindex "file" "inserting into expansion"
.cindex "&%readfile%& expansion item"
-The file name and end-of-line string are first expanded separately. The file is
+The filename and end-of-line string are first expanded separately. The file is
then read, and its contents replace the entire item. All newline characters in
the file are replaced by the end-of-line string if it is present. Otherwise,
newlines are left in the string.
.code
${readsocket{/socket/name}{request string}{3s:shutdown=no}}
.endd
-.new
The second, tls, controls the use of TLS on the connection. Example:
.code
${readsocket{/socket/name}{request string}{3s:tls=yes}}
.endd
The default is to not use TLS.
If it is enabled, a shutdown as descripbed above is never done.
-.wen
A fourth argument allows you to change any newlines that are in the data
that is read, in the same way as for &%readfile%& (see above). This example
.vindex "&$item$&"
This operation reduces a list to a single, scalar string. After expansion,
<&'string1'&> is interpreted as a list, colon-separated by default, but the
-separator can be changed in the usual way. Then <&'string2'&> is expanded and
+separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+Then <&'string2'&> is expanded and
assigned to the &$value$& variable. After this, each item in the <&'string1'&>
-list is assigned to &$item$& in turn, and <&'string3'&> is expanded for each of
+list is assigned to &$item$&, in turn, and <&'string3'&> is expanded for each of
them. The result of that expansion is assigned to &$value$& before the next
iteration. When the end of the list is reached, the final value of &$value$& is
-added to the expansion output. The &*reduce*& expansion item can be used in a
+added to the expansion output. The &%reduce%& expansion item can be used in a
number of ways. For example, to add up a list of numbers:
.code
${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
${reduce {3:0:9:4:6}{0}{${if >{$item}{$value}{$item}{$value}}}}
.endd
At the end of a &*reduce*& expansion, the values of &$item$& and &$value$& are
-restored to what they were before. See also the &*filter*& and &*map*&
+restored to what they were before. See also the &%filter%& and &%map%&
expansion items.
.vitem &*$rheader_*&<&'header&~name'&>&*:*&&~or&~&*$rh_*&<&'header&~name'&>&*:*&
.cindex list sorting
.cindex expansion "list sorting"
After expansion, <&'string'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way.
+default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
The <&'comparator'&> argument is interpreted as the operator
of a two-argument expansion condition.
The numeric operators plus ge, gt, le, lt (and ~i variants) are supported.
${addresses:>:$h_from:}
.endd
-Compare the &*address*& (singular)
+Compare the &%address%& (singular)
expansion item, which extracts the working address from a single RFC2822
-address. See the &*filter*&, &*map*&, and &*reduce*& items for ways of
+address. See the &%filter%&, &%map%&, and &%reduce%& items for ways of
processing lists.
To clarify "list of addresses in RFC 2822 format" mentioned above, Exim follows
The string must consist entirely of decimal digits. The number is converted to
base 62 and output as a string of six characters, including leading zeros. In
the few operating environments where Exim uses base 36 instead of base 62 for
-its message identifiers (because those systems do not have case-sensitive file
-names), base 36 is used by this operator, despite its name. &*Note*&: Just to
-be absolutely clear: this is &'not'& base64 encoding.
+its message identifiers (because those systems do not have case-sensitive
+filenames), base 36 is used by this operator, despite its name. &*Note*&: Just
+to be absolutely clear: this is &'not'& base64 encoding.
.vitem &*${base62d:*&<&'base-62&~digits'&>&*}*&
.cindex "&%base62d%& expansion item"
.cindex "&%hexquote%& expansion item"
This operator converts non-printable characters in a string into a hex
escape form. Byte values between 33 (!) and 126 (~) inclusive are left
-as is, and other byte values are converted to &`\xNN`&, for example a
+as is, and other byte values are converted to &`\xNN`&, for example, a
byte value 127 is converted to &`\x7f`&.
returns the SHA-1 hash fingerprint of the certificate.
-.vitem &*${sha256:*&<&'string'&>&*}*&
+.vitem &*${sha256:*&<&'string'&>&*}*& &&&
+ &*${sha2:*&<&'string'&>&*}*& &&&
+ &*${sha2_<n>:*&<&'string'&>&*}*&
.cindex "SHA-256 hash"
+.cindex "SHA-2 hash"
.cindex certificate fingerprint
.cindex "expansion" "SHA-256 hashing"
.cindex "&%sha256%& expansion item"
+.cindex "&%sha2%& expansion item"
The &%sha256%& operator computes the SHA-256 hash value of the string
and returns
it as a 64-digit hexadecimal number, in which any letters are in upper case.
If the string is a single variable of type certificate,
returns the SHA-256 hash fingerprint of the certificate.
+.new
+The operator can also be spelled &%sha2%& and does the same as &%sha256%&
+(except for certificates, which are not supported).
+Finally, if an underbar
+and a number is appended it specifies the output length, selecting a
+member of the SHA-2 family of hash functions.
+Values of 256, 384 and 512 are accepted, with 256 being the default.
+.wen
+
.vitem &*${sha3:*&<&'string'&>&*}*& &&&
&*${sha3_<n>:*&<&'string'&>&*}*&
.cindex "expansion" "utf-8 forcing"
.cindex "&%utf8clean%& expansion item"
This replaces any invalid utf-8 sequence in the string by the character &`?`&.
-.new
In versions of Exim before 4.92, this did not correctly do so for a truncated
final codepoint's encoding, and the character would be silently dropped.
If you must handle detection of this scenario across both sets of Exim behavior,
.endd
(which will false-positive if the first character of the local part is a
literal question mark).
-.wen
.vitem "&*${utf8_domain_to_alabel:*&<&'string'&>&*}*&" &&&
"&*${utf8_domain_from_alabel:*&<&'string'&>&*}*&" &&&
.vindex "&$item$&"
These conditions iterate over a list. The first argument is expanded to form
the list. By default, the list separator is a colon, but it can be changed by
-the normal method. The second argument is interpreted as a condition that is to
+the normal method (&<<SECTlistsepchange>>&).
+The second argument is interpreted as a condition that is to
be applied to each item in the list in turn. During the interpretation of the
condition, the current list item is placed in a variable called &$item$&.
.ilist
.code
${if forany{<, $recipients}{match{$item}{^user3@}}{yes}{no}}
.endd
-The value of &$item$& is saved and restored while &*forany*& or &*forall*& is
+The value of &$item$& is saved and restored while &%forany%& or &%forall%& is
being processed, to enable these expansion items to be nested.
To scan a named list, expand it with the &*listnamed*& operator.
+.new
+.vitem "&*forall_json{*&<&'a JSON array'&>&*}{*&<&'a condition'&>&*}*&" &&&
+ "&*forany_json{*&<&'a JSON array'&>&*}{*&<&'a condition'&>&*}*&" &&&
+ "&*forall_jsons{*&<&'a JSON array'&>&*}{*&<&'a condition'&>&*}*&" &&&
+ "&*forany_jsons{*&<&'a JSON array'&>&*}{*&<&'a condition'&>&*}*&"
+.cindex JSON "iterative conditions"
+.cindex JSON expansions
+.cindex expansion "&*forall_json*& condition"
+.cindex expansion "&*forany_json*& condition"
+.cindex expansion "&*forall_jsons*& condition"
+.cindex expansion "&*forany_jsons*& condition"
+As for the above, except that the first argument must, after expansion,
+be a JSON array.
+The array separator is not changeable.
+For the &"jsons"& variants the elements are expected to be JSON strings
+and have their quotes removed before the evaluation of the condition.
+.wen
+
+
.vitem &*ge&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
&*gei&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.vindex "&$compile_number$&"
The building process for Exim keeps a count of the number
of times it has been compiled. This serves to distinguish different
-compilations of the same version of the program.
+compilations of the same version of Exim.
.vitem &$config_dir$&
.vindex "&$config_dir$&"
.vindex "&$config_file$&"
The name of the main configuration file Exim is using.
+.new
+.vitem &$dmarc_domain_policy$& &&&
+ &$dmarc_status$& &&&
+ &$dmarc_status_text$& &&&
+ &$dmarc_used_domains$&
+Results of DMARC verification.
+For details see section &<<SECDMARC>>&.
+.wen
+
.vitem &$dkim_verify_status$&
Results of DKIM verification.
For details see section &<<SECDKIMVFY>>&.
The first character is a major version number, currently 4.
Then after a dot, the next group of digits is a minor version number.
There may be other characters following the minor version.
+This value may be overridden by the &%exim_version%& main config option.
.vitem &$header_$&<&'name'&>
This is not strictly an expansion variable. It is expansion syntax for
.cindex authentication "expansion item"
Performing these checks sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
.vitem &$host_lookup_failed$&
When a message is being delivered to a file, pipe, or autoreply transport as a
result of aliasing or forwarding, &$local_part$& is set to the local part of
-the parent address, not to the file name or command (see &$address_file$& and
+the parent address, not to the filename or command (see &$address_file$& and
&$address_pipe$&).
When an ACL is running for a RCPT command, &$local_part$& contains the
.cindex queues named
The name of the spool queue in use; empty for the default queue.
+.new
+.vitem &$r_...$&
+.vindex &$r_...$&
+.cindex router variables
+Values can be placed in these variables by the &%set%& option of a router.
+They can be given any name that starts with &$r_$&.
+The values persist for the address being handled through subsequent routers
+and the eventual transport.
+.wen
+
.vitem &$rcpt_count$&
.vindex "&$rcpt_count$&"
When a message is being received by SMTP, this variable contains the number of
option.
As well as being useful in ACLs (including the &"connect"& ACL), these variable
-could be used, for example, to make the file name for a TLS certificate depend
+could be used, for example, to make the filename for a TLS certificate depend
on which interface and/or port is being used for the incoming connection. The
values of &$received_ip_address$& and &$received_port$& are saved with any
messages that are received, thus making these variables available at delivery
&*Note*&: Under versions of OpenSSL preceding 1.1.1,
when a list of more than one
file is used for &%tls_certificate%&, this variable is not reliable.
+.new
+The macro "_TLS_BAD_MULTICERT_IN_OURCERT" will be defined for those versions.
+.wen
.vitem &$tls_in_peercert$&
.vindex "&$tls_in_peercert$&"
but in the context of an outward SMTP delivery taking place via the &(smtp)& transport
becomes the same as &$tls_out_cipher$&.
+.new
+.vitem &$tls_in_cipher_std$&
+.vindex "&$tls_in_cipher_std$&"
+As above, but returning the RFC standard name for the cipher suite.
+.wen
+
.vitem &$tls_out_cipher$&
.vindex "&$tls_out_cipher$&"
This variable is
&<<CHAPTLS>>& for details of TLS support and chapter &<<CHAPsmtptrans>>& for
details of the &(smtp)& transport.
+,new
+.vitem &$tls_out_cipher_std$&
+.vindex "&$tls_out_cipher_std$&"
+As above, but returning the RFC standard name for the cipher suite.
+.wen
+
.vitem &$tls_out_dane$&
.vindex &$tls_out_dane$&
DANE active status. See section &<<SECDANE>>&.
.vitem &$version_number$&
.vindex "&$version_number$&"
-The version number of Exim.
+The version number of Exim. Same as &$exim_version$&, may be overridden
+by the &%exim_version%& main config option.
.vitem &$warn_message_delay$&
.vindex "&$warn_message_delay$&"
.endlist
The default list separator in both cases is a colon, but this can be changed as
-described in section &<<SECTlistconstruct>>&. When IPv6 addresses are involved,
+described in section &<<SECTlistsepchange>>&. When IPv6 addresses are involved,
it is usually best to change the separator to avoid having to double all the
colons. For example:
.code
exim.
The value of &%-oX%& is a list of items. The default colon separator can be
-changed in the usual way if required. If there are any items that do not
+changed in the usual way (&<<SECTlistsepchange>>&) if required.
+If there are any items that do not
contain dots or colons (that is, are not IP addresses), the value of
&%daemon_smtp_ports%& is replaced by the list of those items. If there are any
items that do contain dots or colons, the value of &%local_interfaces%& is
.chapter "Main configuration" "CHAPmainconfig"
.scindex IIDconfima "configuration file" "main section"
.scindex IIDmaiconf "main configuration"
-The first part of the run time configuration file contains three types of item:
+The first part of the runtime configuration file contains three types of item:
.ilist
Macro definitions: These lines start with an upper case letter. See section
See also the &'Policy controls'& section above.
.table2
-.row &%dkim_verify_signers%& "DKIM domain for which DKIM ACL is run"
+.row &%dkim_verify_hashes%& "DKIM hash methods accepted for signatures"
+.row &%dkim_verify_keytypes%& "DKIM key types accepted for signatures"
+.row &%dkim_verify_signers%& "DKIM domains for which DKIM ACL is run"
.row &%host_lookup%& "host name looked up for these hosts"
.row &%host_lookup_order%& "order of DNS and local name lookups"
.row &%recipient_unqualified_hosts%& "may send unqualified recipients"
.row &%ignore_fromline_hosts%& "allow &""From ""& from these hosts"
.row &%ignore_fromline_local%& "allow &""From ""& from local SMTP"
.row &%pipelining_advertise_hosts%& "advertise pipelining to these hosts"
+.row &%pipelining_connect_advertise_hosts%& "advertise pipelining to these hosts"
.row &%prdr_enable%& "advertise PRDR to all hosts"
.row &%smtputf8_advertise_hosts%& "advertise SMTPUTF8 to these hosts"
.row &%tls_advertise_hosts%& "advertise TLS to these hosts"
.cindex "UTF-8" "in domain name"
Lots of discussion is going on about internationalized domain names. One
camp is strongly in favour of just using UTF-8 characters, and it seems
-that at least two other MTAs permit this. This option allows Exim users to
-experiment if they wish.
+that at least two other MTAs permit this.
+This option allows Exim users to experiment if they wish.
If it is set true, Exim's domain parsing function allows valid
UTF-8 multicharacters to appear in domain name components, in addition to
-letters, digits, and hyphens. However, just setting this option is not
-enough; if you want to look up these domain names in the DNS, you must also
+letters, digits, and hyphens.
+
+.new
+If Exim is built with internationalization support
+and the SMTPUTF8 ESMTP option is in use (see chapter &<<CHAPi18n>>&)
+this option can be left as default.
+.wen
+Without that,
+if you want to look up such domain names in the DNS, you must also
adjust the value of &%dns_check_names_pattern%& to match the extended form. A
suitable setting is:
.code
intervals specified by this option. The data is a colon-separated list of times
after which to send warning messages. If the value of the option is an empty
string or a zero time, no warnings are sent. Up to 10 times may be given. If a
-message has been on the queue for longer than the last time, the last interval
+message has been in the queue for longer than the last time, the last interval
between the times is used to compute subsequent warning times. For example,
with
.code
to handle IPv6 literal addresses.
+.new
+.option dkim_verify_hashes main "string list" "sha256 : sha512 : sha1"
+.cindex DKIM "selecting signature algorithms"
+This option gives a list of hash types which are acceptable in signatures,
+and an order of processing.
+Signatures with algorithms not in the list will be ignored.
+
+Note that the presence of sha1 violates RFC 8301.
+Signatures using the rsa-sha1 are however (as of writing) still common.
+The default inclusion of sha1 may be dropped in a future release.
+
+.option dkim_verify_keytypes main "string list" "ed25519 : rsa"
+This option gives a list of key types which are acceptable in signatures,
+and an order of processing.
+Signatures with algorithms not in the list will be ignored.
+
+.option dkim_verify_minimal main boolean false
+If set to true, verification of signatures will terminate after the
+first success.
+.wen
+
.option dkim_verify_signers main "domain list&!!" $dkim_signers
.cindex DKIM "controlling calls to the ACL"
This option gives a list of DKIM domains for which the DKIM ACL is run.
reversed and looked up in the reverse DNS, as described in more detail in
section &<<SECTverifyCSA>>&.
-.new
.option dns_cname_loops main integer 1
.cindex DNS "CNAME following"
This option controls the following of CNAME chains, needed if the resolver does
The default value of one CNAME-follow is needed
thanks to the observed return for an MX request,
given no MX presence but a CNAME to an A, of the CNAME.
-.wen
.option dns_dnssec_ok main integer -1
This is a fudge to help with name servers that give big delays or otherwise do
not work for the AAAA record type. In due course, when the world's name
servers have all been upgraded, there should be no need for this option.
+.new
+Note that all lookups, including those done for verification, are affected;
+this will result in verify failure for IPv6 connections or ones using names
+only valid for IPv6 addresses.
+.wen
.option dns_retrans main time 0s
used. See chapter &<<CHAPsecurity>>& for a discussion of security issues.
+.option exim_version main string "current version"
+.cindex "Exim version"
+.cindex customizing "version number"
+.cindex "version number of Exim" override
+This option allows to override the &$version_number$&/&$exim_version$& Exim reports in
+various places. Use with care, this may fool stupid security scanners.
+
+
.option extra_local_interfaces main "string list" unset
This option defines network interfaces that are to be considered local when
routing, but which are not used for listening by the daemon. See section
.option hold_domains main "domain list&!!" unset
.cindex "domain" "delaying delivery"
.cindex "delivery" "delaying certain domains"
-This option allows mail for particular domains to be held on the queue
+This option allows mail for particular domains to be held in the queue
manually. The option is overridden if a message delivery is forced with the
&%-M%&, &%-qf%&, &%-Rf%& or &%-Sf%& options, and also while testing or
verifying addresses using &%-bt%& or &%-bv%&. Otherwise, if a domain matches an
After a permanent delivery failure, bounce messages are frozen,
because there is no sender to whom they can be returned. When a frozen bounce
-message has been on the queue for more than the given time, it is unfrozen at
+message has been in the queue for more than the given time, it is unfrozen at
the next queue run, and a further delivery is attempted. If delivery fails
again, the bounce message is discarded. This makes it possible to keep failed
bounce messages around for a shorter time than the normal maximum retry time
&'Sender:'& header lines supplied by untrusted users, you must also set
&%local_sender_retain%& to be true.
+.cindex "envelope from"
.cindex "envelope sender"
These options affect only the header lines in the message. The envelope sender
is still forced to be the login id at the qualify domain unless
This option sets the path which is used to determine the names of Exim's log
files, or indicates that logging is to be to syslog, or both. It is expanded
when Exim is entered, so it can, for example, contain a reference to the host
-name. If no specific path is set for the log files at compile or run time,
-or if the option is unset at run time (i.e. &`log_file_path = `&)
+name. If no specific path is set for the log files at compile or runtime,
+or if the option is unset at runtime (i.e. &`log_file_path = `&)
they are written in a sub-directory called &_log_& in Exim's spool directory.
+.new
+A path must start with a slash.
+To send to syslog, use the word &"syslog"&.
+.wen
Chapter &<<CHAPlog>>& contains further details about Exim's logging, and
section &<<SECTwhelogwri>>& describes how the contents of &%log_file_path%& are
used. If this string is fixed at your installation (contains no expansion
transport driver.
-.option openssl_options main "string list" "+no_sslv2 +single_dh_use +no_ticket"
+.option openssl_options main "string list" "+no_sslv2 +no_sslv3 +single_dh_use +no_ticket"
.cindex "OpenSSL "compatibility options"
This option allows an administrator to adjust the SSL options applied
by OpenSSL to connections. It is given as a space-separated list of items,
that clients will use it; &"out of order"& commands that are &"expected"& do
not count as protocol errors (see &%smtp_max_synprot_errors%&).
+.new
+.option pipelining_connect_advertise_hosts main "host list&!!" *
+.cindex "pipelining" "early connection"
+.cindex "pipelining" PIPE_CONNECT
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+this option controls which hosts the facility is advertised to
+and from which pipeline early-connection (before MAIL) SMTP
+commands are acceptable.
+When used, the pipelining saves on roundtrip times.
+
+See also the &%hosts_pipe_connect%& smtp transport option.
+
+Currently the option name &"X_PIPE_CONNECT"& is used.
+.wen
+
.option prdr_enable main boolean false
.cindex "PRDR" "enabling on server"
.cindex "queueing incoming messages"
.cindex "message" "queueing unconditionally"
If &%queue_only%& is set, a delivery process is not automatically started
-whenever a message is received. Instead, the message waits on the queue for the
+whenever a message is received. Instead, the message waits in the queue for the
next queue run. Even if &%queue_only%& is false, incoming messages may not get
delivered immediately when certain conditions (such as heavy load) occur.
received, routing is performed, and local deliveries take place.
However, if any SMTP deliveries are required for domains that match
&%queue_smtp_domains%&, they are not immediately delivered, but instead the
-message waits on the queue for the next queue run. Since routing of the message
+message waits in the queue for the next queue run. Since routing of the message
has taken place, Exim knows to which remote hosts it must be delivered, and so
when the queue run happens, multiple messages for the same host are delivered
over a single SMTP connection. The &%-odqs%& command line option causes all
.cindex "timeout" "for non-SMTP input"
This option sets the timeout for accepting a non-SMTP message, that is, the
maximum time that Exim waits when reading a message on the standard input. If
-the value is zero, it will wait for ever. This setting is overridden by the
+the value is zero, it will wait forever. This setting is overridden by the
&%-or%& command line option. The timeout for incoming SMTP messages is
controlled by &%smtp_receive_timeout%&.
used. If the expansion yields an empty string, no &'Received:'& header line is
added to the message. Otherwise, the string should start with the text
&"Received:"& and conform to the RFC 2822 specification for &'Received:'&
-header lines. The default setting is:
+header lines.
+.new
+The default setting is:
.code
received_header_text = Received: \
${if def:sender_rcvhost {from $sender_rcvhost\n\t}\
- {${if def:sender_ident \
- {from ${quote_local_part:$sender_ident} }}\
- ${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\
+ {${if def:sender_ident \
+ {from ${quote_local_part:$sender_ident} }}\
+ ${if def:sender_helo_name {(helo=$sender_helo_name)\n\t}}}}\
by $primary_hostname \
- ${if def:received_protocol {with $received_protocol}} \
- ${if def:tls_in_cipher {($tls_in_cipher)\n\t}}\
+ ${if def:received_protocol {with $received_protocol }}\
+ ${if def:tls_in_cipher_std { tls $tls_in_cipher_std\n\t}}\
(Exim $version_number)\n\t\
${if def:sender_address \
{(envelope-from <$sender_address>)\n\t}}\
id $message_exim_id\
${if def:received_for {\n\tfor $received_for}}
.endd
+.wen
The reference to the TLS cipher is omitted when Exim is built without TLS
support. The use of conditional expansions ensures that this works for both
&%sender_unqualified_hosts%&, or if the message was submitted locally (not
using TCP/IP), and the &%-bnq%& option was not set.
-.option set_environment main "string list" empty
+.option add_environment main "string list" empty
.cindex "environment"
-This option allows to set individual environment variables that the
+This option allows to add individual environment variables that the
currently linked libraries and programs in child processes use. The
-default list is empty,
+default list is empty.
.option slow_lookup_log main integer 0
.cindex "message" "queueing by SMTP connection count"
If the number of simultaneous incoming SMTP connections being handled via the
listening daemon exceeds this value, messages received by SMTP are just placed
-on the queue; no delivery processes are started automatically. The count is
+in the queue; no delivery processes are started automatically. The count is
fixed at the start of an SMTP connection. It cannot be updated in the
subprocess that receives messages, and so the queueing or not queueing applies
to all messages received in the same connection.
automatically when receiving messages via SMTP, whether via the daemon or by
the use of &%-bs%& or &%-bS%&. If the value of the option is greater than zero,
and the number of messages received in a single SMTP session exceeds this
-number, subsequent messages are placed on the queue, but no delivery processes
+number, subsequent messages are placed in the queue, but no delivery processes
are started. This helps to limit the number of Exim processes when a server
restarts after downtime and there is a lot of mail waiting for it on other
systems. On large systems, the default should probably be increased, and on
When &%split_spool_directory%& is set, the behaviour of queue runner processes
changes. Instead of creating a list of all messages in the queue, and then
-trying to deliver each one in turn, it constructs a list of those in one
+trying to deliver each one, in turn, it constructs a list of those in one
sub-directory and tries to deliver them, before moving on to the next
sub-directory. The sub-directories are processed in a random order. This
spreads out the scanning of the input directories, and uses less memory. It is
-particularly beneficial when there are lots of messages on the queue. However,
+particularly beneficial when there are lots of messages in the queue. However,
if &%queue_run_in_order%& is set, none of this new processing happens. The
entire queue has to be scanned and sorted before any deliveries can start.
.cindex "frozen messages" "timing out"
.cindex "timeout" "frozen messages"
If &%timeout_frozen_after%& is set to a time greater than zero, a frozen
-message of any kind that has been on the queue for longer than the given time
+message of any kind that has been in the queue for longer than the given time
is automatically cancelled at the next queue run. If the frozen message is a
bounce message, it is just discarded; otherwise, a bounce is sent to the
sender, in a similar manner to cancellation by the &%-Mg%& command line option.
frozen message, see &%ignore_bounce_errors_after%&.
&*Note:*& the default value of zero means no timeouts; with this setting,
-frozen messages remain on the queue forever (except for any frozen bounce
+frozen messages remain in the queue forever (except for any frozen bounce
messages that are released by &%ignore_bounce_errors_after%&).
.cindex "TLS" "server certificate; location of"
.cindex "certificate" "server, location of"
The value of this option is expanded, and must then be a list of absolute paths to
-files which contains the server's certificates. Commonly only one file is
-needed.
+files which contain the server's certificates (in PEM format).
+Commonly only one file is needed.
The server's private key is also
assumed to be in this file if &%tls_privatekey%& is unset. See chapter
&<<CHAPTLS>>& for further details.
option in the relevant &(smtp)& transport.
&*Note*&: If you use filenames based on IP addresses, change the list
-separator in the usual way to avoid confusion under IPv6.
+separator in the usual way (&<<SECTlistsepchange>>&) to avoid confusion under IPv6.
&*Note*&: Under versions of OpenSSL preceding 1.1.1,
when a list of more than one
file is used, the &$tls_in_ourcert$& variable is unreliable.
-
-&*Note*&: OCSP stapling is not usable under OpenSSL
-when a list of more than one file is used.
+.new
+The macro "_TLS_BAD_MULTICERT_IN_OURCERT" will be defined for those versions.
+.wen
If the option contains &$tls_out_sni$& and Exim is built against OpenSSL, then
if the OpenSSL build supports TLS extensions and the TLS client sends the
The value of this option is expanded and indicates the source of DH parameters
to be used by Exim.
-&*Note: The Exim Maintainers strongly recommend using a filename with site-generated
+.new
+This option is ignored for GnuTLS version 3.6.0 and later.
+The library manages parameter negotiation internally.
+.wen
+
+&*Note: The Exim Maintainers strongly recommend,
+for other TLS library versions,
+using a filename with site-generated
local DH parameters*&, which has been supported across all versions of Exim. The
other specific constants available are a fallback so that even when
"unconfigured", Exim can offer Perfect Forward Secrecy in older ciphersuites in TLS.
Certificate Authority.
Usable for GnuTLS 3.4.4 or 3.3.17 or OpenSSL 1.1.0 (or later).
+.new
+The macro "_HAVE_TLS_OCSP" will be defined for those versions.
+.wen
-For GnuTLS 3.5.6 or later the expanded value of this option can be a list
+.new
+For OpenSSL 1.1.0 or later, and
+.wen
+for GnuTLS 3.5.6 or later the expanded value of this option can be a list
of files, to match a list given for the &%tls_certificate%& option.
The ordering of the two lists must match.
+.new
+The macro "_HAVE_TLS_OCSP_LIST" will be defined for those versions.
+.wen
+.new
+The file(s) should be in DER format,
+except for GnuTLS 3.6.3 or later
+or for OpenSSL,
+when an optional filetype prefix can be used.
+The prefix must be one of "DER" or "PEM", followed by
+a single space. If one is used it sets the format for subsequent
+files in the list; the initial format is DER.
+If multiple proofs are wanted, for multiple chain elements
+(this only works under TLS1.3)
+they must be coded as a combined OCSP response.
+
+Although GnuTLS will accept PEM files with multiple separate
+PEM blobs (ie. separate OCSP responses), it sends them in the
+TLS Certificate record interleaved with the certificates of the chain;
+although a GnuTLS client is happy with that, an OpenSSL client is not.
+.wen
.option tls_on_connect_ports main "string list" unset
.cindex SSMTP
.cindex "sender" "setting by untrusted user"
.cindex "untrusted user setting sender"
.cindex "user" "untrusted setting sender"
+.cindex "envelope from"
.cindex "envelope sender"
When an untrusted user submits a message to Exim using the standard input, Exim
normally creates an envelope sender address from the user's login and the
.cindex "customizing" "warning message"
This option defines a template file containing paragraphs of text to be used
for constructing the warning message which is sent by Exim when a message has
-been on the queue for a specified amount of time, as specified by
+been in the queue for a specified amount of time, as specified by
&%delay_warning%&. Details of the file's contents are given in chapter
&<<CHAPemsgcust>>&. See also &%bounce_message_file%&.
This makes the configuration file less messy, and also reduces the number of
lookups (though Exim does cache lookups).
+.new
+See also the &%set%& option below.
+.wen
+
.vindex "&$sender_address_data$&"
.vindex "&$address_data$&"
The &%address_data%& facility is also useful as a means of passing information
unless you really, really know what you are doing. See also the generic
transport option of the same name.
-.option dnssec_request_domains routers "domain list&!!" unset
+.option dnssec_request_domains routers "domain list&!!" *
.cindex "MX record" "security"
.cindex "DNSSEC" "MX lookup"
.cindex "security" "MX lookup"
.option errors_to routers string&!! unset
+.cindex "envelope from"
.cindex "envelope sender"
.cindex "router" "changing address for errors"
If a router successfully handles an address, it may assign the address to a
.cindex "fallback" "hosts specified on router"
String expansion is not applied to this option. The argument must be a
colon-separated list of host names or IP addresses. The list separator can be
-changed (see section &<<SECTlistconstruct>>&), and a port can be specified with
+changed (see section &<<SECTlistsepchange>>&), and a port can be specified with
each name or address. In fact, the format of each item is exactly the same as
defined for the list of hosts in a &(manualroute)& router (see section
&<<SECTformatonehostitem>>&).
.cindex "header lines" "adding"
.cindex "router" "adding header lines"
This option specifies a list of text headers,
-newline-separated (by default, changeable in the usual way),
+newline-separated (by default, changeable in the usual way &<<SECTlistsepchange>>&),
that is associated with any addresses that are accepted by the router.
Each item is separately expanded, at routing time. However, this
option has no effect when an address is just being verified. The way in which
.cindex "header lines" "removing"
.cindex "router" "removing header lines"
This option specifies a list of text headers,
-colon-separated (by default, changeable in the usual way),
+colon-separated (by default, changeable in the usual way &<<SECTlistsepchange>>&),
that is associated with any addresses that are accepted by the router.
Each item is separately expanded, at routing time. However, this
option has no effect when an address is just being verified. The way in which
through the &%require_files%& list, expanding each item separately.
Because the list is split before expansion, any colons in expansion items must
-be doubled, or the facility for using a different list separator must be used.
+be doubled, or the facility for using a different list separator must be used
+(&<<SECTlistsepchange>>&).
If any expansion is forced to fail, the item is ignored. Other expansion
failures cause routing of the address to be deferred.
these options are all expanded, you can use the &%exists%& expansion condition
to make such tests. The &%require_files%& option is intended for checking files
that the router may be going to use internally, or which are needed by a
-transport (for example &_.procmailrc_&).
+transport (e.g., &_.procmailrc_&).
During delivery, the &[stat()]& function is run as root, but there is a
facility for some checking of the accessibility of a file by another user.
be caused by a configuration error, and routing is deferred because the
existence or non-existence of the file cannot be determined. However, in some
circumstances it may be desirable to treat this condition as if the file did
-not exist. If the file name (or the exclamation mark that precedes the file
-name for non-existence) is preceded by a plus sign, the EACCES error is treated
+not exist. If the filename (or the exclamation mark that precedes the filename
+for non-existence) is preceded by a plus sign, the EACCES error is treated
as if the file did not exist. For example:
.code
require_files = +/some/file
This option controls whether the local part is used to form the key for retry
hints for addresses that suffer temporary errors while being handled by this
-router. The default value is true for any router that has &%check_local_user%&
+.new
+router. The default value is true for any router that has any of
+&%check_local_user%&,
+&%local_parts%&,
+&%condition%&,
+&%local_part_prefix%&,
+&%local_part_suffix%&,
+&%senders%& or
+&%require_files%&
+.wen
set, and false otherwise. Note that this option does not apply to hints keys
for transport delays; they are controlled by a generic transport option of the
same name.
+Failing to set this option when it is needed
+(because a remote router handles only some of the local-parts for a domain)
+can result in incorrect error messages being generated.
+
The setting of &%retry_use_local_part%& applies only to the router on which it
appears. If the router generates child addresses, they are routed
independently; this setting does not become attached to them.
matters.
+.new
+.option set routers "string list" unset
+.cindex router variables
+This option may be used multiple times on a router;
+because of this the list aspect is mostly irrelevant.
+The list separator is a semicolon but can be changed in the
+usual way.
+
+Each list-element given must be of the form $"name = value"$
+and the names used must start with the string &"r_"&.
+Values containing a list-separator should have them doubled.
+When a router runs, the strings are evaluated in order,
+to create variables which are added to the set associated with
+the address.
+The variable is set with the expansion of the value.
+The variables can be used by the router options
+(not including any preconditions)
+and by the transport.
+Later definitions of a given named variable will override former ones.
+Varible use is via the usual &$r_...$& syntax.
+
+This is similar to the &%address_data%& option, except that
+many independent variables can be used, with choice of naming.
+.wen
+
+
.option translate_ip_address routers string&!! unset
.cindex "IP address" "translating"
.cindex "packet radio"
If the list is written with spaces, it must be protected with quotes.
The format of each item
in the list is described in the next section. The list separator can be changed
-as described in section &<<SECTlistconstruct>>&.
+as described in section &<<SECTlistsepchange>>&.
If the list of hosts was obtained from a &%route_list%& item, the following
variables are set during its expansion:
described in the next section.
.endlist
-When a message is redirected to a file (a &"mail folder"&), the file name given
+When a message is redirected to a file (a &"mail folder"&), the filename given
in a non-filter redirection list must always be an absolute path. A filter may
generate a relative path &-- how this is handled depends on the transport's
configuration. See section &<<SECTfildiropt>>& for a discussion of this issue
.cindex "address redirection" "non-filter list items"
When the redirection data is not an Exim or Sieve filter, for example, if it
comes from a conventional alias or forward file, it consists of a list of
-addresses, file names, pipe commands, or certain special items (see section
+addresses, filenames, pipe commands, or certain special items (see section
&<<SECTspecitredli>>& below). The special items can be individually enabled or
disabled by means of options whose names begin with &%allow_%& or &%forbid_%&,
depending on their default values. The items in the list are separated by
.code
/home/world/minbari
.endd
-is treated as a file name, but
+is treated as a filename, but
.code
/s=molari/o=babylon/@x400gate.way
.endd
-is treated as an address. For a file name, a transport must be specified using
+is treated as an address. For a filename, a transport must be specified using
the &%file_transport%& option. However, if the generated path name ends with a
forward slash character, it is interpreted as a directory name rather than a
-file name, and &%directory_transport%& is used instead.
+filename, and &%directory_transport%& is used instead.
Normally, either the router or the transport specifies a user and a group under
which to run the delivery. The default is to use the Exim user and group.
During routing for message delivery (as opposed to verification), a redirection
containing &':fail:'& causes an immediate failure of the incoming address,
-whereas &':defer:'& causes the message to remain on the queue so that a
+whereas &':defer:'& causes the message to remain in the queue so that a
subsequent delivery attempt can happen at a later time. If an address is
deferred for too long, it will ultimately fail, because the normal retry
rules still apply.
ending in a slash is specified as a new &"address"&. The transport used is
specified by this option, which, after expansion, must be the name of a
configured transport. This should normally be an &(appendfile)& transport. When
-it is running, the file name is in &$address_file$&.
+it is running, the filename is in &$address_file$&.
.option filter_prepend_home redirect boolean true
.cindex "header lines" "adding in transport"
.cindex "transport" "header lines; adding"
This option specifies a list of text headers,
-newline-separated (by default, changeable in the usual way),
+newline-separated (by default, changeable in the usual way &<<SECTlistsepchange>>&),
which are (separately) expanded and added to the header
portion of a message as it is transported, as described in section
&<<SECTheadersaddrem>>&. Additional header lines can also be specified by
.cindex "header lines" "removing"
.cindex "transport" "header lines; removing"
This option specifies a list of header names,
-colon-separated (by default, changeable in the usual way);
+colon-separated (by default, changeable in the usual way &<<SECTlistsepchange>>&);
these headers are omitted from the message as it is transported, as described
in section &<<SECTheadersaddrem>>&. Header removal can also be specified by
routers.
.option return_path transports string&!! unset
.cindex "envelope sender"
+.cindex "envelope from"
.cindex "transport" "return path; changing"
.cindex "return path" "changing in transport"
If this option is set, the string is expanded at transport time and replaces
fileinto "folder23";
.endd
In this situation, the expansion of &%file%& or &%directory%& in the transport
-must transform the relative path into an appropriate absolute file name. In the
+must transform the relative path into an appropriate absolute filename. In the
case of Sieve filters, the name &'inbox'& must be handled. It is the name that
is used as a result of a &"keep"& action in the filter. This example shows one
way of handling this requirement:
The option must be set to one of the words &"anywhere"&, &"inhome"&, or
&"belowhome"&. In the second and third cases, a home directory must have been
-set for the transport. This option is not useful when an explicit file name is
-given for normal mailbox deliveries. It is intended for the case when file
-names are generated from users' &_.forward_& files. These are usually handled
+set for the transport. This option is not useful when an explicit filename is
+given for normal mailbox deliveries. It is intended for the case when filenames
+are generated from users' &_.forward_& files. These are usually handled
by an &(appendfile)& transport called &%address_file%&. See also
&%file_must_exist%&.
This option applies when one of the delivery modes that writes a separate file
for each message is being used. When Exim wants to find the size of one of
these files in order to test the quota, it first checks &%quota_size_regex%&.
-If this is set to a regular expression that matches the file name, and it
+If this is set to a regular expression that matches the filename, and it
captures one string, that string is interpreted as a representation of the
file's size. The value of &%quota_size_regex%& is not expanded.
This feature is useful only when users have no shell access to their mailboxes
&-- otherwise they could defeat the quota simply by renaming the files. This
facility can be used with maildir deliveries, by setting &%maildir_tag%& to add
-the file length to the file name. For example:
+the file length to the filename. For example:
.code
maildir_tag = ,S=$message_size
quota_size_regex = ,S=(\d+)
number of lines in the message.
The regular expression should not assume that the length is at the end of the
-file name (even though &%maildir_tag%& puts it there) because maildir MUAs
-sometimes add other information onto the ends of message file names.
+filename (even though &%maildir_tag%& puts it there) because maildir MUAs
+sometimes add other information onto the ends of message filenames.
Section &<<SECID136>>& contains further information.
+.new
+This option should not be used when other message-handling software
+may duplicate messages by making hardlinks to the files. When that is done Exim
+will count the message size once for each filename, in contrast with the actual
+disk usage. When the option is not set, calculating total usage requires
+a system-call per file to get the size; the number of links is then available also
+as is used to adjust the effective size.
+.wen
+
.option quota_warn_message appendfile string&!! "see below"
See below for the use of this option. If it is not set when
.option use_bsmtp appendfile boolean false
+.cindex "envelope from"
.cindex "envelope sender"
If this option is set true, &(appendfile)& writes messages in &"batch SMTP"&
format, with the envelope sender and recipient(s) included as SMTP commands. If
current time, primary host name, and process id added, by opening for writing
as a new file. If this fails with an access error, delivery is deferred.
.next
-Close the hitching post file, and hard link it to the lock file name.
+Close the hitching post file, and hard link it to the lock filename.
.next
If the call to &[link()]& succeeds, creation of the lock file has succeeded.
Unlink the hitching post name.
directory"&). If the delivery is successful, the file is renamed into the
&_new_& subdirectory.
-In the file name, <&'stime'&> is the current time of day in seconds, and
+In the filename, <&'stime'&> is the current time of day in seconds, and
<&'mtime'&> is the microsecond fraction of the time. After a maildir delivery,
Exim checks that the time-of-day clock has moved on by at least one microsecond
before terminating the delivery process. This guarantees uniqueness for the
-file name. However, as a precaution, Exim calls &[stat()]& for the file before
+filename. However, as a precaution, Exim calls &[stat()]& for the file before
opening it. If any response other than ENOENT (does not exist) is given,
Exim waits 2 seconds and tries again, up to &%maildir_retries%& times.
This does not apply to &'Cc:'& or &'Bcc:'& recipients.
If &%once%& is unset, or is set to an empty string, the message is always sent.
-By default, if &%once%& is set to a non-empty file name, the message
+By default, if &%once%& is set to a non-empty filename, the message
is not sent if a potential recipient is already listed in the database.
However, if the &%once_repeat%& option specifies a time greater than zero, the
message is sent if that much time has elapsed since a message was last sent to
.cindex "filter" "transport filter"
.vindex "&$pipe_addresses$&"
Special handling takes place when an argument consists of precisely the text
-&`$pipe_addresses`&. This is not a general expansion variable; the only
+&`$pipe_addresses`& (no quotes).
+This is not a general expansion variable; the only
place this string is recognized is when it appears as an argument for a pipe or
transport filter command. It causes each address that is being handled to be
inserted in the argument list at that point &'as a separate argument'&. This
avoids any problems with spaces or shell metacharacters, and is of use when a
&(pipe)& transport is handling groups of addresses in a batch.
-If &%force_command%& is enabled on the transport, Special handling takes place
+If &%force_command%& is enabled on the transport, special handling takes place
for an argument that consists of precisely the text &`$address_pipe`&. It
is handled similarly to &$pipe_addresses$& above. It is expanded and each
argument is inserted in the argument list at that point
.option dkim_canon smtp string&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_domain smtp string list&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_hash smtp string&!! sha256
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_identity smtp string&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_private_key smtp string&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_selector smtp string&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_strict smtp string&!! unset
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_sign_headers smtp string&!! "per RFC"
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option dkim_timestamps smtp string&!! unset
-DKIM signing options. For details see section &<<SECDKIMSIGN>>&.
+DKIM signing option. For details see section &<<SECDKIMSIGN>>&.
.option delay_after_cutoff smtp boolean true
details.
-.option dnssec_request_domains smtp "domain list&!!" unset
+.option dnssec_request_domains smtp "domain list&!!" *
.cindex "MX record" "security"
.cindex "DNSSEC" "MX lookup"
.cindex "security" "MX lookup"
.cindex "DNS" "DNSSEC"
DNS lookups for domains matching &%dnssec_request_domains%& will be done with
-the dnssec request bit set.
-This applies to all of the SRV, MX, AAAA, A lookup sequence.
+the dnssec request bit set. Setting this transport option is only useful if the
+transport overrides or sets the host names. See the &%dnssec_request_domains%&
+router option.
.cindex "security" "MX lookup"
.cindex "DNS" "DNSSEC"
DNS lookups for domains matching &%dnssec_require_domains%& will be done with
-the dnssec request bit set. Any returns not having the Authenticated Data bit
-(AD bit) set will be ignored and logged as a host-lookup failure.
-This applies to all of the SRV, MX, AAAA, A lookup sequence.
+the dnssec request bit set. Setting this transport option is only
+useful if the transport overrides or sets the host names. See the
+&%dnssec_require_domains%& router option.
Exim will not use the SMTP PIPELINING extension when delivering to any host
that matches this list, even if the server host advertises PIPELINING support.
+.new
+.option hosts_pipe_connect smtp "host list&!!" unset
+.cindex "pipelining" "early connection"
+.cindex "pipelining" PIPE_CONNECT
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+this option controls which to hosts the facility watched for
+and recorded, and used for subsequent connections.
+
+The retry hints database is used for the record,
+and records are subject to the &%retry_data_expire%& option.
+When used, the pipelining saves on roundtrip times.
+It also turns SMTP into a client-first protocol
+so combines well with TCP Fast Open.
+
+See also the &%pipelining_connect_advertise_hosts%& main option.
+
+Note:
+When the facility is used, the transport &%helo_data%& option
+will be expanded before the &$sending_ip_address$& variable
+is filled in.
+A check is made for the use of that variable, without the
+presence of a &"def:"& test on it, but suitably complex coding
+can avoid the check and produce unexpected results.
+You have been warned.
+.wen
+
.option hosts_avoid_tls smtp "host list&!!" unset
.cindex "TLS" "avoiding for certain hosts"
message on the same connection. See section &<<SECTmulmessam>>& for an
explanation of when this might be needed.
-.option hosts_noproxy_tls smtp "host list&!!" *
+.new
+.option hosts_noproxy_tls smtp "host list&!!" unset
.cindex "TLS" "passing connection"
.cindex "multiple SMTP deliveries"
.cindex "TLS" "multiple message deliveries"
For any host that matches this list, a TLS session which has
been started will not be passed to a new delivery process for sending another
message on the same session.
+.wen
The traditional implementation closes down TLS and re-starts it in the new
process, on the same open TCP connection, for each successive message
.cindex DANE "requiring for certain servers"
If built with DANE support, Exim will require that a DNSSEC-validated
TLSA record is present for any host matching the list,
-and that a DANE-verified TLS connection is made.
+and that a DANE-verified TLS connection is made. See
+the &%dnssec_request_domains%& router and transport options.
There will be no fallback to in-clear communication.
See section &<<SECDANE>>&.
CHUNKING support, Exim will attempt to use BDAT commands rather than DATA.
BDAT will not be used in conjunction with a transport filter.
-.option hosts_try_dane smtp "host list&!!" unset
+.option hosts_try_dane smtp "host list&!!" *
.cindex DANE "transport options"
.cindex DANE "attempting for certain servers"
-If built with DANE support, Exim will lookup a
-TLSA record for any host matching the list.
-If found and verified by DNSSEC,
-a DANE-verified TLS connection is made to that host;
-there will be no fallback to in-clear communication.
+If built with DANE support, Exim will require that a DNSSEC-validated
+TLSA record is present for any host matching the list,
+and that a DANE-verified TLS connection is made. See
+the &%dnssec_request_domains%& router and transport options.
+There will be no fallback to in-clear communication.
See section &<<SECDANE>>&.
-.option hosts_try_fastopen smtp "host list&!!" unset
+.option hosts_try_fastopen smtp "host list&!!" *
.cindex "fast open, TCP" "enabling, in client"
.cindex "TCP Fast Open" "enabling, in client"
.cindex "RFC 7413" "TCP Fast Open"
during the expansion of the string. Forced expansion failure, or an empty
string result causes the option to be ignored. Otherwise, after expansion, the
string must be a list of IP addresses, colon-separated by default, but the
-separator can be changed in the usual way. For example:
+separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+For example:
.code
interface = <; 192.168.123.123 ; 3ffe:ffff:836f::fe86:a061
.endd
If the expansion fails, or if a port number cannot be found, delivery
is deferred.
-.new
Note that at least one Linux distribution has been seen failing
to put &"smtps"& in its &"/etc/services"& file, resulting is such deferrals.
-.wen
If this option is set to &"smtps"&, the default value for the &%port%& option
changes to &"smtps"&, and the transport initiates TLS immediately after
connecting, as an outbound SSL-on-connect, instead of using STARTTLS to upgrade.
-.new
The Internet standards bodies used to strongly discourage use of this mode,
but as of RFC 8314 it is perferred over STARTTLS for message submission
(as distinct from MTA-MTA communication).
-.wen
.option retry_include_ip_address smtp boolean&!! true
If both this option and &%tls_try_verify_hosts%& are unset
operation is as if this option selected all hosts.
-.new
.option utf8_downconvert smtp integer!! unset
.cindex utf8 "address downconversion"
.cindex i18n "utf8 address downconversion"
this option controls conversion of UTF-8 in message addresses
to a-label form.
For details see section &<<SECTi18nMTA>>&.
-.wen
rewriting is applied immediately to child addresses that are generated by
redirection, unless &%no_rewrite%& is set on the router.
+.cindex "envelope from"
.cindex "envelope sender" "rewriting at transport time"
.cindex "rewriting" "at transport time"
.cindex "header lines" "rewriting at transport time"
.section "Testing the rewriting rules that apply on input" "SECID149"
.cindex "rewriting" "testing"
.cindex "testing" "rewriting"
-Exim's input rewriting configuration appears in a part of the run time
+Exim's input rewriting configuration appears in a part of the runtime
configuration file headed by &"begin rewrite"&. It can be tested by the
&%-brw%& command line option. This takes an address (which can be a full RFC
2822 address) as its argument. The output is a list of how the address would be
its delivery when others to the same address get through. In this situation,
because some messages are successfully delivered, the &"retry clock"& for the
host or address keeps getting reset by the successful deliveries, and so
-failing messages remain on the queue for ever because the cutoff time is never
+failing messages remain in the queue for ever because the cutoff time is never
reached.
Two exceptional actions are applied to prevent this happening. The first
.chapter "SMTP authentication" "CHAPSMTPAUTH"
.scindex IIDauthconf1 "SMTP" "authentication configuration"
.scindex IIDauthconf2 "authentication"
-The &"authenticators"& section of Exim's run time configuration is concerned
+The &"authenticators"& section of Exim's runtime configuration is concerned
with SMTP authentication. This facility is an extension to the SMTP protocol,
described in RFC 2554, which allows a client SMTP host to authenticate itself
to a server. This is a common way for a server to recognize clients that are
AUTH_CRAM_MD5=yes
AUTH_CYRUS_SASL=yes
AUTH_DOVECOT=yes
+AUTH_EXTERNAL=yes
AUTH_GSASL=yes
AUTH_HEIMDAL_GSSAPI=yes
AUTH_PLAINTEXT=yes
the Cyrus SASL authentication library.
The third is an interface to Dovecot's authentication system, delegating the
work via a socket interface.
-The fourth provides an interface to the GNU SASL authentication library, which
+.new
+The fourth provides for negotiation of authentication done via non-SMTP means,
+as defined by RFC 4422 Appendix A.
+.wen
+The fifth provides an interface to the GNU SASL authentication library, which
provides mechanisms but typically not data sources.
-The fifth provides direct access to Heimdal GSSAPI, geared for Kerberos, but
+The sixth provides direct access to Heimdal GSSAPI, geared for Kerberos, but
supporting setting a server keytab.
-The sixth can be configured to support
+The seventh can be configured to support
the PLAIN authentication mechanism (RFC 2595) or the LOGIN mechanism, which is
-not formally documented, but used by several MUAs. The seventh authenticator
+not formally documented, but used by several MUAs.
+The eighth authenticator
supports Microsoft's &'Secure Password Authentication'& mechanism.
-The eighth is an Exim authenticator but not an SMTP one;
+The last is an Exim authenticator but not an SMTP one;
instead it can use information from a TLS negotiation.
The authenticators are configured using the same syntax as other drivers (see
.cindex authentication "expansion item"
Successful authentication sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
then so can the &(cyrus_sasl)& authenticator. By default it uses the public
name of the driver to determine which mechanism to support.
-Where access to some kind of secret file is required, for example in GSSAPI
+Where access to some kind of secret file is required, for example, in GSSAPI
or CRAM-MD5, it is worth noting that the authenticator runs as the Exim
user, and that the Cyrus SASL library has no way of escalating privileges
by default. You may also find you need to set environment variables,
made that any particular new authentication mechanism will be supported
without code changes in Exim.
+Exim's &(gsasl)& authenticator does not have client-side support at this
+time; only the server-side support is implemented. Patches welcome.
+
.option server_channelbinding gsasl boolean false
Do not set this true without consulting a cryptographic engineer.
+. ////////////////////////////////////////////////////////////////////////////
+. ////////////////////////////////////////////////////////////////////////////
+
+.chapter "The external authenticator" "CHAPexternauth"
+.scindex IIDexternauth1 "&(external)& authenticator"
+.scindex IIDexternauth2 "authenticators" "&(external)&"
+.cindex "authentication" "Client Certificate"
+.cindex "authentication" "X509"
+.cindex "Certificate-based authentication"
+The &(external)& authenticator provides support for
+authentication based on non-SMTP information.
+The specification is in RFC 4422 Appendix A
+(&url(https://tools.ietf.org/html/rfc4422)).
+It is only a transport and negotiation mechanism;
+the process of authentication is entirely controlled
+by the server configuration.
+
+The client presents an identity in-clear.
+It is probably wise for a server to only advertise,
+and for clients to only attempt,
+this authentication method on a secure (eg. under TLS) connection.
+
+One possible use, compatible with the
+K-9 Mail Andoid client (&url(https://k9mail.github.io/)),
+is for using X509 client certificates.
+
+It thus overlaps in function with the TLS authenticator
+(see &<<CHAPtlsauth>>&)
+but is a full SMTP SASL authenticator
+rather than being implicit for TLS-connection carried
+client certificates only.
+
+The examples and discussion in this chapter assume that
+client-certificate authentication is being done.
+
+The client must present a certificate,
+for which it must have been requested via the
+&%tls_verify_hosts%& or &%tls_try_verify_hosts%& main options
+(see &<<CHAPTLS>>&).
+For authentication to be effective the certificate should be
+verifiable against a trust-anchor certificate known to the server.
+
+.section "External options" "SECTexternsoptions"
+.cindex "options" "&(external)& authenticator (server)"
+The &(external)& authenticator has two server options:
+
+.option server_param2 external string&!! unset
+.option server_param3 external string&!! unset
+.cindex "variables (&$auth1$& &$auth2$& etc)" "in &(external)& authenticator"
+These options are expanded before the &%server_condition%& option
+and the result are placed in &$auth2$& and &$auth3$& resectively.
+If the expansion is forced to fail, authentication fails. Any other expansion
+failure causes a temporary error code to be returned.
+
+They can be used to clarify the coding of a complex &%server_condition%&.
+
+.section "Using external in a server" "SECTexternserver"
+.cindex "AUTH" "in &(external)& authenticator"
+.cindex "numerical variables (&$1$& &$2$& etc)" &&&
+ "in &(external)& authenticator"
+.vindex "&$auth1$&, &$auth2$&, etc"
+.cindex "base64 encoding" "in &(external)& authenticator"
+
+When running as a server, &(external)& performs the authentication test by
+expanding a string. The data sent by the client with the AUTH command, or in
+response to subsequent prompts, is base64 encoded, and so may contain any byte
+values when decoded. The decoded value is treated as
+an identity for authentication and
+placed in the expansion variable &$auth1$&.
+
+For compatibility with previous releases of Exim, the value is also placed in
+the expansion variable &$1$&. However, the use of this
+variable for this purpose is now deprecated, as it can lead to confusion in
+string expansions that also use them for other things.
+
+.vindex "&$authenticated_id$&"
+Once an identity has been received,
+&%server_condition%& is expanded. If the expansion is forced to fail,
+authentication fails. Any other expansion failure causes a temporary error code
+to be returned. If the result of a successful expansion is an empty string,
+&"0"&, &"no"&, or &"false"&, authentication fails. If the result of the
+expansion is &"1"&, &"yes"&, or &"true"&, authentication succeeds and the
+generic &%server_set_id%& option is expanded and saved in &$authenticated_id$&.
+For any other result, a temporary error code is returned, with the expanded
+string as the error text.
+
+Example:
+.code
+ext_ccert_san_mail:
+ driver = external
+ public_name = EXTERNAL
+
+ server_advertise_condition = $tls_in_certificate_verified
+ server_param2 = ${certextract {subj_altname,mail,>:} \
+ {$tls_in_peercert}}
+ server_condition = ${if forany {$auth2} \
+ {eq {$item}{$auth1}}}
+ server_set_id = $auth1
+.endd
+This accepts a client certificate that is verifiable against any
+of your configured trust-anchors
+(which usually means the full set of public CAs)
+and which has a mail-SAN matching the claimed identity sent by the client.
+
+Note that, up to TLS1.2, the client cert is on the wire in-clear, including the SAN,
+The account name is therefore guessable by an opponent.
+TLS 1.3 protects both server and client certificates, and is not vulnerable
+in this way.
+Likewise, a traditional plaintext SMTP AUTH done inside TLS is not.
+
+
+.section "Using external in a client" "SECTexternclient"
+.cindex "options" "&(external)& authenticator (client)"
+The &(external)& authenticator has one client option:
+
+.option client_send external string&!! unset
+This option is expanded and sent with the AUTH command as the
+identity being asserted.
+
+Example:
+.code
+ext_ccert:
+ driver = external
+ public_name = EXTERNAL
+
+ client_condition = ${if !eq{$tls_out_cipher}{}}
+ client_send = myaccount@smarthost.example.net
+.endd
+
+
+.ecindex IIDexternauth1
+.ecindex IIDexternauth2
+
+
+
+
+
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
.code
USE_GNUTLS=yes
.endd
-in Local/Makefile, in addition to
-.code
-SUPPORT_TLS=yes
-.endd
-You must also set TLS_LIBS and TLS_INCLUDE appropriately, so that the
+in Local/Makefile
+you must also set TLS_LIBS and TLS_INCLUDE appropriately, so that the
include files and libraries for GnuTLS can be found.
There are some differences in usage when using GnuTLS instead of OpenSSL:
.oindex "&%tls_require_ciphers%&" "OpenSSL"
There is a function in the OpenSSL library that can be passed a list of cipher
suites before the cipher negotiation takes place. This specifies which ciphers
-.new
are acceptable for TLS versions prior to 1.3.
-.wen
The list is colon separated and may contain names like
DES-CBC3-SHA. Exim passes the expanded value of &%tls_require_ciphers%&
directly to this function call.
tls_require_ciphers = ECDSA:RSA:!COMPLEMENTOFDEFAULT
.endd
-.new
For TLS version 1.3 the control available is less fine-grained
and Exim does not provide access to it at present.
The value of the &%tls_require_ciphers%& option is ignored when
.code
TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
.endd
-.wen
.section "Requiring specific ciphers or other parameters in GnuTLS" &&&
-.section "Configuring an Exim client to use TLS" "SECID185"
+.section "Configuring an Exim client to use TLS" "SECTclientTLS"
.cindex "cipher" "logging"
.cindex "log" "TLS cipher"
.cindex "log" "distinguished name"
if it requests it. If the server is Exim, it will request a certificate only if
&%tls_verify_hosts%& or &%tls_try_verify_hosts%& matches the client.
+.new
+Do not use a certificate which has the OCSP-must-staple extension,
+for client use (they are usable for server use).
+As TLS has no means for the client to staple before TLS 1.3 it will result
+in failed connections.
+.wen
+
If the &%tls_verify_certificates%& option is set on the &(smtp)& transport, it
specifies a collection of expected server certificates.
These may be
attacks in the string (&`../`& or SQL), and ensuring that a valid filename
can always be referenced; it is important to remember that &$tls_in_sni$& is
arbitrary unverified data provided prior to authentication.
-Further, the initial certificate is loaded before SNI is arrived, so
+Further, the initial certificate is loaded before SNI has arrived, so
an expansion for &%tls_certificate%& must have a default which is used
when &$tls_in_sni$& is empty.
in &_Local/Makefile_&.
If it has been included, the macro "_HAVE_DANE" will be defined.
-The TLSA record for the server may have "certificate usage" of DANE-TA(2) or DANE-EE(3).
+A TLSA record consist of 4 fields, the "Certificate Usage", the
+"Selector", the "Matching type", and the "Certificate Association Data".
+For a detailed description of the TLSA record see
+&url(https://tools.ietf.org/html/rfc7671#page-5,RFC 7671).
+
+The TLSA record for the server may have "Certificate Usage" (1st) field of DANE-TA(2) or DANE-EE(3).
These are the "Trust Anchor" and "End Entity" variants.
The latter specifies the End Entity directly, i.e. the certificate involved is that of the server
(and if only DANE-EE is used then it should be the sole one transmitted during the TLS handshake);
all of which point to a single TLSA record.
DANE-TA and DANE-EE can both be used together.
-.new
Our recommendation is to use DANE with a certificate from a public CA,
because this enables a variety of strategies for remote clients to verify
your certificate.
If you're not already using a private CA, or it doesn't meet these
requirements, then we encourage you to avoid all these issues and use a public
CA such as &url(https://letsencrypt.org/,Let's Encrypt) instead.
-.wen
-The TLSA record should have a Selector field of SPKI(1) and a Matching Type field of SHA2-512(2).
+The TLSA record should have a "Selector" (2nd) field of SPKI(1) and
+a "Matching Type" (3rd) field of SHA2-512(2).
-At the time of writing, &url(https://www.huque.com/bin/gen_tlsa)
-is useful for quickly generating TLSA records; and commands like
+For the "Certificate Authority Data" (4th) field, commands like
.code
- openssl x509 -in -pubkey -noout <certificate.pem \
+ openssl x509 -pubkey -noout <certificate.pem \
| openssl rsa -outform der -pubin 2>/dev/null \
| openssl sha512 \
| awk '{print $2}'
.endd
-are workable for 4th-field hashes.
+are workable to create a hash of the certificate's public key.
+
+An example TLSA record for DANE-EE(3), SPKI(1), and SHA-512 (2) looks like
+
+.code
+ _25._tcp.mail.example.com. TLSA 3 1 2 8BA8A336E...
+.endd
+
+At the time of writing, &url(https://www.huque.com/bin/gen_tlsa)
+is useful for quickly generating TLSA records.
+
For use with the DANE-TA model, server certificates must have a correct name (SubjectName or SubjectAltName).
-.new
The Certificate issued by the CA published in the DANE-TA model should be
issued using a strong hash algorithm.
Exim, and importantly various other MTAs sending to you, will not
libraries.
This means no MD5 and no SHA-1. SHA2-256 is the minimum for reliable
interoperability (and probably the maximum too, in 2018).
-.wen
The use of OCSP-stapling should be considered, allowing for fast revocation of certificates (which would otherwise
be limited by the DNS TTL on the TLSA records). However, this is likely to only be usable with DANE-TA. NOTE: the
For client-side DANE there are three new smtp transport options, &%hosts_try_dane%&, &%hosts_require_dane%&
and &%dane_require_tls_ciphers%&.
-The require variant will result in failure if the target host is not DNSSEC-secured.
+The require variant will result in failure if the target host is not
+DNSSEC-secured. To get DNSSEC-secured hostname resolution, use
+the &%dnssec_request_domains%& router or transport option.
DANE will only be usable if the target host has DNSSEC-secured MX, A and TLSA records.
If DANE is not usable, whether requested or not, and CA-anchored
verification evaluation is wanted, the above variables should be set appropriately.
-Currently the &%dnssec_request_domains%& must be active and &%dnssec_require_domains%& is ignored.
+The router and transport option &%dnssec_request_domains%& must not be
+set to "never" and &%dnssec_require_domains%& is ignored.
If verification was successful using DANE then the "CV" item in the delivery log line will show as "CV=dane".
.cindex "control of incoming mail"
.cindex "message" "controlling incoming"
.cindex "policy control" "access control lists"
-Access Control Lists (ACLs) are defined in a separate section of the run time
+Access Control Lists (ACLs) are defined in a separate section of the runtime
configuration file, headed by &"begin acl"&. Each ACL definition starts with a
name, terminated by a colon. Here is a complete ACL section that contains just
one very small ACL:
is &"yes"&.
Any required difference in behaviour of the main DATA-time
ACL should however depend on the PRDR-time ACL having run, as Exim
-will avoid doing so in some situations (e.g. single-recipient mails).
+will avoid doing so in some situations (e.g. single-recipient mails).
See also the &%prdr_enable%& global option
and the &%hosts_try_prdr%& smtp transport option.
string, Exim searches for an ACL as follows:
.ilist
-If the string begins with a slash, Exim uses it as a file name, and reads its
+If the string begins with a slash, Exim uses it as a filename, and reads its
contents as an ACL. The lines are processed in the same way as lines in the
Exim configuration file. In particular, continuation lines are supported, blank
lines are ignored, as are lines whose first non-whitespace character is &"#"&.
.cindex "&ACL;" "virus scanning"
.cindex "&ACL;" "scanning for viruses"
This condition is available only when Exim is compiled with the
-content-scanning extension. It causes the incoming message to be scanned for
+content-scanning extension
+and only after a DATA command.
+It causes the incoming message to be scanned for
viruses. For details, see chapter &<<CHAPexiscan>>&.
.vitem &*mime_regex&~=&~*&<&'list&~of&~regular&~expressions'&>
attempt to verify the HELO/EHLO contents, it is carried out when this
condition is encountered. See the description of the &%helo_verify_hosts%& and
&%helo_try_verify_hosts%& options for details of how to request verification
-independently of this condition.
+independently of this condition, and for detail of the verification.
For SMTP input that does not come over TCP/IP (the &%-bs%& command line
option), this condition is always true.
-.vitem &*verify&~=&~not_blind*&
+.vitem &*verify&~=&~not_blind/*&<&'options'&>
.cindex "verifying" "not blind"
.cindex "bcc recipients, verifying none"
This condition checks that there are no blind (bcc) recipients in the message.
&'Resent-Cc:'& header lines exist, they are also checked. This condition can be
used only in a DATA or non-SMTP ACL.
+.new
+There is one possible option, &`case_insensitive`&. If this is present then
+local parts are checked case-insensitively.
+.wen
+
There are, of course, many legitimate messages that make use of blind (bcc)
recipients. This check should not be used on its own for blocking messages.
.section "DNS lists keyed on domain names" "SECID202"
.cindex "DNS list" "keyed by domain name"
There are some lists that are keyed on domain names rather than inverted IP
-addresses. No reversing of components is used
+addresses (see, e.g., the &'domain based zones'& link at
+&url(http://www.rfc-ignorant.org/)). No reversing of components is used
with these lists. You can change the name that is looked up in a DNS list by
listing it after the domain name, introduced by a slash. For example,
.code
ACL.
Each &%ratelimit%& condition can have up to four options. A &%per_*%& option
-specifies what Exim measures the rate of, for example messages or recipients
+specifies what Exim measures the rate of, for example, messages or recipients
or bytes. You can adjust the measurement using the &%unique=%& and/or
&%count=%& options. You can also control when Exim updates the recorded rate
using a &%strict%&, &%leaky%&, or &%readonly%& option. The options are
The &%leaky%& (default) option means that the client's recorded rate is not
updated if it is above the limit. The effect of this is that Exim measures the
client's average rate of successfully sent email,
-.new
up to the given limit.
This is appropriate if the countermeasure when the condition is true
consists of refusing the message, and
is generally the better choice if you have clients that retry automatically.
If the action when true is anything more complex then this option is
likely not what is wanted.
-.wen
The &%strict%& option means that the client's recorded rate is always
updated. The effect of this is that Exim measures the client's average rate
The main use of these variables is expected to be to distinguish between
rejections of MAIL and rejections of RCPT in callouts.
-.new
The above variables may also be set after a &*successful*&
address verification to:
.ilist
&%random%&: A random local-part callout succeeded
.endlist
-.wen
specialized interfaces for &"daemon"& type virus scanners, which are resident
in memory and thus are much faster.
+.new
+Since message data needs to have arrived,
+the condition may be only called in ACL defined by
+&%acl_smtp_data%&,
+&%acl_smtp_data_prdr%&,
+&%acl_smtp_mime%& or
+&%acl_smtp_dkim%&
+.wen
+
A timeout of 2 minutes is applied to a scanner call (by default);
if it expires then a defer action is taken.
condition succeeds if a virus is found and its name matches the regular
expression. This allows you to take special actions on certain types of virus.
Note that &"/"& characters in the RE must be doubled due to the list-processing,
-unless the separator is changed (in the usual way).
+unless the separator is changed (in the usual way &<<SECTlistsepchange>>&).
.endlist
You can append a &`defer_ok`& element to the &%malware%& argument list to accept
you must set the &%spamd_address%& option in the global part of the Exim
configuration as follows (example):
.code
-spamd_address = 192.168.99.45 387
+spamd_address = 192.168.99.45 783
.endd
The SpamAssassin protocol relies on a TCP half-close from the client.
If your SpamAssassin client side is running a Linux system with an
As of version 2.60, &%SpamAssassin%& also supports communication over UNIX
sockets. If you want to us these, supply &%spamd_address%& with an absolute
-file name instead of an address/port pair:
+filename instead of an address/port pair:
.code
spamd_address = /var/run/spamd_socket
.endd
You can have multiple &%spamd%& servers to improve scalability. These can
reside on other hardware reachable over the network. To specify multiple
&%spamd%& servers, put multiple address/port pairs in the &%spamd_address%&
-option, separated with colons (the separator can be changed in the usual way):
+option, separated with colons (the separator can be changed in the usual way &<<SECTlistsepchange>>&):
.code
spamd_address = 192.168.2.10 783 : \
192.168.2.11 783 : \
Unix and TCP socket specifications may be mixed in any order.
Each element of the list is a list itself, space-separated by default
-and changeable in the usual way; take care to not double the separator.
+and changeable in the usual way (&<<SECTlistsepchange>>&);
+take care to not double the separator.
For TCP socket specifications a host name or IP (v4 or v6, but
subject to list-separator quoting rules) address can be used,
.vlist
.vitem &$spam_score$&
-The spam score of the message, for example &"3.4"& or &"30.5"&. This is useful
+The spam score of the message, for example, &"3.4"& or &"30.5"&. This is useful
for inclusion in log or reject messages.
.vitem &$spam_score_int$&
.next
The string &"default"&. In that case, the file is put in the temporary
&"default"& directory <&'spool_directory'&>&_/scan/_&<&'message_id'&>&_/_& with
-a sequential file name consisting of the message id and a sequence number. The
+a sequential filename consisting of the message id and a sequence number. The
full path and name is available in &$mime_decoded_filename$& after decoding.
.next
A full path name starting with a slash. If the full name is an existing
directory, it is used as a replacement for the default directory. The filename
is then sequentially assigned. If the path does not exist, it is used as
-the full path and file name.
+the full path and filename.
.next
If the string does not start with a slash, it is used as the
filename, and the default path is then used.
.vitem &$mime_decoded_filename$&
This variable is set only after the &%decode%& modifier (see above) has been
-successfully run. It contains the full path and file name of the file
+successfully run. It contains the full path and filename of the file
containing the decoded data.
.endlist
.endd
.vitem &$mime_is_multipart$&
This variable has the value 1 (true) when the current part has the main type
-&"multipart"&, for example &"multipart/alternative"& or &"multipart/mixed"&.
+&"multipart"&, for example, &"multipart/alternative"& or &"multipart/mixed"&.
Since multipart entities only serve as containers for other parts, you may not
want to carry out specific actions on them.
.cindex "&[local_scan()]& function" "building Exim to use"
To make use of the local scan function feature, you must tell Exim where your
function is before building Exim, by setting
-.new
both HAVE_LOCAL_SCAN and
-.wen
LOCAL_SCAN_SOURCE in your
&_Local/Makefile_&. A recommended place to put it is in the &_Local_&
directory, so you might set
commented template function (that just accepts the message) in the file
_src/local_scan.c_.
-If you want to make use of Exim's run time configuration file to set options
+If you want to make use of Exim's runtime configuration file to set options
for your &[local_scan()]& function, you must also set
.code
LOCAL_SCAN_HAS_OPTIONS=yes
.section "API for local_scan()" "SECTapiforloc"
.cindex "&[local_scan()]& function" "API description"
+.cindex &%dlfunc%& "API description"
You must include this line near the start of your code:
.code
#include "local_scan.h"
.section "Setting an errors address in a system filter" "SECID217"
+.cindex "envelope from"
.cindex "envelope sender"
In a system filter, if a &%deliver%& command is followed by
.code
.cindex "sender" "address"
.oindex "&%uucp_from_pattern%&"
.oindex "&%uucp_from_sender%&"
+.cindex "envelope from"
.cindex "envelope sender"
.cindex "Sendmail compatibility" "&""From""& line"
Messages that have come from UUCP (and some other applications) often begin
.chapter "Customizing bounce and warning messages" "CHAPemsgcust" &&&
"Customizing messages"
-When a message fails to be delivered, or remains on the queue for more than a
+When a message fails to be delivered, or remains in the queue for more than a
configured amount of time, Exim sends a message to the original sender, or
to an alternative configured address. The text of these messages is built into
the code of Exim, but it is possible to change it, either by adding a single
<$sender_address>
}}has not been delivered to all of its recipients after
-more than $warn_message_delay on the queue on $primary_hostname.
+more than $warn_message_delay in the queue on $primary_hostname.
The message identifier is: $message_exim_id
The subject of the message is: $h_subject
routers are tried, and so the whole delivery fails.
The &%forbid_pipe%& and &%forbid_file%& options prevent a local part from being
-expanded into a file name or a pipe delivery, which is usually inappropriate in
+expanded into a filename or a pipe delivery, which is usually inappropriate in
a mailing list.
.oindex "&%errors_to%&"
.section "Variable Envelope Return Paths (VERP)" "SECTverp"
.cindex "VERP"
.cindex "Variable Envelope Return Paths"
+.cindex "envelope from"
.cindex "envelope sender"
Variable Envelope Return Paths &-- see &url(https://cr.yp.to/proto/verp.txt) &--
are a way of helping mailing list administrators discover which subscription
setting ensures that if the lookup fails (leading to &%data%& being an empty
string), Exim gives up on the address without trying any subsequent routers.
-This one router can handle all the virtual domains because the alias file names
+This one router can handle all the virtual domains because the alias filenames
follow a fixed pattern. Permissions can be arranged so that appropriate people
can edit the different alias files. A successful aliasing operation results in
a new envelope recipient address, which is then routed from scratch.
.section "Exim on the upstream server host" "SECID247"
It is tempting to arrange for incoming mail for the intermittently connected
-host to remain on Exim's queue until the client connects. However, this
+host to remain in Exim's queue until the client connects. However, this
approach does not scale very well. Two different kinds of waiting message are
being mixed up in the same queue &-- those that cannot be delivered because of
some temporary problem, and those that are waiting for their destination host
Linux this has been seen to make syslog take 90% plus of CPU time.
The destination for Exim's logs is configured by setting LOG_FILE_PATH in
-&_Local/Makefile_& or by setting &%log_file_path%& in the run time
+&_Local/Makefile_& or by setting &%log_file_path%& in the runtime
configuration. This latter string is expanded, so it can contain, for example,
references to the host name:
.code
log_file_path = /var/log/$primary_hostname/exim_%slog
.endd
It is generally advisable, however, to set the string in &_Local/Makefile_&
-rather than at run time, because then the setting is available right from the
+rather than at runtime, because then the setting is available right from the
start of Exim's execution. Otherwise, if there's something it wants to log
before it has read the configuration file (for example, an error in the
configuration file) it will not use the path you want, and may not be able to
.code
log_file_path = $spool_directory/log/%slog
.endd
-If you do not specify anything at build time or run time,
-or if you unset the option at run time (i.e. &`log_file_path = `&),
+If you do not specify anything at build time or runtime,
+or if you unset the option at runtime (i.e. &`log_file_path = `&),
that is where the logs are written.
-A log file path may also contain &`%D`& or &`%M`& if datestamped log file names
+A log file path may also contain &`%D`& or &`%M`& if datestamped log filenames
are in use &-- see section &<<SECTdatlogfil>>& below.
Here are some examples of possible settings:
&`F `& sender address (on delivery lines)
&`H `& host name and IP address
&`I `& local interface used
-&`id `& message id for incoming message
+&`id `& message id (from header) for incoming message
&`K `& CHUNKING extension used
&`L `& on &`<=`& and &`=>`& lines: PIPELINING extension used
&`M8S `& 8BITMIME status for incoming message
&` incoming_port `& remote port on <= lines
&`*lost_incoming_connection `& as it says (includes timeouts)
&` millisec `& millisecond timestamps and RT,QT,DT,D times
+&`*msg_id `& on <= lines, Message-ID: header value
+&` msg_id_created `& on <= lines, Message-ID: header value when one had to be added
&` outgoing_interface `& local interface on => lines
&` outgoing_port `& add remote port to => lines
&`*queue_run `& start and end queue runs
&%incoming_interface%&: The interface on which a message was received is added
to the &"<="& line as an IP address in square brackets, tagged by I= and
followed by a colon and the port number. The local interface and port are also
-added to other SMTP log lines, for example &"SMTP connection from"&, to
+added to other SMTP log lines, for example, &"SMTP connection from"&, to
rejection lines, and (despite the name) to outgoing &"=>"& and &"->"& lines.
The latter can be disabled by turning off the &%outgoing_interface%& option.
.next
&%millisec%&: Timestamps have a period and three decimal places of finer granularity
appended to the seconds value.
.next
+.new
+.cindex "log" "message id"
+&%msg_id%&: The value of the Message-ID: header.
+.next
+&%msg_id_created%&: The value of the Message-ID: header, when one had to be created.
+This will be either because the message is a bounce, or was submitted locally
+(submission mode) without one.
+The field identifier will have an asterix appended: &"id*="&.
+.wen
+.next
.cindex "log" "outgoing interface"
.cindex "log" "local interface"
.cindex "log" "local address and port"
&%pid%&: The current process id is added to every log line, in square brackets,
immediately after the time and date.
.next
-.new
.cindex log pipelining
.cindex pipelining "logging outgoing"
&%pipelining%&: A field is added to delivery and accept
On accept lines, where PIPELINING was offered but not used by the client,
the field has a minus appended.
+
+.new
+.cindex "pipelining" "early connection"
+If Exim is built with the SUPPORT_PIPE_CONNECT build option
+accept "L" fields have a period appended if the feature was
+offered but not used, or an asterisk appended if used.
+Delivery "L" fields have an asterisk appended if used.
+.wen
+
.next
.cindex "log" "queue run"
.cindex "queue runner" "logging"
.vitem &*-x*&
Match only non-frozen messages.
+
+.new
+.vitem &*-G*&&~<&'queuename'&>
+Match only messages in the given queue. Without this, the default queue is searched.
+.wen
.endlist
The following options control the format of the output:
.cindex "&'exiqsumm'&"
.cindex "queue" "summary"
The &'exiqsumm'& utility is a Perl script which reads the output of &`exim
--bp`& and produces a summary of the messages on the queue. Thus, you use it by
+-bp`& and produces a summary of the messages in the queue. Thus, you use it by
running a command such as
.code
exim -bp | exiqsumm
.display
&`exigrep [-t<`&&'n'&&`>] [-I] [-l] [-M] [-v] <`&&'pattern'&&`> [<`&&'log file'&&`>] ...`&
.endd
-If no log file names are given on the command line, the standard input is read.
+If no log filenames are given on the command line, the standard input is read.
The &%-t%& argument specifies a number of seconds. It adds an additional
condition for message selection. Messages that are complete are shown only if
-they spent more than <&'n'&> seconds on the queue.
+they spent more than <&'n'&> seconds in the queue.
By default, &'exigrep'& does case-insensitive matching. The &%-I%& option
makes it case-sensitive. This may give a performance improvement when searching
configuration.
.endlist
-Each time &'exicyclog'& is run the file names get &"shuffled down"& by one. If
-the main log file name is &_mainlog_& (the default) then when &'exicyclog'& is
+Each time &'exicyclog'& is run the filenames get &"shuffled down"& by one. If
+the main log filename is &_mainlog_& (the default) then when &'exicyclog'& is
run &_mainlog_& becomes &_mainlog.01_&, the previous &_mainlog.01_& becomes
&_mainlog.02_& and so on, up to the limit that is set in the script or by the
&%-k%& option. Log files whose numbers exceed the limit are discarded. Reject
The remainder of the output is in sections that can be independently disabled
or modified by various options. It consists of a summary of deliveries by
transport, histograms of messages received and delivered per time interval
-(default per hour), information about the time messages spent on the queue,
+(default per hour), information about the time messages spent in the queue,
a list of relayed messages, lists of the top fifty sending hosts, local
senders, destination hosts, and destination local users by count and by volume,
and a list of delivery errors that occurred.
.cindex "USE_DB"
If the native DB interface is in use (USE_DB is set in a compile-time
-configuration file &-- this is common in free versions of Unix) the two file
-names must be different, because in this mode the Berkeley DB functions create
-a single output file using exactly the name given. For example,
+configuration file &-- this is common in free versions of Unix) the two
+filenames must be different, because in this mode the Berkeley DB functions
+create a single output file using exactly the name given. For example,
.code
exim_dbmbuild /etc/aliases /etc/aliases.db
.endd
environment, the suffixes are added to the second argument of
&'exim_dbmbuild'&, so it can be the same as the first. This is also the case
when the Berkeley functions are used in compatibility mode (though this is not
-recommended), because in that case it adds a &_.db_& suffix to the file name.
+recommended), because in that case it adds a &_.db_& suffix to the filename.
If a duplicate key is encountered, the program outputs a warning, and when it
finishes, its return code is 1 rather than zero, unless the &%-noduperr%&
mailbox, which is the same as Exim's default. The use of &%-flock%& or
&%-fcntl%& requires that the file be writeable; the use of &%-lockfile%&
requires that the directory containing the file be writeable. Locking by lock
-file does not last for ever; Exim assumes that a lock file is expired if it is
+file does not last forever; Exim assumes that a lock file is expired if it is
more than 30 minutes old.
The &%-mbx%& option can be used with either or both of &%-fcntl%& or
End
.endd
.cindex "admin user"
-In order to see the contents of messages on the queue, and to operate on them,
+In order to see the contents of messages in the queue, and to operate on them,
&'eximon'& must either be run as root or by an admin user.
The command-line parameters of &'eximon'& are passed to &_eximon.bin_& and may
.section "The stripcharts" "SECID265"
.cindex "stripchart"
-The first stripchart is always a count of messages on the queue. Its name can
+The first stripchart is always a count of messages in the queue. Its name can
be configured by setting QUEUE_STRIPCHART_NAME in the
&_Local/eximon.conf_& file. The remaining stripcharts are defined in the
configuration script by regular expression matches on log file entries, making
.section "The queue display" "SECID268"
.cindex "queue" "display in monitor"
The bottom section of the monitor window contains a list of all messages that
-are on the queue, which includes those currently being received or delivered,
+are in the queue, which includes those currently being received or delivered,
as well as those awaiting delivery. The size of this subwindow is controlled by
parameters in the configuration file &_Local/eximon.conf_&, and the frequency
at which it is updated is controlled by another parameter in the same file &--
to force an update of the queue display at any time.
When a host is down for some time, a lot of pending mail can build up for it,
-and this can make it hard to deal with other messages on the queue. To help
+and this can make it hard to deal with other messages in the queue. To help
with this situation there is a button next to &"Update"& called &"Hide"&. If
pressed, a dialogue box called &"Hide addresses ending with"& is put up. If you
type anything in here and press &"Return"&, the text is added to a chain of
pressing the &"Hide"& button.
The queue display contains, for each unhidden queued message, the length of
-time it has been on the queue, the size of the message, the message id, the
+time it has been in the queue, the size of the message, the message id, the
message sender, and the first undelivered recipient, all on one line. If it is
a bounce message, the sender is shown as &"<>"&. If there is more than one
recipient to which the message has not yet been delivered, subsequent ones are
&'body'&: The contents of the spool file containing the body of the message are
displayed in a new text window. There is a default limit of 20,000 bytes to the
amount of data displayed. This can be changed by setting the BODY_MAX
-option at compile time, or the EXIMON_BODY_MAX option at run time.
+option at compile time, or the EXIMON_BODY_MAX option at runtime.
.next
&'deliver message'&: A call to Exim is made using the &%-M%& option to request
delivery of the message. This causes an automatic thaw if the message is
.ilist
ALT_CONFIG_PREFIX can be set to a string that is required to match the
-start of any file names used with the &%-C%& option. When it is set, these file
-names are also not allowed to contain the sequence &"/../"&. (However, if the
-value of the &%-C%& option is identical to the value of CONFIGURE_FILE in
+start of any filenames used with the &%-C%& option. When it is set, these
+filenames are also not allowed to contain the sequence &"/../"&. (However, if
+the value of the &%-C%& option is identical to the value of CONFIGURE_FILE in
&_Local/Makefile_&, Exim ignores &%-C%& and proceeds as usual.) There is no
default setting for &%ALT_CONFIG_PREFIX%&.
obviously more secure if Exim does not run as root except when necessary.
For this reason, a user and group for Exim to use must be defined in
&_Local/Makefile_&. These are known as &"the Exim user"& and &"the Exim
-group"&. Their values can be changed by the run time configuration, though this
+group"&. Their values can be changed by the runtime configuration, though this
is not recommended. Often a user called &'exim'& is used, but some sites use
&'mail'& or another user name altogether.
is insurance against disk crashes where the directory is lost but the files
themselves are recoverable.
-.new
The file formats may be changed, or new formats added, at any release.
Spool files are not intended as an interface to other programs
and should not be used as such.
-.wen
Some people are tempted into editing -D files in order to modify messages. You
need to be extremely careful if you do this; it is not recommended and you are
certificate.
.endlist
+.new
+Any of the above may have an extra hyphen prepended, to indicate the the
+corresponding data is untrusted.
+.wen
+
Following the options there is a list of those addresses to which the message
is not to be delivered. This set of addresses is initialized from the command
line when the &%-t%& option is used and &%extract_addresses_remove_arguments%&
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "DKIM and SPF" "CHAPdkim" &&&
- "DKIM and SPF Support"
-.cindex "DKIM"
+.chapter "DKIM, SPF and DMARC" "CHAPdkim" &&&
+ "DKIM, SPF and DMARC Support"
.section "DKIM (DomainKeys Identified Mail)" SECDKIM
+.cindex "DKIM"
DKIM is a mechanism by which messages sent by some entity can be provably
linked to a domain which that entity controls. It permits reputation to
.cindex "DKIM" "signing"
For signing to be usable you must have published a DKIM record in DNS.
-Note that RFC 8301 says:
+Note that RFC 8301 (which does not cover EC keys) says:
.code
rsa-sha1 MUST NOT be used for signing or verifying.
.option dkim_domain smtp string list&!! unset
The domain(s) you want to sign with.
After expansion, this can be a list.
-Each element in turn is put into the &%$dkim_domain%& expansion variable
+Each element in turn,
+.new
+lowercased,
+.wen
+is put into the &%$dkim_domain%& expansion variable
while expanding the remaining signing options.
If it is empty after expansion, DKIM signing is not done,
and no error will result even if &%dkim_strict%& is set.
Signers SHOULD use RSA keys of at least 2048 bits.
.endd
-Support for EC keys is being developed under
-&url(https://datatracker.ietf.org/doc/draft-ietf-dcrup-dkim-crypto/).
+.new
+EC keys for DKIM are defined by RFC 8463.
+.wen
They are considerably smaller than RSA keys for equivalent protection.
As they are a recent development, users should consider dual-signing
(by setting a list of selectors, and an expansion for this option)
certtool --load_privkey=dkim_ed25519.private --pubkey_info --outder | tail -c +13 | base64
.endd
-Note that the format
-of Ed25519 keys in DNS has not yet been decided; this release supports
-both of the leading candidates at this time, a future release will
-probably drop support for whichever proposal loses.
+.new
+Exim also supports an alternate format
+of Ed25519 keys in DNS which was a candidate during development
+of the standard, but not adopted.
+A future release will probably drop that support.
+.wen
.option dkim_hash smtp string&!! sha256
Can be set to any one of the supported hash methods, which are:
will be signed, and one signature added for a missing header with the
name will be appended.
-.new
.option dkim_timestamps smtp integer&!! unset
This option controls the inclusion of timestamp information in the signature.
If not set, no such information will be included.
both creation (t=) and expiry (x=) tags will be included.
RFC 6376 lists these tags as RECOMMENDED.
-.wen
.section "Verifying DKIM signatures in incoming mail" "SECDKIMVFY"
.cindex "DKIM" "verification"
-.new
Verification of DKIM signatures in SMTP incoming email is done for all
messages for which an ACL control &%dkim_disable_verify%& has not been set.
+.new
+.cindex DKIM "selecting signature algorithms"
+Individual classes of signature algorithm can be ignored by changing
+the main options &%dkim_verify_hashes%& or &%dkim_verify_keytypes%&.
+The &%dkim_verify_minimal%& option can be set to cease verification
+processing for a message once the first passing signature is found.
+.wen
+
.cindex authentication "expansion item"
Performing verification sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
+
+.new
+For most purposes the default option settings suffice and the remainder
+of this section can be ignored.
.wen
-.new The results of that verification are then made available to the
-&%acl_smtp_dkim%& ACL, &new(which can examine and modify them).
-By default, this ACL is called once for each
-syntactically(!) correct signature in the incoming message.
+The results of verification are made available to the
+&%acl_smtp_dkim%& ACL, which can examine and modify them.
A missing ACL definition defaults to accept.
+By default, the ACL is called once for each
+syntactically(!) correct signature in the incoming message.
If any ACL call does not accept, the message is not accepted.
If a cutthrough delivery was in progress for the message, that is
summarily dropped (having wasted the transmission effort).
-To evaluate the &new(verification result) in the ACL
+To evaluate the verification result in the ACL
a large number of expansion variables
containing the signature status and its details are set up during the
runtime of the ACL.
Calling the ACL only for existing signatures is not sufficient to build
-more advanced policies. For that reason, the global option
-&%dkim_verify_signers%&, and a global expansion variable
+more advanced policies. For that reason, the main option
+&%dkim_verify_signers%&, and an expansion variable
&%$dkim_signers%& exist.
-The global option &%dkim_verify_signers%& can be set to a colon-separated
+The main option &%dkim_verify_signers%& can be set to a colon-separated
list of DKIM domains or identities for which the ACL &%acl_smtp_dkim%& is
called. It is expanded when the message has been received. At this point,
the expansion variable &%$dkim_signers%& already contains a colon-separated
If a domain or identity is listed several times in the (expanded) value of
&%dkim_verify_signers%&, the ACL is only called once for that domain or identity.
+.new
+Note that if the option is set using untrustworthy data
+(such as the From: header)
+care should be taken to force lowercase for domains
+and for the domain part if identities.
+The default setting can be regarded as trustworthy in this respect.
+.wen
+
If multiple signatures match a domain (or identity), the ACL is called once
for each matching signature.
-Inside the &%acl_smtp_dkim%&, the following expansion variables are
+Inside the DKIM ACL, the following expansion variables are
available (from most to least important):
algorithms (currently, rsa-sha1) have permanently failed evaluation
.endd
-To enforce this you must have a DKIM ACL which checks this variable
-and overwrites the &$dkim_verify_status$& variable as discussed above.
+To enforce this you must either have a DKIM ACL which checks this variable
+and overwrites the &$dkim_verify_status$& variable as discussed above,
+.new
+or have set the main option &%dkim_verify_hashes%& to exclude
+processing of such signatures.
+.wen
.vitem &%$dkim_canon_body%&
The body canonicalization method. One of 'relaxed' or 'simple'.
The number of signed body bytes. If zero ("0"), the body is unsigned. If no
limit was set by the signer, "9999999999999" is returned. This makes sure
that this variable always expands to an integer value.
-.new
&*Note:*& The presence of the signature tag specifying a signing body length
is one possible route to spoofing of valid DKIM signatures.
A paranoid implementation might wish to regard signature where this variable
shows less than the "no limit" return as being invalid.
-.wen
.vitem &%$dkim_created%&
UNIX timestamp reflecting the date and time when the signature was created.
SPF is a mechanism whereby a domain may assert which IP addresses may transmit
messages with its domain in the envelope from, documented by RFC 7208.
-For more information on SPF see &url(http://www.openspf.org).
-. --- 2018-09-07: still not https
+For more information on SPF see &url(http://www.open-spf.org), a static copy of
+the &url(http://openspf.org).
+. --- 2019-10-28: still not https, open-spf.org is told to be a
+. --- web-archive copy of the now dead openspf.org site
+. --- See https://www.mail-archive.com/mailop@mailop.org/msg08019.html for a
+. --- discussion.
Messages sent by a system not authorised will fail checking of such assertions.
This includes retransmissions done by traditional forwarders.
For verification, an ACL condition and an expansion lookup are provided.
.cindex authentication "expansion item"
Performing verification sets up information used by the
-&$authresults$& expansion item.
+&%authresults%& expansion item.
.cindex SPF "ACL condition"
message = $sender_host_address is not allowed to send mail from \
${if def:sender_address_domain \
{$sender_address_domain}{$sender_helo_name}}. \
- Please see http://www.openspf.org/Why?scope=\
+ Please see http://www.open-spf.org/Why?scope=\
${if def:sender_address_domain {mfrom}{helo}};\
identity=${if def:sender_address_domain \
{$sender_address}{$sender_helo_name}};\
"Best-guess". Strictly speaking, "Best-guess" is not standard
SPF, but it is supported by the same framework that enables SPF
capability.
-Refer to &url(http://www.openspf.org/FAQ/Best_guess_record)
+Refer to &url(http://www.open-spf.org/FAQ/Best_guess_record)
for a description of what it means.
-. --- 2018-09-07: still not https:
+. --- 2019-10-28: still not https:
To access this feature, simply use the spf_guess condition in place
of the spf one. For example:
.cindex SPF "lookup expansion"
.cindex lookup spf
A lookup expansion is also available. It takes an email
-address as the key and an IP address as the database:
+address as the key and an IP address
+.new
+(v4 or v6)
+.wen
+as the database:
.code
${lookup {username@domain} spf {ip.ip.ip.ip}}
The lookup will return the same result strings as can appear in
&$spf_result$& (pass,fail,softfail,neutral,none,err_perm,err_temp).
-Currently, only IPv4 addresses are supported.
+
+
+
+
+
+.new
+.section DMARC SECDMARC
+.cindex DMARC verification
+
+DMARC combines feedback from SPF, DKIM, and header From: in order
+to attempt to provide better indicators of the authenticity of an
+email. This document does not explain the fundamentals; you
+should read and understand how it works by visiting the website at
+&url(http://www.dmarc.org/).
+
+If Exim is built with DMARC support,
+the libopendmarc library is used.
+
+For building Exim yourself, obtain the library from
+&url(http://sourceforge.net/projects/opendmarc/)
+to obtain a copy, or find it in your favorite rpm package
+repository. You will need to attend to the local/Makefile feature
+SUPPORT_DMARC and the associated LDFLAGS addition.
+This description assumes
+that headers will be in /usr/local/include, and that the libraries
+are in /usr/local/lib.
+
+. subsection
+
+There are three main-configuration options:
+.cindex DMARC "configuration options"
+
+The &%dmarc_tld_file%& option
+.oindex &%dmarc_tld_file%&
+defines the location of a text file of valid
+top level domains the opendmarc library uses
+during domain parsing. Maintained by Mozilla,
+the most current version can be downloaded
+from a link at &url(https://publicsuffix.org/list/, currently pointing
+at https://publicsuffix.org/list/public_suffix_list.dat)
+See also util/renew-opendmarc-tlds.sh script.
+The default for the option is /etc/exim/opendmarc.tlds.
+
+
+The &%dmarc_history_file%& option, if set
+.oindex &%dmarc_history_file%&
+defines the location of a file to log results
+of dmarc verification on inbound emails. The
+contents are importable by the opendmarc tools
+which will manage the data, send out DMARC
+reports, and expire the data. Make sure the
+directory of this file is writable by the user
+exim runs as.
+The default is unset.
+
+The &%dmarc_forensic_sender%& option
+.oindex &%dmarc_forensic_sender%&
+defines an alternate email address to use when sending a
+forensic report detailing alignment failures
+if a sender domain's dmarc record specifies it
+and you have configured Exim to send them.
+If set, this is expanded and used for the
+From: header line; the address is extracted
+from it and used for the envelope from.
+If not set (the default), the From: header is expanded from
+the dsn_from option, and <> is used for the
+envelope from.
+
+. I wish we had subsections...
+
+.cindex DMARC controls
+By default, the DMARC processing will run for any remote,
+non-authenticated user. It makes sense to only verify DMARC
+status of messages coming from remote, untrusted sources. You can
+use standard conditions such as hosts, senders, etc, to decide that
+DMARC verification should *not* be performed for them and disable
+DMARC with a control setting:
+.code
+ control = dmarc_disable_verify
+.endd
+A DMARC record can also specify a "forensic address", which gives
+exim an email address to submit reports about failed alignment.
+Exim does not do this by default because in certain conditions it
+results in unintended information leakage (what lists a user might
+be subscribed to, etc). You must configure exim to submit forensic
+reports to the owner of the domain. If the DMARC record contains a
+forensic address and you specify the control statement below, then
+exim will send these forensic emails. It's also advised that you
+configure a dmarc_forensic_sender because the default sender address
+construction might be inadequate.
+.code
+ control = dmarc_enable_forensic
+.endd
+(AGAIN: You can choose not to send these forensic reports by simply
+not putting the dmarc_enable_forensic control line at any point in
+your exim config. If you don't tell it to send them, it will not
+send them.)
+
+There are no options to either control. Both must appear before
+the DATA acl.
+
+. subsection
+
+DMARC checks cam be run on incoming SMTP messages by using the
+"dmarc_status" ACL condition in the DATA ACL. You are required to
+call the "spf" condition first in the ACLs, then the "dmarc_status"
+condition. Putting this condition in the ACLs is required in order
+for a DMARC check to actually occur. All of the variables are set
+up before the DATA ACL, but there is no actual DMARC check that
+occurs until a "dmarc_status" condition is encountered in the ACLs.
+
+The dmarc_status condition takes a list of strings on its
+right-hand side. These strings describe recommended action based
+on the DMARC check. To understand what the policy recommendations
+mean, refer to the DMARC website above. Valid strings are:
+.display
+&'accept '& The DMARC check passed and the library recommends accepting the email.
+&'reject '& The DMARC check failed and the library recommends rejecting the email.
+&'quarantine '& The DMARC check failed and the library recommends keeping it for further inspection.
+&'none '& The DMARC check passed and the library recommends no specific action, neutral.
+&'norecord '& No policy section in the DMARC record for this sender domain.
+&'nofrom '& Unable to determine the domain of the sender.
+&'temperror '& Library error or dns error.
+&'off '& The DMARC check was disabled for this email.
+.endd
+You can prefix each string with an exclamation mark to invert its
+meaning, for example "!accept" will match all results but
+"accept". The string list is evaluated left-to-right in a
+short-circuit fashion. When a string matches the outcome of the
+DMARC check, the condition succeeds. If none of the listed
+strings matches the outcome of the DMARC check, the condition
+fails.
+
+Of course, you can also use any other lookup method that Exim
+supports, including LDAP, Postgres, MySQL, etc, as long as the
+result is a list of colon-separated strings.
+
+Performing the check sets up information used by the
+&%authresults%& expansion item.
+
+Several expansion variables are set before the DATA ACL is
+processed, and you can use them in this ACL. The following
+expansion variables are available:
+
+&$dmarc_status$&
+.vindex &$dmarc_status$&
+.cindex DMARC result
+is a one word status indicating what the DMARC library
+thinks of the email. It is a combination of the results of
+DMARC record lookup and the SPF/DKIM/DMARC processing results
+(if a DMARC record was found). The actual policy declared
+in the DMARC record is in a separate expansion variable.
+
+&$dmarc_status_text$&
+.vindex &$dmarc_status_text$&
+is a slightly longer, human readable status.
+
+&$dmarc_used_domain$&
+.vindex &$dmarc_used_domain$&
+is the domain which DMARC used to look up the DMARC policy record.
+
+&$dmarc_domain_policy$&
+.vindex &$dmarc_domain_policy$&
+is the policy declared in the DMARC record. Valid values
+are "none", "reject" and "quarantine". It is blank when there
+is any error, including no DMARC record.
+
+. subsection
+
+By default, Exim's DMARC configuration is intended to be
+non-intrusive and conservative. To facilitate this, Exim will not
+create any type of logging files without explicit configuration by
+you, the admin. Nor will Exim send out any emails/reports about
+DMARC issues without explicit configuration by you, the admin (other
+than typical bounce messages that may come about due to ACL
+processing or failure delivery issues).
+
+In order to log statistics suitable to be imported by the opendmarc
+tools, you need to:
+.ilist
+Configure the global setting dmarc_history_file
+.next
+Configure cron jobs to call the appropriate opendmarc history
+import scripts and truncating the dmarc_history_file
+.endlist
+
+In order to send forensic reports, you need to:
+.ilist
+Configure the global setting dmarc_forensic_sender
+.next
+Configure, somewhere before the DATA ACL, the control option to
+enable sending DMARC forensic reports
+.endlist
+
+. subsection
+
+Example usage:
+.code
+(RCPT ACL)
+ warn domains = +local_domains
+ hosts = +local_hosts
+ control = dmarc_disable_verify
+
+ warn !domains = +screwed_up_dmarc_records
+ control = dmarc_enable_forensic
+
+ warn condition = (lookup if destined to mailing list)
+ set acl_m_mailing_list = 1
+
+(DATA ACL)
+ warn dmarc_status = accept : none : off
+ !authenticated = *
+ log_message = DMARC DEBUG: $dmarc_status $dmarc_used_domain
+
+ warn dmarc_status = !accept
+ !authenticated = *
+ log_message = DMARC DEBUG: '$dmarc_status' for $dmarc_used_domain
+
+ warn dmarc_status = quarantine
+ !authenticated = *
+ set $acl_m_quarantine = 1
+ # Do something in a transport with this flag variable
+
+ deny condition = ${if eq{$dmarc_domain_policy}{reject}}
+ condition = ${if eq{$acl_m_mailing_list}{1}}
+ message = Messages from $dmarc_used_domain break mailing lists
+
+ deny dmarc_status = reject
+ !authenticated = *
+ message = Message from $dmarc_used_domain failed sender's DMARC policy, REJECT
+
+ warn add_header = :at_start:${authresults {$primary_hostname}}
+.endd
+
+.wen
.endd
If &$proxy_session$& is set but &$proxy_external_address$& is empty
there was a protocol error.
+The variables &$sender_host_address$& and &$sender_host_port$&
+will have values for the actual client system, not the proxy.
Since the real connections are all coming from the proxy, and the
per host connection tracking is done before Proxy Protocol is
If mua_wrapper is set, the utf8_downconvert control
is initially set to -1.
-.new
The smtp transport has an option &%utf8_downconvert%&.
If set it must expand to one of the three values described above,
and it overrides any previously set value.
-.wen
There is no explicit support for VRFY and EXPN.
The name is placed in the variable &$event_name$& and the event action
expansion must check this, as it will be called for every possible event type.
+.new
The current list of events is:
+.wen
.display
&`dane:fail after transport `& per connection
&`msg:complete after main `& per message
&`tcp:close after transport `& per connection
&`tls:cert before both `& per certificate in verification chain
&`smtp:connect after transport `& per connection
+&`smtp:ehlo after transport `& per connection
.endd
New event types may be added in future.
&`msg:host:defer `& error string
&`tls:cert `& verification chain depth
&`smtp:connect `& smtp banner
+&`smtp:ehlo `& smtp ehlo response
.endd
The :defer events populate one extra variable: &$event_defer_errno$&.
&_src/transports_&, &_src/auths_&, or &_src/lookups_&); add a line for the new
driver or lookup type and add it to the definition of OBJ.
.next
+Edit &_OS/Makefile-Base_& adding a &_.o_& file for the predefined-macros, to the
+definition of OBJ_MACRO. Add a set of line to do the compile also.
+.next
Create &_newdriver.h_& and &_newdriver.c_& in the appropriate sub-directory of
&_src_&.
.next