Home | History | Annotate | Line # | Download | only in html
      1      1.1      tron <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
      2  1.1.1.6  christos         "https://www.w3.org/TR/html4/loose.dtd">
      3      1.1      tron <html> <head>
      4  1.1.1.4  christos <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      5  1.1.1.5  christos <link rel='stylesheet' type='text/css' href='postfix-doc.css'>
      6      1.1      tron <title> Postfix manual - bounce(5) </title>
      7      1.1      tron </head> <body> <pre>
      8      1.1      tron BOUNCE(5)                                                            BOUNCE(5)
      9      1.1      tron 
     10  1.1.1.6  christos <b><a name="name">NAME</a></b>
     11      1.1      tron        bounce - Postfix bounce message template format
     12      1.1      tron 
     13  1.1.1.6  christos <b><a name="synopsis">SYNOPSIS</a></b>
     14      1.1      tron        <b><a href="postconf.5.html#bounce_template_file">bounce_template_file</a> = /etc/postfix/bounce.cf</b>
     15      1.1      tron 
     16      1.1      tron        <b>postconf -b</b> [<i>template</i><b>_</b><i>file</i>]
     17      1.1      tron 
     18  1.1.1.6  christos <b><a name="description">DESCRIPTION</a></b>
     19  1.1.1.2      tron        The  Postfix  <a href="bounce.8.html"><b>bounce</b>(8)</a>  server  produces  delivery status notification
     20  1.1.1.2      tron        (DSN) messages for undeliverable mail, delayed mail, successful  deliv-
     21  1.1.1.2      tron        ery or address verification requests.
     22  1.1.1.2      tron 
     23  1.1.1.2      tron        By  default,  these notifications are generated from built-in templates
     24  1.1.1.2      tron        with message headers and message text. Sites can override the  built-in
     25  1.1.1.2      tron        information  by  specifying a bounce template file with the <b><a href="postconf.5.html#bounce_template_file">bounce_tem</a>-</b>
     26  1.1.1.2      tron        <b><a href="postconf.5.html#bounce_template_file">plate_file</a></b> configuration parameter.
     27  1.1.1.2      tron 
     28  1.1.1.2      tron        This document describes the general procedure to create a  bounce  tem-
     29  1.1.1.2      tron        plate  file,  followed  by the specific details of bounce template for-
     30  1.1.1.2      tron        mats.
     31      1.1      tron 
     32  1.1.1.6  christos <b><a name="general_procedure">GENERAL PROCEDURE</a></b>
     33  1.1.1.2      tron        To create a customized bounce template file, create a temporary copy of
     34  1.1.1.2      tron        the file <b>/etc/postfix/bounce.cf.default</b> and edit the temporary file.
     35      1.1      tron 
     36  1.1.1.2      tron        To  preview  the  results of $<i>name</i> expansions in the template text, use
     37  1.1.1.2      tron        the command
     38      1.1      tron 
     39      1.1      tron            <b>postconf -b</b> <i>temporary</i><b>_</b><i>file</i>
     40      1.1      tron 
     41  1.1.1.2      tron        Errors in the template will be reported to the  standard  error  stream
     42  1.1.1.2      tron        and to the syslog daemon.
     43      1.1      tron 
     44  1.1.1.2      tron        While  previewing  the text, be sure to pay particular attention to the
     45  1.1.1.2      tron        expansion of time value parameters that  appear  in  the  delayed  mail
     46  1.1.1.2      tron        notification text.
     47  1.1.1.2      tron 
     48  1.1.1.2      tron        Once  the result is satisfactory, copy the template to the Postfix con-
     49  1.1.1.2      tron        figuration directory and specify in <a href="postconf.5.html">main.cf</a> something like:
     50      1.1      tron 
     51      1.1      tron        /etc/postfix/<a href="postconf.5.html">main.cf</a>:
     52      1.1      tron            <a href="postconf.5.html#bounce_template_file">bounce_template_file</a> = /etc/postfix/bounce.cf
     53      1.1      tron 
     54  1.1.1.6  christos <b><a name="template_file_format">TEMPLATE FILE FORMAT</a></b>
     55  1.1.1.2      tron        The template file can specify templates for failed mail, delayed  mail,
     56  1.1.1.2      tron        successful  delivery  or for address verification.  These templates are
     57  1.1.1.2      tron        named  <b>failure_template</b>,  <b>delay_template</b>,  <b>success_template</b>  and   <b>ver-</b>
     58  1.1.1.2      tron        <b>ify_template</b>,  respectively.   You  can  but do not have to specify all
     59  1.1.1.2      tron        four templates in a bounce template file.
     60  1.1.1.2      tron 
     61  1.1.1.2      tron        Each template starts with "<i>template</i><b>_</b><i>name</i> <b>=</b> &lt;&lt;<b>EOF</b>" and ends with a  line
     62  1.1.1.2      tron        that contains the word "<b>EOF</b>" only. You can change the word EOF, but you
     63  1.1.1.2      tron        can't enclose it in quotes  as  with  the  shell  or  with  Perl  (<i>tem-</i>
     64  1.1.1.2      tron        <i>plate</i><b>_</b><i>name</i> <b>=</b> &lt;&lt;<b>'EOF'</b>). Here is an example:
     65      1.1      tron 
     66      1.1      tron            # The failure template is used for undeliverable mail.
     67      1.1      tron 
     68      1.1      tron            failure_template = &lt;&lt;EOF
     69      1.1      tron            Charset: us-ascii
     70      1.1      tron            From: MAILER-DAEMON (Mail Delivery System)
     71      1.1      tron            Subject: Undelivered Mail Returned to Sender
     72      1.1      tron            Postmaster-Subject: Postmaster Copy: Undelivered Mail
     73      1.1      tron 
     74      1.1      tron            This is the mail system at host $<a href="postconf.5.html#myhostname">myhostname</a>.
     75      1.1      tron 
     76      1.1      tron            I'm sorry to have to inform you that your message could not
     77      1.1      tron            be delivered to one or more recipients. It's attached below.
     78      1.1      tron 
     79      1.1      tron            For further assistance, please send mail to postmaster.
     80      1.1      tron 
     81      1.1      tron            If you do so, please include this problem report. You can
     82      1.1      tron            delete your own text from the attached returned message.
     83      1.1      tron 
     84      1.1      tron                               The mail system
     85      1.1      tron            EOF
     86      1.1      tron 
     87  1.1.1.2      tron        The  usage and specification of bounce templates is subject to the fol-
     88  1.1.1.2      tron        lowing restrictions:
     89  1.1.1.2      tron 
     90  1.1.1.2      tron        <b>o</b>      No special meaning is given to the  backslash  character  or  to
     91  1.1.1.2      tron               leading whitespace; these are always taken literally.
     92      1.1      tron 
     93  1.1.1.2      tron        <b>o</b>      Inside  the &lt;&lt; context, the "$" character is special. To produce
     94  1.1.1.2      tron               a "$" character as output, specify "$$".
     95      1.1      tron 
     96  1.1.1.2      tron        <b>o</b>      Outside the &lt;&lt; context, lines beginning with "#" are ignored, as
     97  1.1.1.2      tron               are empty lines, and lines consisting of whitespace only.
     98  1.1.1.2      tron 
     99  1.1.1.2      tron        Examples of all templates can be found in the file <b>bounce.cf.default</b> in
    100  1.1.1.2      tron        the Postfix configuration directory.
    101      1.1      tron 
    102  1.1.1.6  christos <b><a name="template_header_format">TEMPLATE HEADER FORMAT</a></b>
    103  1.1.1.2      tron        The first portion of a bounce template consists  of  optional  template
    104  1.1.1.2      tron        headers.   Some become message headers in the delivery status notifica-
    105  1.1.1.2      tron        tion; some control the formatting of  that  notification.  Headers  not
    106  1.1.1.2      tron        specified in a template will be left at their default value.
    107      1.1      tron 
    108      1.1      tron        The following headers are supported:
    109      1.1      tron 
    110      1.1      tron        <b>Charset:</b>
    111  1.1.1.2      tron               The  MIME  character  set of the template message text.  See the
    112  1.1.1.2      tron               "TEMPLATE MESSAGE TEXT FORMAT" description below.
    113      1.1      tron 
    114  1.1.1.2      tron        <b>From:</b>  The sender address in the message header of the delivery  status
    115  1.1.1.2      tron               notification.
    116      1.1      tron 
    117      1.1      tron        <b>Subject:</b>
    118  1.1.1.2      tron               The subject in the message header of the delivery status notifi-
    119  1.1.1.2      tron               cation that is returned to the sender.
    120      1.1      tron 
    121      1.1      tron        <b>Postmaster-Subject:</b>
    122  1.1.1.2      tron               The subject that will be used in Postmaster copies of undeliver-
    123  1.1.1.2      tron               able  or delayed mail notifications. These copies are sent under
    124  1.1.1.2      tron               control of the <a href="postconf.5.html#notify_classes">notify_classes</a> configuration parameter.
    125  1.1.1.2      tron 
    126  1.1.1.2      tron        The usage and specification of template message headers is  subject  to
    127  1.1.1.2      tron        the following restrictions:
    128  1.1.1.2      tron 
    129  1.1.1.2      tron        <b>o</b>      Template  message  header  names can be specified in upper case,
    130  1.1.1.2      tron               lower case or mixed case. Postfix always produces bounce message
    131  1.1.1.2      tron               header labels of the form "<b>From:</b>" and "<b>Subject:</b>".
    132  1.1.1.2      tron 
    133  1.1.1.2      tron        <b>o</b>      Template message headers must not span multiple lines.
    134  1.1.1.2      tron 
    135  1.1.1.2      tron        <b>o</b>      Template message headers do not support $parameter expansions.
    136  1.1.1.2      tron 
    137  1.1.1.2      tron        <b>o</b>      Template message headers must contain ASCII characters only, and
    138  1.1.1.2      tron               must not contain ASCII null characters.
    139      1.1      tron 
    140  1.1.1.6  christos <b><a name="template_message_text_format">TEMPLATE MESSAGE TEXT FORMAT</a></b>
    141  1.1.1.2      tron        The second portion of a bounce template consists of  message  text.  As
    142  1.1.1.2      tron        the  above  example  shows,  template  message text may contain <a href="postconf.5.html">main.cf</a>
    143  1.1.1.2      tron        $parameters. Besides the parameters that are defined  in  <a href="postconf.5.html">main.cf</a>,  the
    144  1.1.1.2      tron        following parameters are treated specially depending on the suffix that
    145  1.1.1.2      tron        is appended to their name.
    146      1.1      tron 
    147      1.1      tron        <b>delay_warning_time_</b><i>suffix</i>
    148  1.1.1.2      tron               Expands into the  value  of  the  <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b>  parameter,
    149  1.1.1.2      tron               expressed  in the time unit specified by <i>suffix</i>, which is one of
    150  1.1.1.2      tron               <b>seconds</b>, <b>minutes</b>, <b>hours, days</b>, or <b>weeks</b>.
    151      1.1      tron 
    152      1.1      tron        <b>maximal_queue_lifetime_</b><i>suffix</i>
    153  1.1.1.2      tron               Expands into the value of the <b><a href="postconf.5.html#maximal_queue_lifetime">maximal_queue_lifetime</a></b>  parameter,
    154  1.1.1.2      tron               expressed in the time unit specified by <i>suffix</i>.  See above under
    155  1.1.1.2      tron               <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a></b> for possible <i>suffix</i> values.
    156  1.1.1.2      tron 
    157  1.1.1.3  christos        <b><a href="postconf.5.html#mydomain">mydomain</a></b>
    158  1.1.1.3  christos               Expands into the value of the <b><a href="postconf.5.html#mydomain">mydomain</a></b>  parameter.   With  "smt-
    159  1.1.1.3  christos               putf8_enable  = yes", this replaces ACE labels (xn--mumble) with
    160  1.1.1.3  christos               their UTF-8 equivalent.
    161  1.1.1.3  christos 
    162  1.1.1.3  christos               This feature is available in Postfix 3.0.
    163  1.1.1.3  christos 
    164  1.1.1.3  christos        <b><a href="postconf.5.html#myhostname">myhostname</a></b>
    165  1.1.1.3  christos               Expands into the value of the <b><a href="postconf.5.html#myhostname">myhostname</a></b> parameter.  With  "smt-
    166  1.1.1.3  christos               putf8_enable  = yes", this replaces ACE labels (xn--mumble) with
    167  1.1.1.3  christos               their UTF-8 equivalent.
    168  1.1.1.3  christos 
    169  1.1.1.3  christos               This feature is available in Postfix 3.0.
    170  1.1.1.3  christos 
    171  1.1.1.2      tron        The usage and specification of template message text is subject to  the
    172  1.1.1.2      tron        following restrictions:
    173  1.1.1.2      tron 
    174  1.1.1.2      tron        <b>o</b>      The  template  message  text is not sent in Postmaster copies of
    175  1.1.1.2      tron               delivery status notifications.
    176  1.1.1.2      tron 
    177  1.1.1.2      tron        <b>o</b>      If the template  message  text  contains  non-ASCII  characters,
    178  1.1.1.2      tron               Postfix  requires  that the <b>Charset:</b> template header is updated.
    179  1.1.1.2      tron               Specify an appropriate superset  of  US-ASCII.   A  superset  is
    180  1.1.1.2      tron               needed because Postfix appends ASCII text after the message tem-
    181      1.1      tron               plate when it sends a delivery status notification.
    182      1.1      tron 
    183  1.1.1.6  christos <b><a name="see_also">SEE ALSO</a></b>
    184      1.1      tron        <a href="bounce.8.html">bounce(8)</a>, Postfix delivery status notifications
    185      1.1      tron        <a href="postconf.5.html">postconf(5)</a>, configuration parameters
    186      1.1      tron 
    187  1.1.1.6  christos <b><a name="license">LICENSE</a></b>
    188  1.1.1.2      tron        The Secure Mailer license must be distributed with this software.
    189      1.1      tron 
    190  1.1.1.6  christos <b><a name="history">HISTORY</a></b>
    191  1.1.1.2      tron        The Postfix bounce template format was originally developed by  Nicolas
    192  1.1.1.2      tron        Riendeau.
    193      1.1      tron 
    194      1.1      tron <b>AUTHOR(S)</b>
    195      1.1      tron        Wietse Venema
    196      1.1      tron        IBM T.J. Watson Research
    197      1.1      tron        P.O. Box 704
    198      1.1      tron        Yorktown Heights, NY 10598, USA
    199      1.1      tron 
    200  1.1.1.3  christos        Wietse Venema
    201  1.1.1.3  christos        Google, Inc.
    202  1.1.1.3  christos        111 8th Avenue
    203  1.1.1.3  christos        New York, NY 10011, USA
    204  1.1.1.3  christos 
    205      1.1      tron                                                                      BOUNCE(5)
    206      1.1      tron </pre> </body> </html>
    207