Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a4080654d049ad31b216b761b9173c1f > files > 116

exim-doc-4.69-4mdv2010.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 10 2009 by texi2html 1.78 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>

-->
<head>
<title>Specification of the Exim Mail Transfer Agent: 15. Generic options for routers</title>

<meta name="description" content="Specification of the Exim Mail Transfer Agent: 15. Generic options for routers">
<meta name="keywords" content="Specification of the Exim Mail Transfer Agent: 15. Generic options for routers">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.78">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Generic-options-for-routers"></a>
<a name="SEC186"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_14.html#SEC185" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_16.html#SEC187" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec_14.html#SEC162" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_16.html#SEC187" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 15. Generic options for routers </h1>

<p>This chapter describes the generic options that apply to all routers.
Those that are preconditions are marked with ** in the &quot;use&quot; field.
</p>
<p>For a general description of how a router operates, see sections
<a href="spec_3.html#SEC23">Running an individual router</a> and <a href="spec_3.html#SEC25">Router preconditions</a>. The latter specifies the order in
which the preconditions are tested. The order of expansion of the options that
provide data for a transport is: <code>errors_to</code>, <code>headers_add</code>,
<code>headers_remove</code>, <code>transport</code>.
</p>
<a name="IDX1636"></a>

<table>
<tr><td>
<p><code>address_data</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1637"></a>
<p>The string is expanded just before the router is run, that is, after all the
precondition tests have succeeded. If the expansion is forced to fail, the
router declines, the value of <code>address_data</code> remains unchanged, and the
<code>more</code> option controls what happens next. Other expansion failures cause
delivery of the address to be deferred.
</p>
<a name="IDX1638"></a>
<p>When the expansion succeeds, the value is retained with the address, and can be
accessed using the variable <code>$address_data</code> in the current router, subsequent
routers, and the eventual transport.
</p>
<p><strong>Warning</strong>: If the current or any subsequent router is a <code>redirect</code> router
that runs a user's filter file, the contents of <code>$address_data</code> are accessible
in the filter. This is not normally a problem, because such data is usually
either not confidential or it &quot;belongs&quot; to the current user, but if you do
put confidential data into <code>$address_data</code> you need to remember this point.
</p>
<p>Even if the router declines or passes, the value of <code>$address_data</code> remains
with the address, though it can be changed by another <code>address_data</code> setting
on a subsequent router. If a router generates child addresses, the value of
<code>$address_data</code> propagates to them. This also applies to the special kind of
&quot;child&quot; that is generated by a router with the <code>unseen</code> option.
</p>
<p>The idea of <code>address_data</code> is that you can use it to look up a lot of data
for the address once, and then pick out parts of the data later. For example,
you could use a single LDAP lookup to return a string of the form
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">uid=1234 gid=5678 mailbox=/mail/xyz forward=/home/xyz/.forward
</pre></td></tr></table>

<p>In the transport you could pick out the mailbox by a setting such as
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">file = ${extract{mailbox}{$address_data}}
</pre></td></tr></table>

<p>This makes the configuration file less messy, and also reduces the number of
lookups (though Exim does cache lookups).
</p>
<a name="IDX1639"></a>
<a name="IDX1640"></a>
<p>The <code>address_data</code> 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
<code>$address_data</code> 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 <code>$sender_address_data</code>.
</p>
<a name="IDX1641"></a>

<table>
<tr><td>
<p><code>address_test</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<a name="IDX1642"></a>
<a name="IDX1643"></a>
<p>If this option is set false, the router is skipped when routing is being tested
by means of the <code>-bt</code> command line option. This can be a convenience when
your first router sends messages to an external scanner, because it saves you
having to set the &quot;already scanned&quot; indicator when testing real address
routing.
</p>
<a name="IDX1644"></a>

<table>
<tr><td>
<p><code>cannot_route_message</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1645"></a>
<a name="IDX1646"></a>
<p>This option specifies a text message that is used when an address cannot be
routed because Exim has run out of routers. The default message is
&quot;Unrouteable address&quot;. This option is useful only on routers that have
<code>more</code> set false, or on the very last router in a configuration, because the
value that is used is taken from the last router that is considered. This
includes a router that is skipped because its preconditions are not met, as
well as a router that declines. For example, using the default configuration,
you could put:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">cannot_route_message = Remote domain not found in DNS
</pre></td></tr></table>

<p>on the first router, which is a <code>dnslookup</code> router with <code>more</code> set false,
and
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">cannot_route_message = Unknown local user
</pre></td></tr></table>

<p>on the final router that checks for local users. If string expansion fails for
this option, the default message is used. Unless the expansion failure was
explicitly forced, a message about the failure is written to the main and panic
logs, in addition to the normal message about the routing failure.
</p>
<a name="IDX1647"></a>

<table>
<tr><td>
<p><code>caseful_local_part</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1648"></a>
<a name="IDX1649"></a>
<p>By default, routers handle the local parts of addresses in a case-insensitive
manner, though the actual case is preserved for transmission with the message.
If you want the case of letters to be significant in a router, you must set
this option true. For individual router options that contain address or local
part lists (for example, <code>local_parts</code>), case-sensitive matching can be
turned on by &quot;+caseful&quot; as a list item. See section <a href="spec_10.html#SEC135">Case of letters in address lists</a> for
more details.
</p>
<a name="IDX1650"></a>
<a name="IDX1651"></a>
<a name="IDX1652"></a>
<p>The value of the <code>$local_part</code> variable is forced to lower case while a
router is running unless <code>caseful_local_part</code> is set. When a router assigns
an address to a transport, the value of <code>$local_part</code> when the transport runs
is the same as it was in the router. Similarly, when a router generates child
addresses by aliasing or forwarding, the values of <code>$original_local_part</code>
and <code>$parent_local_part</code> are those that were used by the redirecting router.
</p>
<p>This option applies to the processing of an address by a router. When a
recipient address is being processed in an ACL, there is a separate <code>control</code>
modifier that can be used to specify case-sensitive processing within the ACL
(see section <a href="spec_40.html#SEC328">Use of the control modifier</a>).
</p>
<a name="IDX1653"></a>

