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