{
    "content": [
        {
            "type": "text",
            "text": "# bounce(5) (man)\n\n**Summary:** bounce - Postfix bounce message template format\n\n**Synopsis:** bouncetemplatefile = /etc/postfix/bounce.cf\npostconf -b [templatefile]\n\n## See Also\n\n- postconf(5)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (4 lines)\n- **DESCRIPTION** (10 lines)\n- **GENERAL PROCEDURE** (19 lines)\n- **TEMPLATE FILE FORMAT** (44 lines)\n- **TEMPLATE HEADER FORMAT** (6 lines) — 3 subsections\n  - Charset: (5 lines)\n  - Subject: (3 lines)\n  - Postmaster-Subject: (18 lines)\n- **TEMPLATE MESSAGE TEXT FORMAT** (14 lines) — 2 subsections\n  - mydomain (5 lines)\n  - myhostname (16 lines)\n- **SEE ALSO** (3 lines)\n- **LICENSE** (2 lines)\n- **HISTORY** (16 lines)\n\n## Full Content\n\n### NAME\n\nbounce - Postfix bounce message template format\n\n### SYNOPSIS\n\nbouncetemplatefile = /etc/postfix/bounce.cf\n\npostconf -b [templatefile]\n\n### DESCRIPTION\n\nThe  Postfix  bounce(8) server produces delivery status notification (DSN) messages for unde‐\nliverable mail, delayed mail, successful delivery or address verification requests.\n\nBy default, these notifications are generated from built-in templates  with  message  headers\nand message text. Sites can override the built-in information by specifying a bounce template\nfile with the bouncetemplatefile configuration parameter.\n\nThis document describes the general procedure to create a bounce template file,  followed  by\nthe specific details of bounce template formats.\n\n### GENERAL PROCEDURE\n\nTo  create  a customized bounce template file, create a temporary copy of the file /etc/post‐‐\nfix/bounce.cf.default and edit the temporary file.\n\nTo preview the results of $name expansions in the template text, use the command\n\npostconf -b temporaryfile\n\nErrors in the template will be reported to the standard error stream and to the  syslog  dae‐\nmon.\n\nWhile previewing the text, be sure to pay particular attention to the expansion of time value\nparameters that appear in the delayed mail notification text.\n\nOnce the result is satisfactory, copy the template to the Postfix configuration directory and\nspecify in main.cf something like:\n\n/etc/postfix/main.cf:\nbouncetemplatefile = /etc/postfix/bounce.cf\n\n### TEMPLATE FILE FORMAT\n\nThe template file can specify templates for failed mail, delayed mail, successful delivery or\nfor address verification.  These templates are named failuretemplate,  delaytemplate,  suc‐‐\ncesstemplate and verifytemplate, respectively.  You can but do not have to specify all four\ntemplates in a bounce template file.\n\nEach template starts with \"templatename = <<EOF\" and ends with a line that contains the word\n\"EOF\" only. You can change the word EOF, but you can't enclose it in quotes as with the shell\nor with Perl (templatename = <<'EOF'). Here is an example:\n\n# The failure template is used for undeliverable mail.\n\nfailuretemplate = <<EOF\nCharset: us-ascii\nFrom: MAILER-DAEMON (Mail Delivery System)\nSubject: Undelivered Mail Returned to Sender\nPostmaster-Subject: Postmaster Copy: Undelivered Mail\n\nThis is the mail system at host $myhostname.\n\nI'm sorry to have to inform you that your message could not\nbe delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can\ndelete your own text from the attached returned message.\n\nThe mail system\nEOF\n\nThe usage and specification of bounce templates is subject to the following restrictions:\n\n•      No special meaning is given to the backslash character or to leading whitespace; these\nare always taken literally.\n\n•      Inside  the  <<  context,  the \"$\" character is special. To produce a \"$\" character as\noutput, specify \"$$\".\n\n•      Outside the << context, lines beginning with \"#\" are ignored, as are empty lines,  and\nlines consisting of whitespace only.\n\nExamples  of all templates can be found in the file bounce.cf.default in the Postfix configu‐\nration directory.\n\n### TEMPLATE HEADER FORMAT\n\nThe first portion of a bounce template consists of optional template  headers.   Some  become\nmessage  headers in the delivery status notification; some control the formatting of that no‐\ntification. Headers not specified in a template will be left at their default value.\n\nThe following headers are supported:\n\n#### Charset:\n\nThe MIME character set of the template message text.  See the \"TEMPLATE  MESSAGE  TEXT\nFORMAT\" description below.\n\nFrom:  The sender address in the message header of the delivery status notification.\n\n#### Subject:\n\nThe subject in the message header of the delivery status notification that is returned\nto the sender.\n\n#### Postmaster-Subject:\n\nThe subject that will be used in Postmaster copies of undeliverable  or  delayed  mail\nnotifications. These copies are sent under control of the notifyclasses configuration\nparameter.\n\nThe usage and specification of template message headers is subject to the following  restric‐\ntions:\n\n•      Template  message  header  names  can  be specified in upper case, lower case or mixed\ncase. Postfix always produces bounce message header labels of  the  form  \"From:\"  and\n\"Subject:\".\n\n•      Template message headers must not span multiple lines.\n\n•      Template message headers do not support $parameter expansions.\n\n•      Template  message  headers  must  contain  ASCII characters only, and must not contain\nASCII null characters.\n\n### TEMPLATE MESSAGE TEXT FORMAT\n\nThe second portion of a bounce template consists of message text. As the above example shows,\ntemplate  message  text  may contain main.cf $parameters. Besides the parameters that are de‐\nfined in main.cf, the following parameters are treated specially depending on the suffix that\nis appended to their name.\n\ndelaywarningtimesuffix\nExpands into the value of the delaywarningtime parameter, expressed in the time unit\nspecified by suffix, which is one of seconds, minutes, hours, days, or weeks.\n\nmaximalqueuelifetimesuffix\nExpands into the value of the maximalqueuelifetime parameter, expressed in the  time\nunit specified by suffix.  See above under delaywarningtime for possible suffix val‐\nues.\n\n#### mydomain\n\nExpands into the value of the mydomain parameter.  With \"smtputf8enable = yes\",  this\nreplaces ACE labels (xn--mumble) with their UTF-8 equivalent.\n\nThis feature is available in Postfix 3.0.\n\n#### myhostname\n\nExpands  into  the  value  of the myhostname parameter.  With \"smtputf8enable = yes\",\nthis replaces ACE labels (xn--mumble) with their UTF-8 equivalent.\n\nThis feature is available in Postfix 3.0.\n\nThe usage and specification of template message text is subject  to  the  following  restric‐\ntions:\n\n•      The  template message text is not sent in Postmaster copies of delivery status notifi‐\ncations.\n\n•      If the template message text contains non-ASCII characters, Postfix requires that  the\nCharset:  template header is updated.  Specify an appropriate superset of US-ASCII.  A\nsuperset is needed because Postfix appends ASCII text after the message template  when\nit sends a delivery status notification.\n\n### SEE ALSO\n\nbounce(8), Postfix delivery status notifications\npostconf(5), configuration parameters\n\n### LICENSE\n\nThe Secure Mailer license must be distributed with this software.\n\n### HISTORY\n\nThe Postfix bounce template format was originally developed by Nicolas Riendeau.\n\nAUTHOR(S)\nWietse Venema\nIBM T.J. Watson Research\nP.O. Box 704\nYorktown Heights, NY 10598, USA\n\nWietse Venema\nGoogle, Inc.\n111 8th Avenue\nNew York, NY 10011, USA\n\n\n\nBOUNCE(5)\n\n"
        }
    ],
    "structuredContent": {
        "command": "bounce",
        "section": "5",
        "mode": "man",
        "summary": "bounce - Postfix bounce message template format",
        "synopsis": "bouncetemplatefile = /etc/postfix/bounce.cf\npostconf -b [templatefile]",
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "postconf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/postconf/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "GENERAL PROCEDURE",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "TEMPLATE FILE FORMAT",
                "lines": 44,
                "subsections": []
            },
            {
                "name": "TEMPLATE HEADER FORMAT",
                "lines": 6,
                "subsections": [
                    {
                        "name": "Charset:",
                        "lines": 5
                    },
                    {
                        "name": "Subject:",
                        "lines": 3
                    },
                    {
                        "name": "Postmaster-Subject:",
                        "lines": 18
                    }
                ]
            },
            {
                "name": "TEMPLATE MESSAGE TEXT FORMAT",
                "lines": 14,
                "subsections": [
                    {
                        "name": "mydomain",
                        "lines": 5
                    },
                    {
                        "name": "myhostname",
                        "lines": 16
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "HISTORY",
                "lines": 16,
                "subsections": []
            }
        ]
    }
}