<table>
<tr><td>
<p><code>check_local_user</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1654"></a>
<a name="IDX1655"></a>
<a name="IDX1656"></a>
<a name="IDX1657"></a>
<p>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 <code>getpwnam()</code> function rather
than trying to read &lsquo;<tt>/etc/passwd</tt>&rsquo; directly. This means that other methods of
holding password data (such as NIS) are supported. If the local part is a local
user, <code>$home</code> is set from the password data, and can be tested in other
preconditions that are evaluated after this one (the order of evaluation is
given in section <a href="spec_3.html#SEC25">Router preconditions</a>). However, the value of <code>$home</code> can be
overridden by <code>router_home_directory</code>. If the local part is not a local user,
the router is skipped.
</p>
<p>If you want to check that the local part is either the name of a local user
or matches something else, you cannot combine <code>check_local_user</code> with a
setting of <code>local_parts</code>, because that specifies the logical <em>and</em> of the
two conditions. However, you can use a <code>passwd</code> lookup in a <code>local_parts</code>
setting to achieve this. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">local_parts = passwd;$local_part : lsearch;/etc/other/users
</pre></td></tr></table>

<p>Note, however, that the side effects of <code>check_local_user</code> (such as setting
up a home directory) do not occur when a <code>passwd</code> lookup is used in a
<code>local_parts</code> (or any other) precondition.
</p>
<a name="IDX1658"></a>

<table>
<tr><td>
<p><code>condition</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1659"></a>
<p>This option specifies a general precondition test that has to succeed for the
router to be called. The <code>condition</code> option is the last precondition to be
evaluated (see section <a href="spec_3.html#SEC25">Router preconditions</a>). The string is expanded, and if the
result is a forced failure, or an empty string, or one of the strings &quot;0&quot; or
&quot;no&quot; or &quot;false&quot; (checked without regard to the case of the letters), the
router is skipped, and the address is offered to the next one.
</p>
<p>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).
</p>
<p>The <code>condition</code> option provides a means of applying custom conditions to the
running of routers. Note that in the case of a simple conditional expansion,
the default expansion values are exactly what is wanted. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">condition = ${if &gt;{$message_age}{600}}
</pre></td></tr></table>

<p>Because of the default behaviour of the string expansion, this is equivalent to
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">condition = ${if &gt;{$message_age}{600}{true}{}}
</pre></td></tr></table>

<p>If the expansion fails (other than forced failure) delivery is deferred. Some
of the other precondition options are common special cases that could in fact
be specified using <code>condition</code>.
</p>
<a name="IDX1660"></a>

<table>
<tr><td>
<p><code>debug_print</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1661"></a>
<p>If this option is set and debugging is enabled (see the <code>-d</code> command line
option), the string is expanded and included in the debugging output.
If expansion of the string fails, the error message is written to the debugging
output, and Exim carries on processing.
This option is provided to help with checking out the values of variables and
so on when debugging router configurations. For example, if a <code>condition</code>
option appears not to be working, <code>debug_print</code> can be used to output the
variables it references. The output happens after checks for <code>domains</code>,
<code>local_parts</code>, and <code>check_local_user</code> but before any other preconditions
are tested. A newline is added to the text if it does not end with one.
</p>
<a name="IDX1662"></a>

<table>
<tr><td>
<p><code>disable_logging</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<p>If this option is set true, nothing is logged for any routing errors
or for any deliveries caused by this router. You should not set this option
unless you really, really know what you are doing. See also the generic
transport option of the same name.
</p>
<a name="IDX1663"></a>

<table>
<tr><td>
<p><code>domains</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>domain list</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1664"></a>
<a name="IDX1665"></a>
<p>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 <code>$domain_data</code> for use in string
expansions of the driver's private options. See section <a href="spec_3.html#SEC25">Router preconditions</a> for
a list of the order in which preconditions are evaluated.
</p>
<a name="IDX1666"></a>

<table>
<tr><td>
<p><code>driver</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<p>This option must always be set. It specifies which of the available routers is
to be used.
</p>
<a name="IDX1667"></a>

<table>
<tr><td>
<p><code>errors_to</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1668"></a>
<a name="IDX1669"></a>
<p>If a router successfully handles an address, it may assign the address to a
transport for delivery or it may generate child addresses. In both cases, if
there is a delivery problem during later processing, the resulting bounce
message is sent to the address that results from expanding this string,
provided that the address verifies successfully. The <code>errors_to</code> option is
expanded before <code>headers_add</code>, <code>headers_remove</code>, and <code>transport</code>.
</p>
<p>The <code>errors_to</code> setting associated with an address can be overridden if it
subsequently passes through other routers that have their own <code>errors_to</code>
settings, or if the message is delivered by a transport with a <code>return_path</code>
setting.
</p>
<p>If <code>errors_to</code> is unset, or the expansion is forced to fail, or the result of
the expansion fails to verify, the errors address associated with the incoming
address is used. At top level, this is the envelope sender. A non-forced
expansion failure causes delivery to be deferred.
</p>
<p>If an address for which <code>errors_to</code> has been set ends up being delivered over
SMTP, the envelope sender for that delivery is the <code>errors_to</code> value, so that
any bounces that are generated by other MTAs on the delivery route are also
sent there. You can set <code>errors_to</code> to the empty string by either of these
settings:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">errors_to =
errors_to = &quot;&quot;
</pre></td></tr></table>

<p>An expansion item that yields an empty string has the same effect. If you do
this, a locally detected delivery error for addresses processed by this router
no longer gives rise to a bounce message; the error is discarded. If the
address is delivered to a remote host, the return path is set to &lsquo;<samp>&lt;&gt;</samp>&rsquo;, unless
overridden by the <code>return_path</code> option on the transport.
</p>
<a name="IDX1670"></a>
<p>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 <code>$address_data</code> in the router, and reinstate it in the transport by
setting <code>return_path</code>.
</p>
<p>The most common use of <code>errors_to</code> is to direct mailing list bounces to the
manager of the list, as described in section <a href="spec_47.html#SEC422">Using Exim to handle mailing lists</a>, or to
implement VERP (Variable Envelope Return Paths) (see section <a href="spec_47.html#SEC426">Variable Envelope Return Paths (VERP)</a>).
</p>
<a name="IDX1671"></a>

