Sun Java System Messaging Server 6 2005Q4 Administration Guide

To Bounce, Delete, or Hold Messages Using the Conversion Channel Output

This section describes how to use the conversion channel options to bounce, delete, or hold messages. The basic procedure is as follows:

  1. Set OVERRIDE-OPTION-FILE=1 in the appropriate conversions file entry. This tells the conversion channel to read the output options from the OUTPUT_OPTIONS file.

  2. Use the conversion script to determine what action is required on a particular message body part.

  3. In the script, specify the special directive for that action by writing the STATUS=directive_code option in the OUTPUT_OPTIONS file.

A complete listing of special directives can be found in msg_svr_base/include/deprecated/pmdf_err.h. The ones commonly used by the conversion channel are:

Table 13–5 Special Directives Commonly Used By the Conversion Channel

NAME  

Hex Value  

Decimal Value  

PMDF__FORCEHOLD

0x0A9C86AA

178030250

PMDF__FORCERETURN

0x0A9C857A

178029946

PMDF__FORCEDELETE

0x0A9C8662

178030178

We will explain the functions of these directives using examples.

To Bounce Messages

To bounce a message using the conversion channel set OVERRIDE-OPTION-FILE=1 in the appropriate conversions file entry and add the following line to your conversion script:

echo "STATUS=178029946" >> $OUTPUT_OPTIONS

If you wish to add a short text string to the bounced message add the following line to the conversion script:

echo OUTPUT_DIAGNOSTIC=text-string >> $OUTPUT_OPTIONS

where text string is something like: “The message sent from your machine contained a virus which has been removed. Be careful about executing email attachments.

To Conditionally Delete Message Parts

It may be useful to delete parts conditionally, depending on what they contain. This can be done using the output options. By contrast, the DELETE=1 conversion parameter clause unconditionally deletes a message part.

To delete a message part using the output options, set OVERRIDE-OPTION-FILE=1 in the appropriate conversions file entry and add the following line to your conversion script:

echo "STATUS=178030178" >> $OUTPUT_OPTIONS

To Hold a Message

It may be useful to hold messages conditionally, depending on what they contain. To delete a message part using the output options, set OVERRIDE-OPTION-FILE=1 in the appropriate conversions file entry and add the following line to your conversion script:

echo "STATUS=178030250" >> $OUTPUT_OPTIONS

This requests that the conversion channel hold the message as a .HELD file in the conversion channel queue.