Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3d4d9cc28af00be9852b4cb3055b122e > files > 125

exim-doc-4.69-4.fc12.noarch.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><style xmlns="" type="text/css">
div.added    { background-color: #ffff99; }
div.deleted  { text-decoration: line-through;
               background-color: #FF7F7F; }
div.changed  { background-color: #99ff99; }
div.off      {  }

span.added   { background-color: #ffff99; }
span.deleted { text-decoration: line-through;
               background-color: #FF7F7F; }
span.changed { background-color: #99ff99; }
span.off     {  }



pre.literallayout {
  background-color: #E8E8D0;
  padding-left: 0.5cm;
  padding-top:  5px;
  padding-bottom: 5px;
}

div[class=changed] pre.literallayout {
  background-color: #99ff99;
  padding-left: 0.5cm;
  padding-top:  5px;
  padding-bottom: 5px;
}

div.literallayout {
  background-color: #E8E8D0;
  padding-left: 0.5cm;
  padding-top:  5px;
  padding-bottom: 5px;
}

div[class=changed] div.literallayout {
  background-color: #99ff99;
  padding-left: 0.5cm;
  padding-top:  5px;
  padding-bottom: 5px;
}

</style><title>19. The iplookup router</title><meta name="generator" content="DocBook XSL Stylesheets V1.72.0" /><link rel="start" href="index.html" title="Specification of the Exim Mail Transfer Agent" /><link rel="up" href="index.html" title="Specification of the Exim Mail Transfer Agent" /><link rel="prev" href="ch18.html" title="18. The ipliteral router" /><link rel="next" href="ch20.html" title="20. The manualroute router" /></head><body><div class="navheader">
<table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="ch18.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch20.html">Next</a></td></tr></table></div>
<div class="chapter" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a href="index.html#toc0193" id="CHID6">19. The iplookup router</a></h2></div></div>
</div>
<p>
<a id="id569390" class="indexterm"></a>
<a id="id569405" class="indexterm"></a>
The <span><strong class="command">iplookup</strong></span> router was written to fulfil a specific requirement in
Cambridge University (which in fact no longer exists). For this reason, it is
not included in the binary of Exim by default. If you want to include it, you
must set
</p>
<pre class="literallayout">ROUTER_IPLOOKUP=yes
</pre><p>
in your <em class="filename">Local/Makefile</em> configuration file.
</p>
<p>
The <span><strong class="command">iplookup</strong></span> router routes an address by sending it over a TCP or UDP
connection to one or more specific hosts. The host can then return the same or
a different address – in effect rewriting the recipient address in the
message’s envelope. The new address is then passed on to subsequent routers. If
this process fails, the address can be passed on to other routers, or delivery
can be deferred. Since <span><strong class="command">iplookup</strong></span> is just a rewriting router, a transport
must not be specified for it.
</p>
<p>
<a id="id569482" class="indexterm"></a>
<a id="id569500" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">hosts</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>string</em></span></td><td align="right">Default: <span class="emphasis"><em>unset</em></span></td></tr></tbody></table></div>
<p>
This option must be supplied. Its value is a colon-separated list of host
names. The hosts are looked up using <em class="function">gethostbyname()</em>
(or <em class="function">getipnodebyname()</em> when available)
and are tried in order until one responds to the query. If none respond, what
happens is controlled by <span><strong class="option">optional</strong></span>.
</p>
<p>
<a id="id569604" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">optional</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>boolean</em></span></td><td align="right">Default: <span class="emphasis"><em>false</em></span></td></tr></tbody></table></div>
<p>
If <span><strong class="option">optional</strong></span> is true, if no response is obtained from any host, the address
is passed to the next router, overriding <span><strong class="option">no_more</strong></span>. If <span><strong class="option">optional</strong></span> is false,
delivery to the address is deferred.
</p>
<p>
<a id="id569704" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">port</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>integer</em></span></td><td align="right">Default: <span class="emphasis"><em>0</em></span></td></tr></tbody></table></div>
<p>
<a id="id569785" class="indexterm"></a>
This option must be supplied. It specifies the port number for the TCP or UDP
call.
</p>
<p>
<a id="id569809" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">protocol</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>string</em></span></td><td align="right">Default: <span class="emphasis"><em>udp</em></span></td></tr></tbody></table></div>
<p>
This option can be set to “<span class="quote">udp</span>” or “<span class="quote">tcp</span>” to specify which of the two
protocols is to be used.
</p>
<p>
<a id="id569903" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">query</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>string</em></span>†<span class="emphasis"><em></em></span></td><td align="right">Default: <span class="emphasis"><em>see below</em></span></td></tr></tbody></table></div>
<p>
This defines the content of the query that is sent to the remote hosts. The
default value is:
</p>
<pre class="literallayout">$local_part@$domain $local_part@$domain
</pre><p>
The repetition serves as a way of checking that a response is to the correct
query in the default case (see <span><strong class="option">response_pattern</strong></span> below).
</p>
<p>
<a id="id570009" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">reroute</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>string</em></span>†<span class="emphasis"><em></em></span></td><td align="right">Default: <span class="emphasis"><em>unset</em></span></td></tr></tbody></table></div>
<p>
If this option is not set, the rerouted address is precisely the byte string
returned by the remote host, up to the first white space, if any. If set, the
string is expanded to form the rerouted address. It can include parts matched
in the response by <span><strong class="option">response_pattern</strong></span> by means of numeric variables such as
<em class="varname">$1</em>, <em class="varname">$2</em>, etc. The variable <em class="varname">$0</em> refers to the entire input string,
whether or not a pattern is in use. In all cases, the rerouted address must end
up in the form <span class="emphasis"><em>local_part@domain</em></span>.
</p>
<p>
<a id="id570122" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">response_pattern</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>string</em></span></td><td align="right">Default: <span class="emphasis"><em>unset</em></span></td></tr></tbody></table></div>
<p>
This option can be set to a regular expression that is applied to the string
returned from the remote host. If the pattern does not match the response, the
router declines. If <span><strong class="option">response_pattern</strong></span> is not set, no checking of the
response is done, unless the query was defaulted, in which case there is a
check that the text returned after the first white space is the original
address. This checks that the answer that has been received is in response to
the correct question. For example, if the response is just a new domain, the
following could be used:
</p>
<pre class="literallayout">response_pattern = ^([^@]+)$
reroute = $local_part@$1
</pre><p>
<a id="id570230" class="indexterm"></a>
</p>
<div class="informaltable">
<table border="1"><colgroup><col align="left" /><col align="center" /><col align="center" /><col align="right" /></colgroup><tbody><tr><td align="left"><span><strong class="option">timeout</strong></span></td><td align="center">Use: <span class="emphasis"><em>iplookup</em></span></td><td align="center">Type: <span class="emphasis"><em>time</em></span></td><td align="right">Default: <span class="emphasis"><em>5s</em></span></td></tr></tbody></table></div>
<p>
This specifies the amount of time to wait for a response from the remote
machine. The same timeout is used for the <em class="function">connect()</em> function for a TCP
call. It does not apply to UDP.
</p>
</div>
<div class="navfooter">
<table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch18.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch20.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div>
</body></html>