. Update the Copyright year (only) when changing content.
. /////////////////////////////////////////////////////////////////////////////
-.set previousversion "4.87"
+.set previousversion "4.88"
.include ./local_params
.set ACL "access control lists (ACLs)"
.section "Exim documentation" "SECID1"
. Keep this example change bar when updating the documentation!
-.new
.cindex "documentation"
This edition of the Exim specification applies to version &version() of Exim.
Substantive changes from the &previousversion; edition are marked in some
renditions of the document; this paragraph is so marked if the rendition is
capable of showing a change indicator.
-.wen
This document is very much a reference manual; it is not a tutorial. The reader
is expected to have some familiarity with the SMTP mail transfer protocol and
by Exim in conjunction with the &%-MC%& option. It signifies that the
remote host supports the ESMTP &_DSN_& extension.
-.new
.vitem &%-MCG%&
.oindex "&%-MCG%&"
This option is not intended for use by external callers. It is used internally
by Exim in conjunction with the &%-MC%& option. It signifies that an
alternate queue is used, named by the following option.
-.wen
.vitem &%-MCP%&
.oindex "&%-MCP%&"
and &%-S%& options).
.cindex "queue runner" "description of operation"
-.new
If other commandline options do not specify an action,
-.wen
the &%-q%& option starts one queue runner process. This scans the queue of
waiting messages, and runs a delivery process for each one in turn. It waits
for each delivery process to finish before starting the next one. A delivery
be done. If a message requires any remote deliveries, it remains on the queue
for later delivery.
-.new
.vitem &%-q[q][i][f[f]][l][G<name>[/<time>]]]%&
.oindex "&%-qG%&"
.cindex queue named
mailq -qGquarantime
exim -qGoffpeak -Rf @special.domain.example
.endd
-.wen
.vitem &%-q%&<&'qflags'&>&~<&'start&~id'&>&~<&'end&~id'&>
When scanning the queue, Exim can be made to skip over messages whose ids are
section &<<SECTnamedlists>>&.
+.section "Builtin macros" "SECTbuiltinmacros"
+Exim defines some macros depending on facilities available, which may
+differ due to build-time definitions and from one release to another.
+All of these macros start with an underscore.
+They can be used to conditionally include parts of a configuration
+(see below).
+
+The following classes of macros are defined:
+.display
+&` _HAVE_* `& build-time defines
+&` _DRIVER_ROUTER_* `& router drivers
+&` _DRIVER_TRANSPORT_* `& transport drivers
+&` _DRIVER_AUTHENTICATOR_* `& authenticator drivers
+&` _OPT_MAIN_* `& main config options
+&` _OPT_ROUTERS_* `& generic router options
+&` _OPT_TRANSPORTS_* `& generic transport options
+&` _OPT_AUTHENTICATORS_* `& generic authenticator options
+&` _OPT_ROUTER_*_* `& private router options
+&` _OPT_TRANSPORT_*_* `& private transport options
+&` _OPT_AUTHENTICATOR_*_* `& private authenticator options
+.endd
+
+Use an &"exim -bP macros"& command to get the list of macros.
+
+
.section "Conditional skips in the configuration file" "SECID46"
.cindex "configuration file" "conditional skips"
.cindex "&`.ifdef`&"
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 by the letter G, 1024x1024x1024.
-.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
Exim supports the use of regular expressions in many of its options. It
uses the PCRE regular expression library; this provides regular expression
matching that is compatible with Perl 5. The syntax and semantics of
-regular expressions is discussed in many Perl reference books, and also in
+regular expressions is discussed in
+online Perl manpages, in
+many Perl reference books, and also in
Jeffrey Friedl's &'Mastering Regular Expressions'&, which is published by
O'Reilly (see &url(http://www.oreilly.com/catalog/regex2/)).
.cindex "expansion" "of lists"
Each list is expanded as a single string before it is used.
-.new
&'Exception: the router headers_remove option, where list-item
splitting is done before string-expansion.'&
-.wen
The result of
expansion must be a list, possibly containing empty items, which is split up
user@example.com
.endd
-.new
.vitem &*${base32:*&<&'digits'&>&*}*&
.cindex "&%base32%& expansion item"
.cindex "expansion" "conversion to base 32"
.cindex "expansion" "conversion to base 32"
The string must consist entirely of base-32 digits.
The number is converted to decimal and output as a string.
-.wen
.vitem &*${base62:*&<&'digits'&>&*}*&
.cindex "&%base62%& expansion item"
significant bit set (so-called &"8-bit characters"&) count as printing or not
is controlled by the &%print_topbitchars%& option.
-.new
.vitem &*${escape8bit:*&<&'string'&>&*}*&
.cindex "expansion" "escaping 8-bit characters"
.cindex "&%escape8bit%& expansion item"
If the string contains and characters with the most significant bit set,
they are converted to escape sequences starting with a backslash.
Backslashes and DEL characters are also converted.
-.wen
.vitem &*${eval:*&<&'string'&>&*}*&&~and&~&*${eval10:*&<&'string'&>&*}*&
.cindex certificate fingerprint
.cindex "expansion" "SHA-256 hashing"
.cindex "&%sha256%& expansion item"
-.new
The &%sha256%& operator computes the SHA-256 hash value of the string
and returns
it as a 64-digit hexadecimal number, in which any letters are in upper case.
-.wen
If the string is a single variable of type certificate,
returns the SHA-256 hash fingerprint of the certificate.
-.new
.vitem &*${sha3:*&<&'string'&>&*}*& &&&
&*${sha3_<n>:*&<&'string'&>&*}*&
.cindex "SHA3 hash"
The &%sha3%& expansion item is only supported if Exim has been
compiled with GnuTLS 3.5.0 or later.
-.wen
.vitem &*${stat:*&<&'string'&>&*}*&
qualified host name. See also &$smtp_active_hostname$&.
-.new
.vitem &$proxy_external_address$& &&&
&$proxy_external_port$& &&&
&$proxy_local_address$& &&&
These variables are only available when built with Proxy Protocol
or Socks5 support
For details see chapter &<<SECTproxyInbound>>&.
-.wen
.vitem &$prdr_requested$&
.cindex "PRDR" "variable for"
The value set for the &%qualify_recipient%& option in the configuration file,
or if not set, the value of &$qualify_domain$&.
-.new
.vitem &$queue_name$&
.vindex &$queue_name$&
.cindex "named queues"
.cindex queues named
The name of the spool queue in use; empty for the default queue.
-.wen
.vitem &$rcpt_count$&
.vindex "&$rcpt_count$&"
There is also a command line option &%-pd%& (for delay) which suppresses the
initial startup, even if &%perl_at_start%& is set.
-.new
.ilist
.oindex "&%perl_taintmode%&"
.cindex "Perl" "taintmode"
taint mode of the Perl interpreter. You are encouraged to set this
option to a true value. To avoid breaking existing installations, it
defaults to false.
-.wen
.section "Calling Perl subroutines" "SECID86"
.row &%slow_lookup_log%& "control logging of slow DNS lookups"
.row &%syslog_duplication%& "controls duplicate log lines on syslog"
.row &%syslog_facility%& "set syslog &""facility""& field"
+.row &%syslog_pid%& "pid in syslog lines"
.row &%syslog_processname%& "set syslog &""ident""& field"
.row &%syslog_timestamp%& "timestamp syslog lines"
.row &%write_rejectlog%& "control use of message log"
See section &<<CALLaddparcall>>& for details of how this value is used.
-.option check_log_inodes main integer 0
+.option check_log_inodes main integer 100
See &%check_spool_space%& below.
-.option check_log_space main integer 0
+.option check_log_space main integer 10M
See &%check_spool_space%& below.
.oindex "&%check_rfc2047_length%&"
set false, Exim recognizes encoded words of any length.
-.option check_spool_inodes main integer 0
+.option check_spool_inodes main integer 100
See &%check_spool_space%& below.
-.option check_spool_space main integer 0
+.option check_spool_space main integer 10M
.cindex "checking disk space"
.cindex "disk space, checking"
.cindex "spool directory" "checking space"
.vindex "&$log_space$&"
.vindex "&$spool_inodes$&"
.vindex "&$spool_space$&"
-When any of these options are set, they apply to all incoming messages. If you
+When any of these options are nonzero, 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
&$spool_space$& in an ACL with appropriate additional conditions.
&%check_spool_space%& and &%check_spool_inodes%& check the spool partition if
either value is greater than zero, for example:
.code
-check_spool_space = 10M
+check_spool_space = 100M
check_spool_inodes = 100
.endd
The spool partition is the one that contains the directory defined by
&%check_spool_space%& is zero, unless &%no_smtp_check_spool_space%& is set.
The values for &%check_spool_space%& and &%check_log_space%& are held as a
-number of kilobytes. If a non-multiple of 1024 is specified, it is rounded up.
+number of kilobytes (though specified in bytes).
+If a non-multiple of 1024 is specified, it is rounded up.
For non-SMTP input and for batched SMTP input, the test is done at start-up; on
failure a message is written to stderr and Exim exits with a non-zero code, as
it obviously cannot send an error message of any kind.
-.new
+There is a slight performance penalty for these checks.
+Versions of Exim preceding 4.88 had these disabled by default;
+high-rate intallations confident they will never run out of resources
+may wish to deliberately disable them.
+
.option chunking_advertise_hosts main "host list&!!" *
.cindex CHUNKING advertisement
.cindex "RFC 3030" "CHUNKING"
The CHUNKING extension (RFC3030) will be advertised in the EHLO message to
these hosts.
Hosts may use the BDAT command as an alternate to DATA.
-.wen
.option daemon_smtp_ports main string &`smtp`&
.cindex "port" "for daemon"
.option delay_warning main "time list" 24h
.cindex "warning of delay"
.cindex "delay warning, specifying"
+.cindex "queue" "delay warning"
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
run. If you do not want queue runs to occur, omit the &%-q%&&'xx'& setting on
the daemon's command line.
-.new
.cindex queues named
.cindex "named queues"
To set limits for different named queues use
an expansion depending on the &$queue_name$& variable.
-.wen
.option queue_smtp_domains main "domain list&!!" unset
.cindex "queueing incoming messages"
details of Exim's logging.
+.option syslog_pid main boolean true
+.cindex "syslog" "pid"
+If &%syslog_pid%& is set false, the PID on Exim's log lines are
+omitted when these lines are sent to syslog. (Syslog normally prefixes
+the log lines with the PID of the logging process automatically.) You need
+to enable the &`+pid`& log selector item, if you want Exim to write it's PID
+into the logs.) See chapter &<<CHAPlog>>& for details of Exim's logging.
+
+
.option syslog_processname main string &`exim`&
.cindex "syslog" "process name; setting"
Server Name Indication extension, then this option and others documented in
&<<SECTtlssni>>& will be re-expanded.
-.new
If this option is unset or empty a fresh self-signed certificate will be
generated for every connection.
-.wen
.option tls_crl main string&!! unset
.cindex "TLS" "server certificate revocation list"
The value of this option is expanded and indicates the source of DH parameters
to be used by Exim.
-If it is a filename starting with a &`/`&, then it names a file from which DH
+&*Note: The Exim Maintainers strongly recommend using a filename with site-generated
+local DH parameters*&, which has been supported across all versions of Exim. The
+other specific constants available are a fallback so that even when
+"unconfigured", Exim can offer Perfect Forward Secrecy in older ciphersuites in TLS.
+
+If &%tls_dhparam%& is a filename starting with a &`/`&,
+then it names a file from which DH
parameters should be loaded. If the file exists, it should hold a PEM-encoded
PKCS#3 representation of the DH prime. If the file does not exist, for
OpenSSL it is an error. For GnuTLS, Exim will attempt to create the file and
See section &<<SECTgnutlsparam>>& for further details.
If Exim is using OpenSSL and this option is empty or unset, then Exim will load
-a default DH prime; the default is the 2048 bit prime described in section
+a default DH prime; the default is Exim-specific but lacks verifiable provenance.
+
+In older versions of Exim the default was the 2048 bit prime described in section
2.2 of RFC 5114, "2048-bit MODP Group with 224-bit Prime Order Subgroup", which
in IKE is assigned number 23.
Otherwise, the option must expand to the name used by Exim for any of a number
-of DH primes specified in RFC 2409, RFC 3526 and RFC 5114. As names, Exim uses
-"ike" followed by the number used by IKE, or "default" which corresponds to
-"ike23".
+of DH primes specified in RFC 2409, RFC 3526, RFC 5114, RFC 7919, or from other
+sources. As names, Exim uses a standard specified name, else "ike" followed by
+the number used by IKE, or "default" which corresponds to
+&`exim.dev.20160529.3`&.
-The available primes are:
+The available standard primes are:
+&`ffdhe2048`&, &`ffdhe3072`&, &`ffdhe4096`&, &`ffdhe6144`&, &`ffdhe8192`&,
&`ike1`&, &`ike2`&, &`ike5`&,
&`ike14`&, &`ike15`&, &`ike16`&, &`ike17`&, &`ike18`&,
-&`ike22`&, &`ike23`& (aka &`default`&) and &`ike24`&.
+&`ike22`&, &`ike23`& and &`ike24`&.
+
+The available additional primes are:
+&`exim.dev.20160529.1`&, &`exim.dev.20160529.2`& and &`exim.dev.20160529.3`&.
Some of these will be too small to be accepted by clients.
Some may be too large to be accepted by clients.
+The open cryptographic community has suspicions about the integrity of some
+of the later IKE values, which led into RFC7919 providing new fixed constants
+(the "ffdhe" identifiers).
+
+At this point, all of the "ike" values should be considered obsolete;
+they're still in Exim to avoid breaking unusual configurations, but are
+candidates for removal the next time we have backwards-incompatible changes.
The TLS protocol does not negotiate an acceptable size for this; clients tend
to hard-drop connections if what is offered by the server is unacceptable,
acceptable bound from 1024 to 2048.
-.option tls_eccurve main string&!! prime256v1
+.option tls_eccurve main string&!! &`auto`&
.cindex TLS "EC cryptography"
-If built with a recent-enough version of OpenSSL,
-this option selects a EC curve for use by Exim.
+This option selects a EC curve for use by Exim.
-Curve names of the form &'prime256v1'& are accepted.
-For even more-recent library versions, names of the form &'P-512'&
-are also accepted, plus the special value &'auto'&
-which tells the library to choose.
+After expansion it must contain a valid EC curve parameter, such as
+&`prime256v1`&, &`secp384r1`&, or &`P-512`&. Consult your OpenSSL manual
+for valid selections.
-If the option is set to an empty string, no EC curves will be enabled.
+For OpenSSL versions before (and not including) 1.0.2, the string
+&`auto`& selects &`prime256v1`&. For more recent OpenSSL versions
+&`auto`& tells the library to choose.
+
+If the option expands to an empty string, no EC curves will be enabled.
.option tls_ocsp_file main string&!! unset
unauthenticated. See also &%hosts_require_auth%&, and chapter
&<<CHAPSMTPAUTH>>& for details of authentication.
-.new
.option hosts_try_chunking smtp "host list&!!" *
.cindex CHUNKING "enabling, in client"
.cindex BDAT "SMTP command"
.cindex "RFC 3030" "CHUNKING"
-This option provides a list of server to which, provided they announce
+This option provides a list of servers to which, provided they announce
CHUNKING support, Exim will attempt to use BDAT commands rather than DATA.
BDAT will not be used in conjuction with a transport filter.
-.wen
+
+.option hosts_try_fastopen smtp "host list!!" unset
+.option "fast open, TCP" "enabling, in client"
+.option "TCP Fast Open" "enabling, in client"
+.option "RFC 7413" "TCP Fast Open"
+This option provides a list of servers to which, provided
+the facility is supported by this system, Exim will attempt to
+perform a TCP Fast Open.
+No data is sent on the SYN segment but, if the remote server also
+supports the facility, it can send its SMTP banner immediately after
+the SYN,ACK segment. This can save up to one round-trip time.
+
+The facility is only active for previously-contacted servers,
+as the initiator must present a cookie in the SYN segment.
+
+On (at least some) current Linux distributions the facility must be enabled
+in the kernel by the sysadmin before the support is usable.
.option hosts_try_prdr smtp "host list&!!" *
.cindex "PRDR" "enabling, optional in client"
.endd
This accepts a client certificate that is verifiable against any
of your configured trust-anchors
-which usually means the full set of public CAs)
+(which usually means the full set of public CAs)
and which has a SAN with a good account name.
Note that the client cert is on the wire in-clear, including the SAN,
whereas a plaintext SMTP AUTH done inside TLS is not.
To enable TLS operations on a server, the &%tls_advertise_hosts%& option
must be set to match some hosts. The default is * which matches all hosts.
-.new
If this is all you do, TLS encryption will be enabled but not authentication -
meaning that the peer has no assurance it is actually you he is talking to.
You gain protection from a passive sniffer listening on the wire but not
from someone able to intercept the communication.
-.wen
Further protection requires some further configuration at the server end.
Great care should be taken to deal with matters of case, various injection
attacks in the string (&`../`& or SQL), and ensuring that a valid filename
-can always be referenced; it is important to remember that &$tls_sni$& is
+can always be referenced; it is important to remember that &$tls_in_sni$& is
arbitrary unverified data provided prior to authentication.
+Further, the initial cerificate is loaded before SNI is arrived, so
+an expansion for &%tls_certificate%& must have a default which is used
+when &$tls_in_sni$& is empty.
The Exim developers are proceeding cautiously and so far no other TLS options
are re-expanded.
the ACL specified by &%acl_smtp_data%&, which is the second ACL that is
associated with the DATA command.
-.new
.cindex CHUNKING "BDAT command"
.cindex BDAT "SMTP command"
.cindex "RFC 3030" CHUNKING
. XXX why not? It should be possible, for the first BDAT.
The &%acl_smtp_data%& is run after the last BDAT command and all of
the data specified is received.
-.wen
For both of these ACLs, it is not possible to reject individual recipients. An
error response rejects the entire message. Unfortunately, it is known that some
effect.
-.new
.vitem &*queue*&&~=&~<&'text'&>
This modifier specifies the use of a named queue for spool files
for the message.
of traffic, or for quarantine of messages.
Separate queue-runner processes will be needed for named queues.
If the text after expansion is empty, the default queue is used.
-.wen
.vitem &*remove_header*&&~=&~<&'text'&>
the delivery log lines are tagged with ">>" rather than "=>" and appear
before the acceptance "<=" line.
-.new
If there is a temporary error the item is queued for later delivery in the
usual fashion.
This behaviour can be adjusted by appending the option &*defer=*&<&'value'&>
&"pass"& copies an SMTP defer response from the target back to the initiator
and does not queue the message.
Note that this is independent of any receipient verify conditions in the ACL.
-.wen
Delivery in this mode avoids the generation of a bounce mail to a
(possibly faked)
may access any variables already defined. The logging may be adjusted with
the &'opts'& option, which takes the same values as the &`-d`& command-line
option.
-.new
Logging may be stopped, and the file removed, with the &'kill'& option.
-.wen
Some examples (which depend on variables that don't exist in all
contexts):
.code
.code
spamd_address = 192.168.99.45 387
.endd
+The SpamAssassin protocol relies on a TCP half-close from the client.
+If your SpamAssassin client side is running a Linux system with an
+iptables firewall, consider setting
+&%net.netfilter.nf_conntrack_tcp_timeout_close_wait%& to at least the
+timeout, Exim uses when waiting for a response from the SpamAssassin
+server (currently defaulting to 120s). With a lower value the Linux
+connection tracking may consider your half-closed connection as dead too
+soon.
+
To use Rspamd (which by default listens on all local addresses
on TCP port 11333)
A multiline text table, containing the full SpamAssassin report for the
message. Useful for inclusion in headers or reject messages.
This variable is only usable in a DATA-time ACL.
-.new
Beware that SpamAssassin may return non-ASCII characters, especially
when running in country-specific locales, which are not legal
unencoded in headers.
-.wen
.vitem &$spam_action$&
For SpamAssassin either 'reject' or 'no action' depending on the
&`P `& on &`<=`& lines: protocol used
&` `& on &`=>`& and &`**`& lines: return path
&`PRDR`& PRDR extension used
-&`PRX `& on &'<='& and &`=>`& lines: proxy address
+&`PRX `& on &`<=`& and &`=>`& lines: proxy address
&`Q `& alternate queue name
&`QT `& on &`=>`& lines: time spent on queue so far
&` `& on &"Completed"& lines: time spent on queue
MANDATORY:
The domain you want to sign with. The result of this expanded
option is put into the &%$dkim_domain%& expansion variable.
+If it is empty after expansion, DKIM signing is not done.
.option dkim_selector smtp string&!! unset
MANDATORY:
.vitem &%$dkim_copiedheaders%&
A transcript of headers and their values which are included in the signature
(copied from the 'z=' tag of the signature).
-.new
Note that RFC6376 requires that verification fail if the From: header is
not included in the signature. Exim does not enforce this; sites wishing
strict enforcement should code the check explicitly.
-.wen
.vitem &%$dkim_bodylength%&
The number of signed body bytes. If zero ("0"), the body is unsigned. If no
verb to a group of domains or identities. For example:
.code
-# Warn when Mail purportedly from GMail has no signature at all
-warn log_message = GMail sender without DKIM signature
+# Warn when Mail purportedly from GMail has no gmail signature
+warn log_message = GMail sender without gmail.com DKIM signature
sender_domains = gmail.com
dkim_signers = gmail.com
dkim_status = none
.endd
+Note that the above does not check for a total lack of DKIM signing;
+for that check for empty &$h_DKIM-Signature:$& in the data ACL.
+
.vitem &%dkim_status%&
ACL condition that checks a colon-separated list of possible DKIM verification
results against the actual result of verification. This is typically used
main configuration option to a hostlist; connections from these
hosts will use Proxy Protocol.
-.new
The following expansion variables are usable
(&"internal"& and &"external"& here refer to the interfaces
of the proxy):
.endd
If &$proxy_session$& is set but &$proxy_external_address$& is empty
there was a protocol error.
-.wen
Since the real connections are all coming from the proxy, and the
per host connection tracking is done before Proxy Protocol is
.cindex events
The events mechanism in Exim can be used to intercept processing at a number
-of points. It was originally invented to giave a way to do customised logging
+of points. It was originally invented to give a way to do customised logging
actions (for example, to a database) but can also be used to modify some
processing actions.
The :defer events populate one extra variable: &$event_defer_errno$&.
For complex operations an ACL expansion can be used in &%event_action%&
-however due to the multiple contextx that Exim operates in during
+however due to the multiple contexts that Exim operates in during
the course of its processing:
.ilist
variables set in transport events will not be visible outside that