<table>
<tr><td>
<p><code>expn</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<a name="IDX1672"></a>
<a name="IDX1673"></a>
<a name="IDX1674"></a>
<a name="IDX1675"></a>
<p>If this option is turned off, the router is skipped when testing an address
as a result of processing an SMTP EXPN command. You might, for example,
want to turn it off on a router for users' &lsquo;<tt>.forward</tt>&rsquo; files, while leaving it
on for the system alias file.
See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated.
</p>
<p>The use of the SMTP EXPN command is controlled by an ACL (see chapter
<a href="spec_40.html#SEC308">Access control lists</a>). When Exim is running an EXPN command, it is similar to testing
an address with <code>-bt</code>. Compare VRFY, whose counterpart is <code>-bv</code>.
</p>
<a name="IDX1676"></a>

<table>
<tr><td>
<p><code>fail_verify</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1677"></a>
<p>Setting this option has the effect of setting both <code>fail_verify_sender</code> and
<code>fail_verify_recipient</code> to the same value.
</p>
<a name="IDX1678"></a>

<table>
<tr><td>
<p><code>fail_verify_recipient</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<p>If this option is true and an address is accepted by this router when
verifying a recipient, verification fails.
</p>
<a name="IDX1679"></a>

<table>
<tr><td>
<p><code>fail_verify_sender</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<p>If this option is true and an address is accepted by this router when
verifying a sender, verification fails.
</p>
<a name="IDX1680"></a>

<table>
<tr><td>
<p><code>fallback_hosts</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string list</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1681"></a>
<a name="IDX1682"></a>
<p>String expansion is not applied to this option. The argument must be a
colon-separated list of host names or IP addresses. The list separator can be
changed (see section <a href="spec_6.html#SEC75">List construction</a>), and a port can be specified with
each name or address. In fact, the format of each item is exactly the same as
defined for the list of hosts in a <code>manualroute</code> router (see section
<a href="spec_20.html#SEC199">Format of one host item</a>).
</p>
<p>If a router queues an address for a remote transport, this host list is
associated with the address, and used instead of the transport's fallback host
list. If <code>hosts_randomize</code> is set on the transport, the order of the list is
randomized for each use. See the <code>fallback_hosts</code> option of the <code>smtp</code>
transport for further details.
</p>
<a name="IDX1683"></a>

<table>
<tr><td>
<p><code>group</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>see below</em>
</p></td></tr>
</table>

<a name="IDX1684"></a>
<a name="IDX1685"></a>
<a name="IDX1686"></a>
<a name="IDX1687"></a>
<p>When a router queues an address for a transport, and the transport does not
specify a group, the group given here is used when running the delivery
process.
The group may be specified numerically or by name. If expansion fails, the
error is logged and delivery is deferred.
The default is unset, unless <code>check_local_user</code> is set, when the default
is taken from the password information. See also <code>initgroups</code> and <code>user</code>
and the discussion in chapter <a href="spec_23.html#SEC215">Environment for running local transports</a>.
</p>
<a name="IDX1688"></a>

<table>
<tr><td>
<p><code>headers_add</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1689"></a>
<a name="IDX1690"></a>
<p>This option specifies a string of text that is expanded at routing time, and
associated with any addresses that are accepted by the router. However, this
option has no effect when an address is just being verified. The way in which
the text is used to add header lines at transport time is described in section
<a href="spec_44.html#SEC400">Adding and removing header lines in routers and transports</a>. New header lines are not actually added until the
message is in the process of being transported. This means that references to
header lines in string expansions in the transport's configuration do not
&quot;see&quot; the added header lines.
</p>
<p>The <code>headers_add</code> option is expanded after <code>errors_to</code>, but before
<code>headers_remove</code> and <code>transport</code>. If the expanded string is empty, or if
the expansion is forced to fail, the option has no effect. Other expansion
failures are treated as configuration errors.
</p>
<p><strong>Warning 1</strong>: The <code>headers_add</code> option cannot be used for a <code>redirect</code>
router that has the <code>one_time</code> option set.
</p>
<a name="IDX1691"></a>
<a name="IDX1692"></a>
<p><strong>Warning 2</strong>: If the <code>unseen</code> option is set on the router, all header
additions are deleted when the address is passed on to subsequent routers.
For a <code>redirect</code> router, if a generated address is the same as the incoming
address, this can lead to duplicate addresses with different header
modifications. Exim does not do duplicate deliveries (except, in certain
circumstances, to pipes &ndash; see section <a href="spec_22.html#SEC211">Duplicate addresses</a>), but it is undefined
which of the duplicates is discarded, so this ambiguous situation should be
avoided. The <code>repeat_use</code> option of the <code>redirect</code> router may be of help.
</p>
<a name="IDX1693"></a>

<table>
<tr><td>
<p><code>headers_remove</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1694"></a>
<a name="IDX1695"></a>
<p>This option specifies a string of text that is expanded at routing time, and
associated with any addresses that are accepted by the router. However, this
option has no effect when an address is just being verified. The way in which
the text is used to remove header lines at transport time is described in
section <a href="spec_44.html#SEC400">Adding and removing header lines in routers and transports</a>. Header lines are not actually removed until
the message is in the process of being transported. This means that references
to header lines in string expansions in the transport's configuration still
&quot;see&quot; the original header lines.
</p>
<p>The <code>headers_remove</code> option is expanded after <code>errors_to</code> and
<code>headers_add</code>, but before <code>transport</code>. If the expansion is forced to fail,
the option has no effect. Other expansion failures are treated as configuration
errors.
</p>
<p><strong>Warning 1</strong>: The <code>headers_remove</code> option cannot be used for a <code>redirect</code>
router that has the <code>one_time</code> option set.
</p>
<p><strong>Warning 2</strong>: If the <code>unseen</code> option is set on the router, all header
removal requests are deleted when the address is passed on to subsequent
routers, and this can lead to problems with duplicates &ndash; see the similar
warning for <code>headers_add</code> above.
</p>
<a name="IDX1696"></a>

