If the &%domains%& option is set, the domain of the address must be in the set
of domains that it defines.
.cindex "tainted data" "de-tainting"
-.cindex "de-tainting" "using router domains option"
+.cindex de-tainting "using router domains option"
+.cindex de-tainting &$domains$&
A match verifies the variable &$domain$& (which carries tainted data)
and assigns an untainted value to the &$domain_data$& variable.
Such an untainted value is often needed in the transport.
If the &%local_parts%& option is set, the local part of the address must be in
the set of local parts that it defines.
A match verifies the variable &$local_part$& (which carries tainted data)
+.cindex de-tainting &$local_parts$&
and assigns an untainted value to the &$local_part_data$& variable.
Such an untainted value is often needed in the transport.
For specifics of the matching operation and the resulting untainted value,
These options are used by Sendmail for selecting configuration files and are
ignored by Exim.
+.new
+.cmdopt -atrn <&'host'&> <&'domainlist'&>
+This option requests an ODMR customer connection.
+See &<<SECTODMRCUST>>& for details.
+.wen
+
.cmdopt -B <&'type'&>
.oindex "&%-B%&"
.cindex "8-bit characters"
data = ${lookup mysql{ALIAS_QUERY}}
.endd
In earlier versions of Exim macros were sometimes used for domain, host, or
-address lists. In Exim 4 these are handled better by named lists &-- see
+address lists. In Exim version 4 these are handled better by named lists &-- see
section &<<SECTnamedlists>>&.
.section "Expansion of lists" "SECTlistexpand"
.cindex "expansion" "of lists"
-Each list is expanded as a single string before it is used.
+.new
+Each list, after any leading change-of-separator specification
+(see &<<SECTlistsepchange>>&) is expanded as a single string,
.cindex "tainted data" tracking
-&*Note*&: As a result, if any componend was tainted then the
-entire result string becomes tainted.
+&*Note*&: As a result, if any component was tainted then the
+entire expansion result string becomes tainted.
+
+Splitting out a leading explicit change-of-separator permits
+one being safely used on a list that has tainted components
+while still detecting the use of a tainted setting.
+The latter is not permitted.
+.wen
&'Exception: the router headers_remove option, where list-item
splitting is done before string-expansion.'&
where &'x.y'& does not match. It's best to avoid negation altogether in
referenced lists if you can.
+.new
+The list item which references a named list (&"+<listname>"&)
+may not be tainted.
+.wen
+
.cindex "hiding named list values"
.cindex "named lists" "hiding value of"
Some named list definitions may contain sensitive data, for example, passwords for
differ only in their names.
The value for a match will be the primary host name.
+.new
+The pattern may not be tainted.
+.wen
.next
see the &%allow_domain_literals%& main option.
The value for a match will be the string &`@[]`&.
+.new
+The pattern may not be tainted.
+.wen
.next
but a secondary MX target is. &"Primary"& means an MX record with the lowest
preference value &-- there may of course be more than one of them.
+.new
+The pattern may not be tainted.
+.wen
+
The MX lookup that takes place when matching a pattern of this type is
performed with the resolver options for widening names turned off. Thus, for
example, a single-component domain will &'not'& be expanded by adding the
To change Exim's behaviour, the special items &`+include_unknown`& or
&`+ignore_unknown`& may appear in the list (at top level &-- they are
not recognized in an indirected file).
+The effects of these special items do not propagate into referenced
+named lists.
.ilist
If any item that follows &`+include_unknown`& requires information that
lower case. However, although independent matches on the domain alone are still
performed caselessly, regular expressions that match against an entire address
become case-sensitive after &"+caseful"& has been seen.
+The effects of &"+caseful"& propagate into any referenced named lists.
+
+.new
+This string may not be tainted.
+To do caseful matching on list elements whic are tainted,
+place them in a named list.
+.wen
&%caseful_local_part%& is set true in a router, matching in the &%local_parts%&
option is case-sensitive from the start.
+.new
+This string may not be tainted.
+To do caseful matching on list elements whic are tainted,
+place them in a named list.
+.wen
+
If a local part list is indirected to a file (see section &<<SECTfilnamlis>>&),
comments are handled in the same way as address lists &-- they are recognized
only if the # is preceded by white space or the start of the line.
.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 (&<<SECTlistsepchange>>&).
-For each item
-in this list, its value is placed in &$item$&, and then the condition is
-evaluated.
+.new
+<&'string1'&> first has the part after any change-of-list-separator
+(see &<<SECTlistsepchange>>&) expanded,
+then the whole is taken as a list.
+.wen
+The default separator for the list is a colon.
+
+For each item in this list,
+its value is placed in &$item$&, and then the condition is evaluated.
Any modification of &$value$& by this evaluation is discarded.
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
apart from an optional leading minus,
and leading and trailing white space (which is ignored).
-After expansion, <&'string1'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+.new
+The <&'string1'&> argument, after any leading change-of-separator
+(see &<<SECTlistsepchange>>&),
+is expanded and the whole forms the list.
+.wen
+By default, the list separator is a colon.
The first field of the list is numbered one.
If the number is negative, the fields are
.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 (&<<SECTlistsepchange>>&).
-For each item
-in this list, its value is place in &$item$&, and then <&'string2'&> is
+.new
+<&'string1'&> first has the part after any change-of-list-separator
+(see &<<SECTlistsepchange>>&) expanded,
+then the whole is taken as a list.
+.wen
+The default separator for the list is a colon.
+
+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:
.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 (&<<SECTlistsepchange>>&).
+This operation reduces a list to a single, scalar string.
+
+.new
+<&'string1'&> first has the part after any change-of-list-separator
+(see &<<SECTlistsepchange>>&) expanded,
+then the whole is taken as a list.
+.wen
+The default separator for the list is a colon.
+
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
.cindex sorting "a list"
.cindex list sorting
.cindex expansion "list sorting"
-After expansion, <&'string'&> is interpreted as a list, colon-separated by
-default, but the separator can be changed in the usual way (&<<SECTlistsepchange>>&).
+.new
+<&'string'&> first has the part after any change-of-list-separator
+(see &<<SECTlistsepchange>>&) expanded,
+then the whole is taken as a list.
+.wen
+The default separator for the list is a colon.
+
The <&'comparator'&> argument is interpreted as the operator
of a two-argument expansion condition.
The numeric operators plus ge, gt, le, lt (and ~i variants) are supported.
.cindex "list" "item count"
.cindex "list" "count of items"
.cindex "&%listcount%& expansion item"
-The string is interpreted as a list and the number of items is returned.
+The part of the string after any leading change-of-separator is expanded,
+then the whole is interpreted as a list and the number of items is returned.
.vitem &*${listnamed:*&<&'name'&>&*}*&&~and&~&*${listnamed_*&<&'type'&>&*:*&<&'name'&>&*}*&
.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 (&<<SECTlistsepchange>>&).
+These conditions iterate over a list.
+.new
+The first argument, after any leading change-of-separator
+(see &<<SECTlistsepchange>>&),
+is expanded and the whole forms the list.
+.wen
+By default, the list separator is a colon.
+
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$&.
&*inlisti&~{*&<&'subject'&>&*}{*&<&'list'&>&*}*&
.cindex "string" "comparison"
.cindex "list" "iterative conditions"
-Both strings are expanded; the second string is treated as a list of simple
-strings; if the first string is a member of the second, then the condition
-is true.
+The <&'subject'&> string is expanded.
+.new
+The <&'list'&> first has any change-of-list-separator
++(see &<<SECTlistsepchange>>&) retained verbatim,
++then the remainder is expanded.
++.wen
+The whole is treated as a list of simple strings;
+if the subject string is a member of that list, then the condition is true.
For the case-independent &%inlisti%& condition, case is defined per the system C locale.
These are simpler to use versions of the more powerful &*forany*& condition.
Note that <&'string2'&> is not itself subject to string expansion, unless
Exim was built with the EXPAND_LISTMATCH_RHS option.
+.new
+For the latter case, only the part after any leading
+change-of-separator specification is expanded.
+.wen
Consult section &<<SECThoslispatip>>& for further details of these patterns.
.endd
.cindex "&`+caseful`&"
For address lists, the matching starts off caselessly, but the &`+caseful`&
-item can be used, as in all address lists, to cause subsequent items to
-have their local parts matched casefully. Domains are always matched
-caselessly.
+item can be used, as in all address lists, to cause subsequent items
+(including those of referenced named lists)
+to have their local parts matched casefully.
+Domains are always matched caselessly.
The variable &$value$& will be set for a successful match and can be
used in the success clause of an &%if%& expansion item using the condition.
Note that <&'string2'&> is not itself subject to string expansion, unless
Exim was built with the EXPAND_LISTMATCH_RHS option.
+.new
+For the latter case, only the part after any leading
+change-of-separator specification is expanded.
+.wen
&*Note*&: Host lists are &'not'& supported in this way. This is because
hosts have two identities: a name and an IP address, and it is not clear
.vindex ATRN "data for routing"
When an ATRN command is accepted, this variable is filled in with the client
IP and port, for use in a manualroute router.
+
+.vitem &$atrn_mode$&
+.vindex ATRN mode
+.vindex ODMR mode
+When in provider mode this variable will contain &"P"&.
+When in customer mode it will contain &"C"&.
+Otherwise, it will be empty.
.wen
.vitem "&$auth1$& &-- &$auth4$&"
.cindex ATRN "ACL for"
.cindex ATRN advertisement
.cindex "ESMTP extensions" ATRN
+.cindex ODMR provider
This option defines the ACL that is run when an SMTP ATRN command is
received.
If no value is set, or the result after expansion is an empty string,
then the ATRN facility is not advertised.
See chapter &<<CHAPACL>>& for general information on ACLs,
-and section &<<SECTATRN>>& for description of ATRN.
+and section &<<SECTODMRPRDVR>>& for description of ATRN.
.wen
.option acl_smtp_auth main string&!! unset
.options dmarc_forensic_sender main string&!! unset &&&
- dmarc_history_file main string unset &&&
- dmarc_tld_file main string unset
+ dmarc_history_file&!! main string unset &&&
+ dmarc_tld_file main&!! string unset
.cindex DMARC "main section options"
These options control DMARC processing.
See section &<<SECDMARC>>& for details.
.option domains routers&!? "domain list&!!" unset
.cindex "router" "restricting to specific domains"
.vindex "&$domain_data$&"
-If this option is set, the router is skipped unless the current domain matches
-the list.
+If this option is set,
+the argument is first expanded to give a list.
+The router is skipped unless the current domain matches the list.
The data returned by the list check
is placed in &$domain_data$& for use in string
expansions of the driver's private options and in the transport.
+If the result of expansion is empty or a forced-fail,
+the router is skipped.
+
See section &<<SECTrouprecon>>& for
a list of the order in which preconditions are evaluated.
.option local_parts routers&!? "local part list&!!" unset
.cindex "router" "restricting to specific local parts"
.cindex "local part" "checking in router"
+If this option is set, the argument is first expanded to give a list.
The router is run only if the local part of the address matches the list.
+If the result of expansion is empty or a forced-fail,
+the router is skipped.
+
See section &<<SECTrouprecon>>& for a list of the order in which preconditions
are evaluated, and
section &<<SECTlocparlis>>& for a discussion of local part lists. Because the
local_parts = dbm;/usr/local/specials/$domain_data
.endd
.vindex "&$local_part_data$&"
-the data returned by the list check
+The data returned by the list check
for the local part is placed in the variable &$local_part_data$& for use in
expansions of the router's private options or in the transport.
You might use this option, for
.new
-.subsection "The ATRN command" SECTATRN
+.subsection "The ATRN command, and ODMR" SECTODMR
.cindex ATRN processing
.cindex "ESMTP extensions" ATRN
-A second method for intermittently-connecting destinations
-is specified by
+.cindex ODMR provider
+A second method for handling
+On-Demand Message Reception (ODMR)
+for intermittently-connecting destinations is specified by
&url(https://www.rfc-editor.org/rfc/rfc2645.html,RFC 2645).
This describes an ESMTP command called ATRN which requests
-a swap in server/client roles of the communicating endpoints, and delivery
-of queued messages.
+a swap in server/client roles of the communicating SMTP endpoints,
+and delivery of queued messages.
Note that this supports customers having IP addresses that
change frequently.
-Exim supports the &"provider"& side of ATRN, using the terms
-of that specification:
-initially as an SMTP server, then transferring to an SMTP client
+Exim supports both the &"provider"& and &"customer"& sides of ODMR,
+to use the terms of that specification.
+
+. need a sub-subsection here
+.subsection "ODMR provider connection" SECTODMRPRDVR
+
+In the &"provider"& use case Exim is
+initially an SMTP server, then transferring to an SMTP client
role if an ATRN command is accepted.
.oindex "&%acl_smtp_atrn%&"
For example:
.code
begin routers
-odmr_client:
+to_odmr_customer:
driver = manualroute
route_data = <;$atrn_host
- transport = client_smtp
+ transport = call_customer
begin transports
-client_smtp:
+call_customer:
driver = smtp
.endd
Exim does not enforce this, but leaves it up to the configuration;
see chapter &<<CHID9>>&.
+
+.subsection "ODMR customer connection" SECTODMRCUST
+.cindex ODMR customer
+Exim supports the &"customer"& side of ODMR,
+with a command-line option &"-atrn"& that requests a connection
+to a given host, issuance of an ATRN command then operation
+in SMTP server mode.
+The option must be followed by two arguments.
+
+The first is the name or IP of the provider to be contacted.
+
+The second, which may be empty, should be a comma-separated list
+of domains for which mail is to be requested.
+Interpretation of the list is up to the provider;
+an empty list is expected to result in some default being returned.
+
+The provider host is placed in &$domain$& for routing;
+router and transport must be configured suitably to make the connection.
+For example:
+.code
+begin routers
+to_odmr_provider:
+ driver = manualroute
+ condition = ${if eq {$atrn_mode}{C}}
+ route_data = <;$domain
+ transport = call_provider
+
+begin transports
+call_provider:
+ driver = smtp
+ port = odmr
+ hosts_try_auth = *
+ command_timeout = 10m
+.endd
+
+Note that the specification requires a long timeout for the ATRN
+command, to allow for scanning of queued messages.
+
+Configuration should also include client-side authentication
+and processing for receiving messages.
.wen
from a link at &url(https://publicsuffix.org/list/public_suffix_list.dat).
See also the util/renew-opendmarc-tlds.sh script.
The default for the option is unset.
-If not set, DMARC processing is disabled.
+.new
+It is expanded before use.
+If not set (or empty after expansion), DMARC processing is disabled.
+.wen
-The &%dmarc_history_file%& option, if set
+The &%dmarc_history_file%& option
.oindex &%dmarc_history_file%&
defines the location of a file to log results
of dmarc verification on inbound emails. The
reports, and expire the data. Make sure the
directory of this file is writable by the user
exim runs as.
-The default is unset.
+The default for the option is unset.
+.new
+It is expanded before use.
+If not set (or empty after expansion), no history is written.
+.wen
The &%dmarc_forensic_sender%& option
.oindex &%dmarc_forensic_sender%&