Sun Java System Messaging Server 6.3 Administration Guide

10.10.1 To Construct and Modify Status Notifications

A single notification message is constructed from a set of three files: return_prefix.txt + return_ActionStatus.txt + return_suffix.txt

To customize or localize notifications, you would create a complete set of return_*.txt files for each locale and/or customization and store it in a separate directory. For example, you could have French notification files stored in one directory, Spanish for another, and notifications for a special unsolicited bulk email channel stored in a third.

Note –

Sample files for French, German, and Spanish are included in this release. These files can be modified to suit your specific needs.

For double-byte languages such as Japanese, be sure to construct your text in Japanese, then view the text as if it was ASCII to check for % characters. If there are accidental % characters, then replace them with %%.

The format and structure of status notification message sets is described below.

  1. return_prefix.txt provides appropriate header text as well as introductory material for the body. The default for US-english locale is as follows:

    Content-type: text/plain; charset=us-asci
    Content-language: EN-US
    This report relates to a message you sent with the following
    header fields: %H

    Non-US-ASCII status notification messages should change the charset parameter and Content-Language header value appropriately (for example, for French localized files the values would be ISO-8859-1 and fr). %H is a header substitution sequence defined in Table 10–10.

  2. return_<ActionStatus>.txt contains status-specific text. ActionStatus refers to a message’s MTA status type. For example, the default text for return_failed.txt is as follows:

    Your message cannot be delivered to the following recipients:%R

    The default text for return_bounced.txt is:

    Your message is being returned. It was forced to return bythe postmaster.

    The recipient list for this message was:%R

  3. return_suffix.txt contains concluding text. By default this file is blank.

Table 10–10 Notification Message Substitution Sequences




Expands into the message’s headers. 


Expands into the number of units1 the message has been queued.


Expands into the number of units1 the message has left in the queue before it is returned.


Expands into the number of units1 a message is allowed to stay in the queue.

%S [%s] 

Expands to the letter S or s if the previously expanded numeric value was not equal to one. Example: “%C day%s” can expand to “1 day” or “2 days” depending on how many days the message has been queued. 

%U [%u] 

Expands into the time units Hour [hour] or Day [day], in use. Example: “%C %U%s” can expand to “2 days” or “1 hour” depending on how many days or hours the message has been queued, and the value of the MTA option RETURN_UNITS. If you have set RETURN_UNITS=1 (hours) and your site is using localized status notification messages, you will need to edit return_delayed.txt and return_timedout.txt and replace the word “days” with the word hours for all languages other than English. French, replace jour(s) with heure(s). German, replace Tag(e) with Stunde(n). Spanish, replace día(s) with hora(s)


Expands into the list of the message’s recipients. 


% (Note that the text is scanned byte by byte for substitutions sequences regardless of character set. Check for unintended % signs if you are using a double byte character set.) 

1 Units is defined by the RETURN_UNITS option in the MTA Options file and can be hours or days (default).