Previous | Contents | Index |
PMDF's conversion service facility may be used to process with
site-supplied procedures a message so as to produce a new form of the
message. Unlike either the sorts of CHARSET-CONVERSION
operations discussed above or the conversion
channel,
which operate on the content of individual MIME message parts,
conversion services operate on entire MIME message parts (MIME headers
and content) as well as entire MIME messages. Also, unlike other
CHARSET-CONVERSION
operations or conversion channel
operations, conversion services are expected to do their own MIME
disassembly, decoding, re-encoding, and reassembly.
Like other CHARSET-CONVERSION
operations, conversion
services are enabled through the CHARSET-CONVERSION
mapping table. If the first probe of the
CHARSET-CONVERSION
mapping table yields a
"Yes
" or "Always
"
keyword, then PMDF will check for the presence of a PMDF conversions
file. 6 If a conversions file exists, then PMDF will look in
it for an entry specifying a SERVICE-COMMAND
, and if it
finds such an entry, execute it. The conversions file entries should
have the form
in-chan=channel-pattern; in-type=type-pattern; in-subtype=subtype-pattern; service-command=command |
command
string. This is
the command which should be executed to perform a service conversion
(e.g., invoke a document converter). The command must process
an input file containing the message text to be serviced and produce as
output a file containing the new message text. On OpenVMS, the command
must exit with an odd-valued status code if successful and an
even-valued status code if unsuccessful. On UNIX, the command must exit
with a 0 if successful and a non-zero value otherwise.
For instance, the combination of a CHARSET-CONVERSION
table such as
CHARSET-CONVERSION IN-CHAN=bsout_*;OUT-CHAN=*;CONVERT Yes |
in-chan=bsout_*; in-type=*; in-subtype=*; service-command="@PMDF_COM:COMPRESS.COM COMPRESS 'INPUT_FILE' 'OUTPUT_FILE'" |
in-chan=bsout_*; in-type=*; in-subtype=*; service-command="/pmdf/bin/compress.sh compress $INPUT_FILE $OUTPUT_FILE" |
in-chan=bsout_*; in-type=*; in-subtype=*; service-command="c:\pmdf\bin\compress.exe %INPUT_FILE% %OUTPUT_FILE%" |
will result in all messages coming from a bsout_*
channel
being compressed.
DCL symbols (OpenVMS) or environment variables (UNIX and NT) are used to pass the names of the input and output files as well as the name of a file containing the list of the message's envelope recipient addresses. The names of these environment variables are:
Variable | Usage |
---|---|
INPUT_FILE | Name of the input file to process |
OUTPUT_FILE | Name of the output file to produce |
INFO_FILE | Name of the file containing envelope recipient addresses |
INPUT_FILE
and
OUTPUT_FILE
have the values a.in
and
a.out
, then the following declaration on OpenVMS,
in-chan=bsout_*; in-type=*; in-subtype=*; service-command="@PMDF_COM:CONVERT.COM 'INPUT_FILE' 'OUTPUT_FILE'" |
@PMDF_COM:CONVERT.COM A.IN A.OUT |
in-chan=bsout_*; in-type=*; in-subtype=*; service-command="/pmdf/bin/convert.sh $INPUT_FILE $OUTPUT_FILE" |
/pmdf/bin/convert.sh a.in a.out |
in-chan-bsout_*; in-type=*; in-subtype=*; service-command="c:\pmdf\bin\convert.exe %INPUT_FILE% %OUTPUT_FILE%" |
c:\pmdf\bin\convert.exe a.in a.out |
6 The conversions file is located via
the
|
Previous | Next | Contents | Index |