Sophie

Sophie

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

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>46. Customizing bounce and warning messages</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="ch45.html" title="45. SMTP processing" /><link rel="next" href="ch47.html" title="47. Some common configuration settings" /></head><body><div class="navheader">
<table width="100%" summary="Navigation header"><tr><td width="20%" align="left"><a accesskey="p" href="ch45.html">Prev</a> </td><th width="60%" align="center"> </th><td width="20%" align="right"> <a accesskey="n" href="ch47.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#toc0417" id="CHAPemsgcust">46. Customizing bounce and warning messages</a></h2></div>
</div>
</div>
<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 <span class="emphasis"><em>From:</em></span> and <span class="emphasis"><em>To:</em></span> header lines are automatically generated; you can
cause a <span class="emphasis"><em>Reply-To:</em></span> line to be added by setting the <span><strong class="option">errors_reply_to</strong></span>
option. Exim also adds the line
</p>
<pre class="literallayout">Auto-Submitted: auto-generated
</pre><p>
to all warning and bounce messages,
</p>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 xmlns="" class="title"><a xmlns="http://www.w3.org/1999/xhtml" href="index.html#toc0418" id="SECID239">46.1 Customizing bounce messages</a></h3></div>
</div>
</div>
<p>
<a id="id646336" class="indexterm"></a>
<a id="id646621" class="indexterm"></a>
If <span><strong class="option">bounce_message_text</strong></span> is set, its contents are included in the default
message immediately after “<span class="quote">This message was created automatically by mail
delivery software.</span>” The string is not expanded. It is not used if
<span><strong class="option">bounce_message_file</strong></span> is set.
</p>
<p>
When <span><strong class="option">bounce_message_file</strong></span> 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>
<p>
<a id="id646666" class="indexterm"></a>
<a id="id646678" class="indexterm"></a>
Each item of text that is read from the file is expanded, and there are two
expansion variables which can be of use here: <em class="varname">$bounce_recipient</em> is set to
the recipient of an error message while it is being created, and
<em class="varname">$bounce_return_size_limit</em> contains the value of the <span><strong class="option">return_size_limit</strong></span>
option, rounded to a whole number.
</p>
<p>
The items must appear in the file in the following order:
</p>
<div class="itemizedlist">
<ul type="disc"><li><p>
The first item is included in the headers, and should include at least a
<span class="emphasis"><em>Subject:</em></span> header. Exim does not check the syntax of these headers.
</p>
</li><li><p>
The second item forms the start of the error message. After it, Exim lists the
failing addresses with their error messages.
</p>
</li><li><p>
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.
</p>
</li><li><p>
The fourth item is used to introduce the copy of the message that is returned
as part of the error report.
</p>
</li><li><p>
The fifth item is added after the fourth one if the returned message is
truncated because it is bigger than <span><strong class="option">return_size_limit</strong></span>.
</p>
</li><li><p>
The sixth item is added after the copy of the original message.
</p>
</li></ul></div>
<p>
The default state (<span><strong class="option">bounce_message_file</strong></span> unset) is equivalent to the
following file, in which the sixth item is empty. The <span class="emphasis"><em>Subject:</em></span> and some
other lines have been split in order to fit them on the page:
</p>
<pre class="literallayout">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></div>
<div class="section" lang="en" xml:lang="en">
<div class="titlepage">
<div>
<div>
<h3 xmlns="" class="title"><a xmlns="http://www.w3.org/1999/xhtml" href="index.html#toc0419" id="SECTcustwarn">46.2 Customizing warning messages</a></h3></div>
</div>
</div>
<p>
<a id="id646807" class="indexterm"></a>
<a id="id646821" class="indexterm"></a>
The option <span><strong class="option">warn_message_file</strong></span> 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>
<div class="itemizedlist">
<ul type="disc"><li><p>
The first item is included in the headers, and should include at least a
<span class="emphasis"><em>Subject:</em></span> header. Exim does not check the syntax of these headers.
</p>
</li><li><p>
The second item forms the start of the warning message. After it, Exim lists
the delayed addresses.
</p>
</li><li><p>
The third item then ends the message.
</p>
</li></ul></div>
<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>
<pre class="literallayout">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><p>
<a id="id646894" class="indexterm"></a>
<a id="id646906" class="indexterm"></a>
However, in the default state the subject and date lines are omitted if no
appropriate headers exist. During the expansion of this file,
<em class="varname">$warn_message_delay</em> is set to the delay time in one of the forms “<span class="quote">&lt;<span class="emphasis"><em>n</em></span>&gt;
minutes</span>” or “<span class="quote">&lt;<span class="emphasis"><em>n</em></span>&gt; hours</span>”, and <em class="varname">$warn_message_recipients</em> contains a list
of recipients for the warning message. There may be more than one if there are
multiple addresses with different <span><strong class="option">errors_to</strong></span> settings on the routers that
handled them.
</p>
</div>
</div>
<div class="navfooter">
<table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch45.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> <a accesskey="n" href="ch47.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>