<table>
<tr><td>
<p><code>ignore_target_hosts</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>host list</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1697"></a>
<a name="IDX1698"></a>
<p>Although this option is a host list, it should normally contain IP address
entries rather than names. If any host that is looked up by the router has an
IP address that matches an item in this list, Exim behaves as if that IP
address did not exist. This option allows you to cope with rogue DNS entries
like
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">remote.domain.example.  A  127.0.0.1
</pre></td></tr></table>

<p>by setting
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">ignore_target_hosts = 127.0.0.1
</pre></td></tr></table>

<p>on the relevant router. If all the hosts found by a <code>dnslookup</code> router are
discarded in this way, the router declines. In a conventional configuration, an
attempt to mail to such a domain would normally provoke the &quot;unrouteable
domain&quot; error, and an attempt to verify an address in the domain would fail.
Similarly, if <code>ignore_target_hosts</code> is set on an <code>ipliteral</code> router, the
router declines if presented with one of the listed addresses.
</p>
<p>You can use this option to disable the use of IPv4 or IPv6 for mail delivery by
means of the first or the second of the following settings, respectively:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">ignore_target_hosts = 0.0.0.0/0
ignore_target_hosts = &lt;; 0::0/0
</pre></td></tr></table>

<p>The pattern in the first line matches all IPv4 addresses, whereas the pattern
in the second line matches all IPv6 addresses.
</p>
<p>This option may also be useful for ignoring link-local and site-local IPv6
addresses. Because, like all host lists, the value of <code>ignore_target_hosts</code>
is expanded before use as a list, it is possible to make it dependent on the
domain that is being routed.
</p>
<a name="IDX1699"></a>
<p>During its expansion, <code>$host_address</code> is set to the IP address that is being
checked.
</p>
<a name="IDX1700"></a>

<table>
<tr><td>
<p><code>initgroups</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1701"></a>
<a name="IDX1702"></a>
<a name="IDX1703"></a>
<a name="IDX1704"></a>
<p>If the router queues an address for a transport, and this option is true, and
the uid supplied by the router is not overridden by the transport, the
<code>initgroups()</code> function is called when running the transport to ensure that
any additional groups associated with the uid are set up. See also <code>group</code>
and <code>user</code> and the discussion in chapter <a href="spec_23.html#SEC215">Environment for running local transports</a>.
</p>
<a name="IDX1705"></a>

<table>
<tr><td>
<p><code>local_part_prefix</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>string list</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1706"></a>
<a name="IDX1707"></a>
<p>If this option is set, the router is skipped unless the local part starts with
one of the given strings, or <code>local_part_prefix_optional</code> is true. See
section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions are
evaluated.
</p>
<p>The list is scanned from left to right, and the first prefix that matches is
used. A limited form of wildcard is available; if the prefix begins with an
asterisk, it matches the longest possible sequence of arbitrary characters at
the start of the local part. An asterisk should therefore always be followed by
some character that does not occur in normal local parts.
<a name="IDX1708"></a>
<a name="IDX1709"></a>
Wildcarding can be used to set up multiple user mailboxes, as described in
section <a href="spec_47.html#SEC428">Multiple user mailboxes</a>.
</p>
<a name="IDX1710"></a>
<a name="IDX1711"></a>
<p>During the testing of the <code>local_parts</code> option, and while the router is
running, the prefix is removed from the local part, and is available in the
expansion variable <code>$local_part_prefix</code>. When a message is being delivered, if
the router accepts the address, this remains true during subsequent delivery by
a transport. In particular, the local part that is transmitted in the RCPT
command for LMTP, SMTP, and BSMTP deliveries has the prefix removed by default.
This behaviour can be overridden by setting <code>rcpt_include_affixes</code> true on
the relevant transport.
</p>
<p>When an address is being verified, <code>local_part_prefix</code> affects only the
behaviour of the router. If the callout feature of verification is in use, this
means that the full address, including the prefix, will be used during the
callout.
</p>
<p>The prefix facility is commonly used to handle local parts of the form
<code>owner-something</code>. Another common use is to support local parts of the form
<code>real-username</code> to bypass a user's &lsquo;<tt>.forward</tt>&rsquo; file - helpful when trying
to tell a user their forwarding is broken - by placing a router like this one
immediately before the router that handles &lsquo;<tt>.forward</tt>&rsquo; files:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">real_localuser:
  driver = accept
  local_part_prefix = real-
  check_local_user
  transport = local_delivery
</pre></td></tr></table>

<p>For security, it would probably be a good idea to restrict the use of this
router to locally-generated messages, using a condition such as this:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">  condition = ${if match {$sender_host_address}\
                         {\N^(|127\.0\.0\.1)$\N}}
</pre></td></tr></table>

<p>If both <code>local_part_prefix</code> and <code>local_part_suffix</code> are set for a router,
both conditions must be met if not optional. Care must be taken if wildcards
are used in both a prefix and a suffix on the same router. Different
separator characters must be used to avoid ambiguity.
</p>
<a name="IDX1712"></a>

<table>
<tr><td>
<p><code>local_part_prefix_optional</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<p>See <code>local_part_prefix</code> above.
</p>
<a name="IDX1713"></a>

<table>
<tr><td>
<p><code>local_part_suffix</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>string list</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1714"></a>
<a name="IDX1715"></a>
<p>This option operates in the same way as <code>local_part_prefix</code>, except that the
local part must end (rather than start) with the given string, the
<code>local_part_suffix_optional</code> option determines whether the suffix is
mandatory, and the wildcard * character, if present, must be the last
character of the suffix. This option facility is commonly used to handle local
parts of the form <code>something-request</code> and multiple user mailboxes of the form
<code>username-foo</code>.
</p>
<a name="IDX1716"></a>

