Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 9adab841b2346eed28e146b23c25375c > files > 121

exim-doc-4.73-2.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "XSLT-compat">
<html lang="en-GB">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../common.css">
<meta name="author" content="The Exim Project. &lt;http://www.exim.org/&gt;">
<meta name="copyright" content="Copyright ©2010 The Exim Project. All rights reserved">
<meta name="description" content="Exim is a message transfer agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the Internet.">
<meta name="keywords" content="exim,smtp,mta,email">
<meta name="robots" content="noodp,noydir,index,follow">
<meta name="viewport" content="width=device-width">
<title>19. The iplookup router</title>
<link rel="stylesheet" type="text/css" href="../../../../doc/chapter.css">
<link rel="canonical" href="http://www.exim.org/exim-html-current/doc/html/spec_html/ch19.html">
</head>
<body>
<h1 id="header"><a href="../../../..">Exim Internet Mailer</a></h1>
<div id="outer">
<ul id="nav_flow" class="nav">
<li><a href="../../../../index.html">Home</a></li>
<li><a href="../../../../mirrors.html">Download</a></li>
<li><a href="../../../../docs.html">Documentation</a></li>
<li><a href="../../../../maillist.html">Mailing Lists</a></li>
<li><a href="http://wiki.exim.org/">Wiki</a></li>
<li><a href="http://www.exim.org/bugzilla/">Bugs</a></li>
<li><a href="../../../../credits.html">Credits</a></li>
<li class="search"><form action="http://www.google.com/search" method="get">
<span class="search_field_container"><input type="search" name="q" placeholder="Search Docs" class="search_field"></span><input type="hidden" name="hl" value="en"><input type="hidden" name="ie" value="UTF-8"><input type="hidden" name="as_qdr" value="all"><input type="hidden" name="q" value="site:www.exim.org"><input type="hidden" name="q" value="inurl:exim-html-current">
</form></li>
</ul>
<div id="inner"><div id="content">
<a class="previous_page" href="ch18.html">&lt;-previous</a><a class="next_page" href="ch20.html">next-&gt;</a><div id="chapter" class="chapter">
<h2 id="CHID6" class="">Chapter 19 - The iplookup router</h2>
<p>


The <span class="docbook_command">iplookup</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>
<div class="docbook_literallayout"><pre>
ROUTER_IPLOOKUP=yes
</pre></div>
<p>
in your <span class="docbook_filename">Local/Makefile</span> configuration file.
</p>
<p>
The <span class="docbook_command">iplookup</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 class="docbook_command">iplookup</span> is just a rewriting router, a transport
must not be specified for it.
</p>
<p>


</p>
<table>






<tr>
<td><span class="docbook_option">hosts</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">string</span>
</td>
<td>Default: <span class="docbook_emphasis">unset</span>
</td>
</tr>


</table>
<p>
This option must be supplied. Its value is a colon-separated list of host
names. The hosts are looked up using <span class="docbook_function">gethostbyname()</span>
(or <span class="docbook_function">getipnodebyname()</span> when available)
and are tried in order until one responds to the query. If none respond, what
happens is controlled by <span class="docbook_option">optional</span>.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">optional</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">boolean</span>
</td>
<td>Default: <span class="docbook_emphasis">false</span>
</td>
</tr>


</table>
<p>
If <span class="docbook_option">optional</span> is true, if no response is obtained from any host, the address
is passed to the next router, overriding <span class="docbook_option">no_more</span>. If <span class="docbook_option">optional</span> is false,
delivery to the address is deferred.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">port</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">integer</span>
</td>
<td>Default: <span class="docbook_emphasis">0</span>
</td>
</tr>


</table>
<p>

This option must be supplied. It specifies the port number for the TCP or UDP
call.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">protocol</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">string</span>
</td>
<td>Default: <span class="docbook_emphasis">udp</span>
</td>
</tr>


</table>
<p>
This option can be set to “udp” or “tcp” to specify which of the two
protocols is to be used.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">query</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">string</span>†<span class="docbook_emphasis"></span>
</td>
<td>Default: <span class="docbook_emphasis">see below</span>
</td>
</tr>


</table>
<p>
This defines the content of the query that is sent to the remote hosts. The
default value is:
</p>
<div class="docbook_literallayout"><pre>
$local_part@$domain $local_part@$domain
</pre></div>
<p>
The repetition serves as a way of checking that a response is to the correct
query in the default case (see <span class="docbook_option">response_pattern</span> below).
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">reroute</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">string</span>†<span class="docbook_emphasis"></span>
</td>
<td>Default: <span class="docbook_emphasis">unset</span>
</td>
</tr>


</table>
<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 class="docbook_option">response_pattern</span> by means of numeric variables such as
$1, $2, etc. The variable $0 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="docbook_emphasis">local_part@domain</span>.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">response_pattern</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">string</span>
</td>
<td>Default: <span class="docbook_emphasis">unset</span>
</td>
</tr>


</table>
<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 class="docbook_option">response_pattern</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>
<div class="docbook_literallayout"><pre>
response_pattern = ^([^@]+)$
reroute = $local_part@$1
</pre></div>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">timeout</span></td>
<td>Use: <span class="docbook_emphasis">iplookup</span>
</td>
<td>Type: <span class="docbook_emphasis">time</span>
</td>
<td>Default: <span class="docbook_emphasis">5s</span>
</td>
</tr>


</table>
<p>
This specifies the amount of time to wait for a response from the remote
machine. The same timeout is used for the <span class="docbook_function">connect()</span> function for a TCP
call. It does not apply to UDP.
</p>
</div>
<a class="previous_page" href="ch18.html">&lt;-previous</a><a class="next_page" href="ch20.html">next-&gt;</a>
</div></div>
<iframe id="branding" name="branding" src="../../../../branding/branding.html" height="0" frameborder="no" scrolling="no"></iframe><div id="footer">Website design by <a href="https://secure.grepular.com/">Mike Cardwell</a>, of <a href="http://cardwellit.com/">Cardwell IT Ltd.</a>
</div>
<div class="left_bar"></div>
<div class="right_bar"></div>
<div id="toc">
<ul class="hidden"></ul>
<img src="../../../../doc/contents.png" width="16" height="155">
</div>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script><script type="text/javascript" src="../../../../common.js"></script><script type="text/javascript" src="../../../../doc/chapter.js"></script>
</body>
</html>