Encodes a binary file into a printable format for transmission as an e-mail message. Encoded files may be decoded with the
pmdf decodeutility. Both the standard MIME encodings as well as a few additional encodings (e.g., UUENCODE) are supported.
pmdf encode input-file-spec encoded-file-spec
Qualifiers Defaults -encoding=type -encoding=BASE64 -filename -nofilename -header -noheader
input-file-specSpecifies the name of an input file. The input file may be any binary file. Only a single input file may be specified; wildcards are not allowed.
encoded-file-specThe name of the file to produce as output. The file output by
pmdf encodewill contain all of the information necessary to reconstruct the original input file. The format of the output file is described in the Description section below.
pmdf encodehave been, for the most part, made obsolete by MIME-aware user agent such as pine. If you use pine, then files which you send with the
Sendcommand will be encoded automatically, if necessary. Encoded messages which you receive will be decoded automatically, if necessary, and may simply be extracted to a file with the
Savecommand. If, however, you do not use a MIME aware user agent such as pine, then read on.
pmdf decodeutilities are provided with PMDF as a means of transmitting binary files via e-mail. With
pmdf encode, a file may be encoded in a format which uses short records containing only printable characters. Such files can then be transmitted through most any mail system without being altered (e.g., lines wrapped, characters removed or replaced, etc.).
pmdf encodepreserves all file contents and all file attributes when encoding a file. The contents and attributes are properly restored when decoded with
pmdf decode. Absolutely any type of file can be transmitted with these two utilities.
Encoded files have two parts. The first part is a conventional RFC 822 message header. Header lines are used to describe the file format; this information includes a description of the encoding used to convert the file into a printable form for transfer.
pmdf encodecreates this header;
pmdf decodereads it and uses the information it contains to reconstruct the file.
Many encoded messages received with PMDF are decoded automatically for you, thus obviating the need to use
pmdf decodeat all. This is especially true when you use pine whose
Savecommand will extract any MIME-encoded message or message body part. If you use a non-MIME aware user agent, however, you may occasionally receive an encoded message which PMDF could not deliver in its decoded form to mail owing to limitations of mail itself.
-encoding=typeThis qualifier controls the type of encoding used to encode the input file. The possible values for this qualifier are
gzip compressed BASE64,
BINHEX(encoding only, not the file format),
BASE64encoding is the default; this is also the default decoding type used by
-nofilename (default)When used in conjunction with the
-headerqualifier, this qualifier specifies that the filename should be included in the MIME headers generated. Only the name and extension portion of the input file specification will be used; any node, device, directory, and version number information will be discarded. By default, no filename parameter is specified in the
Content-disposition:header lines. Or if used with
-filenamequalifier causes the filename to be included on the
-noheader (default)This qualifier controls whether or not a MIME-compliant header is placed at the beginning of the output.
-headeris the default.
-noheaderis used to produce output suitable for use in non-MIME messaging applications. Note that all structural information about the file is lost when
See the example provided for the
pmdf decodecommand. In that example, the use of
pmdf encodeis also demonstrated.