<table>
<tr><td>
<p><code>local_part_suffix_optional</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<p>See <code>local_part_suffix</code> above.
</p>
<a name="IDX1717"></a>

<table>
<tr><td>
<p><code>local_parts</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>local part list</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1718"></a>
<a name="IDX1719"></a>
<p>The router is run only if the local part of the address matches the list.
See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated, and
section <a href="spec_10.html#SEC136">Local part lists</a> for a discussion of local part lists. Because the
string is expanded, it is possible to make it depend on the domain, for
example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">local_parts = dbm;/usr/local/specials/$domain
</pre></td></tr></table>

<a name="IDX1720"></a>
<p>If the match is achieved by a lookup, the data that the lookup returned
for the local part is placed in the variable <code>$local_part_data</code> for use in
expansions of the router's private options. You might use this option, for
example, if you have a large number of local virtual domains, and you want to
send all postmaster mail to the same place without having to set up an alias in
each virtual domain:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">postmaster:
  driver = redirect
  local_parts = postmaster
  data = postmaster@real.domain.example
</pre></td></tr></table>

<a name="IDX1721"></a>

<table>
<tr><td>
<p><code>log_as_local</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>see below</em>
</p></td></tr>
</table>

<a name="IDX1722"></a>
<a name="IDX1723"></a>
<p>Exim has two logging styles for delivery, the idea being to make local
deliveries stand out more visibly from remote ones. In the &quot;local&quot; style, the
recipient address is given just as the local part, without a domain. The use of
this style is controlled by this option. It defaults to true for the <code>accept</code>
router, and false for all the others. This option applies only when a
router assigns an address to a transport. It has no effect on routers that
redirect addresses.
</p>
<a name="IDX1724"></a>

<table>
<tr><td>
<p><code>more</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em>*<em></em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<p>The result of string expansion for this option must be a valid boolean value,
that is, one of the strings &quot;yes&quot;, &quot;no&quot;, &quot;true&quot;, or &quot;false&quot;. Any other
result causes an error, and delivery is deferred. If the expansion is forced to
fail, the default value for the option (true) is used. Other failures cause
delivery to be deferred.
</p>
<p>If this option is set false, and the router declines to handle the address, no
further routers are tried, routing fails, and the address is bounced.
<a name="IDX1725"></a>
However, if the router explicitly passes an address to the following router by
means of the setting
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">self = pass
</pre></td></tr></table>

<p>or otherwise, the setting of <code>more</code> is ignored. Also, the setting of <code>more</code>
does not affect the behaviour if one of the precondition tests fails. In that
case, the address is always passed to the next router.
</p>
<p>Note that <code>address_data</code> is not considered to be a precondition. If its
expansion is forced to fail, the router declines, and the value of <code>more</code>
controls what happens next.
</p>
<a name="IDX1726"></a>

<table>
<tr><td>
<p><code>pass_on_timeout</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1727"></a>
<a name="IDX1728"></a>
<p>If a router times out during a host lookup, it normally causes deferral of the
address. If <code>pass_on_timeout</code> is set, the address is passed on to the next
router, overriding <code>no_more</code>. This may be helpful for systems that are
intermittently connected to the Internet, or those that want to pass to a smart
host any messages that cannot immediately be delivered.
</p>
<p>There are occasional other temporary errors that can occur while doing DNS
lookups. They are treated in the same way as a timeout, and this option
applies to all of them.
</p>
<a name="IDX1729"></a>

<table>
<tr><td>
<p><code>pass_router</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1730"></a>
<p>Routers that recognize the generic <code>self</code> option (<code>dnslookup</code>,
<code>ipliteral</code>, and <code>manualroute</code>) are able to return &quot;pass&quot;, forcing
routing to continue, and overriding a false setting of <code>more</code>. When one of
these routers returns &quot;pass&quot;, the address is normally handed on to the next
router in sequence. This can be changed by setting <code>pass_router</code> to the name
of another router. However (unlike <code>redirect_router</code>) the named router must
be below the current router, to avoid loops. Note that this option applies only
to the special case of &quot;pass&quot;. It does not apply when a router returns
&quot;decline&quot; because it cannot handle an address.
</p>
<a name="IDX1731"></a>

<table>
<tr><td>
<p><code>redirect_router</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1732"></a>
<p>Sometimes an administrator knows that it is pointless to reprocess addresses
generated from alias or forward files with the same router again. For
example, if an alias file translates real names into login ids there is no
point searching the alias file a second time, especially if it is a large file.
</p>
<p>The <code>redirect_router</code> option can be set to the name of any router instance.
It causes the routing of any generated addresses to start at the named router
instead of at the first router. This option has no effect if the router in
which it is set does not generate new addresses.
</p>
<a name="IDX1733"></a>

<table>
<tr><td>
<p><code>require_files</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>string list</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1734"></a>
<a name="IDX1735"></a>
<p>This option provides a general mechanism for predicating the running of a
router on the existence or non-existence of certain files or directories.
Before running a router, as one of its precondition tests, Exim works its way
through the <code>require_files</code> list, expanding each item separately.
</p>
<p>Because the list is split before expansion, any colons in expansion items must
be doubled, or the facility for using a different list separator must be used.
If any expansion is forced to fail, the item is ignored. Other expansion
failures cause routing of the address to be deferred.
</p>
<p>If any expanded string is empty, it is ignored. Otherwise, except as described
below, each string must be a fully qualified file path, optionally preceded by
&quot;!&quot;. The paths are passed to the <code>stat()</code> function to test for the
existence of the files or directories. The router is skipped if any paths not
preceded by &quot;!&quot; do not exist, or if any paths preceded by &quot;!&quot; do exist.
</p>
<a name="IDX1736"></a>
<p>If <code>stat()</code> cannot determine whether a file exists or not, delivery of
the message is deferred. This can happen when NFS-mounted filesystems are
unavailable.
</p>
<p>This option is checked after the <code>domains</code>, <code>local_parts</code>, and <code>senders</code>
options, so you cannot use it to check for the existence of a file in which to
look up a domain, local part, or sender. (See section <a href="spec_3.html#SEC25">Router preconditions</a> for a
full list of the order in which preconditions are evaluated.) However, as
these options are all expanded, you can use the <code>exists</code> expansion condition
to make such tests. The <code>require_files</code> option is intended for checking files
that the router may be going to use internally, or which are needed by a
transport (for example &lsquo;<tt>.procmailrc</tt>&rsquo;).
</p>
<p>During delivery, the <code>stat()</code> function is run as root, but there is a
facility for some checking of the accessibility of a file by another user.
This is not a proper permissions check, but just a &quot;rough&quot; check that
operates as follows:
</p>
<p>If an item in a <code>require_files</code> list does not contain any forward slash
characters, it is taken to be the user (and optional group, separated by a
comma) to be checked for subsequent files in the list. If no group is specified
but the user is specified symbolically, the gid associated with the uid is
used. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">require_files = mail:/some/file
require_files = $local_part:$home/.procmailrc
</pre></td></tr></table>

