Sophie

Sophie

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

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: 48. Using Exim as a non-queueing client</title>

<meta name="description" content="Specification of the Exim Mail Transfer Agent: 48. Using Exim as a non-queueing client">
<meta name="keywords" content="Specification of the Exim Mail Transfer Agent: 48. Using Exim as a non-queueing client">
<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="Exim-as-a-non_002dqueueing-client"></a>
<a name="SEC434"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_47.html#SEC433" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_49.html#SEC435" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec_47.html#SEC420" 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_49.html#SEC435" 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"> 48. Using Exim as a non-queueing client </h1>

<p>On a personal computer, it is a common requirement for all
email to be sent to a &quot;smart host&quot;. There are plenty of MUAs that can be
configured to operate that way, for all the popular operating systems.
However, there are some MUAs for Unix-like systems that cannot be so
configured: they submit messages using the command line interface of
&lsquo;<tt>/usr/sbin/sendmail</tt>&rsquo;. Furthermore, utility programs such as <em>cron</em> submit
messages this way.
</p>
<p>If the personal computer runs continuously, there is no problem, because it can
run a conventional MTA that handles delivery to the smart host, and deal with
any delays via its queueing mechanism. However, if the computer does not run
continuously or runs different operating systems at different times, queueing
email is not desirable.
</p>
<p>There is therefore a requirement for something that can provide the
&lsquo;<tt>/usr/sbin/sendmail</tt>&rsquo; interface but deliver messages to a smart host without
any queueing or retrying facilities. Furthermore, the delivery to the smart
host should be synchronous, so that if it fails, the sending MUA is immediately
informed. In other words, we want something that extends an MUA that submits
to a local MTA via the command line so that it behaves like one that submits
to a remote smart host using TCP/SMTP.
</p>
<p>There are a number of applications (for example, there is one called <em>ssmtp</em>)
that do this job. However, people have found them to be lacking in various
ways. For instance, you might want to allow aliasing and forwarding to be done
before sending a message to the smart host.
</p>
<p>Exim already had the necessary infrastructure for doing this job. Just a few
tweaks were needed to make it behave as required, though it is somewhat of an
overkill to use a fully-featured MTA for this purpose.
</p>
<a name="IDX2744"></a>
<p>There is a Boolean global option called <code>mua_wrapper</code>, defaulting false.
Setting <code>mua_wrapper</code> true causes Exim to run in a special mode where it
assumes that it is being used to &quot;wrap&quot; a command-line MUA in the manner
just described. As well as setting <code>mua_wrapper</code>, you also need to provide a
compatible router and transport configuration. Typically there will be just one
router and one transport, sending everything to a smart host.
</p>
<p>When run in MUA wrapping mode, the behaviour of Exim changes in the
following ways:
</p>
<ul class="toc">
<li>
A daemon cannot be run, nor will Exim accept incoming messages from <em>inetd</em>.
In other words, the only way to submit messages is via the command line.

</li><li>
Each message is synchronously delivered as soon as it is received (<code>-odi</code> is
assumed). All queueing options (<code>queue_only</code>, <code>queue_smtp_domains</code>,
<code>control</code> in an ACL, etc.) are quietly ignored. The Exim reception process
does not finish until the delivery attempt is complete. If the delivery is
successful, a zero return code is given.

</li><li>
Address redirection is permitted, but the final routing for all addresses must
be to the same remote transport, and to the same list of hosts. Furthermore,
the return address (envelope sender) must be the same for all recipients, as
must any added or deleted header lines. In other words, it must be possible to
deliver the message in a single SMTP transaction, however many recipients there
are.

</li><li>
If these conditions are not met, or if routing any address results in a
failure or defer status, or if Exim is unable to deliver all the recipients
successfully to one of the smart hosts, delivery of the entire message fails.

</li><li>
Because no queueing is allowed, all failures are treated as permanent; there
is no distinction between 4<em>xx</em> and 5<em>xx</em> SMTP response codes from the
smart host. Furthermore, because only a single yes/no response can be given to
the caller, it is not possible to deliver to some recipients and not others. If
there is an error (temporary or permanent) for any recipient, all are failed.

</li><li>
If more than one smart host is listed, Exim will try another host after a
connection failure or a timeout, in the normal way. However, if this kind of
failure happens for all the hosts, the delivery fails.

</li><li>
When delivery fails, an error message is written to the standard error stream
(as well as to Exim's log), and Exim exits to the caller with a return code
value 1. The message is expunged from Exim's spool files. No bounce messages
are ever generated.

</li><li>
No retry data is maintained, and any retry rules are ignored.

</li><li>
A number of Exim options are overridden: <code>deliver_drop_privilege</code> is forced
true, <code>max_rcpt</code> in the <code>smtp</code> transport is forced to &quot;unlimited&quot;,
<code>remote_max_parallel</code> is forced to one, and fallback hosts are ignored.
</li></ul>

<p>The overall effect is that Exim makes a single synchronous attempt to deliver
the message, failing if there is any kind of problem. Because no local
deliveries are done and no daemon can be run, Exim does not need root
privilege. It should be possible to run it setuid to <em>exim</em> instead of setuid
to <em>root</em>. See section <a href="spec_52.html#SEC478">Running Exim without privilege</a> for a general discussion about
the advantages and disadvantages of running without root privilege.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_47.html#SEC420" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_49.html#SEC435" 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>