Sophie

Sophie

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

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>27. The autoreply transport</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/ch27.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="ch26.html">&lt;-previous</a><a class="next_page" href="ch28.html">next-&gt;</a><div id="chapter" class="chapter">
<h2 id="CHID8" class="">Chapter 27 - The autoreply transport</h2>
<p>


The <span class="docbook_command">autoreply</span> transport is not a true transport in that it does not cause
the message to be transmitted. Instead, it generates a new mail message as an
automatic reply to the incoming message. <span class="docbook_emphasis">References:</span> and
<span class="docbook_emphasis">Auto-Submitted:</span> header lines are included. These are constructed according
to the rules in RFCs 2822 and 3834, respectively.
</p>
<p>
If the router that passes the message to this transport does not have the
<span class="docbook_option">unseen</span> option set, the original message (for the current recipient) is not
delivered anywhere. However, when the <span class="docbook_option">unseen</span> option is set on the router
that passes the message to this transport, routing of the address continues, so
another router can set up a normal message delivery.
</p>
<p>
The <span class="docbook_command">autoreply</span> transport is usually run as the result of mail filtering, a
“vacation” message being the standard example. However, it can also be run
directly from a router like any other transport. To reduce the possibility of
message cascades, messages created by the <span class="docbook_command">autoreply</span> transport always have
empty envelope sender addresses, like bounce messages.
</p>
<p>
The parameters of the message to be sent can be specified in the configuration
by options described below. However, these are used only when the address
passed to the transport does not contain its own reply information. When the
transport is run as a consequence of a
<span class="docbook_option">mail</span>
or <span class="docbook_option">vacation</span> command in a filter file, the parameters of the message are
supplied by the filter, and passed with the address. The transport’s options
that define the message are then ignored (so they are not usually set in this
case). The message is specified entirely by the filter or by the transport; it
is never built from a mixture of options. However, the <span class="docbook_option">file_optional</span>,
<span class="docbook_option">mode</span>, and <span class="docbook_option">return_message</span> options apply in all cases.
</p>
<p>
<span class="docbook_command">Autoreply</span> is implemented as a local transport. When used as a result of a
command in a user’s filter file, <span class="docbook_command">autoreply</span> normally runs under the uid and
gid of the user, and with appropriate current and home directories (see chapter
<a href="ch23.html" title="23. Environment for running local transports">23</a>).
</p>
<p>
There is a subtle difference between routing a message to a <span class="docbook_command">pipe</span> transport
that generates some text to be returned to the sender, and routing it to an
<span class="docbook_command">autoreply</span> transport. This difference is noticeable only if more than one
address from the same message is so handled. In the case of a pipe, the
separate outputs from the different addresses are gathered up and returned to
the sender in a single message, whereas if <span class="docbook_command">autoreply</span> is used, a separate
message is generated for each address that is passed to it.
</p>
<p>
Non-printing characters are not permitted in the header lines generated for the
message that <span class="docbook_command">autoreply</span> creates, with the exception of newlines that are
immediately followed by white space. If any non-printing characters are found,
the transport defers.
Whether characters with the top bit set count as printing characters or not is
controlled by the <span class="docbook_option">print_topbitchars</span> global option.
</p>
<p>
If any of the generic options for manipulating headers (for example,
<span class="docbook_option">headers_add</span>) are set on an <span class="docbook_command">autoreply</span> transport, they apply to the copy
of the original message that is included in the generated message when
<span class="docbook_option">return_message</span> is set. They do not apply to the generated message itself.
</p>
<p>

If the <span class="docbook_command">autoreply</span> transport receives return code 2 from Exim when it submits
the message, indicating that there were no recipients, it does not treat this
as an error. This means that autoreplies sent to $sender_address when this
is empty (because the incoming message is a bounce message) do not cause
problems. They are just discarded.
</p>
<div class="section">
<h3 id="SECID139" class="">1. Private options for autoreply</h3>
<p>

</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">bcc</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies the addresses that are to receive “blind carbon copies” of the
message when the message is specified by the transport.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">cc</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies recipients of the message and the contents of the <span class="docbook_emphasis">Cc:</span> header
when the message is specified by the transport.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">file</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
The contents of the file are sent as the body of the message when the message
is specified by the transport. If both <span class="docbook_option">file</span> and <span class="docbook_option">text</span> are set, the text
string comes first.
</p>
<p>

</p>
<table>






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


</table>
<p>
If this is set, the contents of the file named by the <span class="docbook_option">file</span> option are
subjected to string expansion as they are added to the message.
</p>
<p>

</p>
<table>






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