<p>If a user or group name in a <code>require_files</code> list does not exist, the
<code>require_files</code> condition fails.
</p>
<p>Exim performs the check by scanning along the components of the file path, and
checking the access for the given uid and gid. It checks for &quot;x&quot; access on
directories, and &quot;r&quot; access on the final file. Note that this means that file
access control lists, if the operating system has them, are ignored.
</p>
<p><strong>Warning 1</strong>: When the router is being run to verify addresses for an
incoming SMTP message, Exim is not running as root, but under its own uid. This
may affect the result of a <code>require_files</code> check. In particular, <code>stat()</code>
may yield the error EACCES (&quot;Permission denied&quot;). This means that the Exim
user is not permitted to read one of the directories on the file's path.
</p>
<p><strong>Warning 2</strong>: Even when Exim is running as root while delivering a message,
<code>stat()</code> can yield EACCES for a file in an NFS directory that is mounted
without root access. In this case, if a check for access by a particular user
is requested, Exim creates a subprocess that runs as that user, and tries the
check again in that process.
</p>
<p>The default action for handling an unresolved EACCES is to consider it to
be caused by a configuration error, and routing is deferred because the
existence or non-existence of the file cannot be determined. However, in some
circumstances it may be desirable to treat this condition as if the file did
not exist. If the file name (or the exclamation mark that precedes the file
name for non-existence) is preceded by a plus sign, the EACCES error is treated
as if the file did not exist. For example:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">require_files = +/some/file
</pre></td></tr></table>

<p>If the router is not an essential part of verification (for example, it
handles users' &lsquo;<tt>.forward</tt>&rsquo; files), another solution is to set the <code>verify</code>
option false so that the router is skipped when verifying.
</p>
<a name="IDX1737"></a>

<table>
<tr><td>
<p><code>retry_use_local_part</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>see below</em>
</p></td></tr>
</table>

<a name="IDX1738"></a>
<a name="IDX1739"></a>
<p>When a delivery suffers a temporary routing failure, a retry record is created
in Exim's hints database. For addresses whose routing depends only on the
domain, the key for the retry record should not involve the local part, but for
other addresses, both the domain and the local part should be included.
Usually, remote routing is of the former kind, and local routing is of the
latter kind.
</p>
<p>This option controls whether the local part is used to form the key for retry
hints for addresses that suffer temporary errors while being handled by this
router. The default value is true for any router that has <code>check_local_user</code>
set, and false otherwise. Note that this option does not apply to hints keys
for transport delays; they are controlled by a generic transport option of the
same name.
</p>
<p>The setting of <code>retry_use_local_part</code> applies only to the router on which it
appears. If the router generates child addresses, they are routed
independently; this setting does not become attached to them.
</p>
<a name="IDX1740"></a>

<table>
<tr><td>
<p><code>router_home_directory</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1741"></a>
<a name="IDX1742"></a>
<a name="IDX1743"></a>
<p>This option sets a home directory for use while the router is running. (Compare
<code>transport_home_directory</code>, which sets a home directory for later
transporting.) In particular, if used on a <code>redirect</code> router, this option
sets a value for <code>$home</code> while a filter is running. The value is expanded;
forced expansion failure causes the option to be ignored - other failures
cause the router to defer.
</p>
<p>Expansion of <code>router_home_directory</code> happens immediately after the
<code>check_local_user</code> test (if configured), before any further expansions take
place.
(See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated.)
While the router is running, <code>router_home_directory</code> overrides the value of
<code>$home</code> that came from <code>check_local_user</code>.
</p>
<p>When a router accepts an address and assigns it to a local transport (including
the cases when a <code>redirect</code> router generates a pipe, file, or autoreply
delivery), the home directory setting for the transport is taken from the first
of these values that is set:
</p>
<ul class="toc">
<li>
The <code>home_directory</code> option on the transport;

</li><li>
The <code>transport_home_directory</code> option on the router;

</li><li>
The password data if <code>check_local_user</code> is set on the router;

</li><li>
The <code>router_home_directory</code> option on the router.
</li></ul>

<p>In other words, <code>router_home_directory</code> overrides the password data for the
router, but not for the transport.
</p>
<a name="IDX1744"></a>

<table>
<tr><td>
<p><code>self</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em></p></td><td><p> Default: <em>freeze</em>
</p></td></tr>
</table>

<a name="IDX1745"></a>
<a name="IDX1746"></a>
<p>This option applies to those routers that use a recipient address to find a
list of remote hosts. Currently, these are the <code>dnslookup</code>, <code>ipliteral</code>,
and <code>manualroute</code> routers.
Certain configurations of the <code>queryprogram</code> router can also specify a list
of remote hosts.
Usually such routers are configured to send the message to a remote host via an
<code>smtp</code> transport. The <code>self</code> option specifies what happens when the first
host on the list turns out to be the local host.
The way in which Exim checks for the local host is described in section
<a href="spec_13.html#SEC160">Recognizing the local host</a>.
</p>
<p>Normally this situation indicates either an error in Exim's configuration (for
example, the router should be configured not to process this domain), or an
error in the DNS (for example, the MX should not point to this host). For this
reason, the default action is to log the incident, defer the address, and
freeze the message. The following alternatives are provided for use in special
cases:
</p>
<dl compact="compact">
<dt> <code>defer</code></dt>
<dd><p>Delivery of the message is tried again later, but the message is not frozen.
</p>
</dd>
<dt> <code>reroute</code>: &lt;<em>domain</em>&gt;</dt>
<dd><p>The domain is changed to the given domain, and the address is passed back to
be reprocessed by the routers. No rewriting of headers takes place. This
behaviour is essentially a redirection.
</p>
</dd>
<dt> <code>reroute: rewrite:</code> &lt;<em>domain</em>&gt;</dt>
<dd><p>The domain is changed to the given domain, and the address is passed back to be
reprocessed by the routers. Any headers that contain the original domain are
rewritten.
</p>
</dd>
<dt> <code>pass</code></dt>
<dd><a name="IDX1747"></a>
<a name="IDX1748"></a>
<p>The router passes the address to the next router, or to the router named in the
<code>pass_router</code> option if it is set. This overrides <code>no_more</code>. During
subsequent routing and delivery, the variable <code>$self_hostname</code> contains the
name of the local host that the router encountered. This can be used to
distinguish between different cases for hosts with multiple names. The
combination
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">self = pass
no_more
</pre></td></tr></table>

