Sun Java System Messaging Server 6.3 Administration Guide To Conditionally Delete a Message or Its 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

Similarly, to delete the entire message you could use:

echo "STATUS=178030259" >> $OUTPUT_OPTIONS