-. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.15 2007/02/26 14:06:33 ph10 Exp $
+. $Cambridge: exim/doc/doc-docbook/spec.xfpt,v 1.16 2007/04/11 15:26:09 ph10 Exp $
.
. /////////////////////////////////////////////////////////////////////////////
. This is the primary source of the Exim Manual. It is an xfpt document that is
. /////////////////////////////////////////////////////////////////////////////
. These lines are processing instructions for the Simple DocBook Processor that
-. Philip Hazel is developing in odd moments as a less cumbersome way of making
-. PostScript and PDFs than using xmlto and fop. They will be ignored by all
-. other XML processors.
+. Philip Hazel has developed as a less cumbersome way of making PostScript and
+. PDFs than using xmlto and fop. They will be ignored by all other XML
+. processors.
. /////////////////////////////////////////////////////////////////////////////
.literal xml
<?sdop
+ foot_right_recto="&chaptertitle; (&chapternumber;)"
+ foot_right_verso="&chaptertitle; (&chapternumber;)"
toc_chapter_blanks="yes,yes"
table_warn_soft_overflow="no"
?>
. the <bookinfo> element must also be updated for each new edition.
. /////////////////////////////////////////////////////////////////////////////
+.set previousversion "4.66"
+.set version "4.67"
+
.set ACL "access control lists (ACLs)"
-.set previousversion "4.63"
-.set version "4.66"
+.set I " "
. /////////////////////////////////////////////////////////////////////////////
.macro option
.oindex "&%$1%&"
-.itable all 0 0 4 8* left 5* center 5* center 6* right
+.itable all 0 0 4 8* left 6* center 6* center 6* right
.row "&%$1%&" "Use: &'$2'&" "Type: &'$3'&" "Default: &'$4'&"
.endtable
.endmacro
.itable none 0 0 2 $1 left $2 left
.endmacro
-. --- Macros for the concept and option index entries. For a "range" style of
-. --- entry, use .scindex for the start and .ecindex for the end. The first
-. --- argument of .scindex and the only argument of .ecindex must be the ID
-. --- that ties them together.
+. --- A macro that generates .row, but puts &I; at the start of the first
+. --- argument, thus indenting it. Assume a minimum of two arguments, and
+. --- allow up to four arguments, which is as many as we'll ever need.
+
+.macro irow
+.arg 4
+.row "&I;$1" "$2" "$3" "$4"
+.endarg
+.arg -4
+.arg 3
+.row "&I;$1" "$2" "$3"
+.endarg
+.arg -3
+.row "&I;$1" "$2"
+.endarg
+.endarg
+.endmacro
+
+. --- Macros for option, variable, and concept index entries. For a "range"
+. --- style of entry, use .scindex for the start and .ecindex for the end. The
+. --- first argument of .scindex and the only argument of .ecindex must be the
+. --- ID that ties them together.
.macro cindex
&<indexterm role="concept">&
&</indexterm>&
.endmacro
+.macro vindex
+&<indexterm role="variable">&
+&<primary>&$1&</primary>&
+.arg 2
+&<secondary>&$2&</secondary>&
+.endarg
+&</indexterm>&
+.endmacro
+
.macro index
-.echo "** Don't use .index; use .cindex or .oindex"
+.echo "** Don't use .index; use .cindex or .oindex or .vindex"
.endmacro
. ////////////////////////////////////////////////////////////////////////////
<bookinfo>
<title>Specification of the Exim Mail Transfer Agent</title>
<titleabbrev>The Exim MTA</titleabbrev>
-<date>08 January 2007</date>
+<date>10 April 2007</date>
<author><firstname>Philip</firstname><surname>Hazel</surname></author>
<authorinitials>PH</authorinitials>
<affiliation><orgname>University of Cambridge Computing Service</orgname></affiliation>
<address>New Museums Site, Pembroke Street, Cambridge CB2 3QH, England</address>
<revhistory><revision>
- <revnumber>4.66</revnumber>
- <date>08 January 2007</date>
+ <revnumber>4.67</revnumber>
+ <date>10 April 2007</date>
<authorinitials>PH</authorinitials>
</revision></revhistory>
<copyright><year>2007</year><holder>University of Cambridge</holder></copyright>
. at the top level, so we have to put the .chapter directive first.
. /////////////////////////////////////////////////////////////////////////////
-.chapter "Introduction"
+.chapter "Introduction" "CHID1"
.literal xml
-<indexterm role="concept">
+<indexterm role="variable">
<primary>$1, $2, etc.</primary>
<see><emphasis>numerical variables</emphasis></see>
</indexterm>
contributors.
-.section "Exim documentation"
+.section "Exim documentation" "SECID1"
.new
.cindex "documentation"
This edition of the Exim specification applies to version &version; of Exim.
.cindex "Debian" "information sources"
If you are using a Debian distribution of Exim, you will find information about
Debian-specific features in the file
-.display
-&_/usr/share/doc/exim4-base/README.Debian_&
-.endd
+&_/usr/share/doc/exim4-base/README.Debian_&.
The command &(man update-exim.conf)& is another source of Debian-specific
information.
-.section "FTP and web sites"
+.section "FTP and web sites" "SECID2"
.cindex "web site"
.cindex "FTP site"
The primary site for Exim source distributions is currently the University of
.cindex "wiki"
.cindex "FAQ"
+.new
As well as Exim distribution tar files, the Exim web site contains a number of
-differently formatted versions of the documentation, including the FAQ in both
-text and HTML formats. The HTML version comes with a keyword-in-context index.
-A recent addition to the online information is the Exim wiki
-(&url(http://www.exim.org/eximwiki/)). We hope that this will make it easier
-for Exim users to contribute examples, tips, and know-how for the benefit of
-others.
+differently formatted versions of the documentation. A recent addition to the
+online information is the Exim wiki (&url(http://www.exim.org/eximwiki/)),
+which contains what used to be a separate FAQ, as well as various other
+examples, tips, and know-how that have been contributed by Exim users.
+
+.cindex Bugzilla
+An Exim Bugzilla exists at &url(http://www.exim.org/bugzilla/). You can use
+this to report bugs, and also to add items to the wish list. Please search
+first to check that you are not duplicating a previous entry.
+.wen
-.section "Mailing lists"
+.section "Mailing lists" "SECID3"
.cindex "mailing lists" "for Exim users"
-The following are the three main Exim mailing lists:
+.new
+The following Exim mailing lists exist:
.table2 140pt
-.row &'exim-users@exim.org'& "general discussion list"
-.row &'exim-dev@exim.org'& "discussion of bugs, enhancements, etc."
-.row &'exim-announce@exim.org'& "moderated, low volume announcements list"
+.row &'exim-users@exim.org'& "General discussion list"
+.row &'exim-dev@exim.org'& "Discussion of bugs, enhancements, etc."
+.row &'exim-announce@exim.org'& "Moderated, low volume announcements list"
+.row &'exim-future@exim.org'& "Discussion of long-term development"
.endtable
+.wen
You can subscribe to these lists, change your existing subscriptions, and view
or search the archives via the mailing lists link on the Exim home page.
Please ask Debian-specific questions on this list and not on the general Exim
lists.
-.section "Exim training"
+.section "Exim training" "SECID4"
.cindex "training courses"
From time to time (approximately annually at the time of writing), training
courses are run by the author of Exim in Cambridge, UK. Details of any
&url(http://www-tus.csx.cam.ac.uk/courses/exim/).
-.section "Bug reports"
+.section "Bug reports" "SECID5"
.cindex "bug reports"
.cindex "reporting bugs"
Reports of obvious bugs should be emailed to &'bugs@exim.org'&. However, if you
.endd
These tar files contain only the &_doc_& directory, not the complete
distribution, and are also available in &_.bz2_& as well as &_.gz_& forms.
-.cindex "FAQ"
-The FAQ is available for downloading in two different formats in these files:
-.display
-&_exim4/FAQ.txt.gz_&
-&_exim4/FAQ.html.tar.gz_&
-.endd
-The first of these is a single ASCII file that can be searched with a text
-editor. The second is a directory of HTML files, normally accessed by starting
-at &_index.html_&. The HTML version of the FAQ (which is also included in the
-HTML documentation tarbundle) includes a keyword-in-context index, which is
-often the most convenient way of finding your way around.
-
-.section "Wish list"
-.cindex "wish list"
-A wish list is maintained, containing ideas for new features that have been
-submitted. This used to be a single file that from time to time was exported to
-the ftp site into the file &_exim4/WishList_&. However, it has now been
-imported into Exim's Bugzilla data.
-
-.section "Contributed material"
-.cindex "contributed material"
-At the ftp site, there is a directory called &_Contrib_& that contains
-miscellaneous files contributed to the Exim community by Exim users. There is
-also a collection of contributed configuration examples in
-&_exim4/config.samples.tar.gz_&. These samples are referenced from the FAQ.
-
-
-
-.section "Limitations"
+.section "Limitations" "SECID6"
.ilist
.cindex "limitations of Exim"
.cindex "bang paths" "not handled by Exim"
.endlist
-.section "Run time configuration"
+.section "Run time configuration" "SECID7"
Exim's run time 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
distribution, and is described in chapter &<<CHAPdefconfil>>& below.
-.section "Calling interface"
+.section "Calling interface" "SECID8"
.cindex "Sendmail compatibility" "command line interface"
Like many MTAs, Exim has adopted the Sendmail command line interface so that it
can be a straight replacement for &_/usr/lib/sendmail_& or
-.section "Terminology"
+.section "Terminology" "SECID9"
.cindex "terminology definitions"
.cindex "body of message" "definition of"
The &'body'& of a message is the actual data that the sender wants to transmit.
host's name. It is &'not'& used in that sense here, where it normally refers to
the part of an email address following the @ sign.
-.cindex "envelope" "definition of"
+.cindex "envelope, definition of"
.cindex "sender" "definition of"
A message in transit has an associated &'envelope'&, as well as a header and a
body. The envelope contains a sender address (to which bounce messages should
envelope. An MTA uses these addresses for delivery, and for returning bounce
messages, not the addresses that appear in the header lines.
-.cindex "message header" "definition of"
+.cindex "message" "header, definition of"
.cindex "header section" "definition of"
The &'header'& of a message is the first part of a message's text, consisting
of a number of lines, each of which has a name such as &'From:'&, &'To:'&,
@ sign is called the &'domain'& or &'mail domain'&.
.cindex "local delivery" "definition of"
-.cindex "remote delivery" "definition of"
+.cindex "remote delivery, definition of"
The terms &'local delivery'& and &'remote delivery'& are used to distinguish
delivery to a file or a pipe on the local host from delivery by SMTP over
TCP/IP to another host. As far as Exim is concerned, all hosts other than the
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "Incorporated code"
+.chapter "Incorporated code" "CHID2"
.cindex "incorporated code"
.cindex "regular expressions" "library"
.cindex "PCRE"
University of Cambridge. The source is distributed in the directory
&_src/pcre_&. However, this is a cut-down version of PCRE. If you want to use
the PCRE library in other programs, you should obtain and install the full
-version from &url(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre).
+version of the library from
+&url(ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre).
.next
-.cindex "cdb" "acknowledgement"
+.cindex "cdb" "acknowledgment"
Support for the cdb (Constant DataBase) lookup method is provided by code
contributed by Nigel Metheringham of (at the time he contributed it) Planet
Online Ltd. The implementation is completely contained within the code of Exim.
This code implements Dan Bernstein's Constant DataBase (cdb) spec. Information,
the spec and sample code for cdb can be obtained from
-&url(http://www.pobox.com/~djb/cdb.html). This implementation borrows some
-code from Dan Bernstein's implementation (which has no license restrictions
-applied to it).
+&url(http://www.pobox.com/~djb/cdb.html). This implementation borrows
+some code from Dan Bernstein's implementation (which has no license
+restrictions applied to it).
.endblockquote
.next
.cindex "SPA authentication"
.endblockquote
.next
-.cindex "Exim monitor" "acknowledgement"
+.cindex "Exim monitor" "acknowledgment"
.cindex "X-windows"
.cindex "Athena"
The Exim Monitor program, which is an X-Window application, includes
.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
-contributors are happy to see their code incoporated into Exim under the GPL.
+contributors are happy to see their code incorporated into Exim under the GPL.
.endlist
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "How Exim receives and delivers mail" "" &&&
+.chapter "How Exim receives and delivers mail" "CHID11" &&&
"Receiving and delivering mail"
-.section "Overall philosophy"
+.section "Overall philosophy" "SECID10"
.cindex "design philosophy"
Exim is designed to work efficiently on systems that are permanently connected
to the Internet and are handling a general mix of mail. In such circumstances,
has been down, and it also maintains per-host retry information.
-.section "Policy control"
+.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
which can then use it to decide what to do with the message.
.next
When a message has been received, either from a remote host or from the local
-host, but before the final acknowledgement has been sent, a locally supplied C
+host, but before the final acknowledgment has been sent, a locally supplied C
function called &[local_scan()]& can be run to inspect the message and decide
whether to accept it or not (see chapter &<<CHAPlocalscan>>&). If the message
is accepted, the list of recipients can be modified by the function.
-.section "User filters"
+.section "User filters" "SECID12"
.cindex "filter" "introduction"
.cindex "Sieve filter"
In a conventional Exim configuration, users are able to run private filters by
will already have ticked while the message was being received.
-.section "Receiving mail"
+.section "Receiving mail" "SECID13"
.cindex "receiving mail"
.cindex "message" "reception"
The only way Exim can receive mail from another host is using SMTP over
.endlist
-.cindex "message sender" "constructed by Exim"
+.cindex "message sender, constructed by Exim"
.cindex "sender" "constructed by Exim"
In the three cases that do not involve TCP/IP, the sender address is
constructed from the login name of the user that called Exim and a default
-.section "Handling an incoming message"
+.section "Handling an incoming message" "SECID14"
.cindex "spool directory" "files that hold a message"
.cindex "file" "how a message is held"
When Exim accepts a message, it writes two files in its spool directory. The
-.section "Life of a message"
+.section "Life of a message" "SECID15"
.cindex "message" "life of"
.cindex "message" "frozen"
A message remains in the spool directory until it is completely delivered to
-.section "Processing an address for verification"
+.section "Processing an address for verification" "SECID16"
.cindex "router" "for verification"
.cindex "verifying address" "overview"
As well as being used to decide how to deliver to an address, Exim's routers
facility for this purpose.
-.section "Duplicate addresses"
+.section "Duplicate addresses" "SECID17"
.cindex "case of local parts"
-.cindex "address duplicate" "discarding"
+.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
.section "Router preconditions" "SECTrouprecon"
-.cindex "router preconditions" "order of processing"
+.cindex "router" "preconditions, order of processing"
.cindex "preconditions" "order of processing"
The preconditions that are tested for each router are listed below, in the
order in which they are tested. The individual configuration options are
If the &%domains%& option is set, the domain of the address must be in the set
of domains that it defines.
.next
-.cindex "&$local_part_prefix$&"
-.cindex "&$local_part$&"
-.cindex "&$local_part_suffix$&"
+.vindex "&$local_part_prefix$&"
+.vindex "&$local_part$&"
+.vindex "&$local_part_suffix$&"
If the &%local_parts%& option is set, the local part of the address must be in
the set of local parts that it defines. If &%local_part_prefix%& or
&%local_part_suffix%& is in use, the prefix or suffix is removed from the local
that uses the variables &$local_part$&, &$local_part_prefix$&, and
&$local_part_suffix$& as necessary.
.next
-.cindex "&$local_user_uid$&"
-.cindex "&$local_user_gid$&"
-.cindex "&$home$&"
+.vindex "&$local_user_uid$&"
+.vindex "&$local_user_gid$&"
+.vindex "&$home$&"
If the &%check_local_user%& option is set, the local part must be the name of
an account on the local host. If this check succeeds, the uid and gid of the
local user are placed in &$local_user_uid$& and &$local_user_gid$& and the
-.section "Delivery in detail"
+.section "Delivery in detail" "SECID18"
.cindex "delivery" "in detail"
When a message is to be delivered, the sequence of events is as follows:
-.section "Retry mechanism"
+.section "Retry mechanism" "SECID19"
.cindex "delivery" "retry mechanism"
.cindex "retry" "description of mechanism"
.cindex "queue runner"
-.section "Temporary delivery failure"
+.section "Temporary delivery failure" "SECID20"
.cindex "delivery" "temporary failure"
There are many reasons why a message may not be immediately deliverable to a
particular address. Failure to connect to a remote machine (because it, or the
-.section "Permanent delivery failure"
+.section "Permanent delivery failure" "SECID21"
.cindex "delivery" "permanent failure"
.cindex "bounce message" "when generated"
When a message cannot be delivered to some or all of its intended recipients, a
-.section "Failures to deliver bounce messages"
+.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,
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "Building and installing Exim"
+.chapter "Building and installing Exim" "CHID3"
.scindex IIDbuex "building Exim"
-.section "Unpacking"
-Exim is distributed as a gzipped or bzipped tar file which, when upacked,
+.section "Unpacking" "SECID23"
+Exim is distributed as a gzipped or bzipped tar file which, when unpacked,
creates a directory with the name of the current release (for example,
&_exim-&version;_&) into which the following files are placed:
.table2 140pt
-.row &_ACKNOWLEDGMENTS_& "contains some acknowledgments"
-.row &_CHANGES_& "contains a reference to where changes are documented"
-.row &_LICENCE_& "the GNU General Public Licence"
-.row &_Makefile_& "top-level make file"
-.row &_NOTICE_& "conditions for the use of Exim"
-.row &_README_& "list of files, directories and simple build &&&
- instructions"
+.irow &_ACKNOWLEDGMENTS_& "contains some acknowledgments"
+.irow &_CHANGES_& "contains a reference to where changes are &&&
+ documented"
+.irow &_LICENCE_& "the GNU General Public Licence"
+.irow &_Makefile_& "top-level make file"
+.irow &_NOTICE_& "conditions for the use of Exim"
+.irow &_README_& "list of files, directories and simple build &&&
+ instructions"
.endtable
Other files whose names begin with &_README_& may also be present. The
following subdirectories are created:
.table2 140pt
-.row &_Local_& "an empty directory for local configuration files"
-.row &_OS_& "OS-specific files"
-.row &_doc_& "documentation files"
-.row &_exim_monitor_& "source files for the Exim monitor"
-.row &_scripts_& "scripts used in the build process"
-.row &_src_& "remaining source files"
-.row &_util_& "independent utilities"
+.irow &_Local_& "an empty directory for local configuration files"
+.irow &_OS_& "OS-specific files"
+.irow &_doc_& "documentation files"
+.irow &_exim_monitor_& "source files for the Exim monitor"
+.irow &_scripts_& "scripts used in the build process"
+.irow &_src_& "remaining source files"
+.irow &_util_& "independent utilities"
.endtable
The main utility programs are contained in the &_src_& directory, and are built
that may be useful to some sites.
-.section "Multiple machine architectures and operating systems"
+.section "Multiple machine architectures and operating systems" "SECID24"
.cindex "building Exim" "multiple OS/architectures"
The building process for Exim is arranged to make it easy to build binaries for
a number of different architectures and operating systems from the same set of
different operating systems often have different ones installed.
.cindex "Solaris" "DBM library for"
-.cindex "IRIX" "DBM library for"
-.cindex "BSD" "DBM library for"
-.cindex "Linux" "DBM library for"
+.cindex "IRIX, DBM library for"
+.cindex "BSD, DBM library for"
+.cindex "Linux, DBM library for"
If you are using Solaris, IRIX, one of the modern BSD systems, or a modern
Linux distribution, the DBM configuration should happen automatically, and you
may be able to ignore this section. Otherwise, you may have to learn more than
versions of Unix seem to vary in what they contain as standard. In particular,
some early versions of Linux have no default DBM library, and different
distributors have chosen to bundle different libraries with their packaged
-versions. However, the more recent releases seem to have standardised on the
+versions. However, the more recent releases seem to have standardized on the
Berkeley DB library.
Different DBM libraries have different conventions for naming the files they
-.section "Pre-building configuration"
+.section "Pre-building configuration" "SECID25"
.cindex "building Exim" "pre-building configuration"
.cindex "configuration for building Exim"
.cindex "&_Local/Makefile_&"
-.section "Support for iconv()"
+.section "Support for iconv()" "SECID26"
.cindex "&[iconv()]& support"
.cindex "RFC 2047"
The contents of header lines in messages may be encoded according to the rules
-.section "Use of tcpwrappers"
-.cindex "tcpwrappers" "building Exim to support"
+.section "Use of tcpwrappers" "SECID27"
+.cindex "tcpwrappers, building Exim to support"
.cindex "USE_TCP_WRAPPERS"
Exim can be linked with the &'tcpwrappers'& library in order to check incoming
SMTP calls using the &'tcpwrappers'& control files. This may be a convenient
-.section "Including support for IPv6"
+.section "Including support for IPv6" "SECID28"
.cindex "IPv6" "including support for"
Exim contains code for use on systems that have IPv6 support. Setting
&`HAVE_IPV6=YES`& in &_Local/Makefile_& causes the IPv6 code to be included;
library files.
Two different types of DNS record for handling IPv6 addresses have been
-defined. AAAA records (analagous to A records for IPv4) are in use, and are
+defined. AAAA records (analogous to A records for IPv4) are in use, and are
currently seen as the mainstream. Another record type called A6 was proposed
as better than AAAA because it had more flexibility. However, it was felt to be
over-complex, and its status was reduced to &"experimental"&. It is not known
-.section "The building process"
+.section "The building process" "SECID29"
.cindex "build directory"
Once &_Local/Makefile_& (and &_Local/eximon.conf_&, if required) have been
created, run &'make'& at the top level. It determines the architecture and
-.section 'Output from &"make"&'
+.section 'Output from &"make"&' "SECID283"
The output produced by the &'make'& process for compile lines is often very
unreadable, because these lines can be very long. For this reason, the normal
output is suppressed by default, and instead output similar to that which
.section "Overriding build-time options for Exim" "SECToverride"
-.cindex "build-time options" "overriding"
+.cindex "build-time options, overriding"
The main make file that is created at the beginning of the building process
consists of the concatenation of a number of files which set configuration
values, followed by a fixed set of &'make'& instructions. If a value is set
must be defined in &_Local/Makefile_&. Details of this facility are given in
chapter &<<CHAPperl>>&.
-.cindex "X11 libraries" "location of"
+.cindex "X11 libraries, location of"
The location of the X11 libraries is something that varies a lot between
operating systems, and there may be different versions of X11 to cope
with. Exim itself makes no use of X11, but if you are compiling the Exim
&_Local/Makefile_& or &_Local/eximon.conf_&) before rebuilding.
-.section "OS-specific header files"
+.section "OS-specific header files" "SECID30"
.cindex "&_os.h_&"
.cindex "building Exim" "OS-specific C header files"
The &_OS_& directory contains a number of files with names of the form
-.section "Overriding build-time options for the monitor"
-.cindex "building Eximon" "overriding default options"
+.section "Overriding build-time options for the monitor" "SECID31"
+.cindex "building Eximon"
A similar process is used for overriding things when building the Exim monitor,
where the files that are involved are
.display
.ecindex IIDbuex
-.section "Installing Exim binaries and scripts"
+.section "Installing Exim binaries and scripts" "SECID32"
.cindex "installing Exim"
.cindex "BIN_DIRECTORY"
The command &`make install`& runs the &(exim_install)& script with no
-.section "Setting up the spool directory"
+.section "Setting up the spool directory" "SECID33"
.cindex "spool directory" "creating"
When it starts up, Exim tries to create its spool directory if it does not
exist. The Exim uid and gid are used for the owner and group of the spool
-.section "Testing"
+.section "Testing" "SECID34"
.cindex "testing" "installation"
Having installed Exim, you can check that the run time configuration file is
syntactically valid by running the following command, which assumes that the
production version.
-.section "Replacing another MTA with Exim"
+.section "Replacing another MTA with Exim" "SECID35"
.cindex "replacing another MTA"
Building and installing Exim for the first time does not of itself put it in
general use. The name by which the system's MTA is called by mail user agents
privilege and executable status from the old MTA. It is then necessary to stop
and restart the mailer daemon, if one is running.
-.cindex "FreeBSD" "MTA indirection"
+.cindex "FreeBSD, MTA indirection"
.cindex "&_/etc/mail/mailer.conf_&"
Some operating systems have introduced alternative ways of switching MTAs. For
example, if you are running FreeBSD, you need to edit the file
-.section "Upgrading Exim"
+.section "Upgrading Exim" "SECID36"
.cindex "upgrading Exim"
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
-.section "Stopping the Exim daemon on Solaris"
+.section "Stopping the Exim daemon on Solaris" "SECID37"
.cindex "Solaris" "stopping Exim on"
The standard command for stopping the mailer daemon on Solaris is
.code
The form of the arguments depends on which options are set.
-.section "Setting options by program name"
+.section "Setting options by program name" "SECID38"
.cindex "&'mailq'&"
If Exim is called under the name &'mailq'&, it behaves as if the option &%-bp%&
were present before any other options.
&%exim_group%& options. These do not necessarily have to use the name &"exim"&.
.ilist
-.cindex "trusted user" "definition of"
+.cindex "trusted users" "definition of"
.cindex "user" "trusted definition of"
The trusted users are root, the Exim user, any user listed in the
&%trusted_users%& configuration option, and any user whose current group or any
-.section "Command line options"
+.section "Command line options" "SECID39"
Exim's command line options are described in alphabetical order below. If none
of the options that specifies a specific action (such as starting the daemon or
a queue runner, or testing an address, or receiving a message in a specific
.vitem &%-bd%&
.oindex "&%-bd%&"
.cindex "daemon"
-.cindex "SMTP listener"
+.cindex "SMTP" "listener"
.cindex "queue runner"
This option runs Exim as a daemon, awaiting incoming SMTP connections. Usually
the &%-bd%& option is combined with the &%-q%&<&'time'&> option, to specify
string expansion mechanism, and the result is output. Variable values from the
configuration file (for example, &$qualify_domain$&) are available, but no
message-specific values (such as &$sender_domain$&) are set, because no message
-is being processed &new("(but see &%-bem%& and &%-Mset%&)").
+is being processed (but see &%-bem%& and &%-Mset%&).
&*Note*&: If you use this mechanism to test lookups, and you change the data
files or databases you are using, you must exit and restart Exim before trying
the same lookup again. Otherwise, because each Exim process caches the results
of lookups, you will just get the same result as before.
-.new
.vitem &%-bem%&&~<&'filename'&>
.oindex "&%-bem%&"
.cindex "testing" "string expansion"
&$recipients$& variable. Note that recipients cannot be given on the command
line, because further arguments are taken as strings to expand (just like
&%-be%&).
-.wen
.vitem &%-bF%&&~<&'filename'&>
.oindex "&%-bF%&"
When testing a filter file,
.cindex "&""From""& line"
.cindex "envelope sender"
-.cindex "&%-f%& option" "for filter testing"
+.oindex "&%-f%&" "for filter testing"
the envelope sender can be set by the &%-f%& option,
or by a &"From&~"& line at the start of the test message. Various parameters
that would normally be taken from the envelope recipient address of the message
.vitem &%-bfd%&&~<&'domain'&>
.oindex "&%-bfd%&"
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
This sets the domain of the recipient address when a filter file is being
tested by means of the &%-bf%& option. The default is the value of
&$qualify_domain$&.
.new
Features such as authentication and encryption, where the client input is not
-plain text, are most easily tested using specialized SMTP test programs such as
+plain text, cannot easily be tested with &%-bh%&. Instead, you should use a
+specialized SMTP test program such as
&url(http://jetmore.org/john/code/#swaks,swaks).
.wen
matching against the regular expression defined by the &%uucp_from_pattern%&
option, which can be changed if necessary.
-The
-.cindex "&%-f%& option" "overriding &""From""& line"
-specified sender is treated as if it were given as the argument to the
+.oindex "&%-f%&" "overriding &""From""& line"
+The specified sender is treated as if it were given as the argument to the
&%-f%& option, but if a &%-f%& option is also present, its argument is used in
preference to the address taken from the message. The caller of Exim must be a
trusted user for the sender of a message to be set in this way.
.vitem &%-bnq%&
.oindex "&%-bnq%&"
-.cindex "address qualification" "suppressing"
+.cindex "address qualification, suppressing"
By default, Exim automatically qualifies unqualified addresses (those
without domains) that appear in messages that are submitted locally (that
is, not over TCP/IP). This qualification applies both to addresses in
.vitem &%-bP%&
.oindex "&%-bP%&"
-.cindex "configuration options" "extracting"
+.cindex "configuration options, extracting"
.cindex "options" "configuration &-- extracting"
If this option is given with no arguments, it causes the values of all Exim's
main configuration options to be written to the standard output. The values
.cindex "testing" "addresses"
.cindex "address" "testing"
This option runs Exim in address testing mode, in which each argument is taken
-as an address to be tested for deliverability. The results are written to the
-standard output. If a test fails, and the caller is not an admin user, no
-details of the failure are output, because these might contain sensitive
-information such as usernames and passwords for database lookups.
+as a &new(recipient) address to be tested for deliverability. The results are
+written to the standard output. If a test fails, and the caller is not an admin
+user, no details of the failure are output, because these might contain
+sensitive information such as usernames and passwords for database lookups.
If no arguments are given, Exim runs in an interactive manner, prompting with a
right angle bracket for addresses to be tested.
genuine routing tests if your first router passes everything to a scanner
program.
-The
.cindex "return code" "for &%-bt%&"
-return code is 2 if any address failed outright; it is 1 if no address
+The return code is 2 if any address failed outright; it is 1 if no address
failed outright but at least one could not be resolved for some reason. Return
code 0 is given only when all addresses succeed.
&*Warning*&: &%-bt%& can only do relatively simple testing. If any of the
routers in the configuration makes any tests on the sender address of a
message,
-.cindex "&%-f%& option" "for address testing"
+.oindex "&%-f%&" "for address testing"
you can use the &%-f%& option to set an appropriate sender when running
&%-bt%& tests. Without it, the sender is assumed to be the calling user at the
default qualifying domain. However, if you have set up (for example) routers
.vitem &%-bV%&
.oindex "&%-bV%&"
-.cindex "version number of Exim" "verifying"
+.cindex "version number of Exim"
This option causes Exim to write the current version number, compilation
number, and compilation date of the &'exim'& binary to the standard output.
It also lists the DBM library this is being used, the optional modules (such as
.cindex "verifying address" "using &%-bv%&"
.cindex "address" "verification"
This option runs Exim in address verification mode, in which each argument is
-taken as an address to be verified by the routers. (This does not involve any
-verification callouts). During normal operation, verification happens mostly as
-a consequence processing a &%verify%& condition in an ACL (see chapter
-&<<CHAPACL>>&). If you want to test an entire ACL, possibly including callouts,
-see the &%-bh%& and &%-bhc%& options.
+taken as a &new(recipient) address to be verified by the routers. (This does
+not involve any verification callouts). During normal operation, verification
+happens mostly as a consequence processing a &%verify%& condition in an ACL
+(see chapter &<<CHAPACL>>&). If you want to test an entire ACL, possibly
+including callouts, see the &%-bh%& and &%-bhc%& options.
If verification fails, and the caller is not an admin user, no details of the
failure are output, because these might contain sensitive information such as
verified as a recipient if &%-bv%& is used; to test verification for a sender
address, &%-bvs%& should be used.
-.new
If the &%-v%& option is not set, the output consists of a single line for each
address, stating whether it was verified or not, and giving a reason in the
latter case. Without &%-v%&, generating more than one address by redirection
When &%-v%& is set, more details are given of how the address has been handled,
and in the case of address redirection, all the generated addresses are also
considered. Verification may succeed for some and fail for others.
-.wen
The
.cindex "return code" "for &%-bv%&"
This option causes debugging information to be written to the standard
error stream. It is restricted to admin users because debugging output may show
database queries that contain password information. Also, the details of users'
-filter files should be protected. &new("If a non-admin user uses &%-d%&, Exim
+filter files should be protected. If a non-admin user uses &%-d%&, Exim
writes an error message to the standard error stream and exits with a non-zero
-return code.")
+return code.
When &%-d%& is used, &%-v%& is assumed. If &%-d%& is given on its own, a lot of
standard debugging data is output. This can be reduced, or increased to include
generated, so it now has to be explicitly requested. However, &`-all`& does
turn everything off.
-.cindex "resolver" "debugging output"
-.cindex "DNS resolver" "debugging output"
+.cindex "resolver, debugging output"
+.cindex "DNS resolver, debugging output"
The &`resolver`& option produces output only if the DNS resolver was compiled
with DEBUG enabled. This is not the case in some operating systems. Also,
unfortunately, debugging output from the DNS resolver is written to stdout
.oindex "&%-f%&"
.cindex "sender" "address"
.cindex "address" "sender"
-.cindex "trusted user"
+.cindex "trusted users"
.cindex "envelope sender"
.cindex "user" "trusted"
This option sets the address of the envelope sender of a locally-generated
.vitem &%-i%&
.oindex "&%-i%&"
.cindex "Solaris" "&'mail'& command"
-.cindex "dot in incoming" "non-SMTP message"
+.cindex "dot" "in incoming non-SMTP message"
This option, which has the same effect as &%-oi%&, specifies that a dot on a
line by itself should not terminate an incoming, non-SMTP message. I can find
no documentation for this option in Solaris 2.4 Sendmail, but the &'mailx'&
only by an admin user or by the user who originally caused the message to be
placed on the queue.
-.new
.vitem &%-Mset%&&~<&'message&~id'&>
.oindex "&%-Mset%&
.cindex "testing" "string expansion"
available. This feature is provided to make it easier to test expansions that
make use of these variables. However, this option can be used only by an admin
user. See also &%-bem%&.
-.wen
.vitem &%-Mt%&&~<&'message&~id'&>&~<&'message&~id'&>&~...
.oindex "&%-Mt%&"
.vitem &%-oi%&
.oindex "&%-oi%&"
-.cindex "dot in incoming" "non-SMTP message"
+.cindex "dot" "in incoming non-SMTP message"
This option, which has the same effect as &%-i%&, specifies that a dot on a
line by itself should not terminate an incoming, non-SMTP message. Otherwise, a
single dot does terminate, though Exim does no special processing for other
.vitem &%-oMa%&&~<&'host&~address'&>
.oindex "&%-oMa%&"
-.cindex "sender host address" "specifying for local message"
+.cindex "sender" "host address, specifying for local message"
A number of options starting with &%-oM%& can be used to set values associated
with remote hosts on locally-submitted messages (that is, messages not received
over TCP/IP). These options can be used by any caller in conjunction with the
.vitem &%-oMaa%&&~<&'name'&>
.oindex "&%-oMaa%&"
-.cindex "authentication name" "specifying for local message"
+.cindex "authentication" "name, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMaa%&
option sets the value of &$sender_host_authenticated$& (the authenticator
name). See chapter &<<CHAPSMTPAUTH>>& for a discussion of SMTP authentication.
.vitem &%-oMai%&&~<&'string'&>
.oindex "&%-oMai%&"
-.cindex "authentication id" "specifying for local message"
+.cindex "authentication" "id, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMai%&
option sets the value of &$authenticated_id$& (the id that was authenticated).
This overrides the default value (the caller's login id, except with &%-bh%&,
.vitem &%-oMas%&&~<&'address'&>
.oindex "&%-oMas%&"
-.cindex "authentication sender" "specifying for local message"
+.cindex "authentication" "sender, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMas%&
option sets the authenticated sender value in &$authenticated_sender$&. It
overrides the sender address that is created from the caller's login id for
.vitem &%-oMi%&&~<&'interface&~address'&>
.oindex "&%-oMi%&"
-.cindex "interface address" "specifying for local message"
-.new
+.cindex "interface" "address, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMi%&
option sets the IP interface address value. A port number may be included,
using the same syntax as for &%-oMa%&. The interface address is placed in
&$received_ip_address$& and the port number, if present, in &$received_port$&.
-.wen
.vitem &%-oMr%&&~<&'protocol&~name'&>
.oindex "&%-oMr%&"
-.cindex "protocol" "incoming &-- specifying for local message"
-.cindex "&$received_protocol$&"
+.cindex "protocol, specifying for local message"
+.vindex "&$received_protocol$&"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMr%&
option sets the received protocol value that is stored in
&$received_protocol$&. However, it does not apply (and is ignored) when &%-bh%&
.vitem &%-oMs%&&~<&'host&~name'&>
.oindex "&%-oMs%&"
-.cindex "sender host name" "specifying for local message"
+.cindex "sender" "host name, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMs%&
option sets the sender host name in &$sender_host_name$&. When this option is
present, Exim does not attempt to look up a host name from an IP address; it
.vitem &%-oMt%&&~<&'ident&~string'&>
.oindex "&%-oMt%&"
-.cindex "sender ident string" "specifying for local message"
+.cindex "sender" "ident string, specifying for local message"
See &%-oMa%& above for general remarks about the &%-oM%& options. The &%-oMt%&
option sets the sender ident value in &$sender_ident$&. The default setting for
local callers is the login id of the calling process, except when &%-bh%& is
.vitem &%-os%&&~<&'time'&>
.oindex "&%-os%&"
.cindex "timeout" "for SMTP input"
-.cindex "SMTP timeout" "input"
+.cindex "SMTP" "input timeout"
This option sets a timeout value for incoming SMTP messages. The timeout
applies to each SMTP command and block of data. The value can also be set by
the &%smtp_receive_timeout%& option; it defaults to 5 minutes. The format used
way. If the <&'rsflags'&> start with &'r'&, <&'string'&> is interpreted as a
regular expression; otherwise it is a literal string.
-.new
If you want to do periodic queue runs for messages with specific recipients,
you can combine &%-R%& with &%-q%& and a time value. For example:
.code
This example does a queue run for messages with recipients in the given domain
every 25 minutes. Any additional flags that are specified with &%-q%& are
applied to each queue run.
-.wen
Once a message is selected for delivery by this mechanism, all its addresses
are processed. For the first selected message, Exim overrides any retry
-.section "Using a different configuration file"
+.section "Using a different configuration file" "SECID40"
.cindex "configuration file" "alternate"
A one-off alternate configuration can be specified by the &%-C%& command line
option, which may specify a single file or a list of files. However, when
-.section "File inclusions in the configuration file"
+.section "File inclusions in the configuration file" "SECID41"
.cindex "inclusions in configuration file"
.cindex "configuration file" "including other files"
-.cindex ".include in configuration file"
-.cindex ".include_if_exists in configuration file"
+.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
using this syntax:
.display
definitions. They may not, however, be defined within an individual driver or
ACL, or in the &%local_scan%&, retry, or rewrite sections of the configuration.
-.section "Macro substitution"
+.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
comment line or a &`.include`& line.
-.section "Redefining macros"
+.section "Redefining macros" "SECID43"
Once defined, the value of a macro can be redefined later in the configuration
(or in an included file). Redefinition is specified by using &'=='& instead of
&'='&. For example:
This can be helpful in situations where the configuration file is built
from a number of other files.
-.section "Overriding macro values"
+.section "Overriding macro values" "SECID44"
The values set for macros in the configuration file can be overridden by the
&%-D%& command line option, but Exim gives up its root privilege when &%-D%& is
used, unless called by root or the Exim user. A definition on the command line
-.section "Example of macro usage"
+.section "Example of macro usage" "SECID45"
As an example of macro usage, consider a configuration where aliases are looked
up in a MySQL database. It helps to keep the file less cluttered if long
strings such as SQL statements are defined separately as macros, for example:
section &<<SECTnamedlists>>&.
-.section "Conditional skips in the configuration file"
+.section "Conditional skips in the configuration file" "SECID46"
.cindex "configuration file" "conditional skips"
-.cindex ".ifdef"
+.cindex "&`.ifdef`&"
You can use the directives &`.ifdef`&, &`.ifndef`&, &`.elifdef`&,
&`.elifndef`&, &`.else`&, and &`.endif`& to dynamically include or exclude
portions of the configuration file. The processing happens whenever the file is
that are found in option settings.
-.section "Boolean options"
+.section "Boolean options" "SECID47"
.cindex "format" "boolean"
.cindex "boolean configuration values"
.oindex "&%no_%&&'xxx'&"
-.section "Integer values"
+.section "Integer values" "SECID48"
.cindex "integer configuration values"
.cindex "format" "integer"
-If an integer data item starts with the characters &"0x"&, the remainder of it
-is interpreted as a hexadecimal number. Otherwise, it is treated as octal if it
-starts with the digit 0, and decimal if not. If an integer value is followed by
-the letter K, it is multiplied by 1024; if it is followed by the letter M, it
-is multiplied by 1024x1024.
+.new
+If an option's type is given as &"integer"&, the value can be given in decimal,
+hexadecimal, or octal. If it starts with a digit greater than zero, a decimal
+number is assumed. Otherwise, it is treated as an octal number unless it starts
+with the characters &"0x"&, in which case the remainder is interpreted as a
+hexadecimal number.
+.wen
-When the values of integer option settings are output, values which are an
-exact multiple of 1024 or 1024x1024 are
-sometimes, but not always,
-printed using the letters K and M. The printing style is independent of the
-actual input format that was used.
+If an integer value is followed by the letter K, it is multiplied by 1024; if
+it is followed by the letter M, it is multiplied by 1024x1024. When the values
+of integer option settings are output, values which are an exact multiple of
+1024 or 1024x1024 are sometimes, but not always, printed using the letters K
+and M. The printing style is independent of the actual input format that was
+used.
-.section "Octal integer values"
+.section "Octal integer values" "SECID49"
.cindex "integer format"
.cindex "format" "octal integer"
-The value of an option specified as an octal integer is always interpreted in
-octal, whether or not it starts with the digit zero. Such options are always
-output in octal.
-
+.new
+If an option's type is given as &"octal integer"&, its value is always
+interpreted as an octal number, whether or not it starts with the digit zero.
+Such options are always output in octal.
+.wen
-.section "Fixed point number values"
+.section "Fixed point numbers" "SECID50"
.cindex "fixed point configuration values"
.cindex "format" "fixed point"
-A fixed point number consists of a decimal integer, optionally followed by a
-decimal point and up to three further digits.
+.new
+If an option's type is given as &"fixed-point"&, its value must be a decimal
+integer, optionally followed by a decimal point and up to three further digits.
+.wen
-.section "Time interval values" "SECTtimeformat"
+.section "Time intervals" "SECTtimeformat"
.cindex "time interval" "specifying in configuration"
.cindex "format" "time interval"
A time interval is specified as a sequence of numbers, each followed by one of
the following letters, with no intervening white space:
-.table2 50pt
-.row &~&%s%& seconds
-.row &~&%m%& minutes
-.row &~&%h%& hours
-.row &~&%d%& days
-.row &~&%w%& weeks
+.table2 30pt
+.irow &%s%& seconds
+.irow &%m%& minutes
+.irow &%h%& hours
+.irow &%d%& days
+.irow &%w%& weeks
.endtable
For example, &"3h50m"& specifies 3 hours and 50 minutes. The values of time
.section "String values" "SECTstrings"
.cindex "string" "format of configuration values"
.cindex "format" "string"
-If a string data item does not start with a double-quote character, it is taken
-as consisting of the remainder of the line plus any continuation lines,
-starting at the first character after any leading white space, with trailing
-white space removed, and with no interpretation of the characters in the
-string. Because Exim removes comment lines (those beginning with #) at an early
-stage, they can appear in the middle of a multi-line string. The following
-settings are therefore equivalent:
+.new
+If an option's type is specified as &"string"&, the value can be specified with
+or without double-quotes. If it does not start with a double-quote, the value
+consists of the remainder of the line plus any continuation lines, starting at
+the first character after any leading white space, with trailing white space
+removed, and with no interpretation of the characters in the string. Because
+Exim removes comment lines (those beginning with #) at an early stage, they can
+appear in the middle of a multi-line string. The following two settings are
+therefore equivalent:
+.wen
.code
trusted_users = uucp:mail
-
trusted_users = uucp:\
# This comment line is ignored
mail
continuation are interpreted as escape characters, as follows:
.table2 100pt
-.row &~&`\\`& "single backslash"
-.row &~&`\n`& "newline"
-.row &~&`\r`& "carriage return"
-.row &~&`\t`& "tab"
-.row "&~&`\`&<&'octal digits'&>" "up to 3 octal digits specify one character"
-.row "&~&`\x`&<&'hex digits'&>" "up to 2 hexadecimal digits specify one &&&
+.irow &`\\`& "single backslash"
+.irow &`\n`& "newline"
+.irow &`\r`& "carriage return"
+.irow &`\t`& "tab"
+.irow "&`\`&<&'octal digits'&>" "up to 3 octal digits specify one character"
+.irow "&`\x`&<&'hex digits'&>" "up to 2 hexadecimal digits specify one &&&
character"
.endtable
and examples that apparently quote unnecessarily.
-.section "Expanded strings"
-.cindex "string expansion" "definition of"
+.section "Expanded strings" "SECID51"
.cindex "expansion" "definition of"
Some strings in the configuration file are subjected to &'string expansion'&,
by which means various parts of the string may be changed according to the
within a quoted configuration string.
-.section "User and group names"
+.section "User and group names" "SECID52"
.cindex "user name" "format of"
.cindex "format" "user name"
-.cindex "group" "name format"
+.cindex "groups" "name format"
.cindex "format" "group name"
User and group names are specified as strings, using the syntax described
above, but the strings are interpreted specially. A user or group name must
.section "List construction" "SECTlistconstruct"
.cindex "list" "syntax of in configuration"
.cindex "format" "list item in configuration"
-.cindex "string list" "definition"
+.cindex "string" "list, definition of"
The data for some configuration options is a list of items, with colon as the
default separator. Many of these options are shown with type &"string list"& in
the descriptions later in this document. Others are listed as &"domain list"&,
colon in the example above is necessary. If it were not there, the list would
be interpreted as the two items 127.0.0.1:: and 1.
+.new
+.section "Changing list separators" "SECID53"
.cindex "list separator" "changing"
.cindex "IPv6" "addresses in lists"
+.wen
Doubling colons in IPv6 addresses is an unwelcome chore, so a mechanism was
introduced to allow the separator character to be changed. If a list begins
with a left angle bracket, followed by any punctuation character, that
&%log_file_path%&. It is recommended that the use of non-colon separators be
confined to circumstances where they really are needed.
+.new
+.cindex "list separator" "newline as"
+.cindex "newline as list separator"
+It is also possible to use newline and other control characters (those with
+code values less than 32, plus DEL) as separators in lists. Such separators
+must be provided literally at the time the list is processed. For options that
+are string-expanded, you can write the separator using a normal escape
+sequence. This will be processed by the expander before the string is
+interpreted as a list. For example, if a newline-separated list of domains is
+generated by a lookup, you can process it directly by a line such as this:
+.code
+domains = <\n ${lookup mysql{.....}}
+.endd
+This avoids having to change the list separator in such data. You are unlikely
+to want to use a control character as a separator in an option that is not
+expanded, because the value is literal text. However, it can be done by giving
+the value in quotes. For example:
+.code
+local_interfaces = "<\n 127.0.0.1 \n ::1"
+.endd
+Unlike printing character separators, which can be included in list items by
+doubling, it is not possible to include a control character as data when it is
+set as the separator. Two such characters in succession are interpreted as
+enclosing an empty list item.
+.wen
+
.section "Empty items in lists" "SECTempitelis"
-.section "ACL configuration"
+.section "ACL configuration" "SECID54"
.cindex "default" "ACLs"
.cindex "&ACL;" "default configuration"
In the default configuration, the ACL section follows the main configuration.
This final line in the DATA ACL accepts the message unconditionally.
-.section "Router configuration"
+.section "Router configuration" "SECID55"
.cindex "default" "routers"
.cindex "routers" "default"
The router configuration comes next in the default configuration, introduced
# local_part_suffix = +* : -*
# local_part_suffix_optional
.endd
-.cindex "&$local_part_suffix$&"
+.vindex "&$local_part_suffix$&"
show how you can specify the recognition of local part suffixes. If the first
is uncommented, a suffix beginning with either a plus or a minus sign, followed
by any sequence of characters, is removed from the local part and placed in the
same purpose as they do for the &(userforward)& router.
-.section "Transport configuration"
+.section "Transport configuration" "SECID56"
.cindex "default" "transports"
.cindex "transports" "default"
Transports define mechanisms for actually delivering messages. They operate
-.section "Default retry rule"
+.section "Default retry rule" "SECID57"
.cindex "retry" "default rule"
.cindex "default" "retry rule"
The retry section of the configuration file contains rules which affect the way
-.section "Rewriting configuration"
+.section "Rewriting configuration" "SECID58"
The rewriting section of the configuration, introduced by
.code
begin rewrite
The example PLAIN authenticator looks like this:
.code
#PLAIN:
-# driver = plaintext
-# server_set_id = $auth2
-# server_prompts = :
-# server_condition = Authentication is not yet configured
+# driver = plaintext
+# server_set_id = $auth2
+# server_prompts = :
+# server_condition = Authentication is not yet configured
# server_advertise_condition = ${if def:tls_cipher }
.endd
And the example LOGIN authenticator looks like this:
.code
#LOGIN:
-# driver = plaintext
-# server_set_id = $auth1
-# server_prompts = <| Username: | Password:
-# server_condition = Authentication is not yet configured
+# driver = plaintext
+# server_set_id = $auth1
+# server_prompts = <| Username: | Password:
+# server_condition = Authentication is not yet configured
# server_advertise_condition = ${if def:tls_cipher }
.endd
-.section "Testing regular expressions"
+.section "Testing regular expressions" "SECID59"
.cindex "testing" "regular expressions"
.cindex "regular expressions" "testing"
.cindex "&'pcretest'&"
.chapter "File and database lookups" "CHAPfdlookup"
.scindex IIDfidalo1 "file" "lookups"
-.scindex IIDfidalo2 "database lookups"
+.scindex IIDfidalo2 "database" "lookups"
.cindex "lookup" "description of"
Exim can be configured to look up data in files or databases as it processes
messages. Two different kinds of syntax are used:
time, be aware that some of it will make a lot more sense after you have read
chapters &<<CHAPdomhosaddlists>>& and &<<CHAPexpand>>&.
-.section "Examples of different lookup syntax"
+.section "Examples of different lookup syntax" "SECID60"
It is easy to confuse the two different kinds of lookup, especially as the
lists that may contain the second kind are always expanded before being
processed as lists. Therefore, they may also contain lookups of the first kind.
lookup is permitted.
-.section "Lookup types"
+.section "Lookup types" "SECID61"
.cindex "lookup" "types of"
.cindex "single-key lookup" "definition of"
Two different types of data lookup are implemented:
&(cdb)&: The given file is searched as a Constant DataBase file, using the key
string without a terminating binary zero. The cdb format is designed for
indexed files that are read frequently and never updated, except by total
-re-creation. As such, it is particulary suitable for large files containing
+re-creation. As such, it is particularly suitable for large files containing
aliases or other indexed data referenced by an MTA. Information about cdb can
be found in several places:
.display
.endlist ilist
-.section "Query-style lookup types"
+.section "Query-style lookup types" "SECID62"
.cindex "lookup" "query-style types"
.cindex "query-style lookup" "list of types"
The supported query-style lookup types are listed below. Further details about
.next
.cindex "whoson lookup type"
.cindex "lookup" "whoson"
-&(whoson)&: &'Whoson'& (&url(http://whoson.sourceforge.net)) is a proposed
-Internet protocol that allows Internet server programs to check whether a
-particular (dynamically allocated) IP address is currently allocated to a known
-(trusted) user and, optionally, to obtain the identity of the said user. In
-Exim, this can be used to implement &"POP before SMTP"& checking using ACL
-statements such as
+.new
+&(whoson)&: &'Whoson'& (&url(http://whoson.sourceforge.net)) is a protocol that
+allows a server to check whether a particular (dynamically allocated) IP
+address is currently allocated to a known (trusted) user and, optionally, to
+obtain the identity of the said user. For SMTP servers, &'Whoson'& was popular
+at one time for &"POP before SMTP"& authentication, but that approach has been
+superseded by SMTP authentication. In Exim, &'Whoson'& can be used to implement
+&"POP before SMTP"& checking using ACL statements such as
.code
require condition = \
${lookup whoson {$sender_host_address}{yes}{no}}
the authenticated user, which is stored in the variable &$value$&. However, in
this example, the data in &$value$& is not used; the result of the lookup is
one of the fixed strings &"yes"& or &"no"&.
+.wen
.endlist
-.section "Temporary errors in lookups"
+.section "Temporary errors in lookups" "SECID63"
.cindex "lookup" "temporary error in"
Lookup functions can return temporary error codes if the lookup cannot be
completed. For example, an SQL or LDAP database might be unavailable. For this
In this context, a &"default value"& is a value specified by the administrator
that is to be used if a lookup fails.
-.new
&*Note:*& This section applies only to single-key lookups. For query-style
lookups, the facilities of the query language must be used. An attempt to
specify a default for a query-style lookup provokes an error.
-.wen
If &"*"& is added to a single-key lookup type (for example, &%lsearch*%&)
and the initial lookup fails, the key &"*"& is looked up in the file to
-.section "Lookup caching"
+.section "Lookup caching" "SECID64"
.cindex "lookup" "caching"
.cindex "caching" "lookup data"
Exim caches all lookup results in order to avoid needless repetition of
-.section "Quoting lookup data"
+.section "Quoting lookup data" "SECID65"
.cindex "lookup" "quoting"
.cindex "quoting" "in lookups"
When data from an incoming message is included in a query-style lookup, there
It is permitted to specify a space as the separator character. Further
white space is ignored.
-.section "Pseudo dnsdb record types"
+.section "Pseudo dnsdb record types" "SECID66"
.cindex "MX record" "in &(dnsdb)& lookup"
By default, both the preference value and the host name are returned for
each MX record, separated by a space. If you want only host names, you can use
In this case, the preference values are omitted, and just the host names are
returned.
-.cindex "name server" "for enclosing domain"
+.cindex "name server for enclosing domain"
Another pseudo-type is ZNS (for &"zone NS"&). It performs a lookup for NS
records on the given domain, but if none are found, it removes the first
component of the domain name, and tries again. This process continues until NS
authorization required but absent, or &"?"& for unknown.
-.section "Multiple dnsdb lookups"
+.section "Multiple dnsdb lookups" "SECID67"
In the previous sections, &(dnsdb)& lookups for a single domain are described.
However, you can specify a list of domains or IP addresses in a single
&(dnsdb)& lookup. The list is specified in the normal Exim way, with colon as
.section "More about LDAP" "SECTldap"
-.cindex "LDAP lookup"
+.cindex "LDAP" "lookup, more about"
.cindex "lookup" "LDAP"
.cindex "Solaris" "LDAP"
The original LDAP implementation came from the University of Michigan; this has
encrypted TLS connection is used.
-.section "LDAP quoting"
+.section "LDAP quoting" "SECID68"
.cindex "LDAP" "quoting"
Two levels of quoting are required in LDAP queries, the first for LDAP itself
and the second because the LDAP query is represented as a URL. Furthermore,
authentication below.
-.section "LDAP connections"
+.section "LDAP connections" "SECID69"
.cindex "LDAP" "connections"
The connection to an LDAP server may either be over TCP/IP, or, when OpenLDAP
is in use, via a Unix domain socket. The example given above does not specify
failures, and timeouts.
For each server name in the list, a port number can be given. The standard way
-of specifing a host and port is to use a colon separator (RFC 1738). Because
+of specifying a host and port is to use a colon separator (RFC 1738). Because
&%ldap_default_servers%& is a colon-separated list, such colons have to be
doubled. For example
.code
-.section "LDAP authentication and control information"
+.section "LDAP authentication and control information" "SECID70"
.cindex "LDAP" "authentication"
The LDAP URL syntax provides no way of passing authentication and other control
information to the server. To make this possible, the URL in an LDAP query may
-.section "Format of data returned by LDAP"
+.section "Format of data returned by LDAP" "SECID71"
.cindex "LDAP" "returned data formats"
The &(ldapdn)& lookup type returns the Distinguished Name from a single entry
as a sequence of values, for example
with a newline between the data for each row.
-.section "More about MySQL, PostgreSQL, Oracle, and InterBase"
+.section "More about MySQL, PostgreSQL, Oracle, and InterBase" "SECID72"
.cindex "MySQL" "lookup type"
.cindex "PostgreSQL lookup type"
.cindex "lookup" "MySQL"
characters are not special.
-.section "Special MySQL features"
+.section "Special MySQL features" "SECID73"
For MySQL, an empty host name or the use of &"localhost"& in &%mysql_servers%&
causes a connection to the server on the local host by means of a Unix domain
socket. An alternate socket can be specified in parentheses. The full syntax of
is zero because no rows are affected.
-.section "Special PostgreSQL features"
+.section "Special PostgreSQL features" "SECID74"
PostgreSQL lookups can also use Unix domain socket connections to the database.
This is usually faster and costs less CPU time than a TCP/IP connection.
However it can be used only if the mail server runs on the same machine as the
.section "More about SQLite" "SECTsqlite"
.cindex "lookup" "SQLite"
-.cindex "SQLite lookup type"
+.cindex "sqlite lookup type"
SQLite is different to the other SQL lookups because a file name 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
-.section "Expansion of lists"
+.section "Expansion of lists" "SECID75"
.cindex "expansion" "of lists"
Each list is expanded as a single string before it is used. The result of
expansion must be a list, possibly containing empty items, which is split up
-.section "Negated items in lists"
+.section "Negated items in lists" "SECID76"
.cindex "list" "negation"
.cindex "negation" "in lists"
Items in a list may be positive or negative. Negative items are indicated by a
-.section "An lsearch file is not an out-of-line list"
+.section "An lsearch file is not an out-of-line list" "SECID77"
As will be described in the sections that follow, lookups can be used in lists
to provide indexed methods of checking list membership. There has been some
confusion about the way &(lsearch)& lookups work in lists. Because
-.section "Named lists compared with macros"
+.section "Named lists compared with macros" "SECID78"
.cindex "list" "named compared with macro"
.cindex "macro" "compared with named list"
At first sight, named lists might seem to be no different from macros in the
.endd
-.section "Named list caching"
+.section "Named list caching" "SECID79"
.cindex "list" "caching of named"
.cindex "caching" "named lists"
While processing a message, Exim caches the result of checking a named list if
involved, to ensure that the right value is being used as the key.
-.section "Special host list patterns"
+.section "Special host list patterns" "SECID80"
.cindex "empty item in hosts list"
.cindex "host list" "empty string in"
If a host list item is the empty string, it matches only when no remote host is
colon is the key terminator in &(lsearch)& files. Full, unabbreviated IPv6
addresses are always used.
-&*Warning*&: Specifing &%net32-%& (for an IPv4 address) or &%net128-%& (for an
-IPv6 address) is not the same as specifing just &%net-%& without a number. In
+&*Warning*&: Specifying &%net32-%& (for an IPv4 address) or &%net128-%& (for an
+IPv6 address) is not the same as specifying just &%net-%& without a number. In
the former case the key strings include the mask value, whereas in the latter
case the IP address is used on its own.
Because of the problems of determining host names from IP addresses, matching
against host names is not as common as matching against IP addresses.
-.new
By default, in order to find a host name, Exim first does a reverse DNS lookup;
if no name is found in the DNS, the system function (&[gethostbyaddr()]& or
&[getipnodebyaddr()]& if available) is tried. The order in which these lookups
Only those names whose IP addresses match are accepted. Any other names are
discarded. If no names are left, Exim behaves as if the host name cannot be
found. In the most common case there is only one name and one IP address.
-.wen
There are some options that control what happens if a host name cannot be
found. These are described in section &<<SECTbehipnot>>& below.
.code
dbm;/host/accept/list
.endd
-a single-key lookup is performend, using the host name as its key. If the
+a single-key lookup is performed, using the host name as its key. If the
lookup succeeds, the host matches the item. The actual data that is looked up
is not used.
-.section "Host list patterns for query-style lookups"
+.section "Host list patterns for query-style lookups" "SECID81"
If a pattern is of the form
.display
<&'query-style-search-type'&>;<&'query'&>
-.section "Character escape sequences in expanded strings"
+.section "Character escape sequences in expanded strings" "SECID82"
.cindex "expansion" "escape sequences"
A backslash followed by one of the letters &"n"&, &"r"&, or &"t"& in an
expanded string is recognized as an escape sequence for the character newline,
and for other cases such as looked-up strings that are then expanded.
-.section "Testing string expansions"
+.section "Testing string expansions" "SECID83"
.cindex "expansion" "testing"
.cindex "testing" "string expansion"
-.cindex "&%-be%& option"
+.oindex "&%-be%&"
Many expansions can be tested by calling Exim with the &%-be%& option. This
takes the command arguments, or lines from the standard input if there are no
arguments, runs them through the string expansion code, and writes the results
instead runs under the uid and gid it was called with, to prevent users from
using &%-be%& for reading files to which they do not have access.
-.new
-.cindex "&%-bem%& option"
+.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
.endd
This loads the message from Exim's spool before doing the test expansions, and
is therefore restricted to admin users.
-.wen
.section "Forced expansion failure" "SECTforexpfai"
.display
<&'key1'&> = <&'value1'&> <&'key2'&> = <&'value2'&> ...
.endd
-.cindex "&$value$&"
+.vindex "&$value$&"
where the equals signs and spaces (but not both) are optional. If any of the
values contain white space, they must be enclosed in double quotes, and any
values that are enclosed in double quotes are subject to escape processing as
empty (for example, the fifth field above).
+.new
+.vitem &*${filter{*&<&'string'&>&*}{*&<&'condition'&>&*}}*&
+.cindex "list" "selecting by condition"
+.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
+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
+separator used for the output list is the same as the one used for the
+input, but a separator setting is not included in the output. For example:
+.code
+${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.
+.wen
+
+
.vitem &*${hash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
.cindex "hash function" "textual"
.cindex "expansion" "textual hash"
.vitem "&*$rheader_*&<&'header&~name'&>&*:*&&~or&~&&&
&*$rh_*&<&'header&~name'&>&*:*&"
.cindex "expansion" "header insertion"
-.cindex "&$header_$&"
-.cindex "&$bheader_$&"
-.cindex "&$rheader_$&"
+.vindex "&$header_$&"
+.vindex "&$bheader_$&"
+.vindex "&$rheader_$&"
.cindex "header lines" "in expansion strings"
.cindex "header lines" "character sets"
.cindex "header lines" "decoding"
&'do not'& terminate header names, and should not be used to enclose them as
if they were variables. Attempting to do so causes a syntax error.
-.new
Only header lines that are common to all copies of a message are visible to
this mechanism. These are the original header lines that are received with the
message, and any that are added by an ACL statement or by a system
are saved until the message's incoming header lines are available, at which
point they are added. When a DATA ACL is running, however, header lines added
by earlier ACLs are visible.
-.wen
Upper case and lower case letters are synonymous in header names. If the
following character is white space, the terminating colon may be omitted, but
replaced by an empty string. (See the &%def%& condition in section
&<<SECTexpcond>>& for a means of testing for the existence of a header.)
-.new
If there is more than one header with the same name, they are all concatenated
to form the substitution string, up to a maximum length of 64K. Unless
&%rheader%& is being used, leading and trailing white space is removed from
newline at the very end. For the &%header%& and &%bheader%& expansion, for
those headers that contain lists of addresses, a comma is also inserted at the
junctions between headers. This does not happen for the &%rheader%& expansion.
-.wen
.vitem &*${hmac{*&<&'hashname'&>&*}{*&<&'secret'&>&*}{*&<&'string'&>&*}}*&
.vitem &*${length{*&<&'string1'&>&*}{*&<&'string2'&>&*}}*&
.cindex "expansion" "string truncation"
-.cindex "&%length%&" "expansion item"
+.cindex "&%length%& expansion item"
The &%length%& item is used to extract the initial portion of a string. Both
strings are expanded, and the first one must yield a number, <&'n'&>, say. If
you are using a fixed value for the number, that is, if <&'string1'&> does not
in double quotes. The use of data lookups in users' filter files may be locked
out by the system administrator.
-.cindex "&$value$&"
+.vindex "&$value$&"
If the lookup succeeds, <&'string1'&> is expanded and replaces the entire item.
During its expansion, the variable &$value$& contains the data returned by the
lookup. Afterwards it reverts to the value it had previously (at the outer
{$value}fail}
.endd
+
+.new
+.vitem &*${map{*&<&'string1'&>&*}{*&<&'string2'&>&*}}*&
+.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
+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
+setting is not included in the output. For example:
+.code
+${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.
+.wen
+
.vitem &*${nhash{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
.cindex "expansion" "numeric hash"
.cindex "hash function" "numeric"
.vitem &*${prvs{*&<&'address'&>&*}{*&<&'secret'&>&*}{*&<&'keynumber'&>&*}}*&
-.cindex "prvs" "expansion item"
+.cindex "&%prvs%& expansion item"
The first argument is a complete email address and the second is secret
keystring. The third argument, specifying a key number, is optional. If absent,
it defaults to 0. The result of the expansion is a prvs-signed email address,
.vitem "&*${prvscheck{*&<&'address'&>&*}{*&<&'secret'&>&*}&&&
{*&<&'string'&>&*}}*&"
-.cindex "prvscheck" "expansion item"
+.cindex "&%prvscheck%& expansion item"
This expansion item is the complement of the &%prvs%& item. It is used for
checking prvs-signed addresses. If the expansion of the first argument does not
yield a syntactically valid prvs-signed address, the whole item expands to the
.vitem "&*${readsocket{*&<&'name'&>&*}{*&<&'request'&>&*}&&&
{*&<&'timeout'&>&*}{*&<&'eol&~string'&>&*}{*&<&'fail&~string'&>&*}}*&"
.cindex "expansion" "inserting from a socket"
-.cindex "socket" "use of in expansion"
+.cindex "socket, use of in expansion"
.cindex "&%readsocket%& expansion item"
This item inserts data from a Unix domain or Internet socket into the expanded
string. The minimal way of using it uses just two arguments, as in these
The &(redirect)& router has an option called &%forbid_filter_readsocket%& which
locks out the use of this expansion item in filter files.
+
+.new
+.vitem &*${reduce{*&<&'string1'&>}{<&'string2'&>&*}{*&<&'string3'&>&*}}*&
+.cindex "expansion" "reducing a list to a scalar"
+.cindex "list" "reducing to a scalar"
+.vindex "&$value$&"
+.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
+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
+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
+number of ways. For example, to add up a list of numbers:
+.code
+${reduce {<, 1,2,3}{0}{${eval:$value+$item}}}
+.endd
+The result of that expansion would be &`6`&. The maximum of a list of numbers
+can be found:
+.code
+${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*&
+expansion items.
+.wen
+
.vitem &*$rheader_*&<&'header&~name'&>&*:&~or&~$rh_*&<&'header&~name'&>&*:*&
This item inserts &"raw"& header lines. It is described with the &%header%&
expansion item above.
other command executions from Exim, a shell is not used by default. If you want
a shell, you must explicitly code it.
-.new
The standard input for the command exists, but is empty. The standard output
and standard error are set to the same file descriptor.
.cindex "return code" "from &%run%& expansion"
-.cindex "&$value$&"
+.vindex "&$value$&"
If the command succeeds (gives a zero return code) <&'string1'&> is expanded
and replaces the entire item; during this expansion, the standard output/error
from the command is in the variable &$value$&. If the command fails,
can be the word &"fail"& (not in braces) to force expansion failure if the
command does not succeed. If both strings are omitted, the result is contents
of the standard output/error on success, and nothing on failure.
-.wen
-.cindex "&$runrc$&"
+.vindex "&$runrc$&"
The return code from the command is put in the variable &$runrc$&, and this
remains set afterwards, so in a filter file you can do things like this:
.code
.vitem &*${substr{*&<&'string1'&>&*}{*&<&'string2'&>&*}{*&<&'string3'&>&*}}*&
-.cindex "&%substr%&"
+.cindex "&%substr%& expansion item"
.cindex "substring extraction"
.cindex "expansion" "substring extraction"
The three strings are expanded; the first two must yield numbers. Call them
.vlist
.vitem &*${address:*&<&'string'&>&*}*&
.cindex "expansion" "RFC 2822 address handling"
-.cindex "&%address%&" "expansion item"
+.cindex "&%address%& expansion item"
The string is interpreted as an RFC 2822 address, as it might appear in a
header line, and the effective address is extracted from it. If the string does
not parse successfully, the result is empty.
+.new
+.vitem &*${addresses:*&<&'string'&>&*}*&
+.cindex "expansion" "RFC 2822 address handling"
+.cindex "&%addresses%& expansion item"
+The string (after expansion) is interpreted as a list of addresses in RFC
+2822 format, such as can be found in a &'To:'& or &'Cc:'& header line. The
+operative address (&'local-part@domain'&) is extracted from each item, and the
+result of the expansion is a colon-separated list, with appropriate
+doubling of colons should any happen to be present in the email addresses.
+Syntactically invalid RFC2822 address items are omitted from the output.
+
+It is possible to specify a character other than colon for the output
+separator by starting the string with > followed by the new separator
+character. For example:
+.code
+${addresses:>& Chief <ceo@up.stairs>, sec@base.ment (dogsbody)}
+.endd
+expands to &`ceo@up.stairs&&sec@base.ment`&. 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
+processing lists.
+.wen
+
+
.vitem &*${base62:*&<&'digits'&>&*}*&
.cindex "&%base62%&"
.cindex "expansion" "conversion to base 62"
.cindex "expansion" "expression evaluation"
.cindex "expansion" "arithmetic expression"
.cindex "&%eval%& expansion item"
-.new
These items supports simple arithmetic and bitwise logical operations in
expansion strings. The string (after expansion) must be a conventional
arithmetic expression, but it is limited to basic arithmetic operators, bitwise
logical operators, and parentheses. All operations are carried out using
integer arithmetic. The operator priorities are as follows (the same as in the
C programming language):
-.table2 90pt 300pt
-.row &~&~&~&~&~&~&~&~&'highest:'& "not (~), negate (-)"
-.row "" "multiply (*), divide (/), remainder (%)"
-.row "" "plus (+), minus (-)"
-.row "" "shift-left (<<), shift-right (>>)"
-.row "" "and (&&)"
-.row "" "xor (^)"
-.row &~&~&~&~&~&~&~&~&'lowest:'& "or (|)"
+.table2 70pt 300pt
+.irow &'highest:'& "not (~), negate (-)"
+.irow "" "multiply (*), divide (/), remainder (%)"
+.irow "" "plus (+), minus (-)"
+.irow "" "shift-left (<<), shift-right (>>)"
+.irow "" "and (&&)"
+.irow "" "xor (^)"
+.irow &'lowest:'& "or (|)"
.endtable
Binary operators with the same priority are evaluated from left to right. White
space is permitted before or after operators.
&`${eval:~255&0x1234} `& yields 4608
&`${eval:-(~255&0x1234)} `& yields -4608
.endd
-.wen
As a more realistic example, in an ACL you might have
.code
.vitem &*${length_*&<&'number'&>&*:*&<&'string'&>&*}*&
.cindex "expansion" "string truncation"
-.cindex "&%length%&" "expansion item"
+.cindex "&%length%& expansion item"
The &%length%& operator is a simpler interface to the &%length%& function that
can be used when the parameter is a fixed number (as opposed to a string that
changes when expanded). The effect is the same as
characters.
+.new
+.vitem &*${rfc2047d:*&<&'string'&>&*}*&
+.cindex "expansion" "RFC 2047"
+.cindex "RFC 2047" "decoding"
+.cindex "&%rfc2047d%& expansion item"
+This operator decodes strings that are encoded as per RFC 2047. Binary zero
+bytes are replaced by question marks. Characters are converted into the
+character set defined by &%headers_charset%&. Overlong RFC 2047 &"words"& are
+not recognized unless &%check_rfc2047_length%& is set false.
+.wen
+
+
.vitem &*${rxquote:*&<&'string'&>&*}*&
.cindex "quoting" "in regular expressions"
two strings must take the form of optionally signed decimal integers,
optionally followed by one of the letters &"K"& or &"M"& (in either upper or
lower case), signifying multiplication by 1024 or 1024*1024, respectively.
-&new("As a special case, the numerical value of an empty string is taken as
-zero.")
+As a special case, the numerical value of an empty string is taken as
+zero.
.vitem &*crypteq&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "expansion" "encrypted comparison"
-.cindex "encrypted strings" "comparing"
+.cindex "encrypted strings, comparing"
.cindex "&%crypteq%& expansion condition"
This condition is included in the Exim binary if it is built to support any
authentication mechanisms (see chapter &<<CHAPSMTPAUTH>>&). Otherwise, it is
whatever its length.
.next
-.new
.cindex "&[crypt16()]&"
-&%{crypt16}%& calls the &[crypt16()]& function, which was orginally created to
+&%{crypt16}%& calls the &[crypt16()]& function, which was originally created to
use up to 16 characters of the password in some operating systems. Again, in
modern operating systems, more characters may be used.
.endlist
determined by the setting of DEFAULT_CRYPT in &_Local/Makefile_&. The default
default is &`{crypt}`&. Whatever the default, you can always use either
function by specifying it explicitly in curly brackets.
-.wen
.vitem &*def:*&<&'variable&~name'&>
.cindex "expansion" "checking for empty variable"
&*Note*&: No &%$%& appears before &%header_%& or &%h_%& in the condition, and
the header name must be terminated by a colon if white space does not follow.
-.vitem &*eq&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
+.vitem &*eq&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
+ &*eqi&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "string" "comparison"
.cindex "expansion" "string comparison"
.cindex "&%eq%& expansion condition"
-The two substrings are first expanded. The condition is true if the two
-resulting strings are identical, including the case of letters.
-
-.vitem &*eqi&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
-.cindex "string" "comparison"
-.cindex "expansion" "string comparison"
.cindex "&%eqi%& expansion condition"
The two substrings are first expanded. The condition is true if the two
-resulting strings are identical when compared in a case-independent way.
+resulting strings are identical. For &%eq%& the comparison includes the case of
+letters, whereas for &%eqi%& the comparison is case-independent.
.vitem &*exists&~{*&<&'file&~name'&>&*}*&
.cindex "expansion" "file existence test"
This condition, which has no data, is true during a message's first delivery
attempt. It is false during any subsequent delivery attempts.
-.vitem &*ge&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
-.cindex "&%ge%& expansion condition"
-See &*gei*&.
-.vitem &*gei&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
+.new
+.vitem "&*forall{*&<&'a list'&>&*}{*&<&'a condition'&>&*}*&" &&&
+ "&*forany{*&<&'a list'&>&*}{*&<&'a condition'&>&*}*&"
+.cindex "list" "iterative conditions"
+.cindex "expansion" "&*forall*& condition"
+.cindex "expansion" "&*forany*& condition"
+.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
+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
+For &*forany*&, interpretation stops if the condition is true for any item, and
+the result of the whole condition is true. If the condition is false for all
+items in the list, the overall condition is false.
+.next
+For &*forall*&, interpretation stops if the condition is false for any item,
+and the result of the whole condition is false. If the condition is true for
+all items in the list, the overall condition is true.
+.endlist
+Note that negation of &*forany*& means that the condition must be false for all
+items for the overall condition to succeed, and negation of &*forall*& means
+that the condition must be false for at least one item. In this example, the
+list separator is changed to a comma:
+.code
+${if forany{<, $recipients}{match{$item}{^user3@}}{yes}{no}}
+.endd
+The value of &$item$& is saved and restored while &*forany*& or &*forall*& is
+being processed, to enable these expansion items to be nested.
+.wen
+
+
+.vitem &*ge&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
+ &*gei&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "string" "comparison"
.cindex "expansion" "string comparison"
+.cindex "&%ge%& expansion condition"
.cindex "&%gei%& expansion condition"
The two substrings are first expanded. The condition is true if the first
-string is lexically greater than or equal to the second string: for &%ge%& the
+string is lexically greater than or equal to the second string. For &%ge%& the
comparison includes the case of letters, whereas for &%gei%& the comparison is
case-independent.
-.vitem &*gt&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
-.cindex "&%gt%& expansion condition"
-See &*gti*&.
-
-.vitem &*gti&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
+.vitem &*gt&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
+ &*gti&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "string" "comparison"
.cindex "expansion" "string comparison"
+.cindex "&%gt%& expansion condition"
.cindex "&%gti%& expansion condition"
The two substrings are first expanded. The condition is true if the first
-string is lexically greater than the second string: for &%gt%& the comparison
+string is lexically greater than the second string. For &%gt%& the comparison
includes the case of letters, whereas for &%gti%& the comparison is
case-independent.
-.vitem &*isip&~{*&<&'string'&>&*}*&
-.cindex "&%isip%& expansion condition"
-See &*isip6*&.
-
-.vitem &*isip4&~{*&<&'string'&>&*}*&
-.cindex "&%isip4%& expansion condition"
-See &*isip6*&.
-
-.vitem &*isip6&~{*&<&'string'&>&*}*&
+.vitem &*isip&~{*&<&'string'&>&*}*& &&&
+ &*isip4&~{*&<&'string'&>&*}*& &&&
+ &*isip6&~{*&<&'string'&>&*}*&
.cindex "IP address" "testing string format"
.cindex "string" "testing for IP address"
+.cindex "&%isip%& expansion condition"
+.cindex "&%isip4%& expansion condition"
.cindex "&%isip6%& expansion condition"
The substring is first expanded, and then tested to see if it has the form of
an IP address. Both IPv4 and IPv6 addresses are valid for &%isip%&, whereas
this can be used.
-.vitem &*le&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
-.cindex "&%le%& expansion condition"
-See &*lei*&.
-
-.vitem &*lei&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
+.vitem &*le&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
+ &*lei&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "string" "comparison"
.cindex "expansion" "string comparison"
+.cindex "&%le%& expansion condition"
.cindex "&%lei%& expansion condition"
The two substrings are first expanded. The condition is true if the first
-string is lexically less than or equal to the second string: for &%le%& the
+string is lexically less than or equal to the second string. For &%le%& the
comparison includes the case of letters, whereas for &%lei%& the comparison is
case-independent.
-.vitem &*lt&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
-.cindex "&%lt%& expansion condition"
-See &*lti*&.
-
-.vitem &*lti&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
+.vitem &*lt&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*& &&&
+ &*lti&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "string" "comparison"
.cindex "expansion" "string comparison"
+.cindex "&%lt%& expansion condition"
.cindex "&%lti%& expansion condition"
The two substrings are first expanded. The condition is true if the first
-string is lexically less than the second string: for &%lt%& the comparison
+string is lexically less than the second string. For &%lt%& the comparison
includes the case of letters, whereas for &%lti%& the comparison is
case-independent.
useful for testing for a locally submitted message or one from specific hosts
in a single test such as
. ==== As this is a nested list, any displays it contains must be indented
-. ==== as otherwise they are too far to the left.
+. ==== as otherwise they are too far to the left. This comment applies to
+. ==== the use of xmlto plus fop. There's no problem when formatting with
+. ==== sdop, with or without the extra indent.
.code
${if match_ip{$sender_host_address}{:4.3.2.1:...}{...}{...}}
.endd
.next
The item @[] matches any of the local host's interface addresses.
.next
-Lookups are assumed to be &"net-"& style lookups, even if &`net-`& is not
-specified. Thus, the following are equivalent:
+.new
+Single-key lookups are assumed to be like &"net-"& style lookups in host lists,
+even if &`net-`& is not specified. There is never any attempt to turn the IP
+address into a host name. The most common type of linear search for
+&*match_ip*& is likely to be &*iplsearch*&, in which the file can contain CIDR
+masks. For example:
+.code
+ ${if match_ip{$sender_host_address}{iplsearch;/some/file}...
+.endd
+It is of course possible to use other kinds of lookup, and in such a case, you
+do need to specify the &`net-`& prefix if you want to specify a specific
+address mask, for example:
.code
- ${if match_ip{$sender_host_address}{lsearch;/some/file}...
- ${if match_ip{$sender_host_address}{net-lsearch;/some/file}...
+ ${if match_ip{$sender_host_address}{net24-dbm;/some/file}...
.endd
-You do need to specify the &`net-`& prefix if you want to specify a
-specific address mask, for example, by using &`net24-`&. However, unless you
-are combining a &%match_ip%& condition with others, it is usually neater to use
-an expansion lookup such as:
+However, unless you are combining a &%match_ip%& condition with others, it is
+just as easy to use the fact that a lookup is itself a condition, and write:
.code
- ${lookup{${mask:$sender_host_address/24}}lsearch{/some/file}...
+ ${lookup{${mask:$sender_host_address/24}}dbm{/a/file}...
.endd
+.wen
.endlist ilist
Consult section &<<SECThoslispatip>>& for further details of these patterns.
.vitem &*match_local_part&~{*&<&'string1'&>&*}{*&<&'string2'&>&*}*&
.cindex "domain list" "in expansion condition"
.cindex "address list" "in expansion condition"
-.cindex "local part list" "in expansion condition"
+.cindex "local part" "list, in expansion condition"
.cindex "&%match_local_part%& expansion condition"
This condition, together with &%match_address%& and &%match_domain%&, make it
possible to test domain, address, and local part lists within expansions. Each
.vitem &*queue_running*&
.cindex "queue runner" "detecting when delivering from"
.cindex "expansion" "queue runner test"
-.cindex "&%queue_runnint%& expansion condition"
+.cindex "&%queue_running%& expansion condition"
This condition, which has no data, is true during delivery attempts that are
initiated by queue runner processes, and false otherwise.
-.section "Combining expansion conditions"
+.section "Combining expansion conditions" "SECID84"
.cindex "expansion" "combining conditions"
Several conditions can be tested at once by combining them using the &%and%&
and &%or%& combination conditions. Note that &%and%& and &%or%& are complete
.section "Expansion variables" "SECTexpvar"
-.cindex "expansion variables" "list of"
+.cindex "expansion" "variables, list of"
This section contains an alphabetical list of all the expansion variables. Some
of them are available only when Exim is compiled with specific options such as
support for TLS or the content scanning extension.
.vlist
.vitem "&$0$&, &$1$&, etc"
.cindex "numerical variables (&$1$& &$2$& etc)"
+.new
When a &%match%& expansion condition succeeds, these variables contain the
captured substrings identified by the regular expression during subsequent
-processing of the success string of the containing &%if%& expansion item. They
-may also be set externally by some other matching process which precedes the
-expansion of the string. For example, the commands available in Exim filter
-files include an &%if%& command with its own regular expression matching
-condition.
-
-.vitem "&$acl_c0$& &-- &$acl_c19$&"
-Values can be placed in these variables by the &%set%& modifier in an ACL. The
-values persist throughout the lifetime of an SMTP connection. They can be used
-to pass information between ACLs and between different invocations of the same
-ACL. When a message is received, the values of these variables are saved with
-the message, and can be accessed by filters, routers, and transports during
-subsequent delivery.
+processing of the success string of the containing &%if%& expansion item.
+However, they do not retain their values afterwards; in fact, their previous
+values are restored at the end of processing an &%if%& item. The numerical
+variables may also be set externally by some other matching process which
+precedes the expansion of the string. For example, the commands available in
+Exim filter files include an &%if%& command with its own regular expression
+matching condition.
+.wen
-.vitem "&$acl_m0$& &-- &$acl_m19$&"
+.new
+.vitem "&$acl_c...$&"
Values can be placed in these variables by the &%set%& modifier in an ACL. They
-retain their values while a message is being received, but are reset
-afterwards. They are also reset by MAIL, RSET, EHLO, HELO, and after starting a
-TLS session. When a message is received, the values of these variables are
-saved with the message, and can be accessed by filters, routers, and transports
+can be given any name that starts with &$acl_c$& and is at least six characters
+long, but the sixth character must be either a digit or an underscore. For
+example: &$acl_c5$&, &$acl_c_mycount$&. The values of the &$acl_c...$&
+variables persist throughout the lifetime of an SMTP connection. They can be
+used to pass information between ACLs and between different invocations of the
+same ACL. When a message is received, the values of these variables are saved
+with the message, and can be accessed by filters, routers, and transports
during subsequent delivery.
+.vitem "&$acl_m...$&"
+These variables are like the &$acl_c...$& variables, except that their values
+are reset after a message has been received. Thus, if several messages are
+received in one SMTP connection, &$acl_m...$& values are not passed on from one
+message to the next, as &$acl_c...$& values are. The &$acl_m...$& variables are
+also reset by MAIL, RSET, EHLO, HELO, and after starting a TLS session. When a
+message is received, the values of these variables are saved with the message,
+and can be accessed by filters, routers, and transports during subsequent
+delivery.
+.wen
+
.vitem &$acl_verify_message$&
-.cindex "&$acl_verify_message$&"
+.vindex "&$acl_verify_message$&"
After an address verification has failed, this variable contains the failure
message. It retains its value for use in subsequent modifiers. The message can
be preserved by coding like this:
failure.
.vitem &$address_data$&
-.cindex "&$address_data$&"
+.vindex "&$address_data$&"
This variable is set by means of the &%address_data%& option in routers. The
value then remains with the address while it is processed by subsequent routers
and eventually a transport. If the transport is handling multiple addresses,
these values for longer, you can save them in ACL variables.
.vitem &$address_file$&
-.cindex "&$address_file$&"
+.vindex "&$address_file$&"
When, as a result of aliasing, forwarding, or filtering, a message is directed
to a specific file, this variable holds the name of the file when the transport
is running. At other times, the variable is empty. For example, using the
/home/r2d2/savemail
.endd
then when the &(address_file)& transport is running, &$address_file$&
-contains &"/home/r2d2/savemail"&.
-
+contains the text string &`/home/r2d2/savemail`&.
.cindex "Sieve filter" "value of &$address_file$&"
For Sieve filters, the value may be &"inbox"& or a relative folder name. It is
then up to the transport configuration to generate an appropriate absolute path
to the relevant file.
.vitem &$address_pipe$&
-.cindex "&$address_pipe$&"
+.vindex "&$address_pipe$&"
When, as a result of aliasing or forwarding, a message is directed to a pipe,
this variable holds the pipe command when the transport is running.
.vitem "&$auth1$& &-- &$auth3$&"
-.cindex "&$auth1$&, &$auth2$&, etc"
+.vindex "&$auth1$&, &$auth2$&, etc"
These variables are used in SMTP authenticators (see chapters
&<<CHAPplaintext>>&&--&<<CHAPspa>>&). Elsewhere, they are empty.
.vitem &$authenticated_id$&
.cindex "authentication" "id"
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
When a server successfully authenticates a client it may be configured to
preserve some of the authentication information in the variable
&$authenticated_id$& (see chapter &<<CHAPSMTPAUTH>>&). For example, a
.cindex "sender" "authenticated"
.cindex "authentication" "sender"
.cindex "AUTH" "on MAIL command"
-.cindex "&$authenticated_sender$&"
+.vindex "&$authenticated_sender$&"
When acting as a server, Exim takes note of the AUTH= parameter on an incoming
SMTP MAIL command if it believes the sender is sufficiently trusted, as
described in section &<<SECTauthparamail>>&. Unless the data is the string
available during delivery in the &$authenticated_sender$& variable. If the
sender is not trusted, Exim accepts the syntax of AUTH=, but ignores the data.
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
When a message is submitted locally (that is, not over a TCP connection), the
value of &$authenticated_sender$& is an address constructed from the login
name of the calling process and &$qualify_domain$&, except that a trusted user
.vitem &$authentication_failed$&
.cindex "authentication" "failure"
-.cindex "&$authentication_failed$&"
+.vindex "&$authentication_failed$&"
This variable is set to &"1"& in an Exim server if a client issues an AUTH
command that does not succeed. Otherwise it is set to &"0"&. This makes it
possible to distinguish between &"did not try to authenticate"&
.vitem &$body_linecount$&
.cindex "message body" "line count"
.cindex "body of message" "line count"
-.cindex "&$body_linecount$&"
+.vindex "&$body_linecount$&"
When a message is being received or delivered, this variable contains the
number of lines in the message's body. See also &$message_linecount$&.
.cindex "message body" "binary zero count"
.cindex "body of message" "binary zero count"
.cindex "binary zero" "in message body"
-.cindex "&$body_zerocount$&"
+.vindex "&$body_zerocount$&"
When a message is being received or delivered, this variable contains the
number of binary zero bytes in the message's body.
.vitem &$bounce_recipient$&
-.cindex "&$bounce_recipient$&"
+.vindex "&$bounce_recipient$&"
This is set to the recipient address of a bounce message while Exim is creating
it. It is useful if a customized bounce message text file is in use (see
chapter &<<CHAPemsgcust>>&).
.vitem &$bounce_return_size_limit$&
-.cindex "&$bounce_return_size_limit$&"
+.vindex "&$bounce_return_size_limit$&"
This contains the value set in the &%bounce_return_size_limit%& option, rounded
up to a multiple of 1000. It is useful when a customized error message text
file is in use (see chapter &<<CHAPemsgcust>>&).
.vitem &$caller_gid$&
.cindex "gid (group id)" "caller"
-.cindex "&$caller_gid$&"
+.vindex "&$caller_gid$&"
The real group id under which the process that called Exim was running. This is
not the same as the group id of the originator of a message (see
&$originator_gid$&). If Exim re-execs itself, this variable in the new
.vitem &$caller_uid$&
.cindex "uid (user id)" "caller"
-.cindex "&$caller_uid$&"
+.vindex "&$caller_uid$&"
The real user id under which the process that called Exim was running. This is
not the same as the user id of the originator of a message (see
&$originator_uid$&). If Exim re-execs itself, this variable in the new
incarnation normally contains the Exim uid.
.vitem &$compile_date$&
-.cindex "&$compile_date$&"
+.vindex "&$compile_date$&"
The date on which the Exim binary was compiled.
.vitem &$compile_number$&
-.cindex "&$compile_number$&"
+.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.
.vitem &$demime_errorlevel$&
-.cindex "&$demime_errorlevel$&"
+.vindex "&$demime_errorlevel$&"
This variable is available when Exim is compiled with
the content-scanning extension and the obsolete &%demime%& condition. For
details, see section &<<SECTdemimecond>>&.
.vitem &$demime_reason$&
-.cindex "&$demime_reason$&"
+.vindex "&$demime_reason$&"
This variable is available when Exim is compiled with the
content-scanning extension and the obsolete &%demime%& condition. For details,
see section &<<SECTdemimecond>>&.
.vitem &$dnslist_domain$&
.cindex "black list (DNS)"
-.cindex "&$dnslist_domain$&"
+.vindex "&$dnslist_domain$&"
When a client host is found to be on a DNS (black) list,
the list's domain name is put into this variable so that it can be included in
the rejection message.
.vitem &$dnslist_text$&
-.cindex "&$dnslist_text$&"
+.vindex "&$dnslist_text$&"
When a client host is found to be on a DNS (black) list, the
contents of any associated TXT record are placed in this variable.
.vitem &$dnslist_value$&
-.cindex "&$dnslist_value$&"
+.vindex "&$dnslist_value$&"
When a client host is found to be on a DNS (black) list,
the IP address from the resource record is placed in this variable.
If there are multiple records, all the addresses are included, comma-space
separated.
.vitem &$domain$&
-.new
-.cindex "&$domain$&"
+.vindex "&$domain$&"
When an address is being routed, or delivered on its own, this variable
contains the domain. Uppercase letters in the domain are converted into lower
case for &$domain$&.
-.wen
Global address rewriting happens when a message is received, so the value of
&$domain$& during routing and delivery is the value after rewriting. &$domain$&
.vitem &$domain_data$&
-.cindex "&$domain_data$&"
+.vindex "&$domain_data$&"
When the &%domains%& option on a router matches a domain by
means of a lookup, the data read by the lookup is available during the running
of the router as &$domain_data$&. In addition, if the driver routes the
to nothing.
.vitem &$exim_gid$&
-.cindex "&$exim_gid$&"
+.vindex "&$exim_gid$&"
This variable contains the numerical value of the Exim group id.
.vitem &$exim_path$&
-.cindex "&$exim_path$&"
+.vindex "&$exim_path$&"
This variable contains the path to the Exim binary.
.vitem &$exim_uid$&
-.cindex "&$exim_uid$&"
+.vindex "&$exim_uid$&"
This variable contains the numerical value of the Exim user id.
.vitem &$found_extension$&
-.cindex "&$found_extension$&"
+.vindex "&$found_extension$&"
This variable is available when Exim is compiled with the
content-scanning extension and the obsolete &%demime%& condition. For details,
see section &<<SECTdemimecond>>&.
characters. Note also that braces must &'not'& be used.
.vitem &$home$&
-.cindex "&$home$&"
+.vindex "&$home$&"
When the &%check_local_user%& option is set for a router, the user's home
directory is placed in &$home$& when the check succeeds. In particular, this
means it is set during the running of users' filter files. A router may also
of the environment variable HOME.
.vitem &$host$&
-.cindex "&$host$&"
+.vindex "&$host$&"
If a router assigns an address to a transport (any transport), and passes a
list of hosts with the address, the value of &$host$& when the transport starts
to run is the name of the first host on the list. Note that this applies both
.vitem &$host_address$&
-.cindex "&$host_address$&"
+.vindex "&$host_address$&"
This variable is set to the remote host's IP address whenever &$host$& is set
for a remote connection. It is also set to the IP address that is being checked
when the &%ignore_target_hosts%& option is being processed.
.vitem &$host_data$&
-.cindex "&$host_data$&"
+.vindex "&$host_data$&"
If a &%hosts%& condition in an ACL is satisfied by means of a lookup, the
result of the lookup is made available in the &$host_data$& variable. This
allows you, for example, to do things like this:
message = $host_data
.endd
.vitem &$host_lookup_deferred$&
-.cindex "host name lookup" "failure of"
-.cindex "&$host_lookup_deferred$&"
+.cindex "host name" "lookup, failure of"
+.vindex "&$host_lookup_deferred$&"
This variable normally contains &"0"&, as does &$host_lookup_failed$&. When a
message comes from a remote host and there is an attempt to look up the host's
name from its IP address, and the attempt is not successful, one of these
&"1"&. See also &$sender_host_name$&.
.vitem &$host_lookup_failed$&
-.cindex "&$host_lookup_failed$&"
+.vindex "&$host_lookup_failed$&"
See &$host_lookup_deferred$&.
.vitem &$inode$&
-.cindex "&$inode$&"
+.vindex "&$inode$&"
The only time this variable is set is while expanding the &%directory_file%&
option in the &(appendfile)& transport. The variable contains the inode number
of the temporary file which is about to be renamed. It can be used to construct
a unique name for the file.
-.new
.vitem &$interface_address$&
-.cindex "&$interface_address$&"
+.vindex "&$interface_address$&"
This is an obsolete name for &$received_ip_address$&.
.vitem &$interface_port$&
-.cindex "&$interface_port$&"
+.vindex "&$interface_port$&"
This is an obsolete name for &$received_port$&.
+
+.new
+.vitem &$item$&
+.vindex "&$item$&"
+This variable is used during the expansion of &*forall*& and &*forany*&
+conditions (see section &<<SECTexpcond>>&), and &*filter*&, &*man*&, and
+&*reduce*& items (see section &<<SECTexpcond>>&). In other circumstances, it is
+empty.
.wen
.vitem &$ldap_dn$&
-.cindex "&$ldap_dn$&"
+.vindex "&$ldap_dn$&"
This variable, which is available only when Exim is compiled with LDAP support,
contains the DN from the last entry in the most recently successful LDAP
lookup.
.vitem &$load_average$&
-.cindex "&$load_average$&"
+.vindex "&$load_average$&"
This variable contains the system load average, multiplied by 1000 to that it
is an integer. For example, if the load average is 0.21, the value of the
variable is 210. The value is recomputed every time the variable is referenced.
.vitem &$local_part$&
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
When an address is being routed, or delivered on its own, this
variable contains the local part. When a number of addresses are being
delivered together (for example, multiple RCPT commands in an SMTP
because a message may have many recipients and the system filter is called just
once.
-.cindex "&$local_part_prefix$&"
-.cindex "&$local_part_suffix$&"
+.vindex "&$local_part_prefix$&"
+.vindex "&$local_part_suffix$&"
If a local part prefix or suffix has been recognized, it is not included in the
value of &$local_part$& during routing and subsequent delivery. The values of
any prefix or suffix are in &$local_part_prefix$& and
&%caseful_local_part%& option (see chapter &<<CHAProutergeneric>>&).
.vitem &$local_part_data$&
-.cindex "&$local_part_data$&"
+.vindex "&$local_part_data$&"
When the &%local_parts%& option on a router matches a local part by means of a
lookup, the data read by the lookup is available during the running of the
router as &$local_part_data$&. In addition, if the driver routes the address
variable expands to nothing.
.vitem &$local_part_prefix$&
-.cindex "&$local_part_prefix$&"
+.vindex "&$local_part_prefix$&"
When an address is being routed or delivered, and a
specific prefix for the local part was recognized, it is available in this
variable, having been removed from &$local_part$&.
.vitem &$local_part_suffix$&
-.cindex "&$local_part_suffix$&"
+.vindex "&$local_part_suffix$&"
When an address is being routed or delivered, and a
specific suffix for the local part was recognized, it is available in this
variable, having been removed from &$local_part$&.
.vitem &$local_scan_data$&
-.cindex "&$local_scan_data$&"
+.vindex "&$local_scan_data$&"
This variable contains the text returned by the &[local_scan()]& function when
a message is received. See chapter &<<CHAPlocalscan>>& for more details.
.vitem &$local_user_gid$&
-.cindex "&$local_user_gid$&"
+.vindex "&$local_user_gid$&"
See &$local_user_uid$&.
.vitem &$local_user_uid$&
-.cindex "&$local_user_uid$&"
+.vindex "&$local_user_uid$&"
This variable and &$local_user_gid$& are set to the uid and gid after the
&%check_local_user%& router precondition succeeds. This means that their values
are available for the remaining preconditions (&%senders%&, &%require_files%&,
are &`(uid_t)(-1)`& and &`(gid_t)(-1)`&, respectively.
.vitem &$localhost_number$&
-.cindex "&$localhost_number$&"
+.vindex "&$localhost_number$&"
This contains the expanded value of the
&%localhost_number%& option. The expansion happens after the main options have
been read.
.vitem &$log_inodes$&
-.cindex "&$log_inodes$&"
+.vindex "&$log_inodes$&"
The number of free inodes in the disk partition where Exim's
log files are being written. The value is recalculated whenever the variable is
referenced. If the relevant file system does not have the concept of inodes,
the value of is -1. See also the &%check_log_inodes%& option.
.vitem &$log_space$&
-.cindex "&$log_space$&"
+.vindex "&$log_space$&"
The amount of free space (as a number of kilobytes) in the disk
partition where Exim's log files are being written. The value is recalculated
whenever the variable is referenced. If the operating system does not have the
.vitem &$mailstore_basename$&
-.cindex "&$mailstore_basename$&"
+.vindex "&$mailstore_basename$&"
This variable is set only when doing deliveries in &"mailstore"& format in the
&(appendfile)& transport. During the expansion of the &%mailstore_prefix%&,
&%mailstore_suffix%&, &%message_prefix%&, and &%message_suffix%& options, it
variable is empty.
.vitem &$malware_name$&
-.cindex "&$malware_name$&"
+.vindex "&$malware_name$&"
This variable is available when Exim is compiled with the
content-scanning extension. It is set to the name of the virus that was found
when the ACL &%malware%& condition is true (see section &<<SECTscanvirus>>&).
.vitem &$message_age$&
.cindex "message" "age of"
-.cindex "&$message_age$&"
+.vindex "&$message_age$&"
This variable is set at the start of a delivery attempt to contain the number
of seconds since the message was received. It does not change during a single
delivery attempt.
.cindex "body of message" "expansion variable"
.cindex "message body" "in expansion"
.cindex "binary zero" "in message body"
-.cindex "&$message_body$&"
+.vindex "&$message_body$&"
This variable contains the initial portion of a message's
body while it is being delivered, and is intended mainly for use in filter
files. The maximum number of characters of the body that are put into the
.vitem &$message_body_end$&
.cindex "body of message" "expansion variable"
.cindex "message body" "in expansion"
-.cindex "&$message_body_end$&"
+.vindex "&$message_body_end$&"
This variable contains the final portion of a message's
body while it is being delivered. The format and maximum size are as for
&$message_body$&.
.vitem &$message_body_size$&
.cindex "body of message" "size"
.cindex "message body" "size"
-.cindex "&$message_body_size$&"
+.vindex "&$message_body_size$&"
When a message is being delivered, this variable contains the size of the body
in bytes. The count starts from the character after the blank line that
separates the body from the header. Newlines are included in the count. See
also &$message_size$&, &$body_linecount$&, and &$body_zerocount$&.
.vitem &$message_exim_id$&
-.cindex "&$message_exim_id$&"
+.vindex "&$message_exim_id$&"
When a message is being received or delivered, this variable contains the
unique message id that is generated and used by Exim to identify the message.
An id is not created for a message until after its header has been successfully
&`1BXTIK-0001yO-VA`&.
.vitem &$message_headers$&
-.new
-.cindex &$message_headers$&
+.vindex &$message_headers$&
This variable contains a concatenation of all the header lines when a message
is being processed, except for lines added by routers or transports. The header
lines are separated by newline characters. Their contents are decoded in the
same way as a header line that is inserted by &%bheader%&.
.vitem &$message_headers_raw$&
-.cindex &$message_headers_raw$&
+.vindex &$message_headers_raw$&
This variable is like &$message_headers$& except that no processing of the
contents of header lines is done.
-.wen
.vitem &$message_id$&
This is an old name for &$message_exim_id$&, which is now deprecated.
.vitem &$message_linecount$&
-.cindex "&$message_linecount$&"
+.vindex "&$message_linecount$&"
This variable contains the total number of lines in the header and body of the
message. Compare &$body_linecount$&, which is the count for the body only.
During the DATA and content-scanning ACLs, &$message_linecount$& contains the
.code
deny message = Too many lines in message header
condition = \
- ${if <{250}{${eval:$message_linecount - $body_linecount}}}
+ ${if <{250}{${eval:$message_linecount - $body_linecount}}}
.endd
In the MAIL and RCPT ACLs, the value is zero because at that stage the
message has not yet been received.
.vitem &$message_size$&
.cindex "size" "of message"
.cindex "message" "size"
-.cindex "&$message_size$&"
+.vindex "&$message_size$&"
When a message is being processed, this variable contains its size in bytes. In
most cases, the size includes those headers that were received with the
message, but not those (such as &'Envelope-to:'&) that are added to individual
of the &%add%& command in filter files.
.vitem &$original_domain$&
-.cindex "&$domain$&"
-.cindex "&$original_domain$&"
+.vindex "&$domain$&"
+.vindex "&$original_domain$&"
When a top-level address is being processed for delivery, this contains the
same value as &$domain$&. However, if a &"child"& address (for example,
generated by an alias, forward, or filter file) is being processed, this
part &'system-filter'& and the default qualify domain.
.vitem &$original_local_part$&
-.cindex "&$local_part$&"
-.cindex "&$original_local_part$&"
+.vindex "&$local_part$&"
+.vindex "&$original_local_part$&"
When a top-level address is being processed for delivery, this contains the
same value as &$local_part$&, unless a prefix or suffix was removed from the
local part, because &$original_local_part$& always contains the full local
.vitem &$originator_gid$&
.cindex "gid (group id)" "of originating user"
.cindex "sender" "gid"
-.cindex "&$caller_gid$&"
-.cindex "&$originator_gid$&"
+.vindex "&$caller_gid$&"
+.vindex "&$originator_gid$&"
This variable contains the value of &$caller_gid$& that was set when the
message was received. For messages received via the command line, this is the
gid of the sending user. For messages received by SMTP over TCP/IP, this is
.vitem &$originator_uid$&
.cindex "uid (user id)" "of originating user"
.cindex "sender" "uid"
-.cindex "&$caller_uid$&"
-.cindex "&$originaltor_uid$&"
+.vindex "&$caller_uid$&"
+.vindex "&$originaltor_uid$&"
The value of &$caller_uid$& that was set when the message was received. For
messages received via the command line, this is the uid of the sending user.
For messages received by SMTP over TCP/IP, this is normally the uid of the Exim
user.
.vitem &$parent_domain$&
-.cindex "&$parent_domain$&"
+.vindex "&$parent_domain$&"
This variable is similar to &$original_domain$& (see
above), except that it refers to the immediately preceding parent address.
.vitem &$parent_local_part$&
-.cindex "&$parent_local_part$&"
+.vindex "&$parent_local_part$&"
This variable is similar to &$original_local_part$&
(see above), except that it refers to the immediately preceding parent address.
.vitem &$pid$&
.cindex "pid (process id)" "of current process"
-.cindex "&$pid$&"
+.vindex "&$pid$&"
This variable contains the current process id.
.vitem &$pipe_addresses$&
.cindex "filter" "transport filter"
.cindex "transport" "filter"
-.cindex "&$pipe_addresses$&"
+.vindex "&$pipe_addresses$&"
This is not an expansion variable, but is mentioned here because the string
&`$pipe_addresses`& is handled specially in the command specification for the
&(pipe)& transport (chapter &<<CHAPpipetransport>>&) and in transport filters
variable"& error if encountered.
.vitem &$primary_hostname$&
-.cindex "&$primary_hostname$&"
+.vindex "&$primary_hostname$&"
This variable contains the value set by &%primary_hostname%& in the
configuration file, or read by the &[uname()]& function. If &[uname()]& returns
a single-component name, Exim calls &[gethostbyname()]& (or
&<<SECTverifyPRVS>>&.
.vitem &$qualify_domain$&
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
The value set for the &%qualify_domain%& option in the configuration file.
.vitem &$qualify_recipient$&
-.cindex "&$qualify_recipient$&"
+.vindex "&$qualify_recipient$&"
The value set for the &%qualify_recipient%& option in the configuration file,
or if not set, the value of &$qualify_domain$&.
.vitem &$rcpt_count$&
-.cindex "&$rcpt_count$&"
+.vindex "&$rcpt_count$&"
When a message is being received by SMTP, this variable contains the number of
RCPT commands received for the current message. If this variable is used in a
RCPT ACL, its value includes the current command.
.vitem &$rcpt_defer_count$&
-.cindex "&$rcpt_defer_count$&"
+.vindex "&$rcpt_defer_count$&"
.cindex "4&'xx'& responses" "count of"
When a message is being received by SMTP, this variable contains the number of
RCPT commands in the current message that have previously been rejected with a
temporary (4&'xx'&) response.
.vitem &$rcpt_fail_count$&
-.cindex "&$rcpt_fail_count$&"
+.vindex "&$rcpt_fail_count$&"
When a message is being received by SMTP, this variable contains the number of
RCPT commands in the current message that have previously been rejected with a
permanent (5&'xx'&) response.
.vitem &$received_count$&
-.cindex "&$received_count$&"
+.vindex "&$received_count$&"
This variable contains the number of &'Received:'& header lines in the message,
including the one added by Exim (so its value is always greater than zero). It
is available in the DATA ACL, the non-SMTP ACL, and while routing and
delivering.
.vitem &$received_for$&
-.cindex "&$received_for$&"
+.vindex "&$received_for$&"
If there is only a single recipient address in an incoming message, this
variable contains that address when the &'Received:'& header line is being
built. The value is copied after recipient rewriting has happened, but before
the &[local_scan()]& function is run.
-.new
.vitem &$received_ip_address$&
-.cindex "&$received_ip_address$&"
+.vindex "&$received_ip_address$&"
As soon as an Exim server starts processing an incoming TCP/IP connection, this
variable is set to the address of the local IP interface, and &$received_port$&
is set to the local port number. (The remote IP address and port are in
&(smtp)& transport).
.vitem &$received_port$&
-.cindex "&$received_port$&"
+.vindex "&$received_port$&"
See &$received_ip_address$&.
-.wen
.vitem &$received_protocol$&
-.cindex "&$received_protocol$&"
+.vindex "&$received_protocol$&"
When a message is being processed, this variable contains the name of the
protocol by which it was received. Most of the names used by Exim are defined
by RFCs 821, 2821, and 3848. They start with &"smtp"& (the client used HELO) or
identify messages that are being re-injected after some kind of scanning.
.vitem &$received_time$&
-.cindex "&$received_time$&"
+.vindex "&$received_time$&"
This variable contains the date and time when the current message was received,
as a number of seconds since the start of the Unix epoch.
.vitem &$recipient_data$&
-.cindex "&$recipient_data$&"
+.vindex "&$recipient_data$&"
This variable is set after an indexing lookup success in an ACL &%recipients%&
condition. It contains the data from the lookup, and the value remains set
until the next &%recipients%& test. Thus, you can do things like this:
expansion that all such lists undergo before being interpreted.
.vitem &$recipient_verify_failure$&
-.cindex "&$recipient_verify_failure$&"
+.vindex "&$recipient_verify_failure$&"
In an ACL, when a recipient verification fails, this variable contains
information about the failure. It is set to one of the following words:
rejections of MAIL and rejections of RCPT.
.vitem &$recipients$&
-.cindex "&$recipients$&"
-This variable contains a list of envelope recipients for a
-message. A comma and a space separate the addresses in the replacement text.
-However, the variable is not generally available, to prevent exposure of Bcc
-recipients in unprivileged users' filter files. You can use &$recipients$& only
-in these two cases:
+.vindex "&$recipients$&"
+This variable contains a list of envelope recipients for a message. A comma and
+a space separate the addresses in the replacement text. However, the variable
+is not generally available, to prevent exposure of Bcc recipients in
+unprivileged users' filter files. You can use &$recipients$& only in these
+cases:
.olist
In a system filter file.
is, the ACLs defined by &%acl_smtp_predata%&, &%acl_smtp_data%&,
&%acl_smtp_mime%&, &%acl_not_smtp_start%&, &%acl_not_smtp%&, and
&%acl_not_smtp_mime%&.
+.next
+.new
+From within a &[local_scan()]& function.
+.wen
.endlist
.vitem &$recipients_count$&
-.cindex "&$recipients_count$&"
+.vindex "&$recipients_count$&"
When a message is being processed, this variable contains the number of
envelope recipients that came with the message. Duplicates are not excluded
from the count. While a message is being received over SMTP, the number
.vitem &$regex_match_string$&
-.cindex "&$regex_match_string$&"
+.vindex "&$regex_match_string$&"
This variable is set to contain the matching regular expression after a
&%regex%& ACL condition has matched (see section &<<SECTscanregex>>&).
.vitem &$reply_address$&
-.cindex "&$reply_address$&"
+.vindex "&$reply_address$&"
When a message is being processed, this variable contains the contents of the
&'Reply-To:'& header line if one exists and it is not empty, or otherwise the
contents of the &'From:'& header line. Apart from the removal of leading
decoding or character code translation takes place.
.vitem &$return_path$&
-.cindex "&$return_path$&"
+.vindex "&$return_path$&"
When a message is being delivered, this variable contains the return path &--
the sender field that will be sent as part of the envelope. It is not enclosed
in <> characters. At the start of routing an address, &$return_path$& has the
envelope sender.
.vitem &$return_size_limit$&
-.cindex "&$return_size_limit$&"
+.vindex "&$return_size_limit$&"
This is an obsolete name for &$bounce_return_size_limit$&.
.vitem &$runrc$&
.cindex "return code" "from &%run%& expansion"
-.cindex "&$runrc$&"
+.vindex "&$runrc$&"
This variable contains the return code from a command that is run by the
&%${run...}%& expansion item. &*Warning*&: In a router or transport, you cannot
assume the order in which option values are expanded, except for those
.vitem &$self_hostname$&
.cindex "&%self%& option" "value of host name"
-.cindex "&$self_hostname$&"
+.vindex "&$self_hostname$&"
When an address is routed to a supposedly remote host that turns out to be the
local host, what happens is controlled by the &%self%& generic router option.
One of its values causes the address to be passed to another router. When this
original router encountered. In other circumstances its contents are null.
.vitem &$sender_address$&
-.new
-.cindex "&$sender_address$&"
+.vindex "&$sender_address$&"
When a message is being processed, this variable contains the sender's address
that was received in the message's envelope. The case of letters in the address
is retained, in both the local part and the domain. For bounce messages, the
value of this variable is the empty string. See also &$return_path$&.
-.wen
.vitem &$sender_address_data$&
-.cindex "&$address_data$&"
-.cindex "&$sender_address_data$&"
+.vindex "&$address_data$&"
+.vindex "&$sender_address_data$&"
If &$address_data$& is set when the routers are called from an ACL to verify a
sender address, the final value is preserved in &$sender_address_data$&, to
distinguish it from data from a recipient address. The value does not persist
longer, you can save it in an ACL variable.
.vitem &$sender_address_domain$&
-.cindex "&$sender_address_domain$&"
+.vindex "&$sender_address_domain$&"
The domain portion of &$sender_address$&.
.vitem &$sender_address_local_part$&
-.cindex "&$sender_address_local_part$&"
+.vindex "&$sender_address_local_part$&"
The local part portion of &$sender_address$&.
.vitem &$sender_data$&
-.cindex "&$sender_data$&"
+.vindex "&$sender_data$&"
This variable is set after a lookup success in an ACL &%senders%& condition or
in a router &%senders%& option. It contains the data from the lookup, and the
value remains set until the next &%senders%& test. Thus, you can do things like
expansion that all such lists undergo before being interpreted.
.vitem &$sender_fullhost$&
-.cindex "&$sender_fullhost$&"
+.vindex "&$sender_fullhost$&"
When a message is received from a remote host, this variable contains the host
name and IP address in a single string. It ends with the IP address in square
brackets, followed by a colon and a port number if the logging of ports is
the verified host name or to the host's IP address in square brackets.
.vitem &$sender_helo_name$&
-.cindex "&$sender_helo_name$&"
+.vindex "&$sender_helo_name$&"
When a message is received from a remote host that has issued a HELO or EHLO
command, the argument of that command is placed in this variable. It is also
set if HELO or EHLO is used when a message is received using SMTP locally via
the &%-bs%& or &%-bS%& options.
.vitem &$sender_host_address$&
-.cindex "&$sender_host_address$&"
+.vindex "&$sender_host_address$&"
When a message is received from a remote host, this variable contains that
host's IP address. For locally submitted messages, it is empty.
.vitem &$sender_host_authenticated$&
-.cindex "&$sender_host_authenticated$&"
+.vindex "&$sender_host_authenticated$&"
This variable contains the name (not the public name) of the authenticator
driver that successfully authenticated the client from which the message was
received. It is empty if there was no successful authentication. See also
&$authenticated_id$&.
.vitem &$sender_host_name$&
-.cindex "&$sender_host_name$&"
+.vindex "&$sender_host_name$&"
When a message is received from a remote host, this variable contains the
host's name as obtained by looking up its IP address. For messages received by
other means, this variable is empty.
-.cindex "&$host_lookup_failed$&"
+.vindex "&$host_lookup_failed$&"
If the host name has not previously been looked up, a reference to
&$sender_host_name$& triggers a lookup (for messages from remote hosts).
A looked up name is accepted only if it leads back to the original IP address
any data, or if the forward lookup does not yield the original IP address,
&$sender_host_name$& remains empty, and &$host_lookup_failed$& is set to &"1"&.
-.cindex "&$host_lookup_deferred$&"
+.vindex "&$host_lookup_deferred$&"
However, if either of the lookups cannot be completed (for example, there is a
DNS timeout), &$host_lookup_deferred$& is set to &"1"&, and
&$host_lookup_failed$& remains set to &"0"&.
.vitem &$sender_host_port$&
-.cindex "&$sender_host_port$&"
+.vindex "&$sender_host_port$&"
When a message is received from a remote host, this variable contains the port
number that was used on the remote host.
.vitem &$sender_ident$&
-.cindex "&$sender_ident$&"
+.vindex "&$sender_ident$&"
When a message is received from a remote host, this variable contains the
identification received in response to an RFC 1413 request. When a message has
been received locally, this variable contains the login name of the user that
.vitem &$sender_rcvhost$&
.cindex "DNS" "reverse lookup"
.cindex "reverse DNS lookup"
-.cindex "&$sender_rcvhost$&"
+.vindex "&$sender_rcvhost$&"
This is provided specifically for use in &'Received:'& headers. It starts with
either the verified host name (as obtained from a reverse DNS lookup) or, if
there is no verified host name, the IP address in square brackets. After that
into the string, to improve the formatting of the &'Received:'& header.
.vitem &$sender_verify_failure$&
-.cindex "&$sender_verify_failure$&"
+.vindex "&$sender_verify_failure$&"
In an ACL, when a sender verification fails, this variable contains information
about the failure. The details are the same as for
&$recipient_verify_failure$&.
+.new
+.vitem &$sending_ip_address$&
+.vindex "&$sending_ip_address$&"
+This variable is set whenever an outgoing SMTP connection to another host has
+been set up. It contains the IP address of the local interface that is being
+used. This is useful if a host that has more than one IP address wants to take
+on different personalities depending on which one is being used. For incoming
+connections, see &$received_ip_address$&.
+
+.vitem &$sending_port$&
+.vindex "&$sending_port$&"
+This variable is set whenever an outgoing SMTP connection to another host has
+been set up. It contains the local port that is being used. For incoming
+connections, see &$received_port$&.
+.wen
+
.vitem &$smtp_active_hostname$&
-.cindex "&$smtp_active_hostname$&"
+.vindex "&$smtp_active_hostname$&"
During an incoming SMTP session, this variable contains the value of the active
host name, as specified by the &%smtp_active_hostname%& option. The value of
&$smtp_active_hostname$& is saved with any message that is received, so its
value can be consulted during routing and delivery.
.vitem &$smtp_command$&
-.cindex "&$smtp_command$&"
+.vindex "&$smtp_command$&"
During the processing of an incoming SMTP command, this variable contains the
entire command. This makes it possible to distinguish between HELO and EHLO in
the HELO ACL, and also to distinguish between commands such as these:
the address after SMTP-time rewriting.
.vitem &$smtp_command_argument$&
-.cindex "SMTP command" "argument for"
-.cindex "&$smtp_command_argument$&"
+.cindex "SMTP" "command, argument for"
+.vindex "&$smtp_command_argument$&"
While an ACL is running to check an SMTP command, this variable contains the
argument, that is, the text that follows the command name, with leading white
space removed. Following the introduction of &$smtp_command$&, this variable is
somewhat redundant, but is retained for backwards compatibility.
+.new
+.vitem &$smtp_count_at_connection_start$&
+.vindex "&$smtp_count_at_connection_start$&"
+This variable is set greater than zero only in processes spawned by the Exim
+daemon for handling incoming SMTP connections. The name is deliberately long,
+in order to emphasize what the contents are. When the daemon accepts a new
+connection, it increments this variable. A copy of the variable is passed to
+the child process that handles the connection, but its value is fixed, and
+never changes. It is only an approximation of how many incoming connections
+there actually are, because many other connections may come and go while a
+single connection is being processed. When a child process terminates, the
+daemon decrements its copy of the variable.
+.wen
+
.vitem "&$sn0$& &-- &$sn9$&"
These variables are copies of the values of the &$n0$& &-- &$n9$& accumulators
that were current at the end of the system filter file. This allows a system
.vitem &$spool_directory$&
-.cindex "&$spool_directory$&"
+.vindex "&$spool_directory$&"
The name of Exim's spool directory.
.vitem &$spool_inodes$&
-.cindex "&$spool_inodes$&"
+.vindex "&$spool_inodes$&"
The number of free inodes in the disk partition where Exim's spool files are
being written. The value is recalculated whenever the variable is referenced.
If the relevant file system does not have the concept of inodes, the value of
is -1. See also the &%check_spool_inodes%& option.
.vitem &$spool_space$&
-.cindex "&$spool_space$&"
+.vindex "&$spool_space$&"
The amount of free space (as a number of kilobytes) in the disk partition where
Exim's spool files are being written. The value is recalculated whenever the
variable is referenced. If the operating system does not have the ability to
.vitem &$thisaddress$&
-.cindex "&$thisaddress$&"
+.vindex "&$thisaddress$&"
This variable is set only during the processing of the &%foranyaddress%&
command in a filter file. Its use is explained in the description of that
command, which can be found in the separate document entitled &'Exim's
interfaces to mail filtering'&.
.vitem &$tls_certificate_verified$&
-.cindex "&$tls_certificate_verified$&"
+.vindex "&$tls_certificate_verified$&"
This variable is set to &"1"& if a TLS certificate was verified when the
message was received, and &"0"& otherwise.
.vitem &$tls_cipher$&
-.cindex "&$tls_cipher$&"
+.vindex "&$tls_cipher$&"
When a message is received from a remote host over an encrypted SMTP
connection, this variable is set to the cipher suite that was negotiated, for
example DES-CBC3-SHA. In other circumstances, in particular, for message
&<<CHAPTLS>>& for details of TLS support.
.vitem &$tls_peerdn$&
-.cindex "&$tls_peerdn$&"
+.vindex "&$tls_peerdn$&"
When a message is received from a remote host over an encrypted SMTP
connection, and Exim is configured to request a certificate from the client,
the value of the Distinguished Name of the certificate is made available in the
&$tls_peerdn$& during subsequent processing.
.vitem &$tod_bsdinbox$&
-.cindex "&$tod_bsdinbox$&"
+.vindex "&$tod_bsdinbox$&"
The time of day and the date, in the format required for BSD-style mailbox
files, for example: Thu Oct 17 17:14:09 1995.
.vitem &$tod_epoch$&
-.cindex "&$tod_epoch$&"
+.vindex "&$tod_epoch$&"
The time and date as a number of seconds since the start of the Unix epoch.
.vitem &$tod_full$&
-.cindex "&$tod_full$&"
+.vindex "&$tod_full$&"
A full version of the time and date, for example: Wed, 16 Oct 1995 09:51:40
+0100. The timezone is always given as a numerical offset from UTC, with
positive values used for timezones that are ahead (east) of UTC, and negative
values for those that are behind (west).
.vitem &$tod_log$&
-.cindex "&$tod_log$&"
+.vindex "&$tod_log$&"
The time and date in the format used for writing Exim's log files, for example:
1995-10-12 15:32:29, but without a timezone.
.vitem &$tod_logfile$&
-.cindex "&$tod_logfile$&"
+.vindex "&$tod_logfile$&"
This variable contains the date in the format yyyymmdd. This is the format that
is used for datestamping log files when &%log_file_path%& contains the &`%D`&
flag.
.vitem &$tod_zone$&
-.cindex "&$tod_zone$&"
+.vindex "&$tod_zone$&"
This variable contains the numerical value of the local timezone, for example:
-0500.
.vitem &$tod_zulu$&
-.cindex "&$tod_zulu$&"
+.vindex "&$tod_zulu$&"
This variable contains the UTC date and time in &"Zulu"& format, as specified
by ISO 8601, for example: 20030221154023Z.
.vitem &$value$&
-.cindex "&$value$&"
+.vindex "&$value$&"
This variable contains the result of an expansion lookup, extraction operation,
-or external command, as described above.
+or external command, as described above. &new("It is also used during a
+&*reduce*& expansion.")
.vitem &$version_number$&
-.cindex "&$version_number$&"
+.vindex "&$version_number$&"
The version number of Exim.
.vitem &$warn_message_delay$&
-.cindex "&$warn_message_delay$&"
+.vindex "&$warn_message_delay$&"
This variable is set only during the creation of a message warning about a
delivery delay. Details of its use are explained in section &<<SECTcustwarn>>&.
.vitem &$warn_message_recipients$&
-.cindex "&$warn_message_recipients$&"
+.vindex "&$warn_message_recipients$&"
This variable is set only during the creation of a message warning about a
delivery delay. Details of its use are explained in section &<<SECTcustwarn>>&.
.endlist
in your &_Local/Makefile_& and then build Exim in the normal way.
-.section "Setting up so Perl can be used"
+.section "Setting up so Perl can be used" "SECID85"
.cindex "&%perl_startup%&"
Access to Perl subroutines is via a global configuration option called
&%perl_startup%& and an expansion string operator &%${perl ...}%&. If there is
initial startup, even if &%perl_at_start%& is set.
-.section "Calling Perl subroutines"
+.section "Calling Perl subroutines" "SECID86"
When the configuration file includes a &%perl_startup%& option you can make use
of the string expansion item to call the Perl subroutines that are defined
by the &%perl_startup%& code. The operator is used in any of the following
that was passed to &%die%&.
-.section "Calling Exim functions from Perl"
+.section "Calling Exim functions from Perl" "SECID87"
Within any Perl code called from Exim, the function &'Exim::expand_string()'&
is available to call back into Exim's string expansion function. For example,
the Perl code
timestamp. In this case, you should not supply a terminating newline.
-.section "Use of standard output and error by Perl"
+.section "Use of standard output and error by Perl" "SECID88"
.cindex "Perl" "standard output and error"
You should not write to the standard error or output streams from within your
Perl code, as it is not defined how these are set up. In versions of Exim
options that can be used to influence Exim's behaviour. The rest of this
chapter describes how they operate.
-.new
When a message is received over TCP/IP, the interface and port that were
actually used are set in &$received_ip_address$& and &$received_port$&.
-.wen
-.section "Starting a listening daemon"
+.section "Starting a listening daemon" "SECID89"
When a listening daemon is started (by means of the &%-bd%& command line
option), the interfaces and ports on which it listens are controlled by the
following options:
-.section "Special IP listening addresses"
+.section "Special IP listening addresses" "SECID90"
The addresses 0.0.0.0 and ::0 are treated specially. They are interpreted
as &"all IPv4 interfaces"& and &"all IPv6 interfaces"&, respectively. In each
case, Exim tells the TCP/IP stack to &"listen on all IPv&'x'& interfaces"&
-.section "Overriding local_interfaces and daemon_smtp_ports"
+.section "Overriding local_interfaces and daemon_smtp_ports" "SECID91"
The &%-oX%& command line option can be used to override the values of
&%daemon_smtp_ports%& and/or &%local_interfaces%& for a particular daemon
instance. Another way of doing this would be to use macros and the &%-D%&
-.section "IPv6 address scopes"
+.section "IPv6 address scopes" "SECID92"
.cindex "IPv6" "address scopes"
IPv6 addresses have &"scopes"&, and a host with multiple hardware interfaces
can, in principle, have the same link-local IPv6 address on different
function.) Of course, this means that the additional functionality of
&[getaddrinfo()]& &-- recognizing scoped addresses &-- is lost.
-.section "Disabling IPv6"
+.section "Disabling IPv6" "SECID93"
.cindex "IPv6" "disabling"
Sometimes it happens that an Exim binary that was compiled with IPv6 support is
run on a host whose kernel does not support IPv6. The binary will fall back to
-.section "Examples of starting a listening daemon"
+.section "Examples of starting a listening daemon" "SECID94"
The default case in an IPv6 environment is
.code
daemon_smtp_ports = smtp
-.section "Recognising the local host" "SECTreclocipadd"
+.section "Recognizing the local host" "SECTreclocipadd"
The &%local_interfaces%& option is also used when Exim needs to determine
whether or not an IP address refers to the local host. That is, the IP
addresses of all the interfaces on which a daemon is listening are always
-.section "Delivering to a remote host"
+.section "Delivering to a remote host" "SECID95"
Delivery to a remote host is handled by the smtp transport. By default, it
allows the system's TCP/IP functions to choose which interface to use (if
there is more than one) when connecting to a remote host. However, the
an aid to finding the name of the option you are looking for. Some options are
listed in more than one group.
-.section "Miscellaneous"
+.section "Miscellaneous" "SECID96"
.table2
.row &%bi_command%& "to run for &%-bi%& command line option"
.row &%disable_ipv6%& "do no IPv6 processing"
.endtable
-.section "Exim parameters"
+.section "Exim parameters" "SECID97"
.table2
.row &%exim_group%& "override compiled-in value"
.row &%exim_path%& "override compiled-in value"
-.section "Privilege controls"
+.section "Privilege controls" "SECID98"
.table2
.row &%admin_groups%& "groups that are Exim admin users"
.row &%deliver_drop_privilege%& "drop root for delivery processes"
-.section "Logging"
+.section "Logging" "SECID99"
.table2
.row &%hosts_connection_nolog%& "exemption from connect logging"
.row &%log_file_path%& "override compiled-in value"
-.section "Frozen messages"
+.section "Frozen messages" "SECID100"
.table2
.row &%auto_thaw%& "sets time for retrying frozen messages"
.row &%freeze_tell%& "send message when freezing"
-.section "Data lookups"
+.section "Data lookups" "SECID101"
.table2
.row &%ldap_default_servers%& "used if no server in query"
.row &%ldap_version%& "set protocol version"
-.section "Message ids"
+.section "Message ids" "SECID102"
.table2
.row &%message_id_header_domain%& "used to build &'Message-ID:'& header"
.row &%message_id_header_text%& "ditto"
-.section "Embedded Perl Startup"
+.section "Embedded Perl Startup" "SECID103"
.table2
.row &%perl_at_start%& "always start the interpreter"
.row &%perl_startup%& "code to obey when starting Perl"
-.section "Daemon"
+.section "Daemon" "SECID104"
.table2
.row &%daemon_smtp_ports%& "default ports"
.row &%daemon_startup_retries%& "number of times to retry"
-.section "Resource control"
+.section "Resource control" "SECID105"
.table2
.row &%check_log_inodes%& "before accepting a message"
.row &%check_log_space%& "before accepting a message"
-.section "Policy controls"
+.section "Policy controls" "SECID106"
.table2
.row &%acl_not_smtp%& "ACL for non-SMTP messages"
.row &%acl_not_smtp_mime%& "ACL for non-SMTP MIME parts"
-.section "Callout cache"
+.section "Callout cache" "SECID107"
.table2
.row &%callout_domain_negative_expire%& "timeout for negative domain cache &&&
item"
-.section "TLS"
+.section "TLS" "SECID108"
.table2
+.row &new(&%gnutls_require_kx%&) "control GnuTLS key exchanges"
+.row &new(&%gnutls_require_mac%&) "control GnuTLS MAC algorithms"
+.row &new(&%gnutls_require_protocols%&) "control GnuTLS protocols"
.row &%tls_advertise_hosts%& "advertise TLS to these hosts"
.row &%tls_certificate%& "location of server certificate"
.row &%tls_crl%& "certificate revocation list"
.row &%tls_on_connect_ports%& "specify SSMTP (SMTPS) ports"
.row &%tls_privatekey%& "location of server private key"
.row &%tls_remember_esmtp%& "don't reset after starting TLS"
-.row &%tls_require_ciphers%& "specify acceptable cipers"
+.row &%tls_require_ciphers%& "specify acceptable ciphers"
.row &%tls_try_verify_hosts%& "try to verify client certificate"
.row &%tls_verify_certificates%& "expected client certificates"
.row &%tls_verify_hosts%& "insist on client certificate verify"
-.section "Local user handling"
+.section "Local user handling" "SECID109"
.table2
.row &%finduser_retries%& "useful in NIS environments"
.row &%gecos_name%& "used when creating &'Sender:'&"
-.section "All incoming messages (SMTP and non-SMTP)"
+.section "All incoming messages (SMTP and non-SMTP)" "SECID110"
.table2
.row &%header_maxsize%& "total size of message header"
.row &%header_line_maxsize%& "individual header line limit"
.row &%received_header_text%& "expanded to make &'Received:'&"
.row &%received_headers_max%& "for mail loop detection"
.row &%recipients_max%& "limit per message"
-.row &%recipients_max_reject%& "permanently reject excess"
+.row &%recipients_max_reject%& "permanently reject excess recipients"
.endtable
-.section "Non-SMTP incoming messages"
+.section "Non-SMTP incoming messages" "SECID111"
.table2
.row &%receive_timeout%& "for non-SMTP messages"
.endtable
-.section "Incoming SMTP messages"
+.section "Incoming SMTP messages" "SECID112"
See also the &'Policy controls'& section above.
.table2
-.section "SMTP extensions"
+.section "SMTP extensions" "SECID113"
.table2
.row &%accept_8bitmime%& "advertise 8BITMIME"
.row &%auth_advertise_hosts%& "advertise AUTH to these hosts"
-.section "Processing messages"
+.section "Processing messages" "SECID114"
.table2
.row &%allow_domain_literals%& "recognize domain literal syntax"
.row &%allow_mx_to_ip%& "allow MX to point to IP address"
-.section "System filter"
+.section "System filter" "SECID115"
.table2
.row &%system_filter%& "locate system filter"
.row &%system_filter_directory_transport%& "transport for delivery to a &&&
-.section "Routing and delivery"
+.section "Routing and delivery" "SECID116"
.table2
.row &%disable_ipv6%& "do no IPv6 processing"
.row &%dns_again_means_nonexist%& "for broken domains"
-.section "Bounce and warning messages"
+.section "Bounce and warning messages" "SECID117"
.table2
.row &%bounce_message_file%& "content of bounce"
.row &%bounce_message_text%& "content of bounce"
.row &%bounce_return_message%& "include original message in bounce"
.row &%bounce_return_size_limit%& "limit on returned message"
.row &%bounce_sender_authentication%& "send authenticated sender with bounce"
+.row &new(&%dsn_from%&) "set &'From:'& contents in bounces"
.row &%errors_copy%& "copy bounce messages"
.row &%errors_reply_to%& "&'Reply-to:'& in bounces"
.row &%delay_warning%& "time schedule"
.cindex "DATA" "ACL for"
This option defines the ACL that is run after an SMTP DATA command has been
processed and the message itself has been received, but before the final
-acknowledgement is sent. See chapter &<<CHAPACL>>& for further details.
+acknowledgment is sent. See chapter &<<CHAPACL>>& for further details.
.option acl_smtp_etrn main string&!! unset
.cindex "ETRN" "ACL for"
further details.
.option acl_smtp_quit main string&!! unset
-.cindex "QUIT" "ACL for"
+.cindex "QUIT, ACL for"
This option defines the ACL that is run when an SMTP QUIT command is
received. See chapter &<<CHAPACL>>& for further details.
received. See chapter &<<CHAPACL>>& for further details.
.option acl_smtp_starttls main string&!! unset
-.cindex "STARTTLS" "ACL for"
+.cindex "STARTTLS, ACL for"
This option defines the ACL that is run when an SMTP STARTTLS command is
received. See chapter &<<CHAPACL>>& for further details.
.code
auth_advertise_hosts = ${if eq{$tls_cipher}{}{}{*}}
.endd
-.cindex "&$tls_cipher$&"
+.vindex "&$tls_cipher$&"
If &$tls_cipher$& is empty, the session is not encrypted, and the result of
the expansion is empty, thus matching no hosts. Otherwise, the result of the
expansion is *, which matches all hosts.
.option bi_command main string unset
-.cindex "&%-bi%& option"
+.oindex "&%-bi%&"
This option supplies the name of a command that is run when Exim is called with
the &%-bi%& option (see chapter &<<CHAPcommandline>>&). The string value is
just the command name, it is not a complete command line. If an argument is
.option bounce_return_size_limit main integer 100K
-.cindex "size limit" "of bounce"
+.cindex "size" "of bounce, limit"
.cindex "bounce message" "size limit"
.cindex "limit" "bounce message size"
This option sets a limit in bytes on the size of messages that are returned to
.oindex "&%check_rfc2047_length%&"
.cindex "RFC 2047" "disabling length check"
-.option check_rfc2047_length " User: main" boolean true
+.option check_rfc2047_length main boolean true
RFC 2047 defines a way of encoding non-ASCII characters in headers using a
system of &"encoded words"&. The RFC specifies a maximum length for an encoded
word; strings to be encoded that exceed this length are supposed to use
.option check_spool_space main integer 0
.cindex "checking disk space"
-.cindex "disk space" "checking"
+.cindex "disk space, checking"
.cindex "spool directory" "checking space"
The four &%check_...%& options allow for checking of disk resources before a
message is accepted.
-.cindex "&$log_inodes$&"
-.cindex "&$log_space$&"
-.cindex "&$spool_inodes$&"
-.cindex "&$spool_space$&"
+.vindex "&$log_inodes$&"
+.vindex "&$log_space$&"
+.vindex "&$spool_inodes$&"
+.vindex "&$spool_space$&"
When any of these options are set, they apply to all incoming messages. If you
want to apply different checks to different kinds of message, you can do so by
testing the variables &$log_inodes$&, &$log_space$&, &$spool_inodes$&, and
backward compatibility, &%daemon_smtp_port%& (singular) is a synonym.
.option daemon_startup_retries main integer 9
-.cindex "daemon startup" "retrying"
+.cindex "daemon startup, retrying"
This option, along with &%daemon_startup_sleep%&, controls the retrying done by
the daemon at startup when it cannot immediately bind a listening socket
(typically because the socket is already in use): &%daemon_startup_retries%&
.option delay_warning main "time list" 24h
.cindex "warning of delay"
-.cindex "delay warning" "specifying"
+.cindex "delay warning, specifying"
When a message is delayed, Exim sends a warning message to the sender at
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
.endd
.option delay_warning_condition main string&!! "see below"
-.cindex "&$domain$&"
+.vindex "&$domain$&"
The string is expanded at the time a warning message might be sent. If all the
deferred addresses have the same domain, it is set in &$domain$& during the
expansion. Otherwise &$domain$& is empty. If the result of the expansion is a
removed at the time the message is received, to avoid any problems that might
occur when a delivered message is subsequently sent on to some other recipient.
+.new
+.option disable_fnync main boolean false
+.cindex "&[fsync()]&, disabling"
+This option is available only if Exim was built with the compile-time option
+ENABLE_DISABLE_FSYNC. When this is not set, a reference to &%disable_fsync%& in
+a runtime configuration generates an &"unknown option"& error. You should not
+build Exim with ENABLE_DISABLE_FSYNC or set &%disable_fsync%& unless you
+really, really, really understand what you are doing. &'No pre-compiled
+distributions of Exim should ever make this option available.'&
+
+When &%disable_fsync%& is set true, Exim no longer calls &[fsync()]& to force
+updated files' data to be written to disc before continuing. Unexpected events
+such as crashes and power outages may cause data to be lost or scrambled.
+Here be Dragons. &*Beware.*&
+.wen
+
.option disable_ipv6 main boolean false
.cindex "IPv6" "disabling"
handled CR and LF characters in incoming messages. What happens now is
described in section &<<SECTlineendings>>&.
+.new
+.option dsn_from main "string&!!" "see below"
+.cindex "&'From:'& header line" "in bounces"
+.cindex "bounce messages" "&'From:'& line, specifying"
+This option can be used to vary the contents of &'From:'& header lines in
+bounces and other automatically generated messages (&"Delivery Status
+Notifications"& &-- hence the name of the option). The default setting is:
+.code
+dsn_from = Mail Delivery System <Mailer-Daemon@$qualify_domain>
+.endd
+The value is expanded every time it is needed. If the expansion fails, a
+panic is logged, and the default value is used.
+.wen
.option envelope_to_remove main boolean true
.cindex "&'Envelope-to:'& header line"
rqps@mydomain hostmaster@mydomain.example,\
postmaster@mydomain.example
.endd
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
The address list is expanded before use. The expansion variables &$local_part$&
and &$domain$& are set from the original recipient of the error message, and if
there was any wildcard matching in the pattern, the expansion
.option exim_path main string "see below"
-.cindex "Exim binary" "path name"
+.cindex "Exim binary, path name"
This option specifies the path name of the Exim binary, which is used when Exim
needs to re-exec itself. The default is set up to point to the file &'exim'& in
the directory configured at compile time by the BIN_DIRECTORY setting. It
&<<SECTreclocipadd>>& for details.
-.option "extract_addresses_remove_ &~arguments" main boolean true
-.cindex "&%-t%& option"
+. Allow this long option name to split
+
+.option "extract_addresses_remove_ &~&~arguments" main boolean true
+.oindex "&%-t%&"
.cindex "command line" "addresses with &%-t%&"
.cindex "Sendmail compatibility" "&%-t%& option"
According to some Sendmail documentation (Sun, IRIX, HP-UX), if any addresses
.option finduser_retries main integer 0
-.cindex "NIS" "looking up users; retrying"
+.cindex "NIS, retrying user lookups"
On systems running NIS or other schemes in which user and group information is
distributed from a remote system, there can be times when &[getpwnam()]& and
related functions fail, even when given valid data, because things time out.
.option gecos_name main string&!! unset
.cindex "HP-UX"
-.cindex "&""gecos""& field" "parsing"
+.cindex "&""gecos""& field, parsing"
Some operating systems, notably HP-UX, use the &"gecos"& field in the system
password file to hold other information in addition to users' real names. Exim
looks up this field for use when it is creating &'Sender:'& or &'From:'&
See &%gecos_name%& above.
+.new
+.option gnutls_require_kx main string unset
+This option controls the key exchange mechanisms when GnuTLS is used in an Exim
+server. For details, see section &<<SECTreqciphgnu>>&.
+
+.option gnutls_require_mac main string unset
+This option controls the MAC algorithms when GnuTLS is used in an Exim
+server. For details, see section &<<SECTreqciphgnu>>&.
+
+.option gnutls_require_protocols main string unset
+This option controls the protocols when GnuTLS is used in an Exim
+server. For details, see section &<<SECTreqciphgnu>>&.
+.wen
+
+
.option headers_charset main string "see below"
This option sets a default character set for translating from encoded MIME
&"words"& in header lines, when referenced by an &$h_xxx$& expansion item. The
.option helo_try_verify_hosts main "host list&!!" unset
.cindex "HELO verifying" "optional"
-.cindex "EHLO verifying" "optional"
+.cindex "EHLO" "verifying, optional"
By default, Exim just checks the syntax of HELO and EHLO commands (see
&%helo_accept_junk_hosts%& and &%helo_allow_chars%&). However, some sites like
to do more extensive checking of the data supplied by these commands. The ACL
.option helo_verify_hosts main "host list&!!" unset
.cindex "HELO verifying" "mandatory"
-.cindex "EHLO verifying" "mandatory"
+.cindex "EHLO" "verifying, mandatory"
Like &%helo_try_verify_hosts%&, this option is obsolete, and retained only for
backwards compatibility. For hosts that match this option, Exim checks the host
name given in the HELO or EHLO in the same way as for
.option host_lookup main "host list&!!" unset
-.cindex "host name lookup" "forcing"
+.cindex "host name" "lookup, forcing"
Exim does not look up the name of a calling host from its IP address unless it
is required to compare against some host list, or the host matches
&%helo_try_verify_hosts%& or &%helo_verify_hosts%&, or the host matches this
has obtained, to verify that it yields the IP address that it started with. If
this check fails, Exim behaves as if the name lookup failed.
-.cindex "&$host_lookup_failed$&"
-.cindex "&$sender_host_name$&"
+.vindex "&$host_lookup_failed$&"
+.vindex "&$sender_host_name$&"
After any kind of failure, the host name (in &$sender_host_name$&) remains
unset, and &$host_lookup_failed$& is set to the string &"1"&. See also
&%dns_again_means_nonexist%&, &%helo_lookup_domains%&, and &`verify`& &`=`&
&(smtp)& transport for the local host (see the &%allow_localhost%& option in
that transport). See also &%local_interfaces%&, &%extra_local_interfaces%&, and
chapter &<<CHAPinterfaces>>&, which contains a discussion about local network
-interfaces and recognising the local host.
+interfaces and recognizing the local host.
.option ignore_bounce_errors_after main time 10w
.option ldap_version main integer unset
-.cindex "LDAP protocol version" "forcing"
+.cindex "LDAP" "protocol version, forcing"
This option can be used to force Exim to set a specific protocol version for
LDAP. If it option is unset, it is shown by the &%-bP%& command line option as
-1. When this is the case, the default is 3 if LDAP_VERSION3 is defined in
.option localhost_number main string&!! unset
.cindex "host" "locally unique number for"
.cindex "message ids" "with multiple hosts"
-.cindex "&$localhost_number$&"
+.vindex "&$localhost_number$&"
Exim's message ids are normally unique only within the local host. If
uniqueness among a set of hosts is required, each host must set a different
value for the &%localhost_number%& option. The string is expanded immediately
.option log_timezone main boolean false
.cindex "log" "timezone for entries"
-.cindex "&$tod_log$&"
-.cindex "&$tod_zone$&"
+.vindex "&$tod_log$&"
+.vindex "&$tod_zone$&"
By default, the timestamps on log lines are in local time without the
timezone. This means that if your timezone changes twice a year, the timestamps
in log lines are ambiguous for an hour when the clocks go back. One way of
.option lookup_open_max main integer 25
.cindex "too many open files"
-.cindex "open files" "too many"
+.cindex "open files, too many"
.cindex "file" "too many open"
.cindex "lookup" "maximum open files"
.cindex "limit" "open files for lookups"
.option max_username_length main integer 0
-.cindex "length" "of login name"
+.cindex "length of login name"
.cindex "user name" "maximum length"
.cindex "limit" "user name length"
Some operating systems are broken in that they truncate long arguments to
.option message_body_visible main integer 500
.cindex "body of message" "visible size"
.cindex "message body" "visible size"
-.cindex "&$message_body$&"
-.cindex "&$message_body_end$&"
+.vindex "&$message_body$&"
+.vindex "&$message_body_end$&"
This option specifies how much of a message's body is to be included in the
&$message_body$& and &$message_body_end$& expansion variables.
.option message_logs main boolean true
-.cindex "message log" "disabling"
+.cindex "message logs" "disabling"
.cindex "log" "message log; disabling"
If this option is turned off, per-message log files are not created in the
&_msglog_& spool sub-directory. This reduces the amount of disk I/O required by
.option message_size_limit main string&!! 50M
.cindex "message" "size limit"
.cindex "limit" "message size"
-.cindex "size of message" "limit"
+.cindex "size" "of message, limit"
This option limits the maximum size of message that Exim will process. The
value is expanded for each incoming connection so, for example, it can be made
to depend on the IP address of the remote host for messages arriving via
-TCP/IP. &new("After expansion, the value must be a sequence of decimal digits,
-optionally followed by K or M.")
+TCP/IP. After expansion, the value must be a sequence of decimal digits,
+optionally followed by K or M.
&*Note*&: This limit cannot be made to depend on a message's sender or any
other properties of an individual message, because it has to be advertised in
.option pid_file_path main string&!! "set at compile time"
.cindex "daemon" "pid file path"
-.cindex "pid file" "path for"
+.cindex "pid file, path for"
This option sets the name of the file to which the Exim daemon writes its
process id. The string is expanded, so it can contain, for example, references
to the host name:
.option pipelining_advertise_hosts main "host list&!!" *
-.cindex "PIPELINING advertising" "suppressing"
+.cindex "PIPELINING" "suppressing advertising"
This option can be used to suppress the advertisement of the SMTP
-PIPELINING extension to specific hosts. When PIPELINING is not
-advertised and &%smtp_enforce_sync%& is true, an Exim server enforces strict
-synchronization for each SMTP command and response.
-When PIPELINING is advertised, Exim assumes that clients will use it; &"out
-of order"& commands that are &"expected"& do not count as protocol errors (see
-&%smtp_max_synprot_errors%&).
+PIPELINING extension to specific hosts. &new("See also the &*no_pipelining*&
+control in section &<<SECTcontrols>>&.") When PIPELINING is not advertised and
+&%smtp_enforce_sync%& is true, an Exim server enforces strict synchronization
+for each SMTP command and response. When PIPELINING is advertised, Exim assumes
+that clients will use it; &"out of order"& commands that are &"expected"& do
+not count as protocol errors (see &%smtp_max_synprot_errors%&).
.option preserve_message_logs main boolean false
.cindex "name" "of local host"
.cindex "host" "name of local"
.cindex "local host" "name of"
-.cindex "&$primary_hostname$&"
+.vindex "&$primary_hostname$&"
This specifies the name of the current host. It is used in the default EHLO or
HELO command for outgoing SMTP messages (changeable via the &%helo_data%&
option in the &(smtp)& transport), and as the default for &%qualify_domain%&.
.option prod_requires_admin main boolean true
-.cindex "&%-M%& option"
-.cindex "&%-R%& option"
-.cindex "&%-q%& option"
+.oindex "&%-M%&"
+.oindex "&%-R%&"
+.oindex "&%-q%&"
The &%-M%&, &%-R%&, and &%-q%& command-line options require the caller to be an
admin user unless &%prod_requires_admin%& is set false. See also
&%queue_list_requires_admin%&.
.option queue_list_requires_admin main boolean true
-.cindex "&%-bp%& option"
+.oindex "&%-bp%&"
The &%-bp%& command-line option, which lists the messages that are on the
queue, requires the caller to be an admin user unless
&%queue_list_requires_admin%& is set false. See also &%prod_requires_admin%&.
This option can be set to a colon-separated list of absolute path names, each
one optionally preceded by &"smtp"&. When Exim is receiving a message,
it tests for the existence of each listed path using a call to &[stat()]&. For
-each path that exists, the corresponding queuing option is set.
+each path that exists, the corresponding queueing option is set.
For paths with no prefix, &%queue_only%& is set; for paths prefixed by
&"smtp"&, &%queue_smtp_domains%& is set to match all domains. So, for example,
.code
If it is purely remote deliveries you want to control, use
&%queue_smtp_domains%& instead of &%queue_only%&. This has the added benefit of
-doing the SMTP routing before queuing, so that several messages for the same
+doing the SMTP routing before queueing, so that several messages for the same
host will eventually get delivered down the same connection.
This option controls the setting of the SO_KEEPALIVE option on incoming
TCP/IP socket connections. When set, it causes the kernel to probe idle
connections periodically, by sending packets with &"old"& sequence numbers. The
-other end of the connection should send an acknowledgement if the connection is
+other end of the connection should send an acknowledgment if the connection is
still okay or a reset if the connection has been aborted. The reason for doing
this is that it has the beneficial effect of freeing up certain types of
connection that can get stuck when the remote host is disconnected without
control (in Exim) when incoming SMTP is being handled by &'inetd'&. If the
value is set to zero, no limit is applied. However, it is required to be
non-zero if either &%smtp_accept_max_per_host%& or &%smtp_accept_queue%& is
-set. See also &%smtp_accept_reserve%&.
+set. See also &%smtp_accept_reserve%& and &%smtp_load_reserve%&.
+.new
+A new SMTP connection is immediately rejected if the &%smtp_accept_max%& limit
+has been reached. If not, Exim first checks &%smtp_accept_max_per_host%&. If
+that limit has not been reached for the client host, &%smtp_accept_reserve%&
+and &%smtp_load_reserve%& are then checked before accepting the connection.
+.wen
.option smtp_accept_max_nonmail main integer 10
When a new message is expected, one occurrence of RSET is not counted. This
allows a client to send one RSET between messages (this is not necessary,
-but some clients do it). Exim also allows one uncounted occurence of HELO
+but some clients do it). Exim also allows one uncounted occurrence of HELO
or EHLO, and one occurrence of STARTTLS between messages. After
starting up a TLS session, another EHLO is expected, and so it too is not
counted. The first occurrence of AUTH in a connection, or immediately
live with.
+. Allow this long option to split
-.option smtp_accept_max_per_connection main integer 1000
-.cindex "SMTP incoming message count" "limiting"
+.option "smtp_accept_max_per_ &~&~connection" main integer 1000
+.cindex "SMTP" "limiting incoming message count"
.cindex "limit" "messages per SMTP connection"
The value of this option limits the number of MAIL commands that Exim is
prepared to accept over a single SMTP connection, whether or not each command
.option smtp_accept_max_per_host main string&!! unset
.cindex "limit" "SMTP connections from one host"
.cindex "host" "limiting SMTP connections from"
+.new
This option restricts the number of simultaneous IP connections from a single
host (strictly, from a single IP address) to the Exim daemon. The option is
expanded, to enable different limits to be applied to different hosts by
reference to &$sender_host_address$&. Once the limit is reached, additional
-connection attempts from the same host are rejected with error code 421. The
-default value of zero imposes no limit. If this option is set, it is required
-that &%smtp_accept_max%& be non-zero.
+connection attempts from the same host are rejected with error code 421. This
+is entirely independent of &%smtp_accept_reserve%&. The option's default value
+of zero imposes no limit. If this option is set greater than zero, it is
+required that &%smtp_accept_max%& be non-zero.
+.wen
&*Warning*&: When setting this option you should not use any expansion
constructions that take an appreciable amount of time. The expansion and test
command line options.
-.option smtp_accept_queue_per_connection main integer 10
+. Allow this long option name to split
+
+.option "smtp_accept_queue_per_ &~&~connection" main integer 10
.cindex "queueing incoming messages"
.cindex "message" "queueing by message count"
This option limits the number of delivery processes that Exim starts
that are specified in &%smtp_reserve_hosts%&. The value set in
&%smtp_accept_max%& includes this reserve pool. The specified hosts are not
restricted to this number of connections; the option specifies a minimum number
-of connection slots for them, not a maximum. It is a guarantee that that group
+of connection slots for them, not a maximum. It is a guarantee that this group
of hosts can always get at least &%smtp_accept_reserve%& connections.
+&new("However, the limit specified by &%smtp_accept_max_per_host%& is still
+applied to each individual host.")
For example, if &%smtp_accept_max%& is set to 50 and &%smtp_accept_reserve%& is
set to 5, once there are 45 active connections (from any hosts), new
-connections are accepted only from hosts listed in &%smtp_reserve_hosts%&.
-See also &%smtp_accept_max_per_host%&.
+connections are accepted only from hosts listed in &%smtp_reserve_hosts%&,
+&new("provided the other criteria for acceptance are met.")
.option smtp_active_hostname main string&!! unset
-.new
.cindex "host" "name in SMTP responses"
.cindex "SMTP" "host name in responses"
-.cindex "&$primary_hostname$&"
+.vindex "&$primary_hostname$&"
This option is provided for multi-homed servers that want to masquerade as
several different hosts. At the start of an incoming SMTP connection, its value
is expanded and used instead of the value of &$primary_hostname$& in SMTP
responses. For example, it is used as domain name in the response to an
incoming HELO or EHLO command.
-.cindex "&$smtp_active_hostname$&"
+.vindex "&$smtp_active_hostname$&"
The active hostname is placed in the &$smtp_active_hostname$& variable, which
is saved with any messages that are received. It is therefore available for use
in routers and transports when the message is later delivered.
messages, it is also used as the default for HELO commands in callout
verification if there is no remote transport from which to obtain a
&%helo_data%& value.
-.wen
.option smtp_banner main string&!! "see below"
.cindex "SMTP" "welcome banner"
.option smtp_check_spool_space main boolean true
.cindex "checking disk space"
-.cindex "disk space" "checking"
+.cindex "disk space, checking"
.cindex "spool directory" "checking space"
When this option is set, if an incoming SMTP session encounters the SIZE
option on a MAIL command, it checks that there is enough space in the
.option smtp_etrn_command main string&!! unset
.cindex "ETRN" "command to be run"
-.cindex "&$domain$&"
+.vindex "&$domain$&"
If this option is set, the given command is run whenever an SMTP ETRN
command is received from a host that is permitted to issue such commands (see
chapter &<<CHAPACL>>&). The string is split up into separate arguments which
.option smtp_receive_timeout main time 5m
.cindex "timeout" "for SMTP input"
-.cindex "SMTP timeout" "input"
+.cindex "SMTP" "input timeout"
This sets a timeout value for SMTP reception. It applies to all forms of SMTP
input, including batch SMTP. If a line of input (either an SMTP command or a
data line) is not received within this time, the SMTP connection is dropped and
means that it was in the DATA phase, reading the contents of a message.
-.cindex "&%-os%& option"
+.oindex "&%-os%&"
The value set by this option can be overridden by the
&%-os%& command-line option. A setting of zero time disables the timeout, but
this should never be used for SMTP over TCP/IP. (It can be useful in some cases
.option smtp_return_error_details main boolean false
.cindex "SMTP" "details policy failures"
-.cindex "policy control rejection" "returning details"
+.cindex "policy control" "rejection, returning details"
In the default state, Exim uses bland messages such as
&"Administrative prohibition"& when it rejects SMTP commands for policy
reasons. Many sysadmins like this because it gives away little information
-to spammers. However, some other syadmins who are applying strict checking
+to spammers. However, some other sysadmins who are applying strict checking
policies want to give out much fuller information about failures. Setting
&%smtp_return_error_details%& true causes Exim to be more forthcoming. For
example, instead of &"Administrative prohibition"&, it might give:
.option split_spool_directory main boolean false
.cindex "multiple spool directories"
.cindex "spool directory" "split"
-.cindex "directories" "multiple"
+.cindex "directories, multiple"
If this option is set, it causes Exim to split its input directory into 62
subdirectories, each with a single alphanumeric character as its name. The
sixth character of the message id is used to allocate messages to
tests of Exim without using the standard spool.
.option sqlite_lock_timeout main time 5s
-.cindex "sqlite" "lock timeout"
+.cindex "sqlite lookup type" "lock timeout"
This option controls the timeout that the &(sqlite)& lookup uses when trying to
access an SQLite database. See section &<<SECTsqlite>>& for more details.
-.new
.option strict_acl_vars main boolean false
-.cindex "ACL variables" "handling unset"
+.cindex "&ACL;" "variables, handling unset"
This option controls what happens if a syntactically valid but undefined ACL
variable is referenced. If it is false (the default), an empty string
is substituted; if it is true, an error is generated. See section
&<<SECTaclvariables>>& for details of ACL variables.
-.wen
.option strip_excess_angle_brackets main boolean false
-.cindex "angle brackets" "excess"
+.cindex "angle brackets, excess"
If this option is set, redundant pairs of angle brackets round &"route-addr"&
items in addresses are stripped. For example, &'<<xxx@a.b.c.d>>'& is
treated as &'<xxx@a.b.c.d>'&. If this is in the envelope and the message is
.option system_filter_directory_transport main string&!! unset
-.cindex "&$address_file$&"
+.vindex "&$address_file$&"
This sets the name of the transport driver that is to be used when the
&%save%& command in a system message filter specifies a path ending in &"/"&,
implying delivery of each message into a separate file in some directory.
.option system_filter_pipe_transport main string&!! unset
.cindex "&(pipe)& transport" "for system filter"
-.cindex "&$address_pipe$&"
+.vindex "&$address_pipe$&"
This specifies the transport driver that is to be used when a &%pipe%& command
is used in a system filter. During the delivery, the variable &$address_pipe$&
contains the pipe command.
If you want to timeout frozen bounce messages earlier than other kinds of
frozen message, see &%ignore_bounce_errors_after%&.
-.new
&*Note:*& the default value of zero means no timeouts; with this setting,
frozen messages remain on the queue forever (except for any frozen bounce
messages that are released by &%ignore_bounce_errors_after%&).
-.wen
.option timezone main string unset
-.cindex "timezone" "setting"
+.cindex "timezone, setting"
The value of &%timezone%& is used to set the environment variable TZ while
running Exim (if it is different on entry). This ensures that all timestamps
created by Exim are in the required timezone. If you want all your timestamps
.option tls_certificate main string&!! unset
.cindex "TLS" "server certificate; location of"
-.cindex "certificate for server" "location of"
+.cindex "certificate" "server, location of"
The value of this option is expanded, and must then be the absolute path to a
file which contains the server's certificates. The server's private key is also
assumed to be in this file if &%tls_privatekey%& is unset. See chapter
.option trusted_groups main "string list&!!" unset
-.cindex "trusted group"
-.cindex "group" "trusted"
+.cindex "trusted groups"
+.cindex "groups" "trusted"
This option is expanded just once, at the start of Exim's processing. If this
option is set, any process that is running in one of the listed groups, or
which has one of them as a supplementary group, is trusted. The groups can be
are trusted.
.option trusted_users main "string list&!!" unset
-.cindex "trusted user"
+.cindex "trusted users"
.cindex "user" "trusted"
This option is expanded just once, at the start of Exim's processing. If this
option is set, any process that is running as one of the listed users is
.option unknown_login main string&!! unset
.cindex "uid (user id)" "unknown caller"
-.cindex "&$caller_uid$&"
+.vindex "&$caller_uid$&"
This is a specialized feature for use in unusual configurations. By default, if
the uid of the caller of Exim cannot be looked up using &[getpwuid()]&, Exim
gives up. The &%unknown_login%& option can be used to set a login name to be
See &%unknown_login%&.
.option untrusted_set_sender main "address list&!!" unset
-.cindex "trusted user"
+.cindex "trusted users"
.cindex "sender" "setting by untrusted user"
-.cindex "untrusted user" "setting sender"
+.cindex "untrusted user setting sender"
.cindex "user" "untrusted setting sender"
.cindex "envelope sender"
When an untrusted user submits a message to Exim using the standard input, Exim
.code
exim -f '<>' user@domain.example
.endd
-.cindex "&$sender_ident$&"
+.vindex "&$sender_ident$&"
The &%untrusted_set_sender%& option allows you to permit untrusted users to set
other envelope sender addresses in a controlled way. When it is set, untrusted
users are allowed to set envelope sender addresses that match any of the
&%more%& option controls what happens next. Other expansion failures cause
delivery of the address to be deferred.
-.cindex "&$address_data$&"
+.vindex "&$address_data$&"
When the expansion succeeds, the value is retained with the address, and can be
accessed using the variable &$address_data$& in the current router, subsequent
routers, and the eventual transport.
The &%address_data%& facility is also useful as a means of passing information
from one router to another, and from a router to a transport. In addition, if
-.cindex "&$sender_address_data$&"
-.cindex "&$address_data$&"
+.vindex "&$sender_address_data$&"
+.vindex "&$address_data$&"
When &$address_data$& is set by a router when verifying a recipient address
from an ACL, it remains available for use in the rest of the ACL statement.
After verifying a sender, the value is transferred to &$sender_address_data$&.
.option address_test routers&!? boolean true
-.cindex "&%-bt%& option"
+.oindex "&%-bt%&"
.cindex "router" "skipping when address testing"
If this option is set false, the router is skipped when routing is being tested
by means of the &%-bt%& command line option. This can be a convenience when
turned on by &"+caseful"& as a list item. See section &<<SECTcasletadd>>& for
more details.
-.cindex "&$local_part$&"
-.cindex "&$original_local_part$&"
-.cindex "&$parent_local_part$&"
+.vindex "&$local_part$&"
+.vindex "&$original_local_part$&"
+.vindex "&$parent_local_part$&"
The value of the &$local_part$& variable is forced to lower case while a
router is running unless &%caseful_local_part%& is set. When a router assigns
an address to a transport, the value of &$local_part$& when the transport runs
.option check_local_user routers&!? boolean false
-.cindex "local user" "checking in router"
+.cindex "local user, checking in router"
.cindex "router" "checking for local user"
.cindex "&_/etc/passwd_&"
-.cindex "&$home$&"
+.vindex "&$home$&"
When this option is true, Exim checks that the local part of the recipient
address (with affixes removed if relevant) is the name of an account on the
local system. The check is done by calling the &[getpwnam()]& function rather
.option domains routers&!? "domain list&!!" unset
.cindex "router" "restricting to specific domains"
-.cindex "&$domain_data$&"
+.vindex "&$domain_data$&"
If this option is set, the router is skipped unless the current domain matches
the list. If the match is achieved by means of a file lookup, the data that the
lookup returned for the domain is placed in &$domain_data$& for use in string
address is delivered to a remote host, the return path is set to &`<>`&, unless
overridden by the &%return_path%& option on the transport.
-.cindex "&$address_data$&"
+.vindex "&$address_data$&"
If for some reason you want to discard local errors, but use a non-empty
MAIL command for remote delivery, you can preserve the original return
path in &$address_data$& in the router, and reinstate it in the transport by
is expanded before use as a list, it is possible to make it dependent on the
domain that is being routed.
-.cindex "&$host_address$&"
+.vindex "&$host_address$&"
During its expansion, &$host_address$& is set to the IP address that is being
checked.
.option local_part_prefix routers&!? "string list" unset
.cindex "router" "prefix for local part"
-.cindex "prefix" "for local part; used in router"
+.cindex "prefix" "for local part, used in router"
If this option is set, the router is skipped unless the local part starts with
one of the given strings, or &%local_part_prefix_optional%& is true. See
section &<<SECTrouprecon>>& for a list of the order in which preconditions are
Wildcarding can be used to set up multiple user mailboxes, as described in
section &<<SECTmulbox>>&.
-.cindex "&$local_part$&"
-.cindex "&$local_part_prefix$&"
+.vindex "&$local_part$&"
+.vindex "&$local_part_prefix$&"
During the testing of the &%local_parts%& option, and while the router is
running, the prefix is removed from the local part, and is available in the
expansion variable &$local_part_prefix$&. When a message is being delivered, if
.code
local_parts = dbm;/usr/local/specials/$domain
.endd
-.cindex "&$local_part_data$&"
+.vindex "&$local_part_data$&"
If the match is achieved by a lookup, the data that the lookup returned
for the local part is placed in the variable &$local_part_data$& for use in
expansions of the router's private options. You might use this option, for
.option router_home_directory routers string&!! unset
.cindex "router" "home directory for"
.cindex "home directory" "for router"
-.cindex "&$home$&"
+.vindex "&$home$&"
This option sets a home directory for use while the router is running. (Compare
&%transport_home_directory%&, which sets a home directory for later
transporting.) In particular, if used on a &(redirect)& router, this option
.vitem &%pass%&
.cindex "&%more%& option"
-.cindex "&$self_hostname$&"
+.vindex "&$self_hostname$&"
The router passes the address to the next router, or to the router named in the
&%pass_router%& option if it is set. This overrides &%no_more%&. During
subsequent routing and delivery, the variable &$self_hostname$& contains the
code to support this option is not included in the Exim binary unless
SUPPORT_TRANSLATE_IP_ADDRESS=yes is set in &_Local/Makefile_&.
-.cindex "&$host_address$&"
+.vindex "&$host_address$&"
The &%translate_ip_address%& string is expanded for every IP address generated
by the router, with the generated address set in &$host_address$&. If the
expansion is forced to fail, no action is taken.
If the transport does not specify a home directory, and
&%transport_home_directory%& is not set for the router, the home directory for
-the tranport is taken from the password data if &%check_local_user%& is set for
+the transport is taken from the password data if &%check_local_user%& is set for
the router. Otherwise it is taken from &%router_home_directory%& if that option
is set; if not, no home directory is set for the transport.
.option verify_only routers&!? boolean false
.cindex "EXPN" "with &%verify_only%&"
-.cindex "&%-bv%& option"
+.oindex "&%-bv%&"
.cindex "router" "used only when verifying"
If this option is set, the router is used only when verifying an address or
testing with the &%-bv%& option, not when actually doing a delivery, testing
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The accept router"
+.chapter "The accept router" "CHID4"
.cindex "&(accept)& router"
.cindex "routers" "&(accept)&"
The &(accept)& router has no private options of its own. Unless it is being
-.section "Private options for dnslookup"
+.section "Private options for dnslookup" "SECID118"
.cindex "options" "&(dnslookup)& router"
The private options for the &(dnslookup)& router are as follows:
.cindex "MX record" "required to exist"
.cindex "SRV record" "required to exist"
A domain that matches &%mx_domains%& is required to have either an MX or an SRV
-record in order to be recognised. (The name of this option could be improved.)
+record in order to be recognized. (The name of this option could be improved.)
For example, if all the mail hosts in &'fict.example'& are known to have MX
records, except for those in &'discworld.fict.example'&, you could use this
setting:
when verifying, unless &%rewrite_headers%& is false (not the default).
-.section "Effect of qualify_single and search_parents"
+.section "Effect of qualify_single and search_parents" "SECID119"
When a domain from an envelope recipient is changed by the resolver as a result
of the &%qualify_single%& or &%search_parents%& options, Exim rewrites the
corresponding address in the message's header lines unless &%rewrite_headers%&
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The ipliteral router"
+.chapter "The ipliteral router" "CHID5"
.cindex "&(ipliteral)& router"
.cindex "domain literal" "routing"
.cindex "routers" "&(ipliteral)&"
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The iplookup router"
+.chapter "The iplookup router" "CHID6"
.cindex "&(iplookup)& router"
.cindex "routers" "&(iplookup)&"
The &(iplookup)& router was written to fulfil a specific requirement in
protocols is to be used.
-.option query iplookup string&!! "&`$local_part@$domain $local_part@$domain`&"
+.option query iplookup string&!! "see below"
This defines the content of the query that is sent to the remote hosts. The
-repetition serves as a way of checking that a response is to the correct query
-in the default case (see &%response_pattern%& below).
+default value is:
+.code
+$local_part@$domain $local_part@$domain
+.endd
+The repetition serves as a way of checking that a response is to the correct
+query in the default case (see &%response_pattern%& below).
.option reroute iplookup string&!! unset
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The manualroute router"
+.chapter "The manualroute router" "CHID7"
.scindex IIDmanrou1 "&(manualroute)& router"
.scindex IIDmanrou2 "routers" "&(manualroute)&"
.cindex "domain" "manually routing"
generic &%transport%& option must specify a transport, unless the router is
being used purely for verification (see &%verify_only%&).
-.cindex "&$host$&"
+.vindex "&$host$&"
In the case of verification, matching the domain pattern is sufficient for the
router to accept the address. When actually routing an address for delivery,
an address that matches a domain pattern is queued for the associated
.cindex "options" "&(manualroute)& router"
The private options for the &(manualroute)& router are as follows:
+.new
+.option host_all_ignored manualroute string defer
+See &%host_find_failed%&.
.option host_find_failed manualroute string freeze
This option controls what happens when &(manualroute)& tries to find an IP
address for a host, and the host does not exist. The option can be set to one
-of
+of the following values:
.code
decline
defer
fail
freeze
+ignore
pass
.endd
-The default assumes that this state is a serious configuration error. The
-difference between &"pass"& and &"decline"& is that the former forces the
-address to be passed to the next router (or the router defined by
+The default (&"freeze"&) assumes that this state is a serious configuration
+error. The difference between &"pass"& and &"decline"& is that the former
+forces the address to be passed to the next router (or the router defined by
&%pass_router%&),
.cindex "&%more%& option"
overriding &%no_more%&, whereas the latter passes the address to the next
router only if &%more%& is true.
-This option applies only to a definite &"does not exist"& state; if a host
-lookup gets a temporary error, delivery is deferred unless the generic
-&%pass_on_timeout%& option is set.
+The value &"ignore"& causes Exim to completely ignore a host whose IP address
+cannot be found. If all the hosts in the list are ignored, the behaviour is
+controlled by the &%host_all_ignored%& option. This takes the same values
+as &%host_find_failed%&, except that it cannot be set to &"ignore"&.
+
+The &%host_find_failed%& option applies only to a definite &"does not exist"&
+state; if a host lookup gets a temporary error, delivery is deferred unless the
+generic &%pass_on_timeout%& option is set.
+.wen
.option hosts_randomize manualroute boolean false
-.section "Routing rules in route_list"
+.section "Routing rules in route_list" "SECID120"
The value of &%route_list%& is a string consisting of a sequence of routing
rules, separated by semicolons. If a semicolon is needed in a rule, it can be
entered as two semicolons. Alternatively, the list separator can be changed as
-.section "Routing rules in route_data"
+.section "Routing rules in route_data" "SECID121"
The use of &%route_list%& is convenient when there are only a small number of
routing rules. For larger numbers, it is easier to use a file or database to
hold the routing information, and use the &%route_data%& option instead.
-.section "Format of the list of hosts"
+.section "Format of the list of hosts" "SECID122"
A list of hosts, whether obtained via &%route_data%& or &%route_list%&, is
always separately expanded before use. If the expansion fails, the router
declines. The result of the expansion must be a colon-separated list of names
&$1$& is also set when partial matching is done in a file lookup.
.next
-.cindex "&$value$&"
+.vindex "&$value$&"
If the pattern that matched the domain was a lookup item, the data that was
looked up is available in the expansion variable &$value$&. For example:
.code
If no IP address for a host can be found, what happens is controlled by the
&%host_find_failed%& option.
-.cindex "&$host$&"
+.vindex "&$host$&"
When an address is routed to a local transport, IP addresses are not looked up.
The host list is passed to the transport in the &$host$& variable.
-.section "Manualroute examples"
+.section "Manualroute examples" "SECID123"
In some of the examples that follow, the presence of the &%remote_smtp%&
transport, as defined in the default configuration file, is assumed:
${lookup{$domain}dbm{/domain2/hosts}{$value}fail} \
batch_pipe
.endd
-.cindex "&$domain$&"
-.cindex "&$host$&"
+.vindex "&$domain$&"
+.vindex "&$host$&"
The first of these just passes the domain in the &$host$& variable, which
doesn't achieve much (since it is also in &$domain$&), but the second does a
file lookup to find a value to pass, causing the router to decline to handle
goes on to try a call to &[getipnodebyname()]& or &[gethostbyname()]&, and the
result of the lookup is the result of that call.
-.cindex "&$address_data$&"
+.vindex "&$address_data$&"
If the DATA field is set, its value is placed in the &$address_data$&
variable. For example, this return line
.code
.next
It can cause an automatic reply to be generated.
.next
-It can be forced to fail, with a custom error message.
+.new
+It can be forced to fail, optionally with a custom error message.
.next
-It can be temporarily deferred.
+It can be temporarily deferred, optionally with a custom message.
+.wen
.next
It can be discarded.
.endlist
-.section "Redirection data"
+.section "Redirection data" "SECID124"
The router operates by interpreting a text string which it obtains either by
expanding the contents of the &%data%& option, or by reading the entire
contents of a file whose name is given in the &%file%& option. These two
-.section "Forward files and address verification"
+.section "Forward files and address verification" "SECID125"
.cindex "address redirection" "while verifying"
It is usual to set &%no_verify%& on &(redirect)& routers which handle users'
&_.forward_& files, as in the example above. There are two reasons for this:
-.section "Interpreting redirection data"
+.section "Interpreting redirection data" "SECID126"
.cindex "Sieve filter" "specifying in redirection data"
.cindex "filter" "specifying in redirection data"
The contents of the data string, whether obtained from &%data%& or &%file%&,
&"item"& refers to what remains after any surrounding double quotes have been
removed.
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
&*Warning*&: If you use an Exim expansion to construct a redirection address,
and the expansion contains a reference to &$local_part$&, you should make use
of the &%quote_local_part%& expansion operator, in case the local part contains
.section "Redirecting to a local mailbox" "SECTredlocmai"
.cindex "routing" "loops in"
-.cindex "loop while routing" "avoidance of"
+.cindex "loop" "while routing, avoidance of"
.cindex "address redirection" "to local mailbox"
A redirection item may safely be the same as the address currently under
consideration. This does not cause a routing loop, because a router is
.cindex "backslash in alias file"
.cindex "alias file" "backslash in"
For compatibility with other MTAs, such unqualified local parts may be
-preceeded by &"\"&, but this is not a requirement for loop prevention. However,
+preceded by &"\"&, but this is not a requirement for loop prevention. However,
it does make a difference if more than one domain is being handled
synonymously.
the router to decline. Instead, the alias item
.cindex "black hole"
.cindex "abandoning mail"
-.code
-:blackhole:
-.endd
-can be used. It does what its name implies. No delivery is done, and no error
-message is generated. This has the same effect as specifing &_/dev/null_&, but
-can be independently disabled.
+&':blackhole:'& can be used. It does what its name implies. No delivery is
+done, and no error message is generated. This has the same effect as specifing
+&_/dev/null_& as a destination, but it can be independently disabled.
-&*Warning*&: If &`:blackhole:`& appears anywhere in a redirection list, no
+&*Warning*&: If &':blackhole:'& appears anywhere in a redirection list, no
delivery is done for the original local part, even if other redirection items
are present. If you are generating a multi-item list (for example, by reading a
database) and need the ability to provide a no-op item, you must use
.cindex "delivery" "forcing failure"
.cindex "delivery" "forcing deferral"
.cindex "failing delivery" "forcing"
-.cindex "deferred delivery" "forcing"
+.cindex "deferred delivery, forcing"
.cindex "customizing" "failure message"
An attempt to deliver a particular address can be deferred or forced to fail by
redirection items of the form
.endd
In the case of an address that is being verified from an ACL or as the subject
of a
-.cindex "VRFY error text" "display of"
+.cindex "VRFY" "error text, display of"
VRFY command, the text is included in the SMTP error response by
default.
-.cindex "EXPN error text" "display of"
+.cindex "EXPN" "error text, display of"
The text is not included in the response to an EXPN command. In non-SMTP cases
the text is included in the error message that Exim generates.
&%forbid_smtp_code%& option true. In this case, any SMTP code is quietly
ignored.
-.cindex "&$acl_verify_message$&"
+.vindex "&$acl_verify_message$&"
In an ACL, an explicitly provided message overrides the default, but the
default message is available in the variable &$acl_verify_message$& and can
therefore be included in a custom message if this is desired.
Sometimes it is useful to use a single-key search type with a default (see
chapter &<<CHAPfdlookup>>&) to look up aliases. However, there may be a need
for exceptions to the default. These can be handled by aliasing them to
-.code
-:unknown:
-.endd
-This differs from &':fail:'& in that it causes the &(redirect)& router to
-decline, whereas &':fail:'& forces routing to fail. A lookup which results in
-an empty redirection list has the same effect.
+&':unknown:'&. This differs from &':fail:'& in that it causes the &(redirect)&
+router to decline, whereas &':fail:'& forces routing to fail. A lookup which
+results in an empty redirection list has the same effect.
.endlist
-.section "Duplicate addresses"
+.section "Duplicate addresses" "SECID127"
.cindex "duplicate addresses"
-.cindex "address duplicate" "discarding"
+.cindex "address duplicate, discarding"
.cindex "pipe" "duplicated"
Exim removes duplicate addresses from the list to which it is delivering, so as
to deliver just one copy to each address. This does not apply to deliveries
-.section "Repeated redirection expansion"
+.section "Repeated redirection expansion" "SECID128"
.cindex "repeated redirection expansion"
.cindex "address redirection" "repeated for each delivery attempt"
When a message cannot be delivered to all of its recipients immediately,
can be used to avoid this.
-.section "Errors in redirection lists"
+.section "Errors in redirection lists" "SECID129"
.cindex "address redirection" "errors"
If &%skip_syntax_errors%& is set, a malformed address that causes a parsing
error is skipped, and an entry is written to the main log. This may be useful
-.section "Private options for the redirect router"
+.section "Private options for the redirect router" "SECID130"
.cindex "options" "&(redirect)& router"
The private options for the &(redirect)& router are as follows:
.option file_transport redirect string&!! unset
-.cindex "&$address_file$&"
+.vindex "&$address_file$&"
A &(redirect)& router sets up a direct delivery to a file when a path name not
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
.option pipe_transport redirect string&!! unset
-.cindex "&$address_pipe$&"
+.vindex "&$address_pipe$&"
A &(redirect)& router sets up a direct delivery to a pipe when a string
starting with a vertical bar character is specified as a new &"address"&. The
transport used is specified by this option, which, after expansion, must be the
.option qualify_domain redirect string&!! unset
-.cindex "&$qualify_recipient$&"
+.vindex "&$qualify_recipient$&"
If this option is set, and an unqualified address (one without a domain) is
generated, and that address would normally be qualified by the global setting
in &%qualify_recipient%&, it is instead qualified with the domain specified by
-.section "Concurrent deliveries"
+.section "Concurrent deliveries" "SECID131"
.cindex "concurrent deliveries"
.cindex "simultaneous deliveries"
-If two different messages for the same local recpient arrive more or less
+If two different messages for the same local recipient arrive more or less
simultaneously, the two delivery processes are likely to run concurrently. When
the &(appendfile)& transport is used to write to a file, Exim applies locking
rules to stop concurrent processes from writing to the same file at the same
-.section "Current and home directories"
+.section "Current and home directories" "SECID132"
.cindex "current directory for local transport"
.cindex "home directory" "for local transport"
.cindex "transport" "local; home directory for"
-.section "Expansion variables derived from the address"
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
-.cindex "&$original_domain$&"
+.section "Expansion variables derived from the address" "SECID133"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
+.vindex "&$original_domain$&"
Normally a local delivery is handling a single address, and in that case the
variables such as &$domain$& and &$local_part$& are set during local
deliveries. However, in some circumstances more than one address may be handled
.option home_directory transports string&!! unset
.cindex "transport" "home directory for"
-.cindex "&$home$&"
+.vindex "&$home$&"
This option specifies a home directory setting for a local transport,
overriding any value that may be set by the router. The home directory is
placed in &$home$& while expanding the transport's private options. It is also
.option message_size_limit transports string&!! 0
.cindex "limit" "message size per transport"
-.cindex "size of message" "limit"
+.cindex "size" "of message, limit"
.cindex "transport" "message size; limiting"
This option controls the size of messages passed through the transport. It is
expanded before use; the result of the expansion must be a sequence of decimal
.option rcpt_include_affixes transports boolean false
-.cindex "prefix" "for local part; including in envelope"
-.cindex "suffix" "for local part; including in envelope"
+.cindex "prefix" "for local part, including in envelope"
+.cindex "suffix for local part" "including in envelope"
.cindex "local part" "prefix"
.cindex "local part" "suffix"
When this option is false (the default), and an address that has had any
&*Note:*& A changed return path is not logged unless you add
&%return_path_on_delivery%& to the log selector.
-.cindex "&$return_path$&"
+.vindex "&$return_path$&"
The expansion can refer to the existing value via &$return_path$&. This is
either the message's envelope sender, or an address set by the
&%errors_to%& option on a router. If the expansion is forced to fail, no
If the shadow transport did not succeed, the error message is put in
parentheses afterwards. Shadow transports can be used for a number of different
purposes, including keeping more detailed log information than Exim normally
-provides, and implementing automatic acknowledgement policies based on message
+provides, and implementing automatic acknowledgment policies based on message
headers that some sites insist on.
the &%size_addition%& option on the &(smtp)& transport, either to allow for
additions to the message, or to disable the use of SIZE altogether.
-.cindex "&$pipe_addresses$&"
+.vindex "&$pipe_addresses$&"
The value of the &%transport_filter%& option is the command string for starting
the filter, which is run directly from Exim, not under a shell. The string is
parsed by Exim in the same way as a command string for the &(pipe)& transport:
an ideal name for this feature here, but as it was already implemented for the
&(pipe)& transport, it seemed sensible not to change it.)
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
The expansion variables &$host$& and &$host_address$& are available when the
transport is a remote one. They contain the name and IP address of the host to
which the message is being sent. For example:
expansion cannot generate multiple arguments, or a command name followed by
arguments. Consider this example:
.code
-transport_filter = ${lookup{$host}lsearch{/some/file}\
+transport_filter = ${lookup{$host}lsearch{/a/file}\
{$value}{/bin/cat}}
.endd
The result of the lookup is interpreted as the name of the command, even
if it contains white space. The simplest way round this is to use a shell:
.code
-transport_filter = /bin/sh -c ${lookup{$host}lsearch{/some/file}\
+transport_filter = /bin/sh -c ${lookup{$host}lsearch{/a/file}\
{$value}{/bin/cat}}
.endd
.endlist
.option transport_filter_timeout transports time 5m
-.cindex "transport filter" "timeout"
+.cindex "transport" "filter, timeout"
When Exim is reading the output of a transport filter, it a applies a timeout
that can be set by this option. Exceeding the timeout is normally treated as a
temporary delivery failure. However, if a transport filter is used with a
.option user transports string&!! "Exim user"
.cindex "uid (user id)" "local delivery"
-.cindex "transport user" "specifying"
+.cindex "transport" "user, specifying"
This option specifies the user under whose uid the delivery process is to be
run, overriding any uid that may have been set by the router. If the user is
given as a name, the uid is looked up from the password data, and the
to certain conditions:
.ilist
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
If any of the transport's options contain a reference to &$local_part$&, no
batching is possible.
.next
-.cindex "&$domain$&"
+.vindex "&$domain$&"
If any of the transport's options contain a reference to &$domain$&, only
addresses with the same domain are batched.
.next
addresses is to set the &%envelope_to_add%& option.
.cindex "&(pipe)& transport" "with multiple addresses"
-.cindex "&$pipe_addresses$&"
+.vindex "&$pipe_addresses$&"
If you are using a &(pipe)& transport without BSMTP, and setting the
transport's &%command%& option, you can include &$pipe_addresses$& as part of
the command. This is not a true variable; it is a bit of magic that causes each
of the recipient addresses to be inserted into the command as a separate
argument. This provides a way of accessing all the addresses that are being
delivered in the batch. &*Note:*& This is not possible for pipe commands that
-are specififed by a &(redirect)& router.
+are specified by a &(redirect)& router.
included.
.cindex "quota" "system"
-Exim recognises system quota errors, and generates an appropriate message. Exim
+Exim recognizes system quota errors, and generates an appropriate message. Exim
also supports its own quota control within the transport, for use when the
system facility is unavailable or cannot be used for some reason.
the message is created. Only one of these two options can be set, and for
normal deliveries to mailboxes, one of them &'must'& be set.
-.cindex "&$address_file$&"
-.cindex "&$local_part$&"
+.vindex "&$address_file$&"
+.vindex "&$local_part$&"
However, &(appendfile)& is also used for delivering messages to files or
directories whose names (or parts of names) are obtained from alias,
forwarding, or filtering operations (for example, a &%save%& command in a
-.section "Private options for appendfile"
+.section "Private options for appendfile" "SECID134"
.cindex "options" "&(appendfile)& transport"
&<<SECTopdir>>& for further details of this form of delivery.
-.option directory_file appendfile string&!! &`q${base62:$tod_epoch}-$inode`&
+.option directory_file appendfile string&!! "see below"
.cindex "base62"
-.cindex "&$inode$&"
+.vindex "&$inode$&"
When &%directory%& is set, but neither &%maildir_format%& nor
&%mailstore_format%& is set, &(appendfile)& delivers each message into a file
-whose name is obtained by expanding this string. The default value generates a
-unique name from the current time, in base 62 form, and the inode of the file.
-The variable &$inode$& is available only when expanding this option.
+whose name is obtained by expanding this string. The default value is:
+.code
+q${base62:$tod_epoch}-$inode
+.endd
+This generates a unique name from the current time, in base 62 form, and the
+inode of the file. The variable &$inode$& is available only when expanding this
+option.
.option directory_mode appendfile "octal integer" 0700
.option lock_fcntl_timeout appendfile time 0s
.cindex "timeout" "mailbox locking"
-.cindex "mailbox locking" "blocking and non-blocking"
+.cindex "mailbox" "locking, blocking and non-blocking"
.cindex "locking files"
By default, the &(appendfile)& transport uses non-blocking calls to &[fcntl()]&
when locking an open mailbox file. If the call fails, the delivery process
.cindex "locking files"
.cindex "file" "locking"
.cindex "file" "MBX format"
-.cindex "MBX format" "specifying"
+.cindex "MBX format, specifying"
This option is available only if Exim has been compiled with SUPPORT_MBX
set in &_Local/Makefile_&. If &%mbx_format%& is set with the &%file%& option,
the message is appended to the mailbox file in MBX format instead of
If the output file is created, it is given this mode. If it already exists and
has wider permissions, they are reduced to this mode. If it has narrower
permissions, an error occurs unless &%mode_fail_narrower%& is false. However,
-if the delivery is the result of a &%save%& command in a filter file specifing
+if the delivery is the result of a &%save%& command in a filter file specifying
a particular mode, the mode of the output file is always forced to take that
value, and this option is ignored.
-.section "Using tags to record message sizes"
+.section "Using tags to record message sizes" "SECID135"
If &%maildir_tag%& is set, the string is expanded for each delivery.
When the maildir file is renamed into the &_new_& sub-directory, the
tag is added to its name. However, if adding the tag takes the length of the
name to the point where the test &[stat()]& call fails with ENAMETOOLONG,
the tag is dropped and the maildir file is created with no tag.
-.cindex "&$message_size$&"
+.vindex "&$message_size$&"
Tags can be used to encode the size of files in their names; see
&%quota_size_regex%& above for an example. The expansion of &%maildir_tag%&
happens after the message has been written. The value of the &$message_size$&
-.section "Using a maildirsize file"
+.section "Using a maildirsize file" "SECID136"
.cindex "quota" "in maildir delivery"
.cindex "maildir format" "&_maildirsize_& file"
If &%maildir_use_size_file%& is true, Exim implements the maildir++ rules for
details.
-.section "Mailstore delivery"
+.section "Mailstore delivery" "SECID137"
.cindex "mailstore format" "description of"
If the &%mailstore_format%& option is true, each message is written as two
files in the given directory. A unique base name is constructed from the
&$mailstore_basename$& is available for use during these expansions.
-.section "Non-special new file delivery"
+.section "Non-special new file delivery" "SECID138"
If neither &%maildir_format%& nor &%mailstore_format%& is set, a single new
file is created directly in the named directory. For example, when delivering
messages into files in batched SMTP format for later delivery to some host (see
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The autoreply transport"
+.chapter "The autoreply transport" "CHID8"
.scindex IIDauttra1 "transports" "&(autoreply)&"
.scindex IIDauttra2 "&(autoreply)& transport"
The &(autoreply)& transport is not a true transport in that it does not cause
of the original message that is included in the generated message when
&%return_message%& is set. They do not apply to the generated message itself.
-.cindex "&$sender_address$&"
+.vindex "&$sender_address$&"
If the &(autoreply)& transport receives return code 2 from Exim when it submits
the message, indicating that there were no recipients, it does not treat this
as an error. This means that autoreplies sent to &$sender_address$& when this
-.section "Private options for autoreply"
+.section "Private options for autoreply" "SECID139"
.cindex "options" "&(autoreply)& transport"
.option bcc autoreply string&!! unset
.option timeout lmtp time 5m
-The transport is aborted if the created process
-or Unix domain socket
-does not respond to LMTP commands or message input within this timeout.
-
-
-Here is an example of a typical LMTP transport:
+The transport is aborted if the created process or Unix domain socket does not
+respond to LMTP commands or message input within this timeout. Here is an
+example of a typical LMTP transport:
.code
lmtp:
driver = lmtp
following ways:
.ilist
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
A router routes one address to a transport in the normal way, and the
transport is configured as a &(pipe)& transport. In this case, &$local_part$&
contains the local part of the address (as usual), and the command that is run
is specified by the &%command%& option on the transport.
.next
-.cindex "&$pipe_addresses$&"
+.vindex "&$pipe_addresses$&"
If the &%batch_max%& option is set greater than 1 (the default is 1), the
transport can handle more than one address in a single run. In this case, when
more than one address is routed to the transport, &$local_part$& is not set
(described in section &<<SECThowcommandrun>>& below) contains all the addresses
that are routed to the transport.
.next
-.cindex "&$address_pipe$&"
+.vindex "&$address_pipe$&"
A router redirects an address directly to a pipe command (for example, from an
alias or forward file). In this case, &$address_pipe$& contains the text of the
pipe command, and the &%command%& option on the transport is ignored. If only
for a discussion of local delivery batching.
-.section "Concurrent delivery"
+.section "Concurrent delivery" "SECID140"
If two messages arrive at almost the same time, and both are routed to a pipe
delivery, the two pipe transports may be run concurrently. You must ensure that
any pipe commands you set up are robust against this happening. If the commands
-.section "Returned status and data"
+.section "Returned status and data" "SECID141"
.cindex "&(pipe)& transport" "returned data"
If the command exits with a non-zero return code, the delivery is deemed to
have failed, unless either the &%ignore_status%& option is set (in which case
.cindex "transport" "filter"
.cindex "filter" "transport filter"
-.cindex "&$pipe_addresses$&"
+.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
place this string is recognized is when it appears as an argument for a pipe or
user's home directory if &%check_local_user%& is set.
-.section "Private options for pipe"
+.section "Private options for pipe" "SECID142"
.cindex "options" "&(pipe)& transport"
message_suffix =
.endd
-.option path pipe string &`/bin:/usr/bin`&
+.option path pipe string "see below"
This option specifies the string that is set up in the PATH environment
-variable of the subprocess. If the &%command%& option does not yield an
-absolute path name, the command is sought in the PATH directories, in the usual
-way. &*Warning*&: This does not apply to a command specified as a transport
-filter.
+variable of the subprocess. The default is:
+.code
+/bin:/usr/bin
+.endd
+If the &%command%& option does not yield an absolute path name, the command is
+sought in the PATH directories, in the usual way. &*Warning*&: This does not
+apply to a command specified as a transport filter.
.option pipe_as_creator pipe boolean false
.option use_shell pipe boolean false
-.cindex "&$pipe_addresses$&"
+.vindex "&$pipe_addresses$&"
If this option is set, it causes the command to be passed to &_/bin/sh_&
instead of being run directly from the transport, as described in section
&<<SECThowcommandrun>>&. This is less secure, but is needed in some situations
-.section "Using an external local delivery agent"
+.section "Using an external local delivery agent" "SECID143"
.cindex "local delivery" "using an external agent"
.cindex "&'procmail'&"
.cindex "external local delivery"
&<<CHAPretry>>&) is applied to each IP address independently.
-.section "Multiple messages on a single connection"
+.section "Multiple messages on a single connection" "SECID144"
The sending of multiple messages over a single TCP/IP connection can arise in
two ways:
-.section "Use of the $host variable"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.section "Use of the $host variable" "SECID145"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
At the start of a run of the &(smtp)& transport, the values of &$host$& and
&$host_address$& are the name and IP address of the first host on the host list
passed by the router. However, when the transport is about to connect to a
-.section "Private options for smtp"
+.section "Private options for smtp" "SECID146"
.cindex "options" "&(smtp)& transport"
The private options of the &(smtp)& transport are as follows:
-.new
.option address_retry_include_sender smtp boolean true
.cindex "4&'xx'& responses" "retrying after"
When an address is delayed because of a 4&'xx'& response to a RCPT command, it
reference to the sender (which is what earlier versions of Exim did), by
setting &%address_retry_include_sender%& false. However, this can lead to
problems with servers that regularly issue 4&'xx'& responses to RCPT commands.
-.wen
.option allow_localhost smtp boolean false
.cindex "local host" "sending to"
line containing just &"."& that terminates a message. Its value must not be
zero.
-
.option gethostbyname smtp boolean false
If this option is true when the &%hosts%& and/or &%fallback_hosts%& options are
being used, names are looked up using &[gethostbyname()]&
instead of using the DNS. Of course, that function may in fact use the DNS, but
it may also consult other sources of information such as &_/etc/hosts_&.
-.option helo_data smtp string&!! &`$primary_hostname`&
-.cindex "HELO argument" "setting"
-.cindex "EHLO argument" "setting"
-.cindex "LHLO argument" "setting"
-The value of this option is expanded, and used as the argument for the EHLO,
-HELO, or LHLO command that starts the outgoing SMTP or LMTP session. The
-variables &$host$& and &$host_address$& are set to the identity of the remote
-host, and can be used to generate different values for different servers.
+.new
+.option gnutls_require_kx main string unset
+This option controls the key exchange mechanisms when GnuTLS is used in an Exim
+client. For details, see section &<<SECTreqciphgnu>>&.
+
+.option gnutls_require_mac main string unset
+This option controls the MAC algorithms when GnuTLS is used in an Exim
+client. For details, see section &<<SECTreqciphgnu>>&.
+
+.option gnutls_require_protocols main string unset
+This option controls the protocols when GnuTLS is used in an Exim
+client. For details, see section &<<SECTreqciphgnu>>&.
+.wen
+
+.new
+.option helo_data smtp string&!! "see below"
+.cindex "HELO" "argument, setting"
+.cindex "EHLO" "argument, setting"
+.cindex "LHLO argument setting"
+The value of this option is expanded after a connection to a another host has
+been set up. The result is used as the argument for the EHLO, HELO, or LHLO
+command that starts the outgoing SMTP or LMTP session. The default value of the
+option is:
+.code
+$primary_hostname
+.endd
+During the expansion, the variables &$host$& and &$host_address$& are set to
+the identity of the remote host, and the variables &$sending_ip_address$& and
+&$sending_port$& are set to the local IP address and port number that are being
+used. These variables can be therefore used to generate different values for
+different servers or different local IP addresses. For example, if you want the
+string that is used for &%helo_data%& to be obtained by a DNS lookup of the
+outgoing interface address, you could use this:
+.code
+helo_data = ${lookup dnsdb{ptr=$sending_ip_address}{$value}\
+ {$primary_hostname}}
+.endd
+The use of &%helo_data%& applies both to sending messages and when doing
+callouts.
+.wen
.option hosts smtp "string list&!!" unset
Hosts are associated with an address by a router such as &(dnslookup)&, which
.option hosts_avoid_esmtp smtp "host list&!!" unset
-.cindex "ESMTP" "avoiding use of"
+.cindex "ESMTP, avoiding use of"
.cindex "HELO" "forcing use of"
.cindex "EHLO" "avoiding use of"
.cindex "PIPELINING" "avoiding the use of"
facilities such as AUTH, PIPELINING, SIZE, and STARTTLS.
+.new
+.option hosts_avoid_pipelining smtp "host list&!!" unset
+.cindex "PIPELINING" "avoiding the use of"
+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.
+.wen
+
+
.option hosts_avoid_tls smtp "host list&!!" unset
.cindex "TLS" "avoiding for certain hosts"
Exim will not try to start a TLS session when delivering to any host that
If this option is set, and either the list of hosts is taken from the
&%hosts%& or the &%fallback_hosts%& option, or the hosts supplied by the router
were not obtained from MX records (this includes fallback hosts from the
-router), and were not randomizied by the router, the order of trying the hosts
+router), and were not randomized by the router, the order of trying the hosts
is randomized each time the transport runs. Randomizing the order of a host
list can be used to do crude load sharing.
&<<CHAPSMTPAUTH>>& for details of authentication.
.option interface smtp "string list&!!" unset
-.new
.cindex "bind IP address"
.cindex "IP address" "binding"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
This option specifies which interface to bind to when making an outgoing SMTP
call. &*Note:*& Do not confuse this with the interface address that was used
when a message was received, which is in &$received_ip_address$&, formerly
the outgoing interface address. There is no variable that contains an outgoing
interface address because, unless it is set by this option, its value is
unknown.
-.wen
During the expansion of the &%interface%& option the variables &$host$& and
&$host_address$& refer to the host to which a connection is about to be made
This option controls the setting of SO_KEEPALIVE on outgoing TCP/IP socket
connections. When set, it causes the kernel to probe idle connections
periodically, by sending packets with &"old"& sequence numbers. The other end
-of the connection should send a acknowledgement if the connection is still okay
+of the connection should send a acknowledgment if the connection is still okay
or a reset if the connection has been aborted. The reason for doing this is
that it has the beneficial effect of freeing up certain types of connection
that can get stuck when the remote host is disconnected without tidying up the
.option multi_domain smtp boolean true
-.cindex "&$domain$&"
+.vindex "&$domain$&"
When this option is set, the &(smtp)& transport can handle a number of
addresses containing a mixture of different domains provided they all resolve
to the same list of hosts. Turning the option off restricts the transport to
.option port smtp string&!! "see below"
-.new
.cindex "port" "sending TCP/IP"
.cindex "TCP/IP" "setting outgoing port"
This option specifies the TCP/IP port on the server to which Exim connects.
received, which is in &$received_port$&, formerly known as &$interface_port$&.
The name was changed to minimize confusion with the outgoing port. There is no
variable that contains an outgoing port.
-.wen
If the value of this option begins with a digit it is taken as a port number;
otherwise it is looked up using &[getservbyname()]&. The default value is
.option tls_certificate smtp string&!! unset
-.cindex "TLS client certificate" "location of"
-.cindex "certificate for client" "location of"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.cindex "TLS" "client certificate, location of"
+.cindex "certificate" "client, location of"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
The value of this option must be the absolute path to a file which contains the
client's certificate, for possible use when sending a message over an encrypted
connection. The values of &$host$& and &$host_address$& are set to the name and
.option tls_privatekey smtp string&!! unset
-.cindex "TLS client private key" "location of"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.cindex "TLS" "client private key, location of"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
The value of this option must be the absolute path to a file which contains the
client's private key. This is used when sending a message over an encrypted
connection using a client certificate. The values of &$host$& and
.option tls_require_ciphers smtp string&!! unset
.cindex "TLS" "requiring specific ciphers"
.cindex "cipher" "requiring specific"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
The value of this option must be a list of permitted cipher suites, for use
when setting up an outgoing encrypted connection. (There is a global option of
the same name for controlling incoming connections.) The values of &$host$& and
.option tls_verify_certificates smtp string&!! unset
.cindex "TLS" "server certificate verification"
.cindex "certificate" "verification of server"
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
The value of this option must be the absolute path to a file containing
permitted server certificates, for use when setting up an encrypted connection.
Alternatively, if you are using OpenSSL, you can set
do this. The new RFCs do not contain this suggestion.
-.section "Explicitly configured address rewriting"
+.section "Explicitly configured address rewriting" "SECID147"
This chapter describes the rewriting rules that can be used in the
main rewrite section of the configuration file, and also in the generic
&%headers_rewrite%& option that can be set on any transport.
-.section "When does rewriting happen?"
+.section "When does rewriting happen?" "SECID148"
.cindex "rewriting" "timing of"
.cindex "&ACL;" "rewriting addresses in"
Configured address rewriting can take place at several different stages of a
message's processing.
-.cindex "&$sender_address$&"
+.vindex "&$sender_address$&"
At the start of an ACL for MAIL, the sender address may have been rewritten
by a special SMTP-time rewrite rule (see section &<<SECTrewriteS>>&), but no
ordinary rewrite rules have yet been applied. If, however, the sender address
RCPT ACL. Otherwise, when the sender address is not verified, it is
rewritten as soon as a message's header lines have been received.
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
Similarly, at the start of an ACL for RCPT, the current recipient's address
may have been rewritten by a special SMTP-time rewrite rule, but no ordinary
rewrite rules have yet been applied to it. However, the behaviour is different
-.section "Testing the rewriting rules that apply on input"
+.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
set for a particular transport.
-.section "Rewriting rules"
+.section "Rewriting rules" "SECID150"
.cindex "rewriting" "rules"
The rewrite section of the configuration file consists of lines of rewriting
rules in the form
(or has not) already been rewritten. However, a rewrite of &'From:'& may assume
that the envelope sender has already been rewritten.
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
The variables &$local_part$& and &$domain$& can be used in the replacement
string to refer to the address that is being rewritten. Note that lookup-driven
rewriting can be done by a rule of the form
refer to the address that is being rewritten.
-.section "Rewriting patterns"
+.section "Rewriting patterns" "SECID151"
.cindex "rewriting" "patterns"
.cindex "address list" "in a rewriting pattern"
The source pattern in a rewriting rule is any item which may appear in an
.endlist
-.section "Rewriting replacements"
+.section "Rewriting replacements" "SECID152"
.cindex "rewriting" "replacements"
If the replacement string for a rule is a single asterisk, addresses that
match the pattern and the flags are &'not'& rewritten, and no subsequent
specifies that &'hatta@lookingglass.fict.example'& is never to be rewritten in
&'From:'& headers.
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
If the replacement string is not a single asterisk, it is expanded, and must
yield a fully qualified address. Within the expansion, the variables
&$local_part$& and &$domain$& refer to the address that is being rewritten.
-.section "Rewriting flags"
+.section "Rewriting flags" "SECID153"
There are three different kinds of flag that may appear on rewriting rules:
.ilist
-.section "Flags specifying which headers and envelope addresses to rewrite"
+.section "Flags specifying which headers and envelope addresses to rewrite" &&&
+ "SECID154"
.cindex "rewriting" "flags"
If none of the following flag letters, nor the &"S"& flag (see section
&<<SECTrewriteS>>&) are present, a main rewriting rule applies to all headers
required to be a regular expression, and it is matched against the whole of the
data for the command, including any surrounding angle brackets.
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
This form of rewrite rule allows for the handling of addresses that are not
compliant with RFCs 2821 and 2822 (for example, &"bang paths"& in batched SMTP
input). Because the input is not required to be a syntactically valid address,
original address in the MAIL or RCPT command.
-.section "Flags controlling the rewriting process"
+.section "Flags controlling the rewriting process" "SECID155"
There are four flags which control the way the rewriting process works. These
take effect only when a rule is invoked, that is, when the address is of the
correct type (matches the flags) and matches the pattern:
.endlist
-.section "Rewriting examples"
+.section "Rewriting examples" "SECID156"
Here is an example of the two common rewriting paradigms:
.code
*@*.hitch.fict.example $1@hitch.fict.example
. ////////////////////////////////////////////////////////////////////////////
.chapter "Retry configuration" "CHAPretry"
-.scindex IIDretconf1 "retry configuration" "description of"
+.scindex IIDretconf1 "retry" "configuration, description of"
.scindex IIDregconf2 "configuration file" "retry section"
The &"retry"& section of the run time configuration file contains a list of
retry rules that control how often Exim tries to deliver messages that cannot
subsequent delivery attempts from queue runs occur only when the retry time for
the local address is reached.
-.section "Changing retry rules"
+.section "Changing retry rules" "SECID157"
If you change the retry rules in your configuration, you should consider
whether or not to delete the retry data that is stored in Exim's spool area in
files with names like &_db/retry_&. Deleting any of Exim's hints files is
-.section "Format of retry rules"
+.section "Format of retry rules" "SECID158"
.cindex "retry" "rules"
Each retry rule occupies one line and consists of three or four parts,
separated by white space: a pattern, an error name, an optional list of sender
.endd
-.section "Choosing which retry rule to use for address errors"
+.section "Choosing which retry rule to use for address errors" "SECID159"
When Exim is looking for a retry rule after a routing attempt has failed (for
example, after a DNS timeout), each line in the retry configuration is tested
against the complete address only if &%retry_use_local_part%& is set for the
&%retry_use_local_part%& is set for the transport (it defaults true for all
local transports).
-.new
.cindex "4&'xx'& responses" "retry rules for"
However, when Exim is looking for a retry rule after a remote delivery attempt
suffers an address error (a 4&'xx'& SMTP response for a recipient address), the
&%address_retry_include_sender%& false in the &(smtp)& transport but this can
lead to problems with servers that regularly issue 4&'xx'& responses to RCPT
commands.
-.wen
-.section "Choosing which retry rule to use for host and message errors"
+.section "Choosing which retry rule to use for host and message errors" &&&
+ "SECID160"
For a temporary error that is not related to an individual address (for
example, a connection timeout), each line in the retry configuration is checked
twice. First, the name of the remote host is used as a domain name (preceded by
then the &"host name"& that is used when searching for a retry rule is the
textual form of the IP address.
-.section "Retry rules for specific errors"
+.section "Retry rules for specific errors" "SECID161"
.cindex "retry" "specific errors; specifying"
The second field in a retry rule is the name of a particular error, or an
asterisk, which matches any error. The errors that can be tested for are:
-.section "Retry rules for specified senders"
+.section "Retry rules for specified senders" "SECID162"
.cindex "retry" "rules; sender-specific"
You can specify retry rules that apply only when the failing message has a
specific sender. In particular, this can be used to define retry rules that
-.section "Retry parameters"
+.section "Retry parameters" "SECID163"
.cindex "retry" "parameters in rules"
The third (or fourth, if a senders list is present) field in a retry rule is a
sequence of retry parameter sets, separated by semicolons. Each set consists of
.next
&'H'&: retry at randomized intervals. The arguments are as for &'G'&. For each
retry, the previous interval is multiplied by the factor in order to get a
-maximum for the next interval. The mininum interval is the first argument of
+maximum for the next interval. The minimum interval is the first argument of
the parameter, and an actual interval is chosen randomly between them. Such a
rule has been found to be helpful in cluster configurations when all the
members of the cluster restart at once, and may therefore synchronize their
computed from the rule's parameters until one that is greater than the previous
interval is found. The main configuration variable
.cindex "limit" "retry interval"
-.cindex "retry interval" "maximum"
+.cindex "retry" "interval, maximum"
.cindex "&%retry_interval_max%&"
&%retry_interval_max%& limits the maximum interval between retries. It
cannot be set greater than &`24h`&, which is its default value.
deliveries that have been deferred.
-.section "Retry rule examples"
+.section "Retry rule examples" "SECID164"
Here are some example retry rules:
.code
alice@wonderland.fict.example quota_5d F,7d,3h
-.section "Timeout of retry data"
+.section "Timeout of retry data" "SECID165"
.cindex "timeout" "of retry data"
.cindex "&%retry_data_expire%&"
.cindex "hints database" "data expiry"
-.section "Long-term failures"
-.cindex "delivery failure" "long-term"
+.section "Long-term failures" "SECID166"
+.cindex "delivery failure, long-term"
.cindex "retry" "after long-term failure"
Special processing happens when an email address has been failing for so long
that the cutoff time for the last algorithm is reached. For example, using the
deliver to permanently failing IP addresses than when &%delay_after_cutoff%& is
true.
-.section "Deliveries that work intermittently"
+.section "Deliveries that work intermittently" "SECID167"
.cindex "retry" "intermittently working deliveries"
Some additional logic is needed to cope with cases where a host is
intermittently available, or when a message has some attribute that prevents
-.section "Generic options for authenticators"
+.section "Generic options for authenticators" "SECID168"
.cindex "authentication" "generic options"
.cindex "options" "generic; for authenticators"
See section &<<SECTauthexiser>>& below for further discussion.
-.new
.option server_condition authenticators string&!! unset
This option must be set for a &%plaintext%& server authenticator, where it
is used directly to control authentication. See section &<<SECTplainserver>>&
expansion is &"1"&, &"yes"&, or &"true"&, authentication succeeds. For any
other result, a temporary error code is returned, with the expanded string as
the error text.
-.wen
.option server_debug_print authenticators string&!! unset
.option server_set_id authenticators string&!! unset
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
When an Exim server successfully authenticates a client, this string is
expanded using data from the authentication, and preserved for any incoming
messages in the variable &$authenticated_id$&. It is also included in the log
.next
If the value of the AUTH= parameter is &"<>"&, it is ignored.
.next
-.cindex "&$authenticated_sender$&"
+.vindex "&$authenticated_sender$&"
If &%acl_smtp_mailauth%& is defined, the ACL it specifies is run. While it is
running, the value of &$authenticated_sender$& is set to the value obtained
from the AUTH= parameter. If the ACL does not yield &"accept"&, the value of
&$authenticated_id$&, which is a string obtained from the authentication
process, and which is not usually a complete email address.
-.cindex "&$sender_address$&"
+.vindex "&$sender_address$&"
Whenever an AUTH= value is ignored, the incident is logged. The ACL for
MAIL, if defined, is run after AUTH= is accepted or ignored. It can
therefore make use of &$authenticated_sender$&. The converse is not true: the
The &%server_advertise_condition%& controls the advertisement of individual
authentication mechanisms. For example, it can be used to restrict the
-advertisement of a patricular mechanism to encrypted connections, by a setting
+advertisement of a particular mechanism to encrypted connections, by a setting
such as:
.code
server_advertise_condition = ${if eq{$tls_cipher}{}{no}{yes}}
.endd
-.cindex "&$tls_cipher$&"
+.vindex "&$tls_cipher$&"
If the session is encrypted, &$tls_cipher$& is not empty, and so the expansion
yields &"yes"&, which allows the advertisement to happen.
fails. If there is no matching advertised mechanism, the AUTH command is
rejected with a 504 error.
-.cindex "&$received_protocol$&"
-.cindex "&$sender_host_authenticated$&"
+.vindex "&$received_protocol$&"
+.vindex "&$sender_host_authenticated$&"
When a message is received from an authenticated host, the value of
&$received_protocol$& is set to &"esmtpa"& or &"esmtpsa"& instead of &"esmtp"&
or &"esmtps"&, and &$sender_host_authenticated$& contains the name (not the
-.section "Testing server authentication"
+.section "Testing server authentication" "SECID169"
.cindex "authentication" "testing a server"
.cindex "AUTH" "testing a server"
.cindex "base64 encoding" "creating authentication test data"
-.section "Authentication by an Exim client"
+.section "Authentication by an Exim client" "SECID170"
.cindex "authentication" "on an Exim client"
The &(smtp)& transport has two options called &%hosts_require_auth%& and
&%hosts_try_auth%&. When the &(smtp)& transport connects to a server that
of these options, Exim (as a client) tries to authenticate as follows:
.ilist
-For each authenticator that is configured as a client, it searches the
-authentication mechanisms announced by the server for one whose name
-matches the public name of the authenticator.
-.next
-.cindex "&$host$&"
-.cindex "&$host_address$&"
-When it finds one that matches, it runs the authenticator's client code.
-The variables &$host$& and &$host_address$& are available for any string
-expansions that the client might do. They are set to the server's name and
-IP address. If any expansion is forced to fail, the authentication attempt
-is abandoned,
-and Exim moves on to the next authenticator.
-Otherwise an expansion failure causes delivery to be
-deferred.
+.new
+For each authenticator that is configured as a client, in the order in which
+they are defined in the configuration, it searches the authentication
+mechanisms announced by the server for one whose name matches the public name
+of the authenticator.
+.wen
+.next
+.vindex "&$host$&"
+.vindex "&$host_address$&"
+When it finds one that matches, it runs the authenticator's client code. The
+variables &$host$& and &$host_address$& are available for any string expansions
+that the client might do. They are set to the server's name and IP address. If
+any expansion is forced to fail, the authentication attempt is abandoned, and
+Exim moves on to the next authenticator. Otherwise an expansion failure causes
+delivery to be deferred.
.next
If the result of the authentication attempt is a temporary error or a timeout,
Exim abandons trying to send the message to the host for the moment. It will
use unencrypted plain text, you should not use the same passwords for SMTP
connections as you do for login accounts.
-.new
-.section "Plaintext options"
+.section "Plaintext options" "SECID171"
.cindex "options" "&(plaintext)& authenticator (server)"
When configured as a server, &(plaintext)& uses the following options:
.option server_condition authenticators string&!! unset
This is actually a global authentication option, but it must be set in order to
configure the &(plaintext)& driver as a server. Its use is described below.
-.wen
.option server_prompts plaintext string&!! unset
The contents of this option, after expansion, must be a colon-separated list of
.cindex "binary zero" "in &(plaintext)& authenticator"
.cindex "numerical variables (&$1$& &$2$& etc)" &&&
"in &(plaintext)& authenticator"
-.cindex "&$auth1$&, &$auth2$&, etc"
+.vindex "&$auth1$&, &$auth2$&, etc"
.cindex "base64 encoding" "in &(plaintext)& authenticator"
When running as a server, &(plaintext)& performs the authentication test by
supplied with the AUTH command, the remaining prompts are used to obtain more
data. Each response from the client may be a list of NUL-separated strings.
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
Once a sufficient number of data strings have been received,
&%server_condition%& is expanded. If the expansion is forced to fail,
authentication fails. Any other expansion failure causes a temporary error code
-.section "The PLAIN authentication mechanism"
+.section "The PLAIN authentication mechanism" "SECID172"
.cindex "PLAIN authentication mechanism"
.cindex "authentication" "PLAIN mechanism"
.cindex "binary zero" "in &(plaintext)& authenticator"
writing the test makes the logic clearer.
-.section "The LOGIN authentication mechanism"
+.section "The LOGIN authentication mechanism" "SECID173"
.cindex "LOGIN authentication mechanism"
.cindex "authentication" "LOGIN mechanism"
The LOGIN authentication mechanism is not documented in any RFC, but is in use
-.section "Support for different kinds of authentication"
+.section "Support for different kinds of authentication" "SECID174"
A number of string expansion features are provided for the purpose of
interfacing to different ways of user authentication. These include checking
traditionally encrypted passwords from &_/etc/passwd_& (or equivalent), PAM,
-.section "Using plaintext in a client"
+.section "Using plaintext in a client" "SECID175"
.cindex "options" "&(plaintext)& authenticator (client)"
The &(plaintext)& authenticator has two client options:
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The cram_md5 authenticator"
+.chapter "The cram_md5 authenticator" "CHID9"
.scindex IIDcramauth1 "&(cram_md5)& authenticator"
.scindex IIDcramauth2 "authenticators" "&(cram_md5)&"
.cindex "CRAM-MD5 authentication mechanism"
available in plain text at either end.
-.section "Using cram_md5 as a server"
+.section "Using cram_md5 as a server" "SECID176"
.cindex "options" "&(cram_md5)& authenticator (server)"
This authenticator has one server option, which must be set to configure the
authenticator as a server:
server_secret = ${if eq{$auth1}{ph10}{secret}fail}
server_set_id = $auth1
.endd
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
If authentication succeeds, the setting of &%server_set_id%& preserves the user
-name in &$authenticated_id$&. A more tyical configuration might look up the
+name in &$authenticated_id$&. A more typical configuration might look up the
secret string in a file, using the user name as the key. For example:
.code
lookup_cram:
driver = cram_md5
public_name = CRAM-MD5
- server_secret = ${lookup{$auth1}lsearch{/etc/authpwd}{$value}fail}
+ server_secret = ${lookup{$auth1}lsearch{/etc/authpwd}\
+ {$value}fail}
server_set_id = $auth1
.endd
Note that this expansion explicitly forces failure if the lookup fails
-because &$1$& contains an unknown user name.
+because &$auth1$& contains an unknown user name.
-.section "Using cram_md5 as a client"
+.section "Using cram_md5 as a client" "SECID177"
.cindex "options" "&(cram_md5)& authenticator (client)"
When used as a client, the &(cram_md5)& authenticator has two options:
expanded and the result used as the secret string when computing the response.
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
Different user names and secrets can be used for different servers by referring
to &$host$& or &$host_address$& in the options. Forced failure of either
expansion string is treated as an indication that this authenticator is not
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "The cyrus_sasl authenticator"
+.chapter "The cyrus_sasl authenticator" "CHID10"
.scindex IIDcyrauth1 "&(cyrus_sasl)& authenticator"
.scindex IIDcyrauth2 "authenticators" "&(cyrus_sasl)&"
.cindex "Cyrus" "SASL library"
by default. You may also find you need to set environment variables,
depending on the driver you are using.
-.new
The application name provided by Exim is &"exim"&, so various SASL options may
be set in &_exim.conf_& in your SASL directory. If you are using GSSAPI for
Kerberos, note that because of limitations in the GSSAPI interface,
may be set to point to an alternative keytab file. Exim will pass this
variable through from its own inherited environment when started as root or the
Exim user. The keytab file needs to be readable by the Exim user.
-.wen
-.section "Using cyrus_sasl as a server"
+.section "Using cyrus_sasl as a server" "SECID178"
The &(cyrus_sasl)& authenticator has four private options. It puts the username
(on a successful authentication) into &$auth1$&. For compatibility with
previous releases of Exim, the username is also placed in &$1$&. However, the
things.
-.option server_hostname cyrus_sasl string&!! &`$primary_hostname`&
-This option selects the hostname that is used when communicating with
-the library. It is up to the underlying SASL plug-in what it does with
-this data.
+.option server_hostname cyrus_sasl string&!! "see below"
+This option selects the hostname that is used when communicating with the
+library. The default value is &`$primary_hostname`&. It is up to the underlying
+SASL plug-in what it does with this data.
-.option server_mech cyrus_sasl string &`public_name`&
-This option selects the authentication mechanism this driver should
-use. It allows you to use a different underlying mechanism from the
-advertised name. For example:
+.option server_mech cyrus_sasl string "see below"
+This option selects the authentication mechanism this driver should use. The
+default is the value of the generic &%public_name%& option. This option allows
+you to use a different underlying mechanism from the advertised name. For
+example:
.code
sasl:
driver = cyrus_sasl
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.new
.chapter "The dovecot authenticator" "CHAPdovecot"
.scindex IIDdcotauth1 "&(dovecot)& authenticator"
.scindex IIDdcotauth2 "authenticators" "&(dovecot)&"
&$received_ip_address$& (that is, the connection is local), the &"secured"&
option is passed in the Dovecot authentication command. If, for a TLS
connection, a client certificate has been verified, the &"valid-client-cert"&
-option is passed.
+option is passed. &new("When authentication succeeds, the identity of the user
+who authenticated is placed in &$auth1$&.")
.ecindex IIDdcotauth1
.ecindex IIDdcotauth2
-.wen
. ////////////////////////////////////////////////////////////////////////////
-.section "Using spa as a server"
+.section "Using spa as a server" "SECID179"
.cindex "options" "&(spa)& authenticator (server)"
The &(spa)& authenticator has just one server option:
-.section "Using spa as a client"
+.section "Using spa as a client" "SECID180"
.cindex "options" "&(spa)& authenticator (client)"
The &(spa)& authenticator has the following client options:
-.section "Support for the legacy &""ssmtp""& (aka &""smtps""&) protocol"
+.section "Support for the legacy &""ssmtp""& (aka &""smtps""&) protocol" &&&
+ "SECID284"
.cindex "ssmtp protocol"
.cindex "smtps protocol"
.cindex "SMTP" "ssmtp protocol"
port. The protocol was called &"ssmtp"& or &"smtps"&, and port 465 was
allocated for this purpose.
-This approach was abandoned when encrypted SMTP was standardised, but there are
+This approach was abandoned when encrypted SMTP was standardized, but there are
still some legacy clients that use it. Exim supports these clients by means of
the &%tls_on_connect_ports%& global option. Its value must be a list of port
numbers; the most common use is expected to be:
facility for varying its Diffie-Hellman parameters. I understand that this has
changed, but Exim has not been updated to provide this facility.
.next
-.cindex "&$tls_peerdn$&"
+.vindex "&$tls_peerdn$&"
Distinguished Name (DN) strings reported by the OpenSSL library use a slash for
separating fields; GnuTLS uses commas, in accordance with RFC 2253. This
affects the value of the &$tls_peerdn$& variable.
OpenSSL identifies cipher suites using hyphens as separators, for example:
DES-CBC3-SHA. GnuTLS uses underscores, for example: RSA_ARCFOUR_SHA. What is
more, OpenSSL complains if underscores are present in a cipher list. To make
-life simpler, Exim changes underscores to hyhens for OpenSSL and hyphens to
+life simpler, Exim changes underscores to hyphens for OpenSSL and hyphens to
underscores for GnuTLS when processing lists of cipher suites in the
&%tls_require_ciphers%& options (the global option and the &(smtp)& transport
option).
.endlist
-.section "GnuTLS parameter computation"
+.section "GnuTLS parameter computation" "SECID181"
GnuTLS uses RSA and D-H parameters that may take a substantial amount of time
to compute. It is unreasonable to re-compute them for every TLS session.
Therefore, Exim keeps this data in a file in its spool directory, called
-
-.section "Requiring specific ciphers in GnuTLS" "SECTreqciphgnu"
-.cindex "TLS" "requiring specific ciphers (GnuTLS)"
+.new
+.section "Requiring specific ciphers or other parameters in GnuTLS" &&&
+ "SECTreqciphgnu"
+.cindex "GnuTLS" "specifying parameters for"
+.cindex "TLS" "specifying ciphers (GnuTLS)"
+.cindex "TLS" "specifying key exchange methods (GnuTLS)"
+.cindex "TLS" "specifying MAC algorithms (GnuTLS)"
+.cindex "TLS" "specifying protocols (GnuTLS)"
.cindex "&%tls_require_ciphers%&" "GnuTLS"
-The GnuTLS library does not have a combined function like OpenSSL. Instead,
-it allows the caller to specify separate lists of key-exchange methods,
-main cipher algorithms, and MAC algorithms. Unfortunately, these lists are
-numerical, and the library does not have a function for turning names into
-numbers. Consequently, the list of recognized names has to be built into
-the application.
-
-At present, Exim permits only the list of main cipher algorithms to be
-changed. The &%tls_require_ciphers%& option is in the same format as for
-OpenSSL. Exim searches each item for the name of available algorithm. For
-example, if the list contains RSA_AES_SHA then AES is recognized.
-
-The cipher algorithms list starts out with a default set of algorithms. If
-the first item in &%tls_require_ciphers%& does &'not'& start with an
-exclamation mark, all the default items are deleted. Thus, only those specified
-can be used. If the first item in &%tls_require_ciphers%& &'does'& start with
-an exclamation mark, the defaults are left on the list.
+The GnuTLS library allows the caller to specify separate lists of permitted key
+exchange methods, main cipher algorithms, MAC algorithms, and protocols.
+Unfortunately, these lists are numerical, and the library does not have a
+function for turning names into numbers. Consequently, lists of recognized
+names have to be built into the application. The permitted key exchange
+methods, ciphers, and MAC algorithms may be used in any combination to form a
+cipher suite. This is unlike OpenSSL, where complete cipher suite names are
+passed to its control function.
+
+For compatibility with OpenSSL, the &%tls_require_ciphers%& option can be set
+to complete cipher suite names such as RSA_ARCFOUR_SHA, but for GnuTLS this
+option controls only the cipher algorithms. Exim searches each item in the
+list for the name of an available algorithm. For example, if the list
+contains RSA_AES_SHA, then AES is recognized, and the behaviour is exactly
+the same as if just AES were given.
+
+.cindex "&%gnutls_require_kx%&"
+.cindex "&%gnutls_require_mac%&"
+.cindex "&%gnutls_require_protocols%&"
+There are additional options called &%gnutls_require_kx%&,
+&%gnutls_require_mac%&, and &%gnutls_require_protocols%& that can be used to
+restrict the key exchange methods, MAC algorithms, and protocols, respectively.
+These options are ignored if OpenSSL is in use.
+
+All four options are available as global options, controlling how Exim
+behaves as a server, and also as options of the &(smtp)& transport, controlling
+how Exim behaves as a client. All the values are string expanded. After
+expansion, the values must be colon-separated lists, though the separator
+can be changed in the usual way.
+
+Each of the four lists starts out with a default set of algorithms. If the
+first item in a list does &'not'& start with an exclamation mark, all the
+default items are deleted. In this case, only those that are explicitly
+specified can be used. If the first item in a list &'does'& start with an
+exclamation mark, the defaults are left on the list.
Then, any item that starts with an exclamation mark causes the relevant
-algorithms to be removed from the list, and any item that does not start
-with an exclamation mark causes the relevant algorithms to be added to the
-list. Thus,
+entry to be removed from the list, and any item that does not start with an
+exclamation mark causes a new entry to be added to the list. Unrecognized
+items in the list are ignored. Thus:
.code
-tls_require_ciphers = !RSA_ARCFOUR_SHA
+tls_require_ciphers = !ARCFOUR
.endd
-allows all the defaults except those that use ARCFOUR, whereas
+allows all the defaults except ARCFOUR, whereas
.code
tls_require_ciphers = AES : 3DES
.endd
-allows only cipher suites that use AES and 3DES. The currently recognized
-algorithms are: AES_256, AES_128, AES (both of the preceding), 3DES, and
-ARCFOUR_128. Unrecognized algorithms are ignored. In a server, the order of the
-list is unimportant; the server will advertise the availability of all the
-relevant cipher suites. However, in a client, the order of the list specifies a
-preference order for the algorithms. The first one in the client's list that is
+allows only cipher suites that use AES or 3DES.
+
+For &%tls_require_ciphers%& the recognized names are AES_256, AES_128, AES
+(both of the preceding), 3DES, ARCFOUR_128, ARCFOUR_40, and ARCFOUR (both of
+the preceding). The default list does not contain all of these; it just has
+AES_256, AES_128, 3DES, and ARCFOUR_128.
+
+For &%gnutls_require_kx%&, the recognized names are DHE_RSA, RSA (which
+includes DHE_RSA), DHE_DSS, and DHE (which includes both DHE_RSA and
+DHE_DSS). The default list contains RSA, DHE_DSS, DHE_RSA.
+
+For &%gnutls_require_mac%&, the recognized names are SHA (synonym SHA1), and
+MD5. The default list contains SHA, MD5.
+
+For &%gnutls_require_protocols%&, the recognized names are TLS1 and SSL3.
+The default list contains TLS1, SSL3.
+
+In a server, the order of items in these lists is unimportant. The server
+advertises the availability of all the relevant cipher suites. However, in a
+client, the order in the &%tls_require_ciphers%& list specifies a preference
+order for the cipher algorithms. The first one in the client's list that is
also advertised by the server is tried first. The default order is as listed
above.
+.wen
-
-.section "Configuring an Exim server to use TLS"
+.section "Configuring an Exim server to use TLS" "SECID182"
.cindex "TLS" "configuring an Exim server"
When Exim has been built with TLS support, it advertises the availability of
the STARTTLS command to client hosts that match &%tls_advertise_hosts%&,
but not to any others. The default value of this option is unset, which means
that STARTTLS is not advertised at all. This default is chosen because you
-need to set some other options in order to make TLS avaliable, and also it is
+need to set some other options in order to make TLS available, and also it is
sensible for systems that want to use TLS only as a client.
If a client issues a STARTTLS command and there is some configuration
.cindex "cipher" "logging"
.cindex "log" "TLS cipher"
-.cindex "&$tls_cipher$&"
+.vindex "&$tls_cipher$&"
The variable &$tls_cipher$& is set to the cipher suite that was negotiated for
an incoming TLS connection. It is included in the &'Received:'& header of an
incoming message (by default &-- you can, of course, change this), and it is
-.section "Requesting and verifying client certificates"
+.section "Requesting and verifying client certificates" "SECID183"
.cindex "certificate" "verification of client"
.cindex "TLS" "client certificate verification"
If you want an Exim server to request a certificate when negotiating a TLS
example, you can insist on a certificate before accepting a message for
relaying, but not when the message is destined for local delivery.
-.cindex "&$tls_peerdn$&"
+.vindex "&$tls_peerdn$&"
When a client supplies a certificate (whether it verifies or not), the value of
the Distinguished Name of the certificate is made available in the variable
&$tls_peerdn$& during subsequent processing of the message.
certificate is supplied, &$tls_peerdn$& is empty.
-.section "Revoked certificates"
+.section "Revoked certificates" "SECID184"
.cindex "TLS" "revoked certificates"
.cindex "revocation list"
.cindex "certificate" "revocation list"
CRL in PEM format.
-.section "Configuring an Exim client to use TLS"
+.section "Configuring an Exim client to use TLS" "SECID185"
.cindex "cipher" "logging"
.cindex "log" "TLS cipher"
.cindex "log" "distinguished name"
the current host is abandoned, and the &(smtp)& transport tries to deliver to
alternative hosts, if any.
-.cindex "&$host$&"
-.cindex "&$host_address$&"
+.vindex "&$host$&"
+.vindex "&$host_address$&"
All the TLS options in the &(smtp)& transport are expanded before use, with
&$host$& and &$host_address$& containing the name and address of the server to
which the client is connected. Forced failure of an expansion causes Exim to
.endd
-.section "Certificate chains"
+.section "Certificate chains" "SECID186"
The file named by &%tls_certificate%& may contain more than one
certificate. This is useful in the case where the certificate that is being
sent is validated by an intermediate certificate which the other end does
install if the receiving end is a client MUA that can interact with a user.
-.section "Self-signed certificates"
+.section "Self-signed certificates" "SECID187"
.cindex "certificate" "self-signed"
You can create a self-signed certificate using the &'req'& command provided
with OpenSSL, like this:
one very small ACL:
.code
begin acl
-
small_acl:
accept hosts = one.host.only
.endd
&<<CHAPdefconfil>>&.
-.section "Testing ACLs"
+.section "Testing ACLs" "SECID188"
The &%-bh%& command line option provides a way of testing your ACL
configuration locally by running a fake SMTP session with which you interact.
The host &'relay-test.mail-abuse.org'& provides a service for checking your
-.section "Specifying when ACLs are used"
+.section "Specifying when ACLs are used" "SECID189"
.cindex "&ACL;" "options for specifying"
In order to cause an ACL to be used, you have to name it in one of the relevant
options in the main part of the configuration. These options are:
.cindex "HELO" "ACL for"
.cindex "EHLO" "ACL for"
.cindex "MAIL" "ACL for"
-.cindex "QUIT" "ACL for"
+.cindex "QUIT, ACL for"
.cindex "RCPT" "ACL for"
-.cindex "STARTTLS" "ACL for"
+.cindex "STARTTLS, ACL for"
.cindex "VRFY" "ACL for"
-.cindex "SMTP connection" "ACL for"
-.cindex "non-smtp message" "ACLs for"
-.cindex "MIME parts" "ACL for"
+.cindex "SMTP" "connection, ACL for"
+.cindex "non-SMTP messages" "ACLs for"
+.cindex "MIME content scanning" "ACL for"
.table2 140pt
-.row &~&%acl_not_smtp%& "ACL for non-SMTP messages"
-.row &~&%acl_not_smtp_mime%& "ACL for non-SMTP MIME parts"
-.row &~&%acl_not_smtp_start%& "ACL at start of non-SMTP message"
-.row &~&%acl_smtp_auth%& "ACL for AUTH"
-.row &~&%acl_smtp_connect%& "ACL for start of SMTP connection"
-.row &~&%acl_smtp_data%& "ACL after DATA is complete"
-.row &~&%acl_smtp_etrn%& "ACL for ETRN"
-.row &~&%acl_smtp_expn%& "ACL for EXPN"
-.row &~&%acl_smtp_helo%& "ACL for HELO or EHLO"
-.row &~&%acl_smtp_mail%& "ACL for MAIL"
-.row &~&%acl_smtp_mailauth%& "ACL for the AUTH parameter of MAIL"
-.row &~&%acl_smtp_mime%& "ACL for content-scanning MIME parts"
-.row &~&%acl_smtp_predata%& "ACL at start of DATA command"
-.row &~&%acl_smtp_quit%& "ACL for QUIT"
-.row &~&%acl_smtp_rcpt%& "ACL for RCPT"
-.row &~&%acl_smtp_starttls%& "ACL for STARTTLS"
-.row &~&%acl_smtp_vrfy%& "ACL for VRFY"
+.irow &%acl_not_smtp%& "ACL for non-SMTP messages"
+.irow &%acl_not_smtp_mime%& "ACL for non-SMTP MIME parts"
+.irow &%acl_not_smtp_start%& "ACL at start of non-SMTP message"
+.irow &%acl_smtp_auth%& "ACL for AUTH"
+.irow &%acl_smtp_connect%& "ACL for start of SMTP connection"
+.irow &%acl_smtp_data%& "ACL after DATA is complete"
+.irow &%acl_smtp_etrn%& "ACL for ETRN"
+.irow &%acl_smtp_expn%& "ACL for EXPN"
+.irow &%acl_smtp_helo%& "ACL for HELO or EHLO"
+.irow &%acl_smtp_mail%& "ACL for MAIL"
+.irow &%acl_smtp_mailauth%& "ACL for the AUTH parameter of MAIL"
+.irow &%acl_smtp_mime%& "ACL for content-scanning MIME parts"
+.irow &%acl_smtp_predata%& "ACL at start of DATA command"
+.irow &%acl_smtp_quit%& "ACL for QUIT"
+.irow &%acl_smtp_rcpt%& "ACL for RCPT"
+.irow &%acl_smtp_starttls%& "ACL for STARTTLS"
+.irow &%acl_smtp_vrfy%& "ACL for VRFY"
.endtable
For example, if you set
testing as possible at RCPT time.
-.section "The non-SMTP ACLs"
-.cindex "non-smtp message" "ACLs for"
+.section "The non-SMTP ACLs" "SECID190"
+.cindex "non-SMTP messages" "ACLs for"
The non-SMTP ACLs apply to all non-interactive incoming messages, that is, they
apply to batched SMTP as well as to non-SMTP messages. (Batched SMTP is not
really SMTP.) Many of the ACL conditions (for example, host tests, and tests on
The &%acl_not_smtp_start%& ACL is run right at the start of receiving a
non-SMTP message, before any of the message has been read. (This is the
-analogue of the &%acl_smtp_predata%& ACL for SMTP input.) The result of this
-ACL is ignored; it cannot be used to reject a message. If you really need to,
-you could set a value in an ACL variable here and reject based on that in the
-&%acl_not_smtp%& ACL. However, this ACL can be used to set controls, and in
-particular, it can be used to set
+analogue of the &%acl_smtp_predata%& ACL for SMTP input.) &new("In the case of
+batched SMTP input, it runs after the DATA command has been reached.") The
+result of this ACL is ignored; it cannot be used to reject a message. If you
+really need to, you could set a value in an ACL variable here and reject based
+on that in the &%acl_not_smtp%& ACL. However, this ACL can be used to set
+controls, and in particular, it can be used to set
.code
control = suppress_local_fixups
.endd
temporary error for these kinds of message.
-.section "The SMTP connect ACL"
-.new
-.cindex "SMTP connection" "ACL for"
+.section "The SMTP connect ACL" "SECID191"
+.cindex "SMTP" "connection, ACL for"
.cindex &%smtp_banner%&
The ACL test specified by &%acl_smtp_connect%& happens at the start of an SMTP
session, after the test specified by &%host_reject_connection%& (which is now
&%smtp_banner%& option.
-.section "The EHLO/HELO ACL"
+.section "The EHLO/HELO ACL" "SECID192"
.cindex "EHLO" "ACL for"
.cindex "HELO" "ACL for"
The ACL test specified by &%acl_smtp_helo%& happens when the client issues an
at the first newline and a panic logged if it does). Such a message cannot
affect the EHLO options that are listed on the second and subsequent lines of
an EHLO response.
-.wen
-.section "The DATA ACLs"
+.section "The DATA ACLs" "SECID193"
.cindex "DATA" "ACLs for"
Two ACLs are associated with the DATA command, because it is two-stage
command, with two responses being sent to the client.
your resources.
-.section "The SMTP MIME ACL"
+.section "The SMTP MIME ACL" "SECID194"
The &%acl_smtp_mime%& option is available only when Exim is compiled with the
content-scanning extension. For details, see chapter &<<CHAPexiscan>>&.
.section "The QUIT ACL" "SECTQUITACL"
-.cindex "QUIT" "ACL for"
+.cindex "QUIT, ACL for"
The ACL for the SMTP QUIT command is anomalous, in that the outcome of the ACL
does not affect the response code to QUIT, which is always 221. Thus, the ACL
does not in fact control any access. For this reason, the only verbs that are
-.section "Finding an ACL to use"
+.section "Finding an ACL to use" "SECID195"
.cindex "&ACL;" "finding which to use"
The value of an &%acl_smtp_%&&'xxx'& option is expanded before use, so
you can use different ACLs in different circumstances. For example,
-.section "ACL return codes"
+.section "ACL return codes" "SECID196"
.cindex "&ACL;" "return codes"
Except for the QUIT ACL, which does not affect the SMTP return code (see
section &<<SECTQUITACL>>& above), the result of running an ACL is either
-.section "Unset ACL options"
+.section "Unset ACL options" "SECID197"
.cindex "&ACL;" "unset options"
The default actions when any of the &%acl_%&&'xxx'& options are unset are not
all the same. &*Note*&: These defaults apply only when the relevant ACL is
-.section "Data for message ACLs"
+.section "Data for message ACLs" "SECID198"
.cindex "&ACL;" "data for message ACL"
-.cindex &$domain$&
-.cindex &$local_part$&
-.cindex &$sender_address$&
-.cindex &$sender_host_address$&
-.cindex &$smtp_command$&
+.vindex &$domain$&
+.vindex &$local_part$&
+.vindex &$sender_address$&
+.vindex &$sender_host_address$&
+.vindex &$smtp_command$&
When a MAIL or RCPT ACL, or either of the DATA ACLs, is running, the variables
that contain information about the host and the message's sender (for example,
&$sender_host_address$& and &$sender_address$&) are set, and can be used in ACL
set. Section &<<SECTauthparamail>>& contains a discussion of this parameter and
how it is used.
-.cindex "&$message_size$&"
+.vindex "&$message_size$&"
The &$message_size$& variable is set to the value of the SIZE parameter on
the MAIL command at MAIL, RCPT and pre-data time, or to -1 if
that parameter is not given. The value is updated to the true message size by
the time the final DATA ACL is run (after the message data has been
received).
-.cindex "&$rcpt_count$&"
-.cindex "&$recipients_count$&"
+.vindex "&$rcpt_count$&"
+.vindex "&$recipients_count$&"
The &$rcpt_count$& variable increases by one for each RCPT command received.
The &$recipients_count$& variable increases by one each time a RCPT command is
accepted, so while an ACL for RCPT is being processed, it contains the number
.section "Data for non-message ACLs" "SECTdatfornon"
.cindex "&ACL;" "data for non-message ACL"
-.cindex &$smtp_command_argument$&
-.cindex &$smtp_command$&
+.vindex &$smtp_command_argument$&
+.vindex &$smtp_command$&
When an ACL is being run for AUTH, EHLO, ETRN, EXPN, HELO, STARTTLS, or VRFY,
the remainder of the SMTP command line is placed in &$smtp_command_argument$&,
and the entire SMTP command is available in &$smtp_command$&.
-.section "Format of an ACL"
+.section "Format of an ACL" "SECID199"
.cindex "&ACL;" "format of"
-.cindex "&ACL;" "verbs; definition of"
+.cindex "&ACL;" "verbs, definition of"
An individual ACL consists of a number of statements. Each statement starts
with a verb, optionally followed by a number of conditions and &"modifiers"&.
Modifiers can change the way the verb operates, define error and log messages,
test a sender address in the ACL that is run for a VRFY command.
-.section "ACL verbs"
+.section "ACL verbs" "SECID200"
The ACL verbs are as follows:
.ilist
-.cindex "&%accept%&" "ACL verb"
+.cindex "&%accept%& ACL verb"
&%accept%&: If all the conditions are met, the ACL returns &"accept"&. If any
of the conditions are not met, what happens depends on whether &%endpass%&
appears among the conditions (for syntax see below). If the failing condition
fails, the ACL yields &"deny"&, because the failing condition is after
&%endpass%&.
-.new
The &%endpass%& feature has turned out to be confusing to many people, so its
use is not recommended nowadays. It is always possible to rewrite an ACL so
that &%endpass%& is not needed, and it is no longer used in the default
configuration.
-.cindex "&%message%&" "ACL modifier, with &%accept%&"
+.cindex "&%message%& ACL modifier" "with &%accept%&"
If a &%message%& modifier appears on an &%accept%& statement, its action
depends on whether or not &%endpass%& is present. In the absence of &%endpass%&
(when an &%accept%& verb either accepts or passes control to the next
an error message that is used when access is denied. This behaviour is retained
for backward compatibility, but current &"best practice"& is to avoid the use
of &%endpass%&.
-.wen
.next
-.cindex "&%defer%&" "ACL verb"
+.cindex "&%defer%& ACL verb"
&%defer%&: If all the conditions are true, the ACL returns &"defer"& which, in
an SMTP session, causes a 4&'xx'& response to be given. For a non-SMTP ACL,
&%defer%& is the same as &%deny%&, because there is no way of sending a
.next
-.cindex "&%deny%&" "ACL verb"
+.cindex "&%deny%& ACL verb"
&%deny%&: If all the conditions are met, the ACL returns &"deny"&. If any of
the conditions are not met, control is passed to the next ACL statement. For
example,
.next
-.new
-.cindex "&%discard%&" "ACL verb"
+.cindex "&%discard%& ACL verb"
&%discard%&: This verb behaves like &%accept%&, except that it returns
&"discard"& from the ACL instead of &"accept"&. It is permitted only on ACLs
that are concerned with receiving messages. When all the conditions are true,
If the &%log_message%& modifier is set when &%discard%& operates,
its contents are added to the line that is automatically written to the log.
The &%message%& modifier operates exactly as it does for &%accept%&.
-.wen
.next
-.cindex "&%drop%&" "ACL verb"
+.cindex "&%drop%& ACL verb"
&%drop%&: This verb behaves like &%deny%&, except that an SMTP connection is
forcibly closed after the 5&'xx'& error message has been sent. For example:
.code
The connection is always dropped after sending a 550 response.
.next
-.cindex "&%require%&" "ACL verb"
+.cindex "&%require%& ACL verb"
&%require%&: If all the conditions are met, control is passed to the next ACL
statement. If any of the conditions are not met, the ACL returns &"deny"&. For
example, when checking a RCPT command,
.code
-require verify = sender
+.new
+require message = Sender did not verify
+ verify = sender
+.wen
.endd
passes control to subsequent statements only if the message's sender can be
-verified. Otherwise, it rejects the command.
+verified. Otherwise, it rejects the command. &new("Note the positioning of the
+&%message%& modifier, before the &%verify%& condition. The reason for this is
+discussed in section &<<SECTcondmodproc>>&.")
.next
-.cindex "&%warn%&" "ACL verb"
+.cindex "&%warn%& ACL verb"
&%warn%&: If all the conditions are true, a line specified by the
&%log_message%& modifier is written to Exim's main log. Control always passes
to the next ACL statement. If any condition is false, the log line is not
If any condition on a &%warn%& statement cannot be completed (that is, there is
some sort of defer), the log line specified by &%log_message%& is not written.
-&new("This does not include the case of a forced failure from a lookup, which
-is considered to be a successful completion. After a defer,") no further
+This does not include the case of a forced failure from a lookup, which
+is considered to be a successful completion. After a defer, no further
conditions or modifiers in the &%warn%& statement are processed. The incident
is logged, and the ACL continues to be processed, from the next statement
onwards.
-.cindex "&$acl_verify_message$&"
+.vindex "&$acl_verify_message$&"
When one of the &%warn%& conditions is an address verification that fails, the
text of the verification failure message is in &$acl_verify_message$&. If you
want this logged, you must set it up explicitly. For example:
.section "ACL variables" "SECTaclvariables"
-.new
.cindex "&ACL;" "variables"
There are some special variables that can be set during ACL processing. They
can be used to pass information between different ACLs, different invocations
while receiving one message is still available when receiving the next message
on the same SMTP connection.
.next
-The values of those variables whose names beging with &$acl_m$& persist only
+The values of those variables whose names begin with &$acl_m$& persist only
while a message is being received. They are reset afterwards. They are also
reset by MAIL, RSET, EHLO, HELO, and after starting up a TLS session.
.endlist
Versions of Exim before 4.64 have a limited set of numbered variables, but
their names are compatible, so there is no problem with upgrading.
-.wen
-.section "Condition and modifier processing"
+.section "Condition and modifier processing" "SECTcondmodproc"
.cindex "&ACL;" "conditions; processing"
.cindex "&ACL;" "modifiers; processing"
An exclamation mark preceding a condition negates its result. For example:
incoming message, assuming, of course, that the message is ultimately
accepted. For details, see section &<<SECTaddheadacl>>&.
+.new
+.vitem &*continue*&&~=&~<&'text'&>
+.cindex "&%continue%& ACL modifier"
+.cindex "database" "updating in ACL"
+This modifier does nothing of itself, and processing of the ACL always
+continues with the next condition or modifier. The value of &%continue%& is in
+the side effects of expanding its argument. Typically this could be used to
+update a database. It is really just a syntactic tidiness, to avoid having to
+write rather ugly lines like this:
+.display
+&`condition = ${if eq{0}{`&<&'some expansion'&>&`}{true}{true}}`&
+.endd
+Instead, all you need is
+.display
+&`continue = `&<&'some expansion'&>
+.endd
+.wen
+
.vitem &*control*&&~=&~<&'text'&>
-.cindex "&%control%&" "ACL modifier"
+.cindex "&%control%& ACL modifier"
This modifier affects the subsequent processing of the SMTP connection or of an
incoming message that is accepted. The effect of the first type of control
lasts for the duration of the connection, whereas the effect of the second type
in several different ways. For example:
. ==== As this is a nested list, any displays it contains must be indented
-. ==== as otherwise they are too far to the left.
+. ==== as otherwise they are too far to the left. That comment applies only
+. ==== when xmlto and fop are used; formatting with sdop gets it right either
+. ==== way.
.ilist
It can be at the end of an &%accept%& statement:
.endlist
.vitem &*delay*&&~=&~<&'time'&>
-.cindex "&%delay%&" "ACL modifier"
-.cindex "&%-bh%& option"
-This modifier causes Exim to wait for the time interval before proceeding. The
-time is given in the usual Exim notation. This modifier may appear in any ACL.
-The delay happens as soon as the modifier is processed. However, when testing
-Exim using the &%-bh%& option, the delay is not actually imposed (an
-appropriate message is output instead).
+.cindex "&%delay%& ACL modifier"
+.oindex "&%-bh%&"
+.new
+This modifier may appear in any ACL. It causes Exim to wait for the time
+interval before proceeding. However, when testing Exim using the &%-bh%&
+option, the delay is not actually imposed (an appropriate message is output
+instead). The time is given in the usual Exim notation, and the delay happens
+as soon as the modifier is processed. In an SMTP session, pending output is
+flushed before the delay is imposed.
+.wen
Like &%control%&, &%delay%& can be used with &%accept%& or &%deny%&, for
example:
.endd
.new
+If &%delay%& is encountered when the SMTP PIPELINING extension is in use,
+responses to several commands are no longer buffered and sent in one packet (as
+they would normally be) because all output is flushed before imposing the
+delay. This optimization is disabled so that a number of small delays do not
+appear to the client as one large aggregated delay that might provoke an
+unwanted timeout. You can, however, disable output flushing for &%delay%& by
+using a &%control%& modifier to set &%no_delay_flush%&.
+.wen
+
+
.vitem &*endpass*&
-.cindex "&%endpass%&" "ACL modifier"
+.cindex "&%endpass%& ACL modifier"
This modifier, which has no argument, is recognized only in &%accept%& and
&%discard%& statements. It marks the boundary between the conditions whose
failure causes control to pass to the next statement, and the conditions whose
failure causes the ACL to return &"deny"&. This concept has proved to be
confusing to some people, so the use of &%endpass%& is no longer recommended as
&"best practice"&. See the description of &%accept%& above for more details.
-.wen
.vitem &*log_message*&&~=&~<&'text'&>
-.cindex "&%log_message%&" "ACL modifier"
+.cindex "&%log_message%& ACL modifier"
This modifier sets up a message that is used as part of the log message if the
ACL denies access or a &%warn%& statement's conditions are true. For example:
.code
require log_message = wrong cipher suite $tls_cipher
encrypted = DES-CBC3-SHA
.endd
-.new
&%log_message%& is also used when recipients are discarded by &%discard%&. For
example:
.display
variables are set after a DNS black list lookup succeeds. If the expansion of
&%log_message%& fails, or if the result is an empty string, the modifier is
ignored.
-.wen
-.cindex "&$acl_verify_message$&"
+.vindex "&$acl_verify_message$&"
If you want to use a &%warn%& statement to log the result of an address
verification, you can use &$acl_verify_message$& to include the verification
error message.
more than once while receiving a single email message, only one copy is
actually logged. If you want to log multiple copies, use &%logwrite%& instead
of &%log_message%&. In the absence of &%log_message%& and &%logwrite%&, nothing
-is logged for a succesful &%warn%& statement.
+is logged for a successful &%warn%& statement.
If &%log_message%& is not present and there is no underlying error message (for
example, from the failure of address verification), but &%message%& is present,
logging rejections.
-.new
.vitem "&*log_reject_target*&&~=&~<&'log name list'&>"
-.cindex "&%log_reject_target%&" "ACL modifier"
+.cindex "&%log_reject_target%& ACL modifier"
.cindex "logging in ACL" "specifying which log"
This modifier makes it possible to specify which logs are used for messages
about ACL rejections. Its argument is a colon-separated list of words that can
.endd
This modifier can be used in SMTP and non-SMTP ACLs. It applies to both
permanent and temporary rejections.
-.wen
.vitem &*logwrite*&&~=&~<&'text'&>
-.cindex "&%logwrite%&" "ACL modifier"
+.cindex "&%logwrite%& ACL modifier"
.cindex "logging in ACL" "immediate"
This modifier writes a message to a log file as soon as it is encountered when
processing an ACL. (Compare &%log_message%&, which, except in the case of
-&%warn%& &new("and &%discard%&"), is used only if the ACL statement denies
+&%warn%& and &%discard%&, is used only if the ACL statement denies
access.) The &%logwrite%& modifier can be used to log special incidents in
ACLs. For example:
.display
.vitem &*message*&&~=&~<&'text'&>
-.new
-.cindex "&%message%&" "ACL modifier"
+.cindex "&%message%& ACL modifier"
This modifier sets up a text string that is expanded and used as a response
message when an ACL statement terminates the ACL with an &"accept"&, &"deny"&,
or &"defer"& response. (In the case of the &%accept%& and &%discard%& verbs,
literals, but because the string is expanded, backslash escapes are processed
anyway. If the message contains newlines, this gives rise to a multi-line SMTP
response.
-.wen
-.cindex "&$acl_verify_message$&"
+.vindex "&$acl_verify_message$&"
If &%message%& is used on a statement that verifies an address, the message
specified overrides any message that is generated by the verification process.
However, the original message is available in the variable
.vitem &*set*&&~<&'acl_name'&>&~=&~<&'value'&>
-.cindex "&%set%&" "ACL modifier"
+.cindex "&%set%& ACL modifier"
This modifier puts a value into one of the ACL variables (see section
&<<SECTaclvariables>>&).
.endlist
.section "Use of the control modifier" "SECTcontrols"
-.cindex "&%control%&" "ACL modifier"
+.cindex "&%control%& ACL modifier"
The &%control%& modifier supports the following settings:
.vlist
by the client. This control is permitted only in the connection and HELO ACLs.
-.vitem &*control&~=&~caseful_local_part*&
-See below.
-
-.vitem &*control&~=&~caselower_local_part*&
+.vitem &*control&~=&~caseful_local_part*& &&&
+ &*control&~=&~caselower_local_part*&
.cindex "&ACL;" "case of local part in"
.cindex "case of local parts"
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
These two controls are permitted only in the ACL specified by &%acl_smtp_rcpt%&
(that is, during RCPT processing). By default, the contents of &$local_part$&
are lower cased before ACL processing. If &"caseful_local_part"& is specified,
Notice that we put back the lower cased version afterwards, assuming that
is what is wanted for subsequent tests.
-.vitem &*control&~=&~enforce_sync*&
-See below.
-
-.vitem &*control&~=&~no_enforce_sync*&
+.vitem &*control&~=&~enforce_sync*& &&&
+ &*control&~=&~no_enforce_sync*&
.cindex "SMTP" "synchronization checking"
.cindex "synchronization checking in SMTP"
These controls make it possible to be selective about when SMTP synchronization
.vitem &*control&~=&~fakedefer/*&<&'message'&>
.cindex "fake defer"
-.cindex "defer" "fake"
+.cindex "defer, fake"
This control works in exactly the same way as &%fakereject%& (described below)
except that it causes an SMTP 450 response after the message data instead of a
550 response. You must take care when using &%fakedefer%& because it causes the
.vitem &*control&~=&~fakereject/*&<&'message'&>
.cindex "fake rejection"
-.cindex "rejection" "fake"
+.cindex "rejection, fake"
This control is permitted only for the MAIL, RCPT, and DATA ACLs, in other
words, only when an SMTP message is being received. If Exim accepts the
message, instead the final 250 response, a 550 rejection message is sent.
550-If it was a legitimate message, it may still be
550 delivered to the target recipient(s).
.endd
-This facilty should be used with extreme caution.
+This facility should be used with extreme caution.
.vitem &*control&~=&~freeze*&
.cindex "frozen messages" "forcing in ACL"
is told about the freezing), provided all the &*control=freeze*& modifiers that
are obeyed for the current message have the &`/no_tell`& option.
+.new
+.vitem &*control&~=&~no_delay_flush*&
+.cindex "SMTP" "output flushing, disabling for delay"
+Exim normally flushes SMTP output before implementing a delay in an ACL, to
+avoid unexpected timeouts in clients when the SMTP PIPELINING extension is in
+use. This control, as long as it is encountered before the &%delay%& modifier,
+disables such output flushing.
+
+.vitem &*control&~=&~no_callout_flush*&
+.cindex "SMTP" "output flushing, disabling for callout"
+Exim normally flushes SMTP output before performing a callout in an ACL, to
+avoid unexpected timeouts in clients when the SMTP PIPELINING extension is in
+use. This control, as long as it is encountered before the &%verify%& condition
+that causes the callout, disables such output flushing.
+.wen
.vitem &*control&~=&~no_mbox_unspool*&
This control is available when Exim is compiled with the content scanning
to be useful in production.
.vitem &*control&~=&~no_multiline_response*&
-.cindex "multiline responses" "suppressing"
+.cindex "multiline responses, suppressing"
This control is permitted for any ACL except the one for non-SMTP messages.
It seems that there are broken clients in use that cannot handle multiline
SMTP responses, despite the fact that RFC 821 defined them over 20 years ago.
The setting of the switch can, of course, be made conditional on the
calling host. Its effect lasts until the end of the SMTP connection.
+.new
+.vitem &*control&~=&~no_pipelining*&
+.cindex "PIPELINING" "suppressing advertising"
+This control turns off the advertising of the PIPELINING extension to SMTP in
+the current session. To be useful, it must be obeyed before Exim sends its
+response to an EHLO command. Therefore, it should normally appear in an ACL
+controlled by &%acl_smtp_connect%& or &%acl_smtp_helo%&. See also
+&%pipelining_advertise_hosts%&.
+.wen
+
.vitem &*control&~=&~queue_only*&
.cindex "&%queue_only%&"
.cindex "queueing incoming messages"
that may be received in the same SMTP connection.
.vitem &*control&~=&~suppress_local_fixups*&
-.cindex "submission fixups" "suppressing"
+.cindex "submission fixups, suppressing"
This control applies to locally submitted (non TCP/IP) messages, and is the
complement of &`control`& &`=`& &`submission`&. It disables the fixups that are
normally applied to locally-submitted messages. Specifically:
used only in the &%acl_smtp_mail%&, &%acl_smtp_rcpt%&, &%acl_smtp_predata%&,
and &%acl_not_smtp_start%& ACLs, because it has to be set before the message's
data is read.
+
+.new
+&*Note:*& This control applies only to the current message, not to any others
+that are being submitted at the same time using &%-bs%& or &%-bS%&.
+.wen
.endlist vlist
+
+.section "Summary of message fixup control" "SECTsummesfix"
All four possibilities for message fixups can be specified:
.ilist
.section "Adding header lines in ACLs" "SECTaddheadacl"
.cindex "header lines" "adding in an ACL"
.cindex "header lines" "position of added lines"
-.cindex "&%message%&" "ACL modifier"
+.cindex "&%message%& ACL modifier"
The &%add_header%& modifier can be used to add one or more extra header lines
to an incoming message, as in this example:
.code
ACL statement. All those that are encountered before a condition fails are
honoured.
-.cindex "&%warn%&" "ACL verb"
+.cindex "&%warn%& ACL verb"
For compatibility with previous versions of Exim, a &%message%& modifier for a
&%warn%& verb acts in the same way as &%add_header%&, except that it takes
effect only if all the conditions are true, even if it appears before some of
.vitem &*acl&~=&~*&<&'name&~of&~acl&~or&~ACL&~string&~or&~file&~name&~'&>
.cindex "&ACL;" "nested"
.cindex "&ACL;" "indirect"
-.cindex "&%acl%&" "ACL condition"
+.cindex "&%acl%& ACL condition"
The possible values of the argument are the same as for the
&%acl_smtp_%&&'xxx'& options. The named or inline ACL is run. If it returns
&"accept"& the condition is true; if it returns &"deny"& the condition is
for different local users or different local domains.
.vitem &*authenticated&~=&~*&<&'string&~list'&>
-.cindex "&%authenticated%&" "ACL condition"
+.cindex "&%authenticated%& ACL condition"
.cindex "authentication" "ACL checking"
.cindex "&ACL;" "testing for authentication"
If the SMTP connection is not authenticated, the condition is false. Otherwise,
.endd
.vitem &*condition&~=&~*&<&'string'&>
-.cindex "&%condition%&" "ACL condition"
+.cindex "&%condition%& ACL condition"
.cindex "customizing" "ACL condition"
.cindex "&ACL;" "customized test"
-.cindex "&ACL;" "testing; customized"
+.cindex "&ACL;" "testing, customized"
This feature allows you to make up custom conditions. If the result of
expanding the string is an empty string, the number zero, or one of the strings
&"no"& or &"false"&, the condition is false. If the result is any non-zero
negative.
.vitem &*decode&~=&~*&<&'location'&>
-.cindex "&%decode%&" "ACL condition"
+.cindex "&%decode%& ACL condition"
This condition is available only when Exim is compiled with the
content-scanning extension, and it is allowed only in the ACL defined by
&%acl_smtp_mime%&. It causes the current MIME part to be decoded into a file.
-For details, see chapter &<<CHAPexiscan>>&.
+&new("If all goes well, the condition is true. It is false only if there are
+problems such as a syntax error or a memory shortage. For more details, see
+chapter &<<CHAPexiscan>>&.")
.vitem &*demime&~=&~*&<&'extension&~list'&>
-.cindex "&%demime%&" "ACL condition"
+.cindex "&%demime%& ACL condition"
This condition is available only when Exim is compiled with the
content-scanning extension. Its use is described in section
&<<SECTdemimecond>>&.
.vitem &*dnslists&~=&~*&<&'list&~of&~domain&~names&~and&~other&~data'&>
-.cindex "&%dnslists%&" "ACL condition"
+.cindex "&%dnslists%& ACL condition"
.cindex "DNS list" "in ACL"
.cindex "black list (DNS)"
.cindex "&ACL;" "testing a DNS list"
&<<SECTmorednslists>>&--&<<SECTmorednslistslast>>& for details.
.vitem &*domains&~=&~*&<&'domain&~list'&>
-.cindex "&%domains%&" "ACL condition"
+.cindex "&%domains%& ACL condition"
.cindex "domain" "ACL checking"
.cindex "&ACL;" "testing a recipient domain"
-.cindex "&$domain_data$&"
+.vindex "&$domain_data$&"
This condition is relevant only after a RCPT command. It checks that the domain
of the recipient address is in the domain list. If percent-hack processing is
enabled, it is done before this test is done. If the check succeeds with a
lookup, the result of the lookup is placed in &$domain_data$& until the next
&%domains%& test.
-.new
&*Note carefully*& (because many people seem to fall foul of this): you cannot
use &%domains%& in a DATA ACL.
-.wen
.vitem &*encrypted&~=&~*&<&'string&~list'&>
-.cindex "&%encrypted%&" "ACL condition"
+.cindex "&%encrypted%& ACL condition"
.cindex "encryption" "checking in an ACL"
.cindex "&ACL;" "testing for encryption"
If the SMTP connection is not encrypted, the condition is false. Otherwise, the
.vitem &*hosts&~=&~*&<&'&~host&~list'&>
-.cindex "&%hosts%&" "ACL condition"
+.cindex "&%hosts%& ACL condition"
.cindex "host" "ACL checking"
.cindex "&ACL;" "testing the client host"
This condition tests that the calling host matches the host list. If you have
.code
accept hosts = 10.9.8.7 : dbm;/etc/friendly/hosts
.endd
-.new
The lookup in this example uses the host name for its key. This is implied by
the lookup type &"dbm"&. (For a host address lookup you would use &"net-dbm"&
and it wouldn't matter which way round you had these two items.)
-.wen
The reason for the problem with host names lies in the left-to-right way that
Exim processes lists. It can test IP addresses without doing any DNS lookups,
is not in the list, so the first &%accept%& statement fails. The second
statement can then check the IP address.
-.cindex "&$host_data$&"
+.vindex "&$host_data$&"
If a &%hosts%& condition is satisfied by means of a lookup, the result
of the lookup is made available in the &$host_data$& variable. This
allows you, for example, to set up a statement like this:
which gives a custom error message for each denied host.
.vitem &*local_parts&~=&~*&<&'local&~part&~list'&>
-.cindex "&%local_parts%&" "ACL condition"
+.cindex "&%local_parts%& ACL condition"
.cindex "local part" "ACL checking"
.cindex "&ACL;" "testing a local part"
-.cindex "&$local_part_data$&"
+.vindex "&$local_part_data$&"
This condition is relevant only after a RCPT command. It checks that the local
part of the recipient address is in the list. If percent-hack processing is
enabled, it is done before this test. If the check succeeds with a lookup, the
the next &%local_parts%& test.
.vitem &*malware&~=&~*&<&'option'&>
-.cindex "&%malware%&" "ACL condition"
+.cindex "&%malware%& ACL condition"
.cindex "&ACL;" "virus scanning"
.cindex "&ACL;" "scanning for viruses"
This condition is available only when Exim is compiled with the
viruses. For details, see chapter &<<CHAPexiscan>>&.
.vitem &*mime_regex&~=&~*&<&'list&~of&~regular&~expressions'&>
-.cindex "&%mime_regex%&" "ACL condition"
+.cindex "&%mime_regex%& ACL condition"
.cindex "&ACL;" "testing by regex matching"
This condition is available only when Exim is compiled with the
content-scanning extension, and it is allowed only in the ACL defined by
messages. Details are given in section &<<SECTratelimiting>>&.
.vitem &*recipients&~=&~*&<&'address&~list'&>
-.cindex "&%recipients%&" "ACL condition"
+.cindex "&%recipients%& ACL condition"
.cindex "recipient" "ACL checking"
.cindex "&ACL;" "testing a recipient"
This condition is relevant only after a RCPT command. It checks the entire
recipient address against a list of recipients.
.vitem &*regex&~=&~*&<&'list&~of&~regular&~expressions'&>
-.cindex "&%regex%&" "ACL condition"
+.cindex "&%regex%& ACL condition"
.cindex "&ACL;" "testing by regex matching"
This condition is available only when Exim is compiled with the
content-scanning extension, and is available only in the DATA, MIME, and
any of the regular expressions. For details, see chapter &<<CHAPexiscan>>&.
.vitem &*sender_domains&~=&~*&<&'domain&~list'&>
-.cindex "&%sender_domains%&" "ACL condition"
+.cindex "&%sender_domains%& ACL condition"
.cindex "sender" "ACL checking"
.cindex "&ACL;" "testing a sender domain"
-.cindex "&$domain$&"
-.cindex "&$sender_address_domain$&"
+.vindex "&$domain$&"
+.vindex "&$sender_address_domain$&"
This condition tests the domain of the sender of the message against the given
domain list. &*Note*&: The domain of the sender address is in
&$sender_address_domain$&. It is &'not'& put in &$domain$& during the testing
relaying, because sender addresses are easily, and commonly, forged.
.vitem &*senders&~=&~*&<&'address&~list'&>
-.cindex "&%senders%&" "ACL condition"
+.cindex "&%senders%& ACL condition"
.cindex "sender" "ACL checking"
.cindex "&ACL;" "testing a sender"
This condition tests the sender of the message against the given list. To test
relaying, because sender addresses are easily, and commonly, forged.
.vitem &*spam&~=&~*&<&'username'&>
-.cindex "&%spam%&" "ACL condition"
+.cindex "&%spam%& ACL condition"
.cindex "&ACL;" "scanning for spam"
This condition is available only when Exim is compiled with the
content-scanning extension. It causes the incoming message to be scanned by
SpamAssassin. For details, see chapter &<<CHAPexiscan>>&.
.vitem &*verify&~=&~certificate*&
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "TLS" "client certificate verification"
.cindex "certificate" "verification of client"
.cindex "&ACL;" "certificate verification"
&<<SECTverifyCSA>>&.
.vitem &*verify&~=&~header_sender/*&<&'options'&>
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying sender in the header"
.cindex "header lines" "verifying the sender in"
.cindex "sender" "verifying in header"
.endd
.vitem &*verify&~=&~header_syntax*&
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying header syntax"
.cindex "header lines" "verifying syntax"
.cindex "verifying" "header syntax"
common as they used to be.
.vitem &*verify&~=&~helo*&
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying HELO/EHLO"
.cindex "HELO" "verifying"
.cindex "EHLO" "verifying"
&%helo_try_verify_hosts%& options for details of how to request verification
independently of this condition.
-.new
For SMTP input that does not come over TCP/IP (the &%-bs%& command line
option), this condition is always true.
-.wen
.vitem &*verify&~=&~not_blind*&
.cindex "verifying" "not blind"
-.cindex "bcc recipients" "verifying none"
+.cindex "bcc recipients, verifying none"
This condition checks that there are no blind (bcc) recipients in the message.
Every envelope recipient must appear either in a &'To:'& header line or in a
&'Cc:'& header line for this condition to be true. Local parts are checked
.vitem &*verify&~=&~recipient/*&<&'options'&>
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying recipient"
.cindex "recipient" "verifying"
.cindex "verifying" "recipient"
-.cindex "&$address_data$&"
+.vindex "&$address_data$&"
This condition is relevant only after a RCPT command. It verifies the current
recipient. Details of address verification are given later, starting at section
&<<SECTaddressverification>>&. After a recipient has been verified, the value
value for the child address.
.vitem &*verify&~=&~reverse_host_lookup*&
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying host reverse lookup"
.cindex "host" "verifying reverse lookup"
This condition ensures that a verified host name has been looked up from the IP
is no client host involved), it always succeeds.
.vitem &*verify&~=&~sender/*&<&'options'&>
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
.cindex "&ACL;" "verifying sender"
.cindex "sender" "verifying"
.cindex "verifying" "sender"
the message's sender is empty (that is, this is a bounce message), the
condition is true. Otherwise, the sender address is verified.
-.cindex "&$address_data$&"
-.cindex "&$sender_address_data$&"
+.vindex "&$address_data$&"
+.vindex "&$sender_address_data$&"
If there is data in the &$address_data$& variable at the end of routing, its
value is placed in &$sender_address_data$& at the end of verification. This
value can be used in subsequent conditions and modifiers in the same ACL
to avoid doing it more than once per message.
.vitem &*verify&~=&~sender=*&<&'address'&>&*/*&<&'options'&>
-.cindex "&%verify%&" "ACL condition"
+.cindex "&%verify%& ACL condition"
This is a variation of the previous option, in which a modified address is
verified as a sender.
.endlist
-.section "Specifying the IP address for a DNS list lookup"
+.section "Specifying the IP address for a DNS list lookup" "SECID201"
.cindex "DNS list" "keyed by explicit IP address"
By default, the IP address that is used in a DNS list lookup is the IP address
of the calling host. However, you can specify another IP address by listing it
-.section "DNS lists keyed on domain names"
+.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 (see for example the &'domain based zones'& link at
-.section "Data returned by DNS lists"
+.section "Data returned by DNS lists" "SECID203"
.cindex "DNS list" "data returned from"
DNS lists are constructed using address records in the DNS. The original RBL
just used the address 127.0.0.1 on the right hand side of each record, but the
127.1.0.6 RSS and DUL
127.1.0.7 RSS and DUL and RBL
.endd
-.new
Section &<<SECTaddmatcon>>& below describes how you can distinguish between
-different values. Some DNS lists may return more than one address record; they
-are all checked.
-.wen
+different values. Some DNS lists may return more than one address record;
+&new("see section &<<SECThanmuldnsrec>>& for details of how they are checked.")
-.section "Variables set from DNS lists"
-.new
+.section "Variables set from DNS lists" "SECID204"
.cindex "DNS list" "variables set from"
-.cindex "&$dnslist_domain$&"
-.cindex "&$dnslist_text$&"
-.cindex "&$dnslist_value$&"
+.vindex "&$dnslist_domain$&"
+.vindex "&$dnslist_text$&"
+.vindex "&$dnslist_value$&"
When an entry is found in a DNS list, the variable &$dnslist_domain$&
contains the name of the domain that matched, and &$dnslist_value$& contains
the data from the entry. If more than one address record is returned by the DNS
associated TXT record. For lists such as RBL+ the TXT record for a merged entry
is often not very meaningful. See section &<<SECTmordetinf>>& for a way of
obtaining more information.
-.wen
You can use the DNS list variables in &%message%& or &%log_message%& modifiers
&-- although these appear before the condition in the ACL, they are not
deny dnslists = rblplus.mail-abuse.org=127.0.0.2
.endd
rejects only those hosts that yield 127.0.0.2. Without this additional data,
-any address record is considered to be a match. If more than one address record
-is found on the list, they are all checked for a matching right-hand side.
+any address record is considered to be a match. &new("For the moment, we assume
+that the DNS lookup returns just one record. Section &<<SECThanmuldnsrec>>&
+describes how multiple records are handled.")
More than one IP address may be given for checking, using a comma as a
separator. These are alternatives &-- if any one of them matches, the
-.section "Negated DNS matching conditions"
+.section "Negated DNS matching conditions" "SECID205"
You can supply a negative list of IP addresses as part of a &%dnslists%&
condition. Whereas
.code
which is less clear, and harder to maintain.
+
+
.new
+.section "Handling multiple DNS records from a DNS list" "SECThanmuldnsrec"
+A DNS lookup for a &%dnslists%& condition may return more than one DNS record,
+thereby providing more than one IP address. When an item in a &%dnslists%& list
+is followed by &`=`& or &`&&`& and a list of IP addresses, in order to restrict
+the match to specific results from the DNS lookup, there are two ways in which
+the checking can be handled. For example, consider the condition:
+.code
+dnslists = a.b.c=127.0.0.1
+.endd
+What happens if the DNS lookup for the incoming IP address yields both
+127.0.0.1 and 127.0.0.2 by means of two separate DNS records? Is the
+condition true because at least one given value was found, or is it false
+because at least one of the found values was not listed? And how does this
+affect negated conditions? Both possibilities are provided for with the help of
+additional separators &`==`& and &`=&&`&.
+
+.ilist
+If &`=`& or &`&&`& is used, the condition is true if any one of the looked up
+IP addresses matches one of the listed addresses. For the example above, the
+condition is true because 127.0.0.1 matches.
+.next
+If &`==`& or &`=&&`& is used, the condition is true only if every one of the
+looked up IP addresses matches one of the listed addresses. If the condition is
+changed to:
+.code
+dnslists = a.b.c==127.0.0.1
+.endd
+and the DNS lookup yields both 127.0.0.1 and 127.0.0.2, the condition is
+false because 127.0.0.2 is not listed. You would need to have:
+.code
+dnslists = a.b.c==127.0.0.1,127.0.0.2
+.endd
+for the condition to be true.
+.endlist
+
+When &`!`& is used to negate IP address matching, it inverts the result, giving
+the precise opposite of the behaviour above. Thus:
+.ilist
+If &`!=`& or &`!&&`& is used, the condition is true if none of the looked up IP
+addresses matches one of the listed addresses. Consider:
+.code
+dnslists = a.b.c!&0.0.0.1
+.endd
+If the DNS lookup yields both 127.0.0.1 and 127.0.0.2, the condition is
+false because 127.0.0.1 matches.
+.next
+If &`!==`& or &`!=&&`& is used, the condition is true there is at least one
+looked up IP address that does not match. Consider:
+.code
+dnslists = a.b.c!=&0.0.0.1
+.endd
+If the DNS lookup yields both 127.0.0.1 and 127.0.0.2, the condition is
+true, because 127.0.0.2 does not match. You would need to have:
+.code
+dnslists = a.b.c!=&0.0.0.1,0.0.0.2
+.endd
+for the condition to be false.
+.endlist
+When the DNS lookup yields only a single IP address, there is no difference
+between &`=`& and &`==`& and between &`&&`& and &`=&&`&.
+.wen
+
+
+
+
.section "Detailed information from merged DNS lists" "SECTmordetinf"
.cindex "DNS list" "information from merged"
When the facility for restricting the matching IP values in a DNS list is used,
domain is the one that is put in &$dnslist_domain$&. For example:
.code
reject message = \
- rejected because $sender_ip_address is blacklisted \
+ rejected because $sender_host_address is blacklisted \
at $dnslist_domain\n$dnslist_text
dnslists = \
sbl.spamhaus.org,sbl-xbl.spamhaus.org=127.0.0.2 : \
In this case there is one lookup in &'dnsbl.sorbs.net'&, and if none of the IP
values matches (or if no record is found), this is the only lookup that is
done. Only if there is a match is one of the more specific lists consulted.
-.wen
The &%leaky%& 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, which cannot be greater than the
-maximum. If the client is over the limit it &new("may suffer some
-counter-measures (as specified in the ACL)"), but it will still be able to send
+maximum. If the client is over the limit it may suffer some
+counter-measures (as specified in the ACL), but it will still be able to send
email at the configured maximum rate, whatever the rate of its attempts. This
is generally the better choice if you have clients that retry automatically.
.endlist
.cindex "verifying address" "differentiating failures"
-.cindex "&$recipient_verify_failure$&"
-.cindex "&$sender_verify_failure$&"
-.cindex "&$acl_verify_message$&"
+.vindex "&$recipient_verify_failure$&"
+.vindex "&$sender_verify_failure$&"
+.vindex "&$acl_verify_message$&"
After an address verification failure, &$acl_verify_message$& contains the
error message that is associated with the failure. It can be preserved by
coding like this:
&%hosts_override%& set, its hosts are always used, whether or not the router
supplies a host list.
-.new
The port that is used is taken from the transport, if it is specified and is a
remote transport. (For routers that do verification only, no transport need be
specified.) Otherwise, the default SMTP port is used. If a remote transport
&`RCPT TO:`&<&'the address to be tested'&>
&`QUIT`&
.endd
-.wen
LHLO is used instead of HELO if the transport's &%protocol%& option is
set to &"lmtp"&.
hosts, the ACL yields &"defer"&, unless the &%defer_ok%& parameter of the
&%callout%& option is given, in which case the condition is forced to succeed.
+.new
+.cindex "SMTP" "output flushing, disabling for callout"
+A callout may take a little time. For this reason, Exim normally flushes SMTP
+output before performing a callout in an ACL, to avoid unexpected timeouts in
+clients when the SMTP PIPELINING extension is in use. The flushing can be
+disabled by using a &%control%& modifier to set &%no_callout_flush%&.
+.wen
.vlist
.vitem <&'a&~time&~interval'&>
-.cindex "callout timeout" "specifying"
+.cindex "callout" "timeout, specifying"
This specifies the timeout that applies for the callout attempt to each host.
For example:
.code
verify = sender/callout=5s
.endd
The default is 30 seconds. The timeout is used for each response from the
-remote host. It is also used for the intial connection, unless overridden by
+remote host. It is also used for the initial connection, unless overridden by
the &%connect%& parameter.
.vitem &*connect&~=&~*&<&'time&~interval'&>
-.cindex "callout connection timeout" "specifying"
+.cindex "callout" "connection timeout, specifying"
This parameter makes it possible to set a different (usually smaller) timeout
for making the SMTP connection. For example:
.code
If not specified, this timeout defaults to the general timeout value.
.vitem &*defer_ok*&
-.cindex "callout defer" "action on"
+.cindex "callout" "defer, action on"
When this parameter is present, failure to contact any host, or any other kind
of temporary error, is treated as success by the ACL. However, the cache is not
updated in this circumstance.
.vitem &*maxwait&~=&~*&<&'time&~interval'&>
-.cindex "callout overall timeout" "specifying"
+.cindex "callout" "overall timeout, specifying"
This parameter sets an overall timeout for performing a callout verification.
For example:
.code
.vitem &*no_cache*&
-.cindex "callout cache" "suppressing"
-.cindex "caching callout" "suppressing"
+.cindex "callout" "cache, suppressing"
+.cindex "caching callout, suppressing"
When this parameter is given, the callout cache is neither read nor updated.
.vitem &*postmaster*&
.cindex "callout" "postmaster; checking"
-When this parameter is set, a sucessful callout check is followed by a similar
+When this parameter is set, a successful callout check is followed by a similar
check for the local part &'postmaster'& at the same domain. If this address is
rejected, the callout fails (but see &%fullpostmaster%& above). The result of
the postmaster check is recorded in a cache record; if it is a failure, this is
.code
deny !verify = recipient/callout=use_postmaster
.endd
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
It causes a non-empty postmaster address to be used in the MAIL command when
performing the callout for the recipient, and also for a &"random"& check if
that is configured. The local part of the address is &`postmaster`& and the
.section "Callout caching" "SECTcallvercache"
.cindex "hints database" "callout cache"
-.cindex "callout" "caching"
+.cindex "callout" "cache, description of"
.cindex "caching" "callout"
Exim caches the results of callouts in order to reduce the amount of resources
used, unless you specify the &%no_cache%& parameter with the &%callout%&
In this example, verification succeeds if a router generates a new address, and
the callout does not occur, because no address was routed to a remote host.
-.new
When verification is being tested via the &%-bv%& option, the treatment of
redirections is as just described, unless the &%-v%& or any debugging option is
also specified. In that case, full verification is done for every generated
address and a report is output for each of them.
-.wen
.section "Bounce address tag validation" "SECTverifyPRVS"
-.cindex "BATV" "verifying"
+.cindex "BATV, verifying"
Bounce address tag validation (BATV) is a scheme whereby the envelope senders
of outgoing messages have a cryptographic, timestamped &"tag"& added to them.
Genuine incoming bounce messages should therefore always be addressed to
use this:
.code
# Bounces: drop unsigned addresses for BATV senders
-deny message = This address does not send an unsigned reverse path.
+deny message = This address does not send an unsigned reverse path
senders = :
recipients = +batv_senders
this manual. You can find out about them by reading the file called
&_doc/experimental.txt_&.
-All the content-scanning facilites work on a MBOX copy of the message that is
+All the content-scanning facilities work on a MBOX copy of the message that is
temporarily created in a file called:
.display
<&'spool_directory'&>&`/scan/`&<&'message_id'&>/<&'message_id'&>&`.eml`&
.code
Virus 'W32/Magistr-B' found in file ./those.bat
.endd
-.new
For the trigger expression, we can match the phrase &"found in file"&. For the
name expression, we want to extract the W32/Magistr-B string, so we can match
for the single quotes left and right of it. Altogether, this makes the
even if there is a problem with the virus scanner. Otherwise, such a problem
causes the ACL to defer.
-.cindex "&$malware_name$&"
+.vindex "&$malware_name$&"
When a virus is found, the condition sets up an expansion variable called
&$malware_name$& that contains the name of the virus. You can use it in a
&%message%& modifier that specifies the error returned to the sender, and/or in
.section "Scanning with SpamAssassin" "SECTscanspamass"
.cindex "content scanning" "for spam"
.cindex "spam scanning"
-.cindex "SpamAssassin" "scanning with"
+.cindex "SpamAssassin"
The &%spam%& ACL condition calls SpamAssassin's &%spamd%& daemon to get a spam
score and a report for the message. You can get SpamAssassin at
&url(http://www.spamassassin.org), or, if you have a working Perl
multiple &%spamd%& servers.
-.section "Calling SpamAssassin from an Exim ACL"
+.section "Calling SpamAssassin from an Exim ACL" "SECID206"
Here is a simple example of the use of the &%spam%& condition in a DATA ACL:
.code
deny message = This message was classified as SPAM
spam = joe
.endd
-.new
The right-hand side of the &%spam%& condition specifies a name. This is
relevant if you have set up multiple SpamAssassin profiles. If you do not want
to scan using a specific profile, but rather use the SpamAssassin system-wide
The right-hand side of the &%spam%& condition is expanded before being used, so
you can put lookups or conditions there. When the right-hand side evaluates to
&"0"& or &"false"&, no scanning is done and the condition fails immediately.
-.wen
Scanning with SpamAssassin uses a lot of resources. If you scan every message,
-large ones may cause significant performance degredation. As most spam messages
+large ones may cause significant performance degradation. As most spam messages
are quite small, it is recommended that you do not scan the big ones. For
example:
.code
information for the relevant MIME part. These are described below. The contents
of the MIME part are not by default decoded into a disk file except for MIME
parts whose content-type is &"message/rfc822"&. If you want to decode a MIME
-part into a disk file, you can use the &%decode%& modifier. The general syntax
-is:
+part into a disk file, you can use the &%decode%& condition. The general
+syntax is:
.display
&`decode = [/`&<&'path'&>&`/]`&<&'filename'&>
.endd
If the string does not start with a slash, it is used as the
filename, and the default path is then used.
.endlist
-
+&new("The &%decode%& condition normally succeeds. It is only false for syntax
+errors or unusual circumstances such as memory shortages.")
You can easily decode a file with its original, proposed filename using
.code
decode = $mime_filename
.vitem &$mime_is_coverletter$&
This variable attempts to differentiate the &"cover letter"& of an e-mail from
-attached data. It can be used to clamp down on flashy or unneccessarily encoded
+attached data. It can be used to clamp down on flashy or unnecessarily encoded
content in the cover letter, while not restricting attachments at all.
The variable contains 1 (true) for a MIME part believed to be part of the
errors in MIME containers and can match file extensions found in the message
against a list. Using this facility produces files containing the unpacked MIME
parts of the message in the temporary scan directory. If you do antivirus
-scanning, it is recommened that you use the &%demime%& condition before the
+scanning, it is recommended that you use the &%demime%& condition before the
antivirus (&%malware%&) condition.
On the right-hand side of the &%demime%& condition you can pass a
.vlist
.vitem &$demime_errorlevel$&
-.cindex "&$demime_errorlevel$&"
+.vindex "&$demime_errorlevel$&"
When an error is detected in a MIME container, this variable contains the
severity of the error, as an integer number. The higher the value, the more
severe the error (the current maximum value is 3). If this variable is unset or
zero, no error occurred.
.vitem &$demime_reason$&
-.cindex "&$demime_reason$&"
+.vindex "&$demime_reason$&"
When &$demime_errorlevel$& is greater than zero, this variable contains a
human-readable text string describing the MIME error that occurred.
.endlist
.vlist
.vitem &$found_extension$&
-.cindex "&$found_extension$&"
+.vindex "&$found_extension$&"
When the &%demime%& condition is true, this variable contains the file
extension it found.
.endlist
-.section "Building Exim to use a local scan function"
+.section "Building Exim to use a local scan function" "SECID207"
.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 LOCAL_SCAN_SOURCE in your
.vlist
.vitem &`LOCAL_SCAN_ACCEPT`&
-.cindex "&$local_scan_data$&"
+.vindex "&$local_scan_data$&"
The message is accepted. If you pass back a string of text, it is saved with
the message, and made available in the variable &$local_scan_data$&. No
newlines are permitted (if there are any, they are turned into spaces) and the
printed with the suffix K or M.
.vitem &*opt_octint*&
-This also specifies an integer, but the value is always interpeted as an
+This also specifies an integer, but the value is always interpreted as an
octal integer, whether or not it starts with the digit zero, and it is
always output in octal.
-.section "Available Exim variables"
+.section "Available Exim variables" "SECID208"
.cindex "&[local_scan()]& function" "available Exim variables"
The header &_local_scan.h_& gives you access to a number of C variables. These
are the only ones that are guaranteed to be maintained from release to release.
-Note, however, that you can obtain the value of any Exim variable by calling
-&'expand_string()'&. The exported variables are as follows:
+Note, however, that you can obtain the value of any Exim variable,
+&new("including &$recipients$&,") by calling &'expand_string()'&. The exported
+variables are as follows:
.vlist
.vitem &*unsigned&~int&~debug_selector*&
is NULL for locally submitted messages.
.vitem &*int&~interface_port*&
-.new
The port on which this message was received. When testing with the &%-bh%&
command line option, the value of this variable is -1 unless a port has been
specified via the &%-oMi%& option.
-.wen
.vitem &*uschar&~*message_id*&
This variable contains Exim's message id for the incoming message (the value of
The list of accepted recipients, held in a vector of length
&%recipients_count%&. The &%recipient_item%& structure is discussed below. You
can add additional recipients by calling &'receive_add_recipient()'& (see
-below). You can delete recipients by removing them from the vector and adusting
-the value in &%recipients_count%&. In particular, by setting
+below). You can delete recipients by removing them from the vector and
+adjusting the value in &%recipients_count%&. In particular, by setting
&%recipients_count%& to zero you remove all recipients. If you then return the
value &`LOCAL_SCAN_ACCEPT`&, the message is accepted, but immediately
blackholed. To replace the recipients, you can set &%recipients_count%& to zero
.endlist
-.section "Structure of header lines"
+.section "Structure of header lines" "SECID209"
The &%header_line%& structure contains the members listed below.
You can add additional header lines by calling the &'header_add()'& function
(see below). You can cause header lines to be ignored (deleted) by setting
-.section "Structure of recipient items"
+.section "Structure of recipient items" "SECID210"
The &%recipient_item%& structure contains these members:
.vlist
-.section "Available Exim functions"
+.section "Available Exim functions" "SECID211"
.cindex "&[local_scan()]& function" "available Exim functions"
The header &_local_scan.h_& gives you access to a number of Exim functions.
These are the only ones that are guaranteed to be maintained from release to
.code
lss_match_host(sender_host_name, sender_host_address, ...)
.endd
-.cindex "&$sender_host_address$&"
+.vindex "&$sender_host_address$&"
An empty address field matches an empty item in the host list. If the host name
is NULL, the name corresponding to &$sender_host_address$& is automatically
looked up if a host name is required to match an item in the list. The return
of the &%first_delivery%& condition in an &%if%& command in the filter to
prevent it happening on retries.
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
&*Warning*&: Because the system filter runs just once, variables that are
specific to individual recipient addresses, such as &$local_part$& and
&$domain$&, are not set, and the &"personal"& condition is not meaningful. If
described in section &<<SECTperaddfil>>& below.
-.section "Specifying a system filter"
+.section "Specifying a system filter" "SECID212"
.cindex "uid (user id)" "system filter"
.cindex "gid (group id)" "system filter"
The name of the file that contains the system filter must be specified by
by the &%reply%& command.
-.section "Testing a system filter"
+.section "Testing a system filter" "SECID213"
You can run simple tests of a system filter in the same way as for a user
filter, but you should use &%-bF%& rather than &%-bf%&, so that features that
are permitted only in system filters are recognized.
-.section "Contents of a system filter"
+.section "Contents of a system filter" "SECID214"
The language used to specify system filters is the same as for users' filter
files. It is described in the separate end-user document &'Exim's interface to
mail filtering'&. However, there are some additional features that are
-.section "Additional variable for system filters"
-.cindex "&$recipients$&"
+.section "Additional variable for system filters" "SECID215"
+.vindex "&$recipients$&"
The expansion variable &$recipients$&, containing a list of all the recipients
of the message (separated by commas and white space), is available in system
filters. It is not available in users' filters for privacy reasons.
-.section "Defer, freeze, and fail commands for system filters"
+.section "Defer, freeze, and fail commands for system filters" "SECID216"
.cindex "freezing messages"
.cindex "message" "freezing"
.cindex "message" "forced failure"
-.section "Setting an errors address in a system filter"
+.section "Setting an errors address in a system filter" "SECID217"
.cindex "envelope sender"
In a system filter, if a &%deliver%& command is followed by
.code
.section "Per-address filtering" "SECTperaddfil"
-.cindex "&$domain$&"
-.cindex "&$local_part$&"
+.vindex "&$domain$&"
+.vindex "&$local_part$&"
In contrast to the system filter, which is run just once per message for each
delivery attempt, it is also possible to set up a system-wide filtering
operation that runs once for each recipient address. In this case, variables
Processing that happens automatically for locally-originated messages (unless
&%suppress_local_fixups%& is set) can also be requested for messages that are
received over TCP/IP. The term &"submission mode"& is used to describe this
-state. Submisssion mode is set by the modifier
+state. Submission mode is set by the modifier
.code
control = submission
.endd
-.section "Unqualified addresses"
+.section "Unqualified addresses" "SECID218"
.cindex "unqualified addresses"
.cindex "address" "qualification"
By default, Exim expects every envelope address it receives from an external
requirement to accept unqualified addresses from specific hosts or IP networks.
Exim has two options that separately control which hosts may send unqualified
-sender or receipient addresses in SMTP commands, namely
+sender or recipient addresses in SMTP commands, namely
&%sender_unqualified_hosts%& and &%recipient_unqualified_hosts%&. In both
cases, if an unqualified address is accepted, it is qualified by adding the
value of &%qualify_domain%& or &%qualify_recipient%&, as appropriate.
-.section "The UUCP From line"
+.section "The UUCP From line" "SECID219"
.cindex "&""From""& line"
.cindex "UUCP" "&""From""& line"
.cindex "sender" "address"
-.section "Resent- header lines"
+.section "Resent- header lines" "SECID220"
.cindex "&%Resent-%& header lines"
RFC 2822 makes provision for sets of header lines starting with the string
&`Resent-`& to be added to a message when it is resent by the original
-.section "The Auto-Submitted: header line"
+.section "The Auto-Submitted: header line" "SECID221"
Whenever Exim generates an autoreply, a bounce, or a delay warning message, it
includes the header line:
.code
Auto-Submitted: auto-replied
.endd
-.section "The Bcc: header line"
+.section "The Bcc: header line" "SECID222"
.cindex "&'Bcc:'& header line"
If Exim is called with the &%-t%& option, to take recipient addresses from a
message's header, it removes any &'Bcc:'& header line that may exist (after
existing &'Bcc:'& is not removed.
-.section "The Date: header line"
+.section "The Date: header line" "SECID223"
.cindex "&'Date:'& header line"
If a locally-generated or submission-mode message has no &'Date:'& header line,
Exim adds one, using the current date and time, unless the
&%suppress_local_fixups%& control has been specified.
-.section "The Delivery-date: header line"
+.section "The Delivery-date: header line" "SECID224"
.cindex "&'Delivery-date:'& header line"
.cindex "&%delivery_date_remove%&"
&'Delivery-date:'& header lines are not part of the standard RFC 2822 header
messages.
-.section "The Envelope-to: header line"
+.section "The Envelope-to: header line" "SECID225"
.cindex "&'Envelope-to:'& header line"
.cindex "&%envelope_to_remove%&"
&'Envelope-to:'& header lines are not part of the standard RFC 2822 header set.
The envelope sender address is not empty (that is, this is not a bounce
message). The added header line copies the envelope sender address.
.next
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
The SMTP session is authenticated and &$authenticated_id$& is not empty.
.olist
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
If no domain is specified by the submission control, the local part is
&$authenticated_id$& and the domain is &$qualify_domain$&.
.next
name as described in section &<<SECTconstr>>&.
-.section "The Message-ID: header line"
+.section "The Message-ID: header line" "SECID226"
.cindex "&'Message-ID:'& header line"
.cindex "message" "submission"
.cindex "&%message_id_header_text%&"
&%message_id_header_domain%& options.
-.section "The Received: header line"
+.section "The Received: header line" "SECID227"
.cindex "&'Received:'& header line"
A &'Received:'& header line is added at the start of every message. The
contents are defined by the &%received_header_text%& configuration option, and
-H spool file is written) the earliest time at which delivery could start.
-.section "The References: header line"
+.section "The References: header line" "SECID228"
.cindex "&'References:'& header line"
Messages created by the &(autoreply)& transport include a &'References:'&
header line. This is constructed according to the rules that are described in
-.section "The Return-path: header line"
+.section "The Return-path: header line" "SECID229"
.cindex "&'Return-path:'& header line"
.cindex "&%return_path_remove%&"
&'Return-path:'& header lines are defined as something an MTA may insert when
a message is received over TCP/IP in submission mode, and &%sender_retain%& is
not specified on the submission control, the following processing takes place:
-.cindex "&$authenticated_id$&"
+.vindex "&$authenticated_id$&"
First, any existing &'Sender:'& lines are removed. Then, if the SMTP session is
authenticated, and &$authenticated_id$& is not empty, a sender address is
created as follows:
.ilist
-.cindex "&$qualify_domain$&"
+.vindex "&$qualify_domain$&"
If no domain is specified by the submission control, the local part is
&$authenticated_id$& and the domain is &$qualify_domain$&.
.next
-.section "Case of local parts"
+.section "Case of local parts" "SECID230"
.cindex "case of local parts"
.cindex "local part" "case of"
RFC 2822 states that the case of letters in the local parts of addresses cannot
-.section "Dots in local parts"
+.section "Dots in local parts" "SECID231"
.cindex "dot" "in local part"
.cindex "local part" "dots in"
RFC 2822 forbids empty components in local parts. That is, an unquoted local
-.section "Rewriting addresses"
+.section "Rewriting addresses" "SECID232"
.cindex "rewriting" "addresses"
Rewriting of sender and recipient addresses, and addresses in headers, can
happen automatically, or as the result of configuration options, as described
-.section "Incoming SMTP messages over TCP/IP"
+.section "Incoming SMTP messages over TCP/IP" "SECID233"
.cindex "SMTP" "incoming over TCP/IP"
.cindex "incoming SMTP over TCP/IP"
.cindex "inetd"
-.section "Unrecognized SMTP commands"
+.section "Unrecognized SMTP commands" "SECID234"
.cindex "SMTP" "unrecognized commands"
If Exim receives more than &%smtp_max_unknown_commands%& unrecognized SMTP
commands during a single SMTP connection, it drops the connection after sending
circumstances, a number of non-SMTP lines are sent first.
-.section "Syntax and protocol errors in SMTP commands"
+.section "Syntax and protocol errors in SMTP commands" "SECID235"
.cindex "SMTP" "syntax errors"
.cindex "SMTP" "protocol errors"
A syntax error is detected if an SMTP command is recognized, but there is
-.section "Use of non-mail SMTP commands"
+.section "Use of non-mail SMTP commands" "SECID236"
.cindex "SMTP" "non-mail commands"
The &"non-mail"& SMTP commands are those other than MAIL, RCPT, and
DATA. Exim counts such commands, and drops the connection if there are too
When a new message is expected, one occurrence of RSET is not counted. This
allows a client to send one RSET between messages (this is not necessary,
-but some clients do it). Exim also allows one uncounted occurence of HELO
+but some clients do it). Exim also allows one uncounted occurrence of HELO
or EHLO, and one occurrence of STARTTLS between messages. After
starting up a TLS session, another EHLO is expected, and so it too is not
counted.
-.section "The VRFY and EXPN commands"
+.section "The VRFY and EXPN commands" "SECID237"
When Exim receives a VRFY or EXPN command on a TCP/IP connection, it
runs the ACL specified by &%acl_smtp_vrfy%& or &%acl_smtp_expn%& (as
appropriate) in order to decide whether the command should be accepted or not.
smtp_etrn_command = /etc/etrn_command $domain \
$sender_host_address
.endd
-.cindex "&$domain$&"
+.vindex "&$domain$&"
The string is split up into arguments which are independently expanded. The
expansion variable &$domain$& is set to the argument of the ETRN command,
and no syntax checking is done on the contents of this argument. Exim does not
-.section "Incoming local SMTP"
+.section "Incoming local SMTP" "SECID238"
.cindex "SMTP" "local incoming"
Some user agents use SMTP to pass messages to their local MTA using the
standard input and output, as opposed to passing the envelope on the command
this is done for BSMTP, messages may contain multiple RCPT commands. See
chapter &<<CHAPbatching>>& for more details.
-.cindex "&$host$&"
+.vindex "&$host$&"
When one or more addresses are routed to a BSMTP transport by a router that
sets up a host list, the name of the first host on the list is available to the
transport in the variable &$host$&. Here is an example of such a transport and
to all warning and bounce messages,
-.section "Customizing bounce messages"
+.section "Customizing bounce messages" "SECID239"
.cindex "customizing" "bounce message"
.cindex "bounce message" "customizing"
If &%bounce_message_text%& is set, its contents are included in the default
logs. If any text item in the file is empty, default text is used for that
item.
-.cindex "&$bounce_recipient$&"
-.cindex "&$bounce_return_size_limit$&"
+.vindex "&$bounce_recipient$&"
+.vindex "&$bounce_return_size_limit$&"
Each item of text that is read from the file is expanded, and there are two
expansion variables which can be of use here: &$bounce_recipient$& is set to
the recipient of an error message while it is being created, and
mail delivery software will give up, and when that happens,
the message will be returned to you.
.endd
-.cindex "&$warn_message_delay$&"
-.cindex "&$warn_message_recipients$&"
+.vindex "&$warn_message_delay$&"
+.vindex "&$warn_message_recipients$&"
However, in the default state the subject and date lines are omitted if no
appropriate headers exist. During the expansion of this file,
&$warn_message_delay$& is set to the delay time in one of the forms &"<&'n'&>
-.section "Sending mail to a smart host"
+.section "Sending mail to a smart host" "SECID240"
.cindex "smart host" "example router"
If you want to send all mail for non-local domains to a &"smart host"&, you
should replace the default &(dnslookup)& router with a router which does the
-.section "Syntax errors in mailing lists"
+.section "Syntax errors in mailing lists" "SECID241"
.cindex "mailing lists" "syntax errors in"
If an entry in redirection data contains a syntax error, Exim normally defers
delivery of the original address. That means that a syntax error in a mailing
-.section "Re-expansion of mailing lists"
+.section "Re-expansion of mailing lists" "SECID242"
.cindex "mailing lists" "re-expansion of"
Exim remembers every individual address to which a message has been delivered,
in order to avoid duplication, but it normally stores only the original
-.section "Closed mailing lists"
+.section "Closed mailing lists" "SECID243"
.cindex "mailing lists" "closed"
The examples so far have assumed open mailing lists, to which anybody may
send mail. It is also possible to set up closed lists, where mail is accepted
.code
somelist-request+subscriber=other.dom.example@your.dom.example
.endd
-.cindex "&$local_part$&"
+.vindex "&$local_part$&"
For this to work, you must tell Exim to send multiple copies of messages that
have more than one recipient, so that each copy has just one recipient. This is
achieved by setting &%max_rcpt%& to 1. Without this, a single copy of a message
local_part_suffix_optional
allow_filter
.endd
-.cindex "&$local_part_suffix$&"
+.vindex "&$local_part_suffix$&"
It runs a user's &_.forward_& file for all local parts of the form
&'username-*'&. Within the filter file the user can distinguish different
cases by testing the variable &$local_part_suffix$&. For example:
-.section "Simplified vacation processing"
+.section "Simplified vacation processing" "SECID244"
.cindex "vacation processing"
The traditional way of running the &'vacation'& program is for a user to set up
a pipe command in a &_.forward_& file
-.section "Taking copies of mail"
+.section "Taking copies of mail" "SECID245"
.cindex "message" "copying every"
Some installations have policies that require archive copies of all messages to
be made. A single copy of each message can easily be taken by an appropriate
-.section "Intermittently connected hosts"
+.section "Intermittently connected hosts" "SECID246"
.cindex "intermittently connected hosts"
It has become quite common (because it is cheaper) for hosts to connect to the
Internet periodically rather than remain connected all the time. The normal
Nevertheless there are some features that can be used.
-.section "Exim on the upstream server host"
+.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
approach does not scale very well. Two different kinds of waiting message are
-.section "Exim on the intermittently connected client host"
+.section "Exim on the intermittently connected client host" "SECID248"
The value of &%smtp_accept_queue_per_connection%& should probably be
increased, or even set to zero (that is, disabled) on the intermittently
connected host, so that all incoming messages down a single connection get
.chapter "Using Exim as a non-queueing client" "CHAPnonqueueing" &&&
"Exim as a non-queueing client"
-.cindex "client" "non-queueing"
-.cindex "smart host" "queueing; suppressing"
+.cindex "client, non-queueing"
+.cindex "smart host" "suppressing queueing"
On a personal computer, it is a common requirement for all
email to be sent to a &"smart host"&. There are plenty of MUAs that can be
configured to operate that way, for all the popular operating systems.
A daemon cannot be run, nor will Exim accept incoming messages from &'inetd'&.
In other words, the only way to submit messages is via the command line.
.next
-Each message is synchonously delivered as soon as it is received (&%-odi%& is
+Each message is synchronously delivered as soon as it is received (&%-odi%& is
assumed). All queueing options (&%queue_only%&, &%queue_smtp_domains%&,
&%control%& in an ACL, etc.) are quietly ignored. The Exim reception process
does not finish until the delivery attempt is complete. If the delivery is
.endd
.endlist
+.new
+.cindex "log" "process ids in"
+.cindex "pid (process id)" "in log lines"
+Exim does not include its process id in log lines by default, but you can
+request that it does so by specifying the &`pid`& log selector (see section
+&<<SECTlogselector>>&). When this is set, the process id is output, in square
+brackets, immediately after the time and date.
+.wen
+
-.section "Logging to local files that are periodically &""cycled""&"
+.section "Logging to local files that are periodically &""cycled""&" "SECID285"
.cindex "log" "cycling local files"
.cindex "cycling logs"
.cindex "&'exicyclog'&"
.cindex "log" "local files; writing to"
-Some operating systems provide centralized and standardised methods for cycling
+Some operating systems provide centralized and standardized methods for cycling
log files. For those that do not, a utility script called &'exicyclog'& is
provided (see section &<<SECTcyclogfil>>&). This renames and compresses the
main and reject logs each time it is called. The maximum number of old logs to
.endd
-.section "Logging to syslog"
+.section "Logging to syslog" "SECID249"
.cindex "log" "syslog; writing to"
The use of syslog does not change what Exim logs or the format of its messages,
except in one respect. If &%syslog_timestamp%& is set false, the timestamps on
-.section "Log line flags"
+.section "Log line flags" "SECID250"
One line is written to the main log for each message received, and for each
successful, unsuccessful, and delayed delivery. These lines can readily be
picked out by the distinctive two-character flags that immediately follow the
.endd
-.section "Logging message reception"
+.section "Logging message reception" "SECID251"
.cindex "log" "reception line"
The format of the single-line entry in the main log that is written for every
message received is shown in the basic example below, which is split over
-.section "Logging deliveries"
+.section "Logging deliveries" "SECID252"
.cindex "log" "delivery line"
The format of the single-line entry in the main log that is written for every
delivery is shown in one of the examples below, for local and remote
data when a message is delivered. See section &<<SECTlogselector>>& below.
-.section "Discarded deliveries"
+.section "Discarded deliveries" "SECID253"
.cindex "discarded messages"
.cindex "message" "discarded"
.cindex "delivery" "discarded; logging"
.endd
-.section "Deferred deliveries"
+.section "Deferred deliveries" "SECID254"
When a delivery is deferred, a line of the following form is logged:
.code
2002-12-19 16:20:23 16aiQz-0002Q5-00 == marvin@endrest.example
-.section "Delivery failures"
+.section "Delivery failures" "SECID255"
.cindex "delivery" "failure; logging"
If a delivery fails because an address cannot be routed, a line of the
following form is logged:
-.section "Fake deliveries"
+.section "Fake deliveries" "SECID256"
.cindex "delivery" "fake; logging"
If a delivery does not actually take place because the &%-N%& option has been
used to suppress it, a normal delivery line is written to the log, except that
-.section "Completion"
+.section "Completion" "SECID257"
A line of the form
.code
2002-10-31 09:00:11 16ZCW1-0005MB-00 Completed
-.section "Summary of Fields in Log Lines"
+.section "Summary of Fields in Log Lines" "SECID258"
.cindex "log" "summary of fields"
A summary of the field identifiers that are used in log lines is shown in
the following table:
.display
&`A `& authenticator name (and optional id)
&`C `& SMTP confirmation on delivery
+.new
+&` `& command list for &"no mail in SMTP session"&
+.wen
&`CV `& certificate verification status
+.new
+&`D `& duration of &"no mail in SMTP session"&
+.wen
&`DN `& distinguished name from peer certificate
&`DT `& on &`=>`& lines: time taken for a delivery
&`F `& sender address (on delivery lines)
.endd
-.section "Other log entries"
+.section "Other log entries" "SECID259"
Various other types of log entry are written from time to time. Most should be
self-explanatory. Among the more common are:
&`*queue_run `& start and end queue runs
&` queue_time `& time on queue for one recipient
&` queue_time_overall `& time on queue for whole message
+.new
+&` pid `& Exim process id
+.wen
&` received_recipients `& recipients on <= lines
&` received_sender `& sender on <= lines
&`*rejected_header `& header contents on reject log
&` smtp_confirmation `& SMTP confirmation on => lines
&` smtp_connection `& SMTP connections
&` smtp_incomplete_transaction`& incomplete SMTP transactions
+.new
+&` smtp_no_mail `& session with no MAIL commands
+.wen
&` smtp_protocol_error `& SMTP protocol errors
&` smtp_syntax_error `& SMTP syntax errors
&` subject `& contents of &'Subject:'& on <= lines
More details on each of these items follows:
.ilist
-.cindex "&%warn%& statement" "log when skipping"
+.cindex "&%warn%& ACL verb" "log when skipping"
&%acl_warn_skipped%&: When an ACL &%warn%& statement is skipped because one of
its conditions cannot be evaluated, a log line to this effect is written if
this log selector is set.
parentheses between them.
.next
.cindex "log" "Exim arguments"
-.cindex "Exim arguments" "logging"
+.cindex "Exim arguments, logging"
&%arguments%&: This causes Exim to write the arguments with which it was called
to the main log, preceded by the current working directory. This is a debugging
feature, added to make it easier to find out how certain MUAs call
connection is rejected, for whatever reason.
.next
.cindex "log" "delayed delivery"
-.cindex "delayed delivery" "logging"
+.cindex "delayed delivery, logging"
&%delay_delivery%&: A log entry is written whenever a delivery process is not
started for an incoming message because the load is too high or too many
messages were received on one connection. Logging does not occur if no delivery
.cindex "log" "incoming remote port"
.cindex "port" "logging remote"
.cindex "TCP/IP" "logging incoming remote port"
-.cindex "&$sender_fullhost$&"
-.cindex "&$sender_rcvhost$&"
+.vindex "&$sender_fullhost$&"
+.vindex "&$sender_rcvhost$&"
&%incoming_port%&: The remote port number from which a message was received is
added to log entries and &'Received:'& header lines, following the IP address
in square brackets, and separated from it by a colon. This is implemented by
the default setting, because for most ordinary configurations, the remote port
number is always 25 (the SMTP port).
.next
+.new
+.cindex "log" "process ids in"
+.cindex "pid (process id)" "in log lines"
+&%pid%&: The current process id is added to every log line, in square brackets,
+immediately after the time and date.
+.wen
+.next
.cindex "log" "queue run"
.cindex "queue runner" "logging"
&%queue_run%&: The start and end of every queue run are logged.
and the message sender plus any accepted recipients are included in the log
line. This can provide evidence of dictionary attacks.
.next
+.new
+.cindex "log" "non-MAIL SMTP sessions"
+.cindex "MAIL" "logging session without"
+&%smtp_no_mail%&: A line is written to the main log whenever an accepted SMTP
+connection terminates without having issued a MAIL command. This includes both
+the case when the connection is dropped, and the case when QUIT is used. It
+does not include cases where the connection is rejected right at the start (by
+an ACL, or because there are too many connections, or whatever). These cases
+already have their own log lines.
+
+The log line that is written contains the identity of the client in the usual
+way, followed by D= and a time, which records the duration of the connection.
+If the connection was authenticated, this fact is logged exactly as it is for
+an incoming message, with an A= item. If the connection was encrypted, CV=,
+DN=, and X= items may appear as they do for an incoming message, controlled by
+the same logging options.
+
+Finally, if any SMTP commands were issued during the connection, a C= item
+is added to the line, listing the commands that were used. For example,
+.code
+C=EHLO,QUIT
+.endd
+shows that the client issued QUIT straight after EHLO. If there were fewer
+than 20 commands, they are all listed. If there were more than 20 commands,
+the last 20 are listed, preceded by &"..."&. However, with the default
+setting of 10 for &%smtp_accep_max_nonmail%&, the connection will in any case
+have been aborted before 20 non-mail commands are processed.
+.wen
+.next
.cindex "log" "SMTP protocol error"
.cindex "SMTP" "logging protocol error"
&%smtp_protocol_error%&: A log line is written for every SMTP protocol error
using &%-bs%& the sender identification (normally the calling user) is given.
.next
.cindex "log" "subject"
-.cindex "subject" "logging"
+.cindex "subject, logging"
&%subject%&: The subject of the message is added to the arrival log line,
preceded by &"T="& (T for &"topic"&, since S is already used for &"size"&).
Any MIME &"words"& in the subject are decoded. The &%print_topbitchars%& option
.endlist
-.section "Message log"
+.section "Message log" "SECID260"
.cindex "message" "log file for"
.cindex "log" "message log; description of"
.cindex "&_msglog_& directory"
.ecindex IIDloggen
+
+
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
described in this chapter. There is also the Exim Monitor, which is covered in
the next chapter. The utilities described here are:
-.itable none 0 0 4 2* left 8* left 30* left 40* left
-.row "" &<<SECTfinoutwha>>& &'exiwhat'& &&&
+.itable none 0 0 3 7* left 15* left 40* left
+.irow &<<SECTfinoutwha>>& &'exiwhat'& &&&
"list what Exim processes are doing"
-.row "" &<<SECTgreptheque>>& &'exiqgrep'& "grep the queue"
-.row "" &<<SECTsumtheque>>& &'exiqsumm'& "summarize the queue"
-.row "" &<<SECTextspeinf>>& &'exigrep'& "search the main log"
-.row "" &<<SECTexipick>>& &'exipick'& "select messages on &&&
- various criteria"
-.row "" &<<SECTcyclogfil>>& &'exicyclog'& "cycle (rotate) log files"
-.row "" &<<SECTmailstat>>& &'eximstats'& &&&
+.irow &<<SECTgreptheque>>& &'exiqgrep'& "grep the queue"
+.irow &<<SECTsumtheque>>& &'exiqsumm'& "summarize the queue"
+.irow &<<SECTextspeinf>>& &'exigrep'& "search the main log"
+.irow &<<SECTexipick>>& &'exipick'& "select messages on &&&
+ various criteria"
+.irow &<<SECTcyclogfil>>& &'exicyclog'& "cycle (rotate) log files"
+.irow &<<SECTmailstat>>& &'eximstats'& &&&
"extract statistics from the log"
-.row "" &<<SECTcheckaccess>>& &'exim_checkaccess'& &&&
+.irow &<<SECTcheckaccess>>& &'exim_checkaccess'& &&&
"check address acceptance from given IP"
-.row "" &<<SECTdbmbuild>>& &'exim_dbmbuild'& "build a DBM file"
-.row "" &<<SECTfinindret>>& &'exinext'& "extract retry information"
-.row "" &<<SECThindatmai>>& &'exim_dumpdb'& "dump a hints database"
-.row "" &<<SECThindatmai>>& &'exim_tidydb'& "clean up a hints database"
-.row "" &<<SECThindatmai>>& &'exim_fixdb'& "patch a hints database"
-.row "" &<<SECTmailboxmaint>>& &'exim_lock'& "lock a mailbox file"
+.irow &<<SECTdbmbuild>>& &'exim_dbmbuild'& "build a DBM file"
+.irow &<<SECTfinindret>>& &'exinext'& "extract retry information"
+.irow &<<SECThindatmai>>& &'exim_dumpdb'& "dump a hints database"
+.irow &<<SECThindatmai>>& &'exim_tidydb'& "clean up a hints database"
+.irow &<<SECThindatmai>>& &'exim_fixdb'& "patch a hints database"
+.irow &<<SECTmailboxmaint>>& &'exim_lock'& "lock a mailbox file"
.endtable
Another utility that might be of use to sites with many MTAs is Tom Kistner's
.section "Finding out what Exim processes are doing (exiwhat)" "SECTfinoutwha"
.cindex "&'exiwhat'&"
-.cindex "process" "querying"
+.cindex "process, querying"
.cindex "SIGUSR1"
On operating systems that can restart a system call after receiving a signal
(most modern OS), an Exim process responds to the SIGUSR1 signal by writing
-.section "Summarising the queue (exiqsumm)" "SECTsumtheque"
+.section "Summarizing the queue (exiqsumm)" "SECTsumtheque"
.cindex "&'exiqsumm'&"
.cindex "queue" "summary"
The &'exiqsumm'& utility is a Perl script which reads the output of &`exim
been waiting. Note that the number of pending deliveries is greater than the
number of messages when messages have more than one recipient.
-.new
A summary line is output at the end. By default the output is sorted on the
domain name, but &'exiqsumm'& has the options &%-a%& and &%-c%&, which cause
the output to be sorted by oldest message and by count of messages,
domain into two or more subcounts: &%-b%& separates bounce messages, &%-f%&
separates frozen messages, and &%-s%& separates messages according to their
sender.
-.wen
The output of &'exim -bp'& contains the original addresses in the message, so
this also applies to the output from &'exiqsumm'&. No domains from addresses
match the pattern. Thus, &'exigrep'& can extract complete log entries for a
given message, or all mail for a given user, or for a given host, for example.
The input files can be in Exim log format or syslog format.
-
-If a matching log line is not associated with a specific message, it is always
-included in &'exigrep'&'s output. The usage is:
+.new
+If a matching log line is not associated with a specific message, it is
+included in &'exigrep'&'s output without any additional lines. The usage is:
.display
-&`exigrep [-l] [-t<`&&'n'&&`>] <`&&'pattern'&&`> [<`&&'log file'&&`>] ...`&
+&`exigrep [-t<`&&'n'&&`>] [-I] [-l] [-v] <`&&'pattern'&&`> [<`&&'log file'&&`>] ...`&
.endd
+If no log file names 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.
-The &%-l%& flag means &"literal"&, that is, treat all characters in the
+By default, &'exigrep'& does case-insensitive matching. The &%-I%& option
+makes it case-sensitive. This may give a performance improvement when searching
+large log files. Without &%-I%&, the Perl pattern matches use Perl's &`/i`&
+option; with &%-I%& they do not. In both cases it is possible to change the
+case sensitivity within the pattern by using &`(?i)`& or &`(?-i)`&.
+
+The &%-l%& option means &"literal"&, that is, treat all characters in the
pattern as standing for themselves. Otherwise the pattern must be a Perl
-regular expression. The pattern match is case-insensitive. If no file names are
-given on the command line, the standard input is read.
+regular expression.
+
+The &%-v%& option inverts the matching condition. That is, a line is selected
+if it does &'not'& match the pattern.
+.wen
If the location of a &'zcat'& command is known from the definition of
ZCAT_COMMAND in &_Local/Makefile_&, &'exigrep'& automatically passes any file
.section "Selecting messages by various criteria (exipick)" "SECTexipick"
.cindex "&'exipick'&"
John Jetmore's &'exipick'& utility is included in the Exim distribution. It
-lists messages from the queue according to a variety of criteria. For details,
-visit &url(http://www.exim.org/eximwiki/ToolExipickManPage) or run:
-.code
-exipick --help
-.endd
+lists messages from the queue according to a variety of criteria. For details
+of &'exipick'&'s facilities, visit the web page at
+&url(http://www.exim.org/eximwiki/ToolExipickManPage) or run &'exipick'& with
+the &%--help%& option.
.section "Cycling log files (exicyclog)" "SECTcyclogfil"
.cindex "&'eximstats'&"
A Perl script called &'eximstats'& is provided for extracting statistical
information from log files. The output is either plain text, or HTML.
-Exim log files are also suported by the &'Lire'& system produced by the
+Exim log files are also supported by the &'Lire'& system produced by the
LogReport Foundation &url(http://www.logreport.org).
The &'eximstats'& script has been hacked about quite a bit over time. The
-.section "exim_dumpdb"
+.section "exim_dumpdb" "SECID261"
.cindex "&'exim_dumpdb'&"
The entire contents of a database are written to the standard output by the
&'exim_dumpdb'& program, which has no options or arguments other than the
of the letters R, or T, depending on whether it refers to a routing or
transport retry. For a local delivery, the next part is the local address; for
a remote delivery it is the name of the remote host, followed by its failing IP
-address (unless &%no_retry_include_ip_address%& is set on the &(smtp)&
+address (unless &%retry_include_ip_address%& is set false on the &(smtp)&
transport). If the remote port is not the standard one (port 25), it is added
to the IP address. Then there follows an error code, an additional error code,
and a textual description of the error.
-.section "exim_tidydb"
+.section "exim_tidydb" "SECID262"
.cindex "&'exim_tidydb'&"
The &'exim_tidydb'& utility program is used to tidy up the contents of a hints
database. If run with no options, it removes all records that are more than 30
-.section "exim_fixdb"
+.section "exim_fixdb" "SECID263"
.cindex "&'exim_fixdb'&"
The &'exim_fixdb'& program is a utility for interactively modifying databases.
Its main use is for testing Exim, but it might also be occasionally useful for
-.section "Running the monitor"
+.section "Running the monitor" "SECID264"
The monitor is started by running the script called &'eximon'&. This is a shell
script that sets up a number of environment variables, and then runs the
binary called &_eximon.bin_&. The default appearance of the monitor window can
-.section "The stripcharts"
+.section "The stripcharts" "SECID265"
.cindex "stripchart"
The first stripchart is always a count of messages on the queue. Its name can
be configured by setting QUEUE_STRIPCHART_NAME in the
-.section "Main action buttons"
+.section "Main action buttons" "SECID266"
.cindex "size" "of monitor window"
.cindex "Exim monitor" "window size"
.cindex "window size"
-.section "The log display"
+.section "The log display" "SECID267"
.cindex "log" "tail of; in monitor"
The second section of the window is an area in which a display of the tail of
the main log is maintained.
-.section "The queue display"
+.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,
-.section "The queue menu"
+.section "The queue menu" "SECID269"
.cindex "queue" "menu in monitor"
If the &%shift%& key is held down and the left button is clicked when the mouse
pointer is over the text for any message, an action menu pops up, and the first
as soon as possible.
-.section "Building a more &""hardened""& Exim"
+.section "Building a more &""hardened""& Exim" "SECID286"
.cindex "security" "build-time features"
There are a number of build-time options that can be set in &_Local/Makefile_&
to create Exim binaries that are &"harder"& to attack, in particular by a rogue
-.section "Root privilege"
+.section "Root privilege" "SECID270"
.cindex "setuid"
.cindex "root privilege"
The Exim binary is normally setuid to root, which means that it gains root
uid and gid in the following cases:
.ilist
-.cindex "&%-C%& option"
-.cindex "&%-D%& option"
+.oindex "&%-C%&"
+.oindex "&%-D%&"
If the &%-C%& option is used to specify an alternate configuration file, or if
the &%-D%& option is used to define macro values for the configuration, and the
calling process is not running as root or the Exim user, the uid and gid are
root callers may use &%-C%& and &%-D%& without losing privilege, and if
DISABLE_D_OPTION is set, the &%-D%& option may not be used at all.
.next
-.cindex "&%-be%& option"
-.cindex "&%-bf%& option"
-.cindex "&%-bF%& option"
+.oindex "&%-be%&"
+.oindex "&%-bf%&"
+.oindex "&%-bF%&"
If the expansion test option (&%-be%&) or one of the filter testing options
(&%-bf%& or &%-bF%&) are used, the uid and gid are changed to those of the
calling process.
uid and gid are changed to the Exim user and group. This means that Exim always
runs under its own uid and gid when receiving messages. This also applies when
testing address verification
-.cindex "&%-bv%& option"
-.cindex "&%-bh%& option"
+.oindex "&%-bv%&"
+.oindex "&%-bh%&"
(the &%-bv%& option) and testing incoming message policy controls (the &%-bh%&
option).
.next
.section "Running Exim without privilege" "SECTrunexiwitpri"
-.cindex "privilege" "running without"
+.cindex "privilege, running without"
.cindex "unprivileged running"
.cindex "root privilege" "running without"
Some installations like to run Exim in an unprivileged state for more of its
some POP3 or IMAP-only environments):
.olist
-They must be owned by the Exim group and be writable by that group. This
+They must be owned by the Exim group and be writeable by that group. This
implies you must set &%mode%& in the appendfile configuration, as well as the
mode of the mailbox files themselves.
.next
-.section "Delivering to local files"
+.section "Delivering to local files" "SECID271"
Full details of the checks applied by &(appendfile)& before it writes to a file
are given in chapter &<<CHAPappendfile>>&.
-.section "IPv4 source routing"
+.section "IPv4 source routing" "SECID272"
.cindex "source routing" "in IP packets"
.cindex "IP source routing"
Many operating systems suppress IP source-routed packets in the kernel, but
-.section "The VRFY, EXPN, and ETRN commands in SMTP"
+.section "The VRFY, EXPN, and ETRN commands in SMTP" "SECID273"
Support for these SMTP commands is disabled by default. If required, they can
be enabled by defining suitable ACLs.
-.section "Privileged users"
-.cindex "trusted user"
+.section "Privileged users" "SECID274"
+.cindex "trusted users"
.cindex "admin user"
.cindex "privileged user"
.cindex "user" "trusted"
.cindex "user" "admin"
-Exim recognises two sets of users with special privileges. Trusted users are
+Exim recognizes two sets of users with special privileges. Trusted users are
able to submit new messages to Exim locally, but supply their own sender
addresses and information about a sending host. For other users submitting
local messages, Exim sets up the sender address from the uid, and doesn't
permit a remote host to be specified.
-.cindex "&%-f%& option"
+.oindex "&%-f%&"
However, an untrusted user is permitted to use the &%-f%& command line option
in the special form &%-f <>%& to indicate that a delivery failure for the
message should not cause an error report. This affects the message's envelope,
the Exim monitor and see all the information it is capable of providing, which
includes the contents of files on the spool.
-.cindex "&%-M%& option"
-.cindex "&%-q%& option"
+.oindex "&%-M%&"
+.oindex "&%-q%&"
By default, the use of the &%-M%& and &%-q%& options to cause Exim to attempt
delivery of messages on its queue is restricted to admin users. This
restriction can be relaxed by setting the &%no_prod_requires_admin%& option.
queue is also restricted to admin users. This restriction can be relaxed by
setting &%no_queue_list_requires_admin%&.
-Exim recognises an admin user if the calling process is running as root or as
+Exim recognizes an admin user if the calling process is running as root or as
the Exim user or if any of the groups associated with the calling process is
the Exim group. It is not necessary actually to be running under the Exim
group. However, if admin users who are not root or the Exim user are to access
-.section "Spool files"
+.section "Spool files" "SECID275"
.cindex "spool directory" "files"
Exim's spool directory and everything it contains is owned by the Exim user and
set to the Exim group. The mode for spool files is defined in the
-.section "Use of argv[0]"
+.section "Use of argv[0]" "SECID276"
Exim examines the last component of &%argv[0]%&, and if it matches one of a set
of specific strings, Exim assumes certain options. For example, calling Exim
with the last component of &%argv[0]%& set to &"rsmtp"& is exactly equivalent
-.section "Use of %f formatting"
+.section "Use of %f formatting" "SECID277"
The only use made of &"%f"& by Exim is in formatting load average values. These
are actually stored in integer variables as 1000 times the load average.
Consequently, their range is limited and so therefore is the length of the
-.section "Embedded Exim path"
+.section "Embedded Exim path" "SECID278"
Exim uses its own path name, which is embedded in the code, only when it needs
to re-exec in order to regain root privilege. Therefore, it is not root when it
does so. If some bug allowed the path to get overwritten, it would lead to an
-.section "Use of sprintf()"
+.section "Use of sprintf()" "SECID279"
.cindex "&[sprintf()]&"
A large number of occurrences of &"sprintf"& in the code are actually calls to
&'string_sprintf()'&, a function that returns the result in malloc'd store.
-.section "Use of debug_printf() and log_write()"
+.section "Use of debug_printf() and log_write()" "SECID280"
Arbitrary strings are passed to both these functions, but they do their
formatting by calling the function &'string_vformat()'&, which runs through
the format string itself, and checks the length of each conversion.
-.section "Use of strcat() and strcpy()"
+.section "Use of strcat() and strcpy()" "SECID281"
These are used only in cases where the output buffer is known to be large
enough to hold the result.
.ecindex IIDsecurcon
place, the lock will be retained. If you write a new file and rename it, the
lock will be lost at the instant of rename.
.next
-.cindex "&$body_linecount$&"
+.vindex "&$body_linecount$&"
If you change the number of lines in the file, the value of
&$body_linecount$&, which is stored in the -H file, will be incorrect. At
present, this value is not used by Exim, but there is no guarantee that this
If the message is cryptographically signed, any change will invalidate the
signature.
.endlist
+.new
+All in all, modifying -D files is fraught with danger.
+.wen
-
+.new
Files whose names end with -J may also be seen in the &_input_& directory (or
its subdirectories when &%split_spool_directory%& is set). These are journal
files, used to record addresses to which the message has been delivered during
-the course of a delivery run. At the end of the run, the -H file is updated,
-and the -J file is deleted.
-
+the course of a delivery attempt. If there are still undelivered recipients at
+the end, the -H file is updated, and the -J file is deleted. If, however, there
+is some kind of crash (for example, a power outage) before this happens, the -J
+file remains in existence. When Exim next processes the message, it notices the
+-J file and uses it to update the -H file before starting the next delivery
+attempt.
+.wen
-.section "Format of the -H file"
+.section "Format of the -H file" "SECID282"
.cindex "uid (user id)" "in spool file"
.cindex "gid (group id)" "in spool file"
The second line of the -H file contains the login name for the uid of the
process that called Exim to read the message, followed by the numerical uid and
gid. For a locally generated message, this is normally the user who sent the
-message. For a message received over TCP/IP, it is normally the Exim user.
+message. For a message received over TCP/IP &new("via the daemon"), it is
+normally the Exim user.
The third line of the file contains the address of the message's sender as
transmitted in the envelope, contained in angle brackets. The sender address is
the next line, and is followed by a newline character. It may contain internal
newlines.
-.new
.vitem "&%-aclc%&&~<&'rest-of-name'&>&~<&'length'&>"
A line of this form is present for every ACL connection variable that is
defined. Note that there is a space between &%-aclc%& and the rest of the name.
length is the length of the data string for the variable. The string itself
starts at the beginning of the next line, and is followed by a newline
character. It may contain internal newlines.
-.wen
.vitem "&%-active_hostname%&&~<&'hostname'&>"
This is present if, when the message was received over SMTP, the value of
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.chapter "Adding new drivers or lookup types" "" &&&
+.chapter "Adding new drivers or lookup types" "CHID12" &&&
"Adding drivers or lookups"
.cindex "adding drivers"
-.cindex "new drivers" "adding"
+.cindex "new drivers, adding"
.cindex "drivers" "adding new"
The following actions have to be taken in order to add a new router, transport,
authenticator, or lookup type to Exim:
. ////////////////////////////////////////////////////////////////////////////
. ////////////////////////////////////////////////////////////////////////////
-.makeindex "Option index" "option"
+. /////////////////////////////////////////////////////////////////////////////
+. These lines are processing instructions for the Simple DocBook Processor that
+. Philip Hazel has developed as a less cumbersome way of making PostScript and
+. PDFs than using xmlto and fop. They will be ignored by all other XML
+. processors.
+. /////////////////////////////////////////////////////////////////////////////
+
+.literal xml
+<?sdop
+ format="newpage"
+ foot_right_recto="&chaptertitle;"
+ foot_right_verso="&chaptertitle;"
+?>
+.literal off
-.makeindex "Concept index" "concept"
+.makeindex "Options index" "option"
+.makeindex "Variables index" "variable"
+.makeindex "Concept index" "concept"
. /////////////////////////////////////////////////////////////////////////////