<p>ensures that only those addresses that routed to the local host are passed on.
Without <code>no_more</code>, addresses that were declined for other reasons would also
be passed to the next router.
</p>
</dd>
<dt> <code>fail</code></dt>
<dd><p>Delivery fails and an error report is generated.
</p>
</dd>
<dt> <code>send</code></dt>
<dd><a name="IDX1749"></a>
<p>The anomaly is ignored and the address is queued for the transport. This
setting should be used with extreme caution. For an <code>smtp</code> transport, it
makes sense only in cases where the program that is listening on the SMTP port
is not this version of Exim. That is, it must be some other MTA, or Exim with a
different configuration file that handles the domain in another way.
</p></dd>
</dl>

<a name="IDX1750"></a>

<table>
<tr><td>
<p><code>senders</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>address list</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1751"></a>
<p>If this option is set, the router is skipped unless the message's sender
address matches something on the list.
See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated.
</p>
<p>There are issues concerning verification when the running of routers is
dependent on the sender. When Exim is verifying the address in an <code>errors_to</code>
setting, it sets the sender to the null string. When using the <code>-bt</code> option
to check a configuration file, it is necessary also to use the <code>-f</code> option to
set an appropriate sender. For incoming mail, the sender is unset when
verifying the sender, but is available when verifying any recipients. If the
SMTP VRFY command is enabled, it must be used after MAIL if the sender address
matters.
</p>
<a name="IDX1752"></a>

<table>
<tr><td>
<p><code>translate_ip_address</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1753"></a>
<a name="IDX1754"></a>
<a name="IDX1755"></a>
<p>There exist some rare networking situations (for example, packet radio) where
it is helpful to be able to translate IP addresses generated by normal routing
mechanisms into other IP addresses, thus performing a kind of manual IP
routing. This should be done only if the normal IP routing of the TCP/IP stack
is inadequate or broken. Because this is an extremely uncommon requirement, the
code to support this option is not included in the Exim binary unless
SUPPORT_TRANSLATE_IP_ADDRESS=yes is set in &lsquo;<tt>Local/Makefile</tt>&rsquo;.
</p>
<a name="IDX1756"></a>
<p>The <code>translate_ip_address</code> string is expanded for every IP address generated
by the router, with the generated address set in <code>$host_address</code>. If the
expansion is forced to fail, no action is taken.
For any other expansion error, delivery of the message is deferred.
If the result of the expansion is an IP address, that replaces the original
address; otherwise the result is assumed to be a host name - this is looked
up using <code>gethostbyname()</code> (or <code>getipnodebyname()</code> when available) to
produce one or more replacement IP addresses. For example, to subvert all IP
addresses in some specific networks, this could be added to a router:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">translate_ip_address = \
  ${lookup{${mask:$host_address/26}}lsearch{/some/file}\
    {$value}fail}}
</pre></td></tr></table>

<p>The file would contain lines like
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">10.2.3.128/26    some.host
10.8.4.34/26     10.44.8.15
</pre></td></tr></table>

<p>You should not make use of this facility unless you really understand what you
are doing.
</p>
<a name="IDX1757"></a>

<table>
<tr><td>
<p><code>transport</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<p>This option specifies the transport to be used when a router accepts an address
and sets it up for delivery. A transport is never needed if a router is used
only for verification. The value of the option is expanded at routing time,
after the expansion of <code>errors_to</code>, <code>headers_add</code>, and <code>headers_remove</code>,
and result must be the name of one of the configured transports. If it is not,
delivery is deferred.
</p>
<p>The <code>transport</code> option is not used by the <code>redirect</code> router, but it does
have some private options that set up transports for pipe and file deliveries
(see chapter <a href="spec_22.html#SEC204">The redirect router</a>).
</p>
<a name="IDX1758"></a>

<table>
<tr><td>
<p><code>transport_current_directory</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>unset</em>
</p></td></tr>
</table>

<a name="IDX1759"></a>
<p>This option associates a current directory with any address that is routed
to a local transport. This can happen either because a transport is
explicitly configured for the router, or because it generates a delivery to a
file or a pipe. During the delivery process (that is, at transport time), this
option string is expanded and is set as the current directory, unless
overridden by a setting on the transport.
If the expansion fails for any reason, including forced failure, an error is
logged, and delivery is deferred.
See chapter <a href="spec_23.html#SEC215">Environment for running local transports</a> for details of the local delivery
environment.
</p>
<a name="IDX1760"></a>

<table>
<tr><td>
<p><code>transport_home_directory</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>see below</em>
</p></td></tr>
</table>

