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