X-Git-Url: https://vcs.fsf.org/?p=exim.git;a=blobdiff_plain;f=doc%2Fdoc-docbook%2Fspec.xfpt;h=9bec097b43be6da0943775c655bdfba206ffd11e;hp=7c0a400d29ec142cc17de0dbe0c491ca33cb9cf0;hb=ca0ff207d1a768f65bf5d68e113aea6cf0a3cb1c;hpb=042eb971b8c1af6d257f207d453b30afeed529b8 diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 7c0a400d2..9bec097b4 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -1936,7 +1936,7 @@ in your &_/etc/hosts.allow_& file allows connections from the local host, from the subnet 192.168.1.0/24, and from all hosts in &'friendly.domain.example'&. All other connections are denied. The daemon name used by &'tcpwrappers'& can be changed at build time by setting TCP_WRAPPERS_DAEMON_NAME in -in &_Local/Makefile_&, or by setting tcp_wrappers_daemon_name in the +&_Local/Makefile_&, or by setting tcp_wrappers_daemon_name in the configure file. Consult the &'tcpwrappers'& documentation for further details. @@ -2978,7 +2978,7 @@ way to guarantee a correct response. .oindex "&%-bm%&" .cindex "local message reception" This option runs an Exim receiving process that accepts an incoming, -locally-generated message on the current input. The recipients are given as the +locally-generated message on the standard input. The recipients are given as the command arguments (except when &%-t%& is also present &-- see below). Each argument can be a comma-separated list of RFC 2822 addresses. This is the default option for selecting the overall action of an Exim call; it is assumed @@ -4094,8 +4094,8 @@ message. Provided this error message is successfully sent, the Exim receiving process exits with a return code of zero. If not, the return code is 2 if the problem -is that the original message has no recipients, or 1 any other error. This is -the default &%-oe%&&'x'& option if Exim is called as &'rmail'&. +is that the original message has no recipients, or 1 for any other error. +This is the default &%-oe%&&'x'& option if Exim is called as &'rmail'&. .vitem &%-oem%& .oindex "&%-oem%&" @@ -4515,7 +4515,7 @@ has &'f'& or &'ff'& in its flags, the associated action is taken. .vitem &%-Tqt%&&~<&'times'&> .oindex "&%-Tqt%&" -This an option that is exclusively for use by the Exim testing suite. It is not +This is an option that is exclusively for use by the Exim testing suite. It is not recognized when Exim is run normally. It allows for the setting up of explicit &"queue times"& so that various warning/retry features can be tested. @@ -5369,7 +5369,7 @@ it is unset, Exim uses the &[uname()]& system function to obtain the host name. The first three non-comment configuration lines are as follows: .code -domainlist local_domains = @ +domainlist local_domains = @ domainlist relay_to_domains = hostlist relay_from_hosts = 127.0.0.1 .endd @@ -5711,7 +5711,7 @@ examples described in &<>&. This means that no client can in fact authenticate until you complete the authenticator definitions. .code require message = relay not permitted - domains = +local_domains : +relay_domains + domains = +local_domains : +relay_to_domains .endd This statement rejects the address if its domain is neither a local domain nor one of the domains for which this host is a relay. @@ -7485,7 +7485,7 @@ ${lookup sqlite {/some/thing/sqlitedb \ .endd In a list, the syntax is similar. For example: .code -domainlist relay_domains = sqlite;/some/thing/sqlitedb \ +domainlist relay_to_domains = sqlite;/some/thing/sqlitedb \ select * from relays where ip='$sender_host_address'; .endd The only character affected by the &%quote_sqlite%& operator is a single @@ -7567,13 +7567,13 @@ subject is not in the set. If the end of the list is reached without the subject having matched any of the patterns, it is in the set if the last item was a negative one, but not if it was a positive one. For example, the list in .code -domainlist relay_domains = !a.b.c : *.b.c +domainlist relay_to_domains = !a.b.c : *.b.c .endd matches any domain ending in &'.b.c'& except for &'a.b.c'&. Domains that match neither &'a.b.c'& nor &'*.b.c'& do not match, because the last item in the list is positive. However, if the setting were .code -domainlist relay_domains = !a.b.c +domainlist relay_to_domains = !a.b.c .endd then all domains other than &'a.b.c'& would match because the last item in the list is negative. In other words, a list that ends with a negative item behaves @@ -7677,7 +7677,7 @@ the words &%domainlist%&, &%hostlist%&, &%addresslist%&, or &%localpartlist%&, respectively. Then there follows the name that you are defining, followed by an equals sign and the list itself. For example: .code -hostlist relay_hosts = 192.168.23.0/24 : my.friend.example +hostlist relay_from_hosts = 192.168.23.0/24 : my.friend.example addresslist bad_senders = cdb;/etc/badsenders .endd A named list may refer to other named lists: @@ -8513,7 +8513,7 @@ but the separating colon must still be included at line breaks. White space surrounding the colons is ignored. For example: .code aol.com: spammer1 : spammer2 : ^[0-9]+$ : -spammer3 : spammer4 + spammer3 : spammer4 .endd As in all colon-separated lists in Exim, a colon can be included in an item by doubling. @@ -8758,6 +8758,23 @@ string easier to understand. This item inserts &"basic"& header lines. It is described with the &%header%& expansion item below. + +.vitem "&*${acl{*&<&'name'&>&*}{*&<&'arg'&>&*}...}*&" +.cindex "expansion" "calling an acl" +.cindex "&%acl%&" "call from expansion" +The name and zero to nine argument strings are first expanded separately. The expanded +arguments are assigned to the variables &$acl_arg1$& to &$acl_arg9$& in order. +Any unused are made empty. The variable &$acl_narg$& is set to the number of +arguments. The named ACL (see chapter &<>&) is called +and may use the variables; if another acl expansion is used the values +are overwritten. If the ACL sets +a value using a "message =" modifier and returns accept or deny, the value becomes +the result of the expansion. +If no message was set and the ACL returned accept or deny +the value is an empty string. +If the ACL returned defer the result is a forced-fail. Otherwise the expansion fails. + + .vitem "&*${dlfunc{*&<&'file'&>&*}{*&<&'function'&>&*}{*&<&'arg'&>&*}&&& {*&<&'arg'&>&*}...}*&" .cindex &%dlfunc%& @@ -9388,6 +9405,20 @@ 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. +.vindex "&$run_in_acl$&" +The standard output/error of the command is put in the variable &$value$&. +In this ACL example, the output of a command is logged for the admin to +troubleshoot: +.code +warn condition = ${run{/usr/bin/id}{yes}{no}} + log_message = Output of id: $value +.endd +If the command requires shell idioms, such as the > redirect operator, the +shell must be invoked directly, such as with: +.code +${run{/bin/bash -c "/usr/bin/id >/tmp/id"}{yes}{yes}} +.endd + .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: @@ -9567,6 +9598,7 @@ environments where Exim uses base 36 instead of base 62 for its message identifiers, base-36 digits. The number is converted to decimal and output as a string. + .vitem &*${domain:*&<&'string'&>&*}*& .cindex "domain" "extraction" .cindex "expansion" "domain extraction" @@ -9726,17 +9758,17 @@ See the description of the general &%length%& item above for details. Note that when &%length%& is used as an operator. -.vitem &*${local_part:*&<&'string'&>&*}*& -.cindex "expansion" "local part extraction" -.cindex "&%local_part%& expansion item" -The string is interpreted as an RFC 2822 address and the local part is -extracted from it. If the string does not parse successfully, the result is -empty. +.vitem &*${listcount:*&<&'string'&>&*}*& +.cindex "expansion" "list item count" +.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. -.vitem &*${list:*&<&'name'&>&*}*&&~and&~&*${list_*&<&'type'&>&*name'&>&*}*& +.vitem &*${listnamed:*&<&'name'&>&*}*&&~and&~&*${list_*&<&'type'&>&*name*&>&*}*& .cindex "expansion" "named list" -.cindex "&%list%& expansion item" +.cindex "&%listnamed%& expansion item" The name is interpreted as a named list and the content of the list is returned, expanding any referenced lists, re-quoting as needed for colon-separation. If the optional type if given it must be one of "a", "d", "h" or "l" @@ -9745,12 +9777,12 @@ Otherwise all types are searched in an undefined order and the first matching list is returned. -.vitem &*${nlist:*&<&'string'&>&*}*& -.cindex "expansion" "list item count" -.cindex "list" "item count" -.cindex "list" "count of items" -.cindex "&%nlist%& expansion item" -The string is interpreted as a list and the number of items is returned. +.vitem &*${local_part:*&<&'string'&>&*}*& +.cindex "expansion" "local part extraction" +.cindex "&%local_part%& expansion item" +The string is interpreted as an RFC 2822 address and the local part is +extracted from it. If the string does not parse successfully, the result is +empty. .vitem &*${mask:*&<&'IP&~address'&>&*/*&<&'bit&~count'&>&*}*& @@ -10042,6 +10074,21 @@ In all cases, a relative comparator OP is testing if <&'string1'&> OP 10M, not if 10M is larger than &$message_size$&. +.vitem &*acl&~{{*&<&'name'&>&*}{*&<&'arg1'&>&*}&&& + {*&<&'arg2'&>&*}...}*& +.cindex "expansion" "calling an acl" +.cindex "&%acl%&" "expansion condition" +The name and zero to nine argument strings are first expanded separately. The expanded +arguments are assigned to the variables &$acl_arg1$& to &$acl_arg9$& in order. +Any unused are made empty. The variable &$acl_narg$& is set to the number of +arguments. The named ACL (see chapter &<>&) is called +and may use the variables; if another acl expansion is used the values +are overwritten. If the ACL sets +a value using a "message =" modifier the variable $value becomes +the result of the expansion, otherwise it is empty. +If the ACL returns accept the condition is true; if deny, false. +If the ACL returns defer the result is a forced-fail. + .vitem &*bool&~{*&<&'string'&>&*}*& .cindex "expansion" "boolean parsing" .cindex "&%bool%& expansion condition" @@ -12527,7 +12574,7 @@ local_interfaces = 0.0.0.0 : 127.0.0.1.26 .endd To specify listening on the default port on specific interfaces only: .code -local_interfaces = 192.168.34.67 : 192.168.34.67 +local_interfaces = 10.0.0.67 : 192.168.34.67 .endd &*Warning*&: Such a setting excludes listening on the loopback interfaces. @@ -12824,6 +12871,7 @@ listed in more than one group. .section "TLS" "SECID108" .table2 .row &%gnutls_compat_mode%& "use GnuTLS compatibility mode" +.row &%gnutls_enable_pkcs11%& "allow GnuTLS to autoload PKCS11 modules" .row &%openssl_options%& "adjust OpenSSL compatibility options" .row &%tls_advertise_hosts%& "advertise TLS to these hosts" .row &%tls_certificate%& "location of server certificate" @@ -12973,9 +13021,7 @@ See also the &'Policy controls'& section above. .row &%dns_ipv4_lookup%& "only v4 lookup for these domains" .row &%dns_retrans%& "parameter for resolver" .row &%dns_retry%& "parameter for resolver" -.new .row &%dns_use_dnssec%& "parameter for resolver" -.wen .row &%dns_use_edns0%& "parameter for resolver" .row &%hold_domains%& "hold delivery for these domains" .row &%local_interfaces%& "for routing checks" @@ -13852,6 +13898,19 @@ This option controls whether GnuTLS is used in compatibility mode in an Exim server. This reduces security slightly, but improves interworking with older implementations of TLS. + +.new +option gnutls_enable_pkcs11 main boolean unset +This option will let GnuTLS (2.12.0 or later) autoload PKCS11 modules with +the p11-kit configuration files in &_/etc/pkcs11/modules/_&. + +See +&url(http://www.gnu.org/software/gnutls/manual/gnutls.html#Smart-cards-and-HSMs) +for documentation. +.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 @@ -15187,7 +15246,7 @@ live with. . Allow this long option name to split; give it unsplit as a fifth argument . for the automatic .oindex that is generated by .option. -.option "smtp_accept_max_per_ &~&~connection" main integer 1000 &&& +.option "smtp_accept_max_per_connection" main integer 1000 &&& smtp_accept_max_per_connection .cindex "SMTP" "limiting incoming message count" .cindex "limit" "messages per SMTP connection" @@ -16284,7 +16343,7 @@ router is skipped, and the address is offered to the next one. If the result is any other value, the router is run (as this is the last precondition to be evaluated, all the other preconditions must be true). -This option is unique in that multiple &%condition%& options may be present. +This option is unusual in that multiple &%condition%& options may be present. All &%condition%& options must succeed. The &%condition%& option provides a means of applying custom conditions to the @@ -16483,6 +16542,9 @@ The &%headers_add%& option is expanded after &%errors_to%&, but before the expansion is forced to fail, the option has no effect. Other expansion failures are treated as configuration errors. +Unlike most options, &%headers_add%& can be specified multiple times +for a router; all listed headers are added. + &*Warning 1*&: The &%headers_add%& option cannot be used for a &(redirect)& router that has the &%one_time%& option set. @@ -16516,6 +16578,9 @@ The &%headers_remove%& option is expanded after &%errors_to%& and the option has no effect. Other expansion failures are treated as configuration errors. +Unlike most options, &%headers_remove%& can be specified multiple times +for a router; all listed headers are removed. + &*Warning 1*&: The &%headers_remove%& option cannot be used for a &(redirect)& router that has the &%one_time%& option set. @@ -19519,6 +19584,9 @@ routers. If the result of the expansion is an empty string, or if the expansion is forced to fail, no action is taken. Other expansion failures are treated as errors and cause the delivery to be deferred. +Unlike most options, &%headers_add%& can be specified multiple times +for a transport; all listed headers are added. + .option headers_only transports boolean false @@ -19541,6 +19609,9 @@ routers. If the result of the expansion is an empty string, or if the expansion is forced to fail, no action is taken. Other expansion failures are treated as errors and cause the delivery to be deferred. +Unlike most options, &%headers_remove%& can be specified multiple times +for a router; all listed headers are added. + .option headers_rewrite transports string unset @@ -19845,7 +19916,7 @@ message, which happens if the &%return_message%& option is set. .option transport_filter_timeout transports time 5m .cindex "transport" "filter, timeout" -When Exim is reading the output of a transport filter, it a applies a timeout +When Exim is reading the output of a transport filter, it 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 &(pipe)& transport, a timeout in the transport filter is treated in the same @@ -25805,6 +25876,8 @@ install if the receiving end is a client MUA that can interact with a user. .cindex "certificate" "self-signed" You can create a self-signed certificate using the &'req'& command provided with OpenSSL, like this: +. ==== Do not shorten the duration here without reading and considering +. ==== the text below. Please leave it at 9999 days. .code openssl req -x509 -newkey rsa:1024 -keyout file1 -out file2 \ -days 9999 -nodes @@ -25817,6 +25890,22 @@ that you are prompted for, and any use that is made of the key causes more prompting for the passphrase. This is not helpful if you are going to use this certificate and key in an MTA, where prompting is not possible. +. ==== I expect to still be working 26 years from now. The less technical +. ==== debt I create, in terms of storing up trouble for my later years, the +. ==== happier I will be then. We really have reached the point where we +. ==== should start, at the very least, provoking thought and making folks +. ==== pause before proceeding, instead of leaving all the fixes until two +. ==== years before 2^31 seconds after the 1970 Unix epoch. +. ==== -pdp, 2012 +NB: we are now past the point where 9999 days takes us past the 32-bit Unix +epoch. If your system uses unsigned time_t (most do) and is 32-bit, then +the above command might produce a date in the past. Think carefully about +the lifetime of the systems you're deploying, and either reduce the duration +of the certificate or reconsider your platform deployment. (At time of +writing, reducing the duration is the most likely choice, but the inexorable +progression of time takes us steadily towards an era where this will not +be a sensible resolution). + A self-signed certificate made in this way is sufficient for testing, and may be adequate for all your requirements if you are mainly interested in encrypting transfers, and not in secure identification. @@ -26061,7 +26150,7 @@ connection is closed. In these special cases, the QUIT ACL does not run. .section "The not-QUIT ACL" "SECTNOTQUITACL" .vindex &$acl_smtp_notquit$& The not-QUIT ACL, specified by &%acl_smtp_notquit%&, is run in most cases when -an SMTP session ends without sending QUIT. However, when Exim itself is is bad +an SMTP session ends without sending QUIT. However, when Exim itself is in bad trouble, such as being unable to write to its log files, this ACL is not run, because it might try to do things (such as write to log files) that make the situation even worse. @@ -26415,8 +26504,8 @@ duplicates to be written, use the &%logwrite%& modifier instead. If &%log_message%& is not present, a &%warn%& verb just checks its conditions and obeys any &"immediate"& modifiers (such as &%control%&, &%set%&, -&%logwrite%&, and &%add_header%&) that appear before the first failing -condition. There is more about adding header lines in section +&%logwrite%&, &%add_header%&, and &%remove_header%&) that appear before the +first failing condition. There is more about adding header lines in section &<>&. If any condition on a &%warn%& statement cannot be completed (that is, there is @@ -26534,7 +26623,7 @@ others specify text for messages that are used when access is denied or a warning is generated. The &%control%& modifier affects the way an incoming message is handled. -The positioning of the modifiers in an ACL statement important, because the +The positioning of the modifiers in an ACL statement is important, because the processing of a verb ceases as soon as its outcome is known. Only those modifiers that have already been encountered will take effect. For example, consider this use of the &%message%& modifier: @@ -26655,12 +26744,12 @@ If you want to apply a control unconditionally, you can use it with a .vitem &*delay*&&~=&~<&'time'&> .cindex "&%delay%& ACL modifier" .oindex "&%-bh%&" -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. +This modifier may appear in any ACL except notquit. 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. Like &%control%&, &%delay%& can be used with &%accept%& or &%deny%&, for example: @@ -26858,6 +26947,12 @@ all the conditions are true, wherever it appears in an ACL command, whereas effect. +.vitem &*remove_header*&&~=&~<&'text'&> +This modifier specifies one or more header names in a colon-separated list + that are to be removed from an incoming message, assuming, of course, that +the message is ultimately accepted. For details, see section &<>&. + + .vitem &*set*&&~<&'acl_name'&>&~=&~<&'value'&> .cindex "&%set%& ACL modifier" This modifier puts a value into one of the ACL variables (see section @@ -26946,24 +27041,6 @@ sender when the destination system is doing content-scan based rejection. .new -.vitem &*control&~=&~dscp/*&<&'value'&> -.cindex "&ACL;" "setting DSCP value" -.cindex "DSCP" "inbound" -This option causes the DSCP value associated with the socket for the inbound -connection to be adjusted to a given value, given as one of a number of fixed -strings or to numeric value. -The &%-bI:dscp%& option may be used to ask Exim which names it knows of. -Common values include &`throughput`&, &`mincost`&, and on newer systems -&`ef`&, &`af41`&, etc. Numeric values may be in the range 0 to 0x3F. - -The outbound packets from Exim will be marked with this value in the header -(for IPv4, the TOS field; for IPv6, the TCLASS field); there is no guarantee -that these values will have any effect, not be stripped by networking -equipment, or do much of anything without cooperation with your Network -Engineer and those of all network operators between the source and destination. -.wen - - .vitem &*control&~=&~debug/*&<&'options'&> .cindex "&ACL;" "enabling debug logging" .cindex "debugging" "enabling from an ACL" @@ -26980,6 +27057,35 @@ contexts): control = debug/opts=+expand+acl control = debug/tag=.$message_exim_id/opts=+expand .endd +.wen + + +.new +.vitem &*control&~=&~dkim_disable_verify*& +.cindex "disable DKIM verify" +.cindex "DKIM" "disable verify" +This control turns off DKIM verification processing entirely. For details on +the operation and configuration of DKIM, see chapter &<>&. +.wen + + +.new +.vitem &*control&~=&~dscp/*&<&'value'&> +.cindex "&ACL;" "setting DSCP value" +.cindex "DSCP" "inbound" +This option causes the DSCP value associated with the socket for the inbound +connection to be adjusted to a given value, given as one of a number of fixed +strings or to numeric value. +The &%-bI:dscp%& option may be used to ask Exim which names it knows of. +Common values include &`throughput`&, &`mincost`&, and on newer systems +&`ef`&, &`af41`&, etc. Numeric values may be in the range 0 to 0x3F. + +The outbound packets from Exim will be marked with this value in the header +(for IPv4, the TOS field; for IPv6, the TCLASS field); there is no guarantee +that these values will have any effect, not be stripped by networking +equipment, or do much of anything without cooperation with your Network +Engineer and those of all network operators between the source and destination. +.wen .vitem &*control&~=&~enforce_sync*& &&& @@ -27172,7 +27278,7 @@ Remotely submitted, fixups applied: use &`control = submission`&. .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 "&%add_header%& 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 @@ -27214,7 +27320,7 @@ passing data between (for example) the MAIL and RCPT ACLs. If you want to do this, you can use ACL variables, as described in section &<>&. -The &%add_header%& modifier acts immediately it is encountered during the +The &%add_header%& modifier acts immediately as it is encountered during the processing of an ACL. Notice the difference between these two cases: .display &`accept add_header = ADDED: some text`& @@ -27263,10 +27369,81 @@ system filter or in a router or transport. +.section "Removing header lines in ACLs" "SECTremoveheadacl" +.cindex "header lines" "removing in an ACL" +.cindex "header lines" "position of removed lines" +.cindex "&%remove_header%& ACL modifier" +The &%remove_header%& modifier can be used to remove one or more header lines +from an incoming message, as in this example: +.code +warn message = Remove internal headers + remove_header = x-route-mail1 : x-route-mail2 +.endd +The &%remove_header%& modifier is permitted in the MAIL, RCPT, PREDATA, DATA, +MIME, and non-SMTP ACLs (in other words, those that are concerned with +receiving a message). The message must ultimately be accepted for +&%remove_header%& to have any significant effect. You can use &%remove_header%& +with any ACL verb, including &%deny%&, though this is really not useful for +any verb that doesn't result in a delivered message. + +More than one header can be removed at the same time by using a colon separated +list of header names. The header matching is case insensitive. Wildcards are +not permitted, nor is list expansion performed, so you cannot use hostlists to +create a list of headers, however both connection and message variable expansion +are performed (&%$acl_c_*%& and &%$acl_m_*%&), illustrated in this example: +.code +warn hosts = +internal_hosts + set acl_c_ihdrs = x-route-mail1 : x-route-mail2 +warn message = Remove internal headers + remove_header = $acl_c_ihdrs +.endd +Removed header lines are accumulated during the MAIL, RCPT, and predata ACLs. +They are removed from the message before processing the DATA and MIME ACLs. +There is no harm in attempting to remove the same header twice nor is removing +a non-existent header. Further header lines to be removed may be accumulated +during the DATA and MIME ACLs, after which they are removed from the message, +if present. In the case of non-SMTP messages, headers to be removed are +accumulated during the non-SMTP ACLs, and are removed from the message after +all the ACLs have run. If a message is rejected after DATA or by the non-SMTP +ACL, there really is no effect because there is no logging of what headers +would have been removed. + +.cindex "header lines" "removed; visibility of" +Header lines are not visible in string expansions until the DATA phase when it +is received. Any header lines removed in the MAIL, RCPT, and predata ACLs are +not visible in the DATA ACL and MIME ACLs. Similarly, header lines that are +removed by the DATA or MIME ACLs are still visible in those ACLs. Because of +this restriction, you cannot use header lines as a way of controlling data +passed between (for example) the MAIL and RCPT ACLs. If you want to do this, +you should instead use ACL variables, as described in section +&<>&. + +The &%remove_header%& modifier acts immediately as it is encountered during the +processing of an ACL. Notice the difference between these two cases: +.display +&`accept remove_header = X-Internal`& +&` `&<&'some condition'&> + +&`accept `&<&'some condition'&> +&` remove_header = X-Internal`& +.endd +In the first case, the header line is always removed, whether or not the +condition is true. In the second case, the header line is removed only if the +condition is true. Multiple occurrences of &%remove_header%& may occur in the +same ACL statement. All those that are encountered before a condition fails +are honoured. + +&*Warning*&: This facility currently applies only to header lines that are +present during ACL processing. It does NOT remove header lines that are added +in a system filter or in a router or transport. + + + + .section "ACL conditions" "SECTaclconditions" .cindex "&ACL;" "conditions; list of" -Some of conditions listed in this section are available only when Exim is +Some of the conditions listed in this section are available only when Exim is compiled with the content-scanning extension. They are included here briefly for completeness. More detailed descriptions can be found in the discussion on content scanning in chapter &<>&. @@ -27284,6 +27461,7 @@ The conditions are as follows: .vitem &*acl&~=&~*&<&'name&~of&~acl&~or&~ACL&~string&~or&~file&~name&~'&> .cindex "&ACL;" "nested" .cindex "&ACL;" "indirect" +.cindex "&ACL;" "arguments" .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 @@ -27293,6 +27471,10 @@ condition is on a &%warn%& verb. In that case, a &"defer"& return makes the condition false. This means that further processing of the &%warn%& verb ceases, but processing of the ACL continues. +If the argument is a named ACL, up to nine space-separated optional values +can be appended; they appear in $acl_arg1 to $acl_arg9, and $acl_narg is set +to the count of values. The name and values are expanded separately. + If the nested &%acl%& returns &"drop"& and the outer condition denies access, the connection is dropped. If it returns &"discard"&, the verb must be &%accept%& or &%discard%&, and the action is taken immediately &-- no further @@ -28041,7 +28223,7 @@ dnslists = a.b.c!&0.0.0.1 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 +If &`!==`& or &`!=&&`& is used, the condition is true if there is at least one looked up IP address that does not match. Consider: .code dnslists = a.b.c!=&0.0.0.1 @@ -29051,16 +29233,16 @@ Suppose your LAN is 192.168.45.0/24. In the main part of the configuration, you put the following definitions: .code -domainlist local_domains = my.dom1.example : my.dom2.example -domainlist relay_domains = friend1.example : friend2.example -hostlist relay_hosts = 192.168.45.0/24 +domainlist local_domains = my.dom1.example : my.dom2.example +domainlist relay_to_domains = friend1.example : friend2.example +hostlist relay_from_hosts = 192.168.45.0/24 .endd Now you can use these definitions in the ACL that is run for every RCPT command: .code acl_check_rcpt: - accept domains = +local_domains : +relay_domains - accept hosts = +relay_hosts + accept domains = +local_domains : +relay_to_domains + accept hosts = +relay_from_hosts .endd The first statement accepts any RCPT command that contains an address in the local or relay domains. For any other domain, control passes to the second @@ -31427,6 +31609,10 @@ headers_add = X-added-header: added by $primary_hostname\n\ .endd Exim does not check the syntax of these added header lines. +Multiple &%headers_add%& options for a single router or transport can be +specified; the values will be concatenated (with a separating newline +added) before expansion. + The result of expanding &%headers_remove%& must consist of a colon-separated list of header names. This is confusing, because header names themselves are often terminated by colons. In this case, the colons are the list separators, @@ -31434,6 +31620,11 @@ not part of the names. For example: .code headers_remove = return-receipt-to:acknowledge-to .endd + +Multiple &%headers_remove%& options for a single router or transport can be +specified; the values will be concatenated (with a separating colon +added) before expansion. + When &%headers_add%& or &%headers_remove%& is specified on a router, its value is expanded at routing time, and then associated with all addresses that are accepted by that router, and also with any new addresses that it generates. If @@ -33616,7 +33807,7 @@ selection marked by asterisks: &`*sender_verify_fail `& sender verification failures &`*size_reject `& rejection because too big &`*skip_delivery `& delivery skipped in a queue run -&` smtp_confirmation `& SMTP confirmation on => lines +&`*smtp_confirmation `& SMTP confirmation on => lines &` smtp_connection `& SMTP connections &` smtp_incomplete_transaction`& incomplete SMTP transactions &` smtp_no_mail `& session with no MAIL commands @@ -35989,7 +36180,7 @@ warn log_message = GMail sender without DKIM signature .vitem &%dkim_status%& ACL condition that checks a colon-separated list of possible DKIM verification -results agains the actual result of verification. This is typically used +results against the actual result of verification. This is typically used to restrict an ACL verb to a list of verification outcomes, for example: .code