<a name="IDX1761"></a>
<p>This option associates a home directory with any address that is routed to a
local transport. This can happen either because a transport is explicitly
configured for the router, or because it generates a delivery to a file or a
pipe. During the delivery process (that is, at transport time), the option
string is expanded and is set as the home directory, unless overridden by a
setting of <code>home_directory</code> on the transport.
If the expansion fails for any reason, including forced failure, an error is
logged, and delivery is deferred.
</p>
<p>If the transport does not specify a home directory, and
<code>transport_home_directory</code> is not set for the router, the home directory for
the transport is taken from the password data if <code>check_local_user</code> is set for
the router. Otherwise it is taken from <code>router_home_directory</code> if that option
is set; if not, no home directory is set for the transport.
</p>
<p>See chapter <a href="spec_23.html#SEC215">Environment for running local transports</a> for further details of the local delivery
environment.
</p>
<a name="IDX1762"></a>

<table>
<tr><td>
<p><code>unseen</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>boolean</em>*<em></em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1763"></a>
<p>The result of string expansion for this option must be a valid boolean value,
that is, one of the strings &quot;yes&quot;, &quot;no&quot;, &quot;true&quot;, or &quot;false&quot;. Any other
result causes an error, and delivery is deferred. If the expansion is forced to
fail, the default value for the option (false) is used. Other failures cause
delivery to be deferred.
</p>
<p>When this option is set true, routing does not cease if the router accepts the
address. Instead, a copy of the incoming address is passed to the next router,
overriding a false setting of <code>more</code>. There is little point in setting
<code>more</code> false if <code>unseen</code> is always true, but it may be useful in cases when
the value of <code>unseen</code> contains expansion items (and therefore, presumably, is
sometimes true and sometimes false).
</p>
<a name="IDX1764"></a>
<p>Setting the <code>unseen</code> option has a similar effect to the <code>unseen</code> command
qualifier in filter files. It can be used to cause copies of messages to be
delivered to some other destination, while also carrying out a normal delivery.
In effect, the current address is made into a &quot;parent&quot; that has two children
- one that is delivered as specified by this router, and a clone that goes on
to be routed further. For this reason, <code>unseen</code> may not be combined with the
<code>one_time</code> option in a <code>redirect</code> router.
</p>
<p><strong>Warning</strong>: Header lines added to the address (or specified for removal) by
this router or by previous routers affect the &quot;unseen&quot; copy of the message
only. The clone that continues to be processed by further routers starts with
no added headers and none specified for removal. For a <code>redirect</code> router, if
a generated address is the same as the incoming address, this can lead to
duplicate addresses with different header modifications. Exim does not do
duplicate deliveries (except, in certain circumstances, to pipes &ndash; see section
<a href="spec_22.html#SEC211">Duplicate addresses</a>), but it is undefined which of the duplicates is discarded,
so this ambiguous situation should be avoided. The <code>repeat_use</code> option of the
<code>redirect</code> router may be of help.
</p>
<p>Unlike the handling of header modifications, any data that was set by the
<code>address_data</code> option in the current or previous routers <em>is</em> passed on to
subsequent routers.
</p>
<a name="IDX1765"></a>

<table>
<tr><td>
<p><code>user</code></p></td><td><p> Use: <em>routers</em></p></td><td><p> Type: <em>string</em>*<em></em></p></td><td><p> Default: <em>see below</em>
</p></td></tr>
</table>

<a name="IDX1766"></a>
<a name="IDX1767"></a>
<a name="IDX1768"></a>
<a name="IDX1769"></a>
<a name="IDX1770"></a>
<p>When a router queues an address for a transport, and the transport does not
specify a user, the user given here is used when running the delivery process.
The user may be specified numerically or by name. If expansion fails, the
error is logged and delivery is deferred.
This user is also used by the <code>redirect</code> router when running a filter file.
The default is unset, except when <code>check_local_user</code> is set. In this case,
the default is taken from the password information. If the user is specified as
a name, and <code>group</code> is not set, the group associated with the user is used.
See also <code>initgroups</code> and <code>group</code> and the discussion in chapter
<a href="spec_23.html#SEC215">Environment for running local transports</a>.
</p>
<a name="IDX1771"></a>

<table>
<tr><td>
<p><code>verify</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<p>Setting this option has the effect of setting <code>verify_sender</code> and
<code>verify_recipient</code> to the same value.
</p>
<a name="IDX1772"></a>

<table>
<tr><td>
<p><code>verify_only</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>false</em>
</p></td></tr>
</table>

<a name="IDX1773"></a>
<a name="IDX1774"></a>
<a name="IDX1775"></a>
<p>If this option is set, the router is used only when verifying an address or
testing with the <code>-bv</code> option, not when actually doing a delivery, testing
with the <code>-bt</code> option, or running the SMTP EXPN command. It can be further
restricted to verifying only senders or recipients by means of
<code>verify_sender</code> and <code>verify_recipient</code>.
</p>
<p><strong>Warning</strong>: When the router is being run to verify addresses for an incoming
SMTP message, Exim is not running as root, but under its own uid. If the router
accesses any files, you need to make sure that they are accessible to the Exim
user or group.
</p>
<a name="IDX1776"></a>

<table>
<tr><td>
<p><code>verify_recipient</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<p>If this option is false, the router is skipped when verifying recipient
addresses
or testing recipient verification using <code>-bv</code>.
See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated.
</p>
<a name="IDX1777"></a>

<table>
<tr><td>
<p><code>verify_sender</code></p></td><td><p> Use: <em>routers</em>**<em></em></p></td><td><p> Type: <em>boolean</em></p></td><td><p> Default: <em>true</em>
</p></td></tr>
</table>

<p>If this option is false, the router is skipped when verifying sender addresses
or testing sender verification using <code>-bvs</code>.
See section <a href="spec_3.html#SEC25">Router preconditions</a> for a list of the order in which preconditions
are evaluated.
<a name="IDX1778"></a>
<a name="IDX1779"></a>
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_14.html#SEC162" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_16.html#SEC187" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[Contents]</td>
<td valign="middle" align="left">[<a href="spec_55.html#SEC493" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="spec_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>September, 10 2009</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.78</i></a>.
 </font>
 <br>

</p>
</body>
</html>