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