</table>
<p>
If this option is true, no error is generated if the file named by the <span class="docbook_option">file</span>
option or passed with the address does not exist or cannot be read.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">from</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies the contents of the <span class="docbook_emphasis">From:</span> header when the message is
specified by the transport.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">headers</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies additional RFC 2822 headers that are to be added to the message
when the message is specified by the transport. Several can be given by using
“\n” to separate them. There is no check on the format.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">log</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This option names a file in which a record of every message sent is logged when
the message is specified by the transport.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">mode</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</span>
</td>
<td>Type: <span class="docbook_emphasis">octal integer</span>
</td>
<td>Default: <span class="docbook_emphasis">0600</span>
</td>
</tr>


</table>
<p>
If either the log file or the “once” file has to be created, this mode is
used.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">never_mail</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</span>
</td>
<td>Type: <span class="docbook_emphasis">address list</span>†<span class="docbook_emphasis"></span>
</td>
<td>Default: <span class="docbook_emphasis">unset</span>
</td>
</tr>


</table>
<p>
If any run of the transport creates a message with a recipient that matches any
item in the list, that recipient is quietly discarded. If all recipients are
discarded, no message is created. This applies both when the recipients are
generated by a filter and when they are specified in the transport.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">once</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This option names a file or DBM database in which a record of each <span class="docbook_emphasis">To:</span>
recipient is kept when the message is specified by the transport. <span class="docbook_emphasis">Note</span>:
This does not apply to <span class="docbook_emphasis">Cc:</span> or <span class="docbook_emphasis">Bcc:</span> recipients.
</p>
<p>
If <span class="docbook_option">once</span> is unset, or is set to an empty string, the message is always sent.
By default, if <span class="docbook_option">once</span> is set to a non-empty file name, the message
is not sent if a potential recipient is already listed in the database.
However, if the <span class="docbook_option">once_repeat</span> option specifies a time greater than zero, the
message is sent if that much time has elapsed since a message was last sent to
this recipient. A setting of zero time for <span class="docbook_option">once_repeat</span> (the default)
prevents a message from being sent a second time – in this case, zero means
infinity.
</p>
<p>
If <span class="docbook_option">once_file_size</span> is zero, a DBM database is used to remember recipients,
and it is allowed to grow as large as necessary. If <span class="docbook_option">once_file_size</span> is set
greater than zero, it changes the way Exim implements the <span class="docbook_option">once</span> option.
Instead of using a DBM file to record every recipient it sends to, it uses a
regular file, whose size will never get larger than the given value.
</p>
<p>
In the file, Exim keeps a linear list of recipient addresses and the times at
which they were sent messages. If the file is full when a new address needs to
be added, the oldest address is dropped. If <span class="docbook_option">once_repeat</span> is not set, this
means that a given recipient may receive multiple messages, but at
unpredictable intervals that depend on the rate of turnover of addresses in the
file. If <span class="docbook_option">once_repeat</span> is set, it specifies a maximum time between repeats.
</p>
<p>

</p>
<table>






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


</table>
<p>
See <span class="docbook_option">once</span> above.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">once_repeat</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</span>
</td>
<td>Type: <span class="docbook_emphasis">time</span>†<span class="docbook_emphasis"></span>
</td>
<td>Default: <span class="docbook_emphasis">0s</span>
</td>
</tr>


</table>
<p>
See <span class="docbook_option">once</span> above.
After expansion, the value of this option must be a valid time value.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">reply_to</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies the contents of the <span class="docbook_emphasis">Reply-To:</span> header when the message is
specified by the transport.
</p>
<p>

</p>
<table>






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


</table>
<p>
If this is set, a copy of the original message is returned with the new
message, subject to the maximum size set in the <span class="docbook_option">return_size_limit</span> global
configuration option.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">subject</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies the contents of the <span class="docbook_emphasis">Subject:</span> header when the message is
specified by the transport. It is tempting to quote the original subject in
automatic responses. For example:
</p>
<div class="docbook_literallayout"><pre>
subject = Re: $h_subject:
</pre></div>
<p>
There is a danger in doing this, however. It may allow a third party to
subscribe your users to an opt-in mailing list, provided that the list accepts
bounce messages as subscription confirmations. Well-managed lists require a
non-bounce message to confirm a subscription, so the danger is relatively
small.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">text</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies a single string to be used as the body of the message when the
message is specified by the transport. If both <span class="docbook_option">text</span> and <span class="docbook_option">file</span> are set,
the text comes first.
</p>
<p>

</p>
<table>






<tr>
<td><span class="docbook_option">to</span></td>
<td>Use: <span class="docbook_emphasis">autoreply</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>
This specifies recipients of the message and the contents of the <span class="docbook_emphasis">To:</span> header
when the message is specified by the transport.


</p>
</div>
</div>
<a class="previous_page" href="ch26.html">&lt;-previous</a><a class="next_page" href="ch28.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>