1#!/bin/sh
2
3cat <<'EOF'
4#
5# Do not edit this file. This file shows the default delivery status
6# notification (DSN) messages that are built into Postfix.
7#
8# To change Postfix DSN messages, perhaps to add non-English text,
9# follow instructions in the bounce(5) manual page.
10#
11EOF
12
13# QUICK INSTRUCTIONS:
14#
15#-Edit a temporary copy of this file, and preview the result of $name
16# expansions with "postconf -b temporary_file". If there are any
17# problems, Postfix will log "warning" or "fatal" messages to the
18# maillog file.
19#
20#-The template file can specify bounce message templates for
21# failed mail, for delayed mail, for successful delivery, or for
22# verbose delivery.  You don't have to specify all templates.
23#
24#-Each template starts with "template_name = <<EOF" and ends
25# with a line that contains the word "EOF" only. You can change the
26# word EOF if you like, but you can't do shell/perl/etc like things
27# such as enclosing it in quotes (template_name = <<'EOF').
28#
29#-Each template consists of a few headers and message text. The
30# headers control what the recipient sees as From: and Subject:, and
31# what MIME information Postfix will generate.
32#
33#-Template message headers must not span multiple lines.
34#
35#-Template message headers must not contain main.cf $parameters.
36#
37#-Template message headers must contain ASCII characters only.
38#
39#-The template message text is not sent in Postmaster copies of
40# delivery status notifications.
41#
42#-Template message text may contain main.cf $parameters. Some
43# parameters have additional features as described below with the
44# delayed mail message template.
45#
46#-Template message text may contain non-ASCII text. In that case you
47# MUST change the character set value in the CHARSET: template header,
48# otherwise Postfix will not use your template. You must specify a
49# character set that is a superset of US-ASCII, because Postfix
50# appends ASCII text after the message template when it sends a
51# delivery status notification.
52#
53#-When previewing the result with "postconf -b temporary_file", be
54# sure to pay particular attention to the time values that appear
55# in the delayed mail notification text.
56#
57#-Once you're satisfied with the result, and once Postfix stops
58# logging warning messages, copy the template to the Postfix
59# configuration directory and specify in main.cf something like:
60#
61# /etc/postfix/main.cf:
62#     bounce_template_file = $config_directory/bounce.cf
63#
64#EOF
65
66IFS=
67while read line; do
68    case "$line" in
69    failure_template*) cat <<'EOF'
70
71#
72# The failure template is used when mail is returned to the sender;
73# either the destination rejected the message, or the destination
74# could not be reached before the message expired in the queue.
75#
76
77EOF
78	;;
79    delay_template*) cat <<'EOF'
80
81#
82# The delay template is used when mail is delayed. Note a neat trick:
83# the default template displays the delay_warning_time value as hours
84# by appending the _hours suffix to the parameter name; it displays
85# the maximal_queue_lifetime value as days by appending the _days
86# suffix.
87#
88# Other suffixes are: _seconds, _minutes, _weeks. There are no other
89# main.cf parameters that have this special behavior.
90#
91# You need to adjust these suffixes (and the surrounding text) if
92# you have very different settings for these time parameters.
93#
94
95EOF
96	;;
97    success_template*) cat <<'EOF'
98
99#
100# The success template is used when mail is delivered to mailbox,
101# when an alias or list is expanded, or when mail is delivered to a
102# system that does not announce DSN support. It is an error to specify
103# a Postmaster-Subject: here.
104#
105
106EOF
107	;;
108    verify_template*) cat <<'EOF'
109
110#
111# The verify template is used for address verification (sendmail -bv
112# address...) or for verbose mail delivery (sendmail -v address...).
113# It is an error to specify a Postmaster-Subject: here.
114#
115
116EOF
117	;;
118    esac
119    echo "$line";
120done
121