"Fossies" - the Fresh Open Source Software Archive

Member "courier-1.2.2/courier/doc/dot-forward.html" (22 Jan 2022, 8947 Bytes) of package /linux/misc/courier-1.2.2.tar.bz2:

As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.

    1 <?xml version="1.0"?>
    2 <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><title>dot-forward</title><link rel="stylesheet" type="text/css" href="style.css"/><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"/><link rel="home" href="#dot-forward" title="dot-forward"/><link xmlns="" rel="stylesheet" type="text/css" href="manpage.css"/><meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/><link xmlns="" rel="icon" href="icon.gif" type="image/gif"/><!--
    4 Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for distribution
    5 information.
    7 --></head><body><div class="refentry"><a id="dot-forward" shape="rect"> </a><div class="titlepage"/><div class="refnamediv"><h2>Name</h2><p>dot-forward, dotforward — Read <code class="filename">$HOME/.forward</code></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="informalexample"><pre class="programlisting" xml:space="preserve">
    8 $ cat $HOME/.courier
    9 || dotforward
   10 ./Maildir
   11 </pre></div></div><div class="refsect1"><a id="dot-forward_description" shape="rect"> </a><h2>DESCRIPTION</h2><p>
   12 The <span class="command"><strong>dotforward</strong></span> program is a compatibility module that reads
   13 forwarding instructions in <code class="filename">$HOME/.forward</code>.
   14 <span class="command"><strong>dotforward</strong></span> is used for compatibility
   15 with <span class="command"><strong>sendmail</strong></span> or
   16 other mail servers that use the <code class="filename">$HOME/.forward</code> file. The
   17 <span class="command"><strong>dotforward</strong></span> program is intended to be executed from a
   18 <a class="ulink" href="dot-courier.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">dot-courier</span>(5)</span></a>
   19 delivery instruction file. The
   20 system administrator can add it to the default set of delivery instructions,
   21 thus unilaterally implementing <code class="filename">$HOME/.forward</code> systemwide.  To
   22 read forwarding instructions from <code class="filename">$HOME/.forward</code>, put
   23 "<code class="literal">|| dotforward</code>" on the first line of
   24 <code class="filename">$HOME/.courier*</code>. "<code class="literal">|| dotforward</code>"
   25 can also be added to the <code class="envar">DEFAULTDELIVERY</code> setting in the
   26 <code class="literal">courierd</code> configuration file.  In both cases it must be followed
   27 by a newline, and the remaining delivery instructions, which will be used if
   28 <code class="filename">$HOME/.forward</code> does not exist.</p><p>
   29 <span class="command"><strong>dotforward</strong></span> expects to be invoked from
   30 <a class="ulink" href="dot-courier.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">dot-courier</span>(5)</span></a>
   31 delivery instruction file via the
   32 "<span class="token">||</span>" operator (or from <code class="envar">DEFAULTDELIVERY</code>). <span class="command"><strong>dotforward</strong></span>
   33 checks its environment, reads the message from standard input, reconciles its
   34 environment with the contents of <code class="filename">$HOME/.forward</code>, then prints on
   35 standard output equivalent
   36 <a class="ulink" href="dot-courier.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">dot-courier</span>(5)</span></a>
   37 compatible delivery instructions.
   38 The "<span class="token">||</span>" operator reinterprets <span class="command"><strong>dotforward</strong></span>'s output as additional
   39 delivery instructions, by the
   40 <span class="application">Courier</span> mail server.</p><p>
   41 The different security models of the
   42 <span class="application">Courier</span> mail server and other mail
   43 servers that use
   44 <code class="filename">$HOME/.forward</code>, such as <span class="command"><strong>sendmail</strong></span>,
   45 means that it is
   46 not possible to faithfully duplicate 100% of the behavior of
   47 <code class="filename">$HOME/.forward</code> that originated with <span class="command"><strong>sendmail</strong></span>. The
   48 following section documents the behavior of the <span class="command"><strong>dotforward</strong></span>
   49 utility in the the <span class="application">Courier</span>
   50 mail server mail server.</p><div class="refsect2"><a id="dot-forward__home__forward_processing" shape="rect"> </a><h3><code class="filename">$HOME/.forward</code> processing</h3><p>
   51 <span class="command"><strong>dotforward</strong></span> reads the <code class="envar">DTLINE</code> environment variable,
   52 and the headers of the message being delivered, from standard input.
   53 <code class="envar">DTLINE</code> contains the recipient's E-mail address.  The
   54 <code class="literal">Delivered-To</code> headers list the recipients that already received
   55 this message.  This is used to prevent mail loops between
   56 <code class="filename">$HOME/.forward</code> files from different recipients, which forward
   57 mail to each other.</p><p>
   58 If <code class="filename">$HOME/.forward</code> does not exist, <span class="command"><strong>dotforward</strong></span>
   59 quietly terminates with a zero exit code, doing nothing. The remaining
   60 delivery instructions in <code class="filename">$HOME/.courier</code> are then carried out.</p><p>
   61 If <code class="filename">$HOME/.forward</code> exists, it is expected to contain a list of
   62 addresses that the message should be forwarded to. An address may be an actual
   63 E-mail address, or a name of a program or a mailbox.  Each line in
   64 <code class="filename">$HOME/.forward</code> should contain a list of comma-separated
   65 addresses.  Use "| /path/to/program" (including the double quotes) to specify
   66 a delivery to a program (the message is piped to the given program). Use
   67 "/path/to/mailbox" or "./path/to/mailbox" (again including the double quotes)
   68 to specify a delivery to a mailbox (relative to <code class="literal">$HOME</code> in the
   69 second case).</p><p>
   70 "<code class="literal">| /path/to/program</code>",
   71 "<code class="literal">/path/to/mailbox</code>",
   72  and "<code class="literal">./path/to/mailbox</code>" may also
   73 be listed on a line by themselves without the double quotes.</p><p>
   74 All other addresses are interpreted as E-mail addresses where the mail
   75 should be forwarded.  Any backslash at the beginning of an E-mail address is
   76 removed. Backslashes are used by <span class="command"><strong>sendmail</strong></span> to prevent mail
   77 loops.
   78 The <span class="application">Courier</span> mail server does not need the
   79 backslashes -- it uses a different mechanism to
   80 prevent mail loops.</p><p>
   81 Every E-mail address is checked against the list of E-mail addresses found
   82 in <code class="literal">Delivered-To</code> headers.  If the E-mail address specified in
   83 <code class="filename">$HOME/.forward</code> matches any address in the
   84 <code class="literal">Delivered-To</code> header, it is automatically removed from a list of
   85 addresses.</p><p>
   86 <span class="command"><strong>dotforward</strong></span> normally terminates with the exit code set to
   87 <span class="errorcode">99</span>.
   88 This results in the <span class="application">Courier</span> mail server
   89 considering the message to be succesfully delivered,
   90 and any additional delivery instructions in the <code class="filename">.courier</code> file
   91 will not be carried out.  If an address read from <code class="filename">$HOME/.forward</code>
   92 matches the address in the <code class="envar">DTLINE</code> environment variable, the
   93 address is removed from the list of addresses that the message will be
   94 forwarded to, and <span class="command"><strong>dotforward</strong></span> terminates with the exit code set to
   95 0 (after printing all the relevant delivery instructions to standard output).
   96 The messages will be forwarded, and the
   97 <span class="application">Courier</span> mail server will proceed with
   98 additional
   99 delivery instructions in the <code class="filename">.courier</code> after finishing with the
  100 delivery instructions it reads from <span class="command"><strong>dotforward</strong></span>.</p></div></div><div class="refsect1"><a id="dot-forward_bugs" shape="rect"> </a><h2>BUGS</h2><p>The restrictions and precautions mentioned in
  101 <a class="ulink" href="dot-courier.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">dot-courier</span>(5)</span></a>
  102 are also applicable here. There is
  103 an upper limit on the maximum number of characters that are read from any
  104 process executed by <span class="token">||</span>.
  105 Also if any delivery instruction fails with a transit
  106 exit code, the message will be completely redelivered at a later point, even
  107 to all the addresses it has been succesfully delivered the first time
  108 around.</p></div><div class="refsect1"><a id="dot-forward_see_also" shape="rect"> </a><h2>SEE ALSO</h2><p>
  109 <a class="ulink" href="dot-courier.html" target="_top" shape="rect"><span class="citerefentry"><span class="refentrytitle">dot-courier</span>(5)</span></a>.</p></div></div></body></html>