Sophie

Sophie

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

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: 46. Customizing bounce and warning messages</title>

<meta name="description" content="Specification of the Exim Mail Transfer Agent: 46. Customizing bounce and warning messages">
<meta name="keywords" content="Specification of the Exim Mail Transfer Agent: 46. Customizing bounce and warning messages">
<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="Customizing-messages"></a>
<a name="SEC417"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="spec_45.html#SEC416" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC418" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="spec_45.html#SEC405" 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_47.html#SEC420" 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"> 46. Customizing bounce and warning messages </h1>

<p>When a message fails to be delivered, or remains on the queue for more than a
configured amount of time, Exim sends a message to the original sender, or
to an alternative configured address. The text of these messages is built into
the code of Exim, but it is possible to change it, either by adding a single
string, or by replacing each of the paragraphs by text supplied in a file.
</p>
<p>The <em>From:</em> and <em>To:</em> header lines are automatically generated; you can
cause a <em>Reply-To:</em> line to be added by setting the <code>errors_reply_to</code>
option. Exim also adds the line
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">Auto-Submitted: auto-generated
</pre></td></tr></table>

<p>to all warning and bounce messages,
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC418">46.1 Customizing bounce messages</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC419">46.2 Customizing warning messages</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Customizing-bounce-messages"></a>
<a name="SEC418"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC417" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC419" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC417" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC417" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_47.html#SEC420" 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>
<h2 class="section"> 46.1 Customizing bounce messages </h2>

<p>If <code>bounce_message_text</code> is set, its contents are included in the default
message immediately after &quot;This message was created automatically by mail
delivery software.&quot; The string is not expanded. It is not used if
<code>bounce_message_file</code> is set.
</p>
<p>When <code>bounce_message_file</code> is set, it must point to a template file for
constructing error messages. The file consists of a series of text items,
separated by lines consisting of exactly four asterisks. If the file cannot be
opened, default text is used and a message is written to the main and panic
logs. If any text item in the file is empty, default text is used for that
item.
</p>
<a name="IDX2732"></a>
<a name="IDX2733"></a>
<p>Each item of text that is read from the file is expanded, and there are two
expansion variables which can be of use here: <code>$bounce_recipient</code> is set to
the recipient of an error message while it is being created, and
<code>$bounce_return_size_limit</code> contains the value of the <code>return_size_limit</code>
option, rounded to a whole number.
</p>
<p>The items must appear in the file in the following order:
</p>
<ul class="toc">
<li>
The first item is included in the headers, and should include at least a
<em>Subject:</em> header. Exim does not check the syntax of these headers.

</li><li>
The second item forms the start of the error message. After it, Exim lists the
failing addresses with their error messages.

</li><li>
The third item is used to introduce any text from pipe transports that is to be
returned to the sender. It is omitted if there is no such text.

</li><li>
The fourth item is used to introduce the copy of the message that is returned
as part of the error report.

</li><li>
The fifth item is added after the fourth one if the returned message is
truncated because it is bigger than <code>return_size_limit</code>.

</li><li>
The sixth item is added after the copy of the original message.
</li></ul>

<p>The default state (<code>bounce_message_file</code> unset) is equivalent to the
following file, in which the sixth item is empty. The <em>Subject:</em> and some
other lines have been split in order to fit them on the page:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">Subject: Mail delivery failed
  ${if eq{$sender_address}{$bounce_recipient}
  {: returning message to sender}}
****
This message was created automatically by mail delivery software.

A message ${if eq{$sender_address}{$bounce_recipient}
  {that you sent }{sent by

&lt;$sender_address&gt;

}}could not be delivered to all of its recipients.
This is a permanent error. The following address(es) failed:
****
The following text was generated during the delivery attempt(s):
****
------ This is a copy of the message, including all the headers.
  ------
****
------ The body of the message is $message_size characters long;
  only the first
------ $bounce_return_size_limit or so are included here.
****
</pre></td></tr></table>

<hr size="6">
<a name="Customizing-warning-messages"></a>
<a name="SEC419"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC418" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_47.html#SEC420" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC417" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC417" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="spec_47.html#SEC420" 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>
<h2 class="section"> 46.2 Customizing warning messages </h2>

<p>The option <code>warn_message_file</code> can be pointed at a template file for use when
warnings about message delays are created. In this case there are only three
text sections:
</p>
<ul class="toc">
<li>
The first item is included in the headers, and should include at least a
<em>Subject:</em> header. Exim does not check the syntax of these headers.

</li><li>
The second item forms the start of the warning message. After it, Exim lists
the delayed addresses.

</li><li>
The third item then ends the message.
</li></ul>

<p>The default state is equivalent to the following file, except that some lines
have been split here, in order to fit them on the page:
</p>
<table><tr><td>&nbsp;</td><td><pre class="example">Subject: Warning: message $message_exim_id delayed
  $warn_message_delay
****
This message was created automatically by mail delivery software.

A message ${if eq{$sender_address}{$warn_message_recipients}
{that you sent }{sent by

&lt;$sender_address&gt;

}}has not been delivered to all of its recipients after
more than $warn_message_delay on the queue on $primary_hostname.

The message identifier is:     $message_exim_id
The subject of the message is: $h_subject
The date of the message is:    $h_date

The following address(es) have not yet been delivered:
****
No action is required on your part. Delivery attempts will
continue for some time, and this warning may be repeated at
intervals if the message remains undelivered. Eventually the
mail delivery software will give up, and when that happens,
the message will be returned to you.
</pre></td></tr></table>

<a name="IDX2734"></a>
<a name="IDX2735"></a>
<p>However, in the default state the subject and date lines are omitted if no
appropriate headers exist. During the expansion of this file,
<code>$warn_message_delay</code> is set to the delay time in one of the forms &quot;&lt;<em>n</em>&gt;
minutes&quot; or &quot;&lt;<em>n</em>&gt; hours&quot;, and <code>$warn_message_recipients</code> contains a list
of recipients for the warning message. There may be more than one if there are
multiple addresses with different <code>errors_to</code> settings on the routers that
handled them.
</p>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC417" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="spec_47.html#SEC420" 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>