Previous | Next | Contents | Index |
Decodes a file which was previously encoded with the pmdf
encode
utility or encoded using a MIME aware mail agent.
None.
pmdf decode encoded-file-spec output-file-spec
Qualifiers Defaults -encoding=type -encoding=base64 -filename -nofilename -header -header
Input file: | encoded-file-spec |
Output file: | output-file-spec |
encoded-file-spec
Specifies the name of an encoded input file. The input file must be a file previously encoded, for example with thepmdf encode
utility.output-file-spec
The name of the file to produce as output. The file output bypmdf decode
will have the identical format, structure, contents, etc. of the original file encoded withpmdf encode
. When the-filename
qualifier is used, the output-file-spec is treated as a default file specification and as much as possible of the file name, if any, specified in the Content-type: header line is used to generate the actual output file name.
pmdf decode
andpmdf encode
have been, for the most part, made obsolete by MIME-aware mail user agents, e.g., Pine. If you use Pine or another MIME-aware mail user agent, then files which you send with theSend
command 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 regular extract command. If, however, you do not use pine or another MIME aware mail user agent, then read on.The
pmdf encode
andpmdf decode
utilities are provided with PMDF as a means of transmitting binary files via non-MIME aware agents. Withpmdf 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 encode
preserves all file contents and all file attributes when encoding a file. The contents and attributes are properly restored when decoded withpmdf decode
. Absolutely any type of binary 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 encode
creates this header;pmdf decode
reads it and uses the information it contains to reconstruct the file.
Note
Many encoded messages received with PMDF are decoded automatically for you, thus obviating the need to usepmdf decode
at all. This is especially true when you use pine whoseSave
command will extract any MIME-encoded message or message body part. If you use mail, however, you may occasionally receive an encoded message which PMDF could not deliver in its decoded form owing to limitations of mail itself.
-encoding=type
This qualifier controls the type of decoding used to decode the input file. The possible values for this qualifier are BASE64, CBASE64 (gzip compressed BASE64), BASE85, BINHEX (encoding only, not the file format), BTOA, HEXADECIMAL, QUOTED_PRINTABLE, UUENCODE, CUUENCODE (gzip compressed UUENCODE). It should not be necessary to specify the encoding used; this should be given in the message header. This qualifier will override the header specification if it is used.-filename
-nofilename (default)
When the-filename
qualifier is used, theoutput-file-spec
is treated as a default file specification and as much as possible of the file name, if any, specified in the Content-type: header line is used to generate the actual output file name. The default is-nofilename
in which case any file name specified in the Content-type: header line is ignored.-header (default)
-noheader
This qualifier controls whether or not the encoded file begins with a MIME-compliant header.-header
is the default.-noheader
is used to force PMDF to read material that was not encoded by a MIME messaging system. When-noheader
is used the-encoding
qualifier is usually needed to specify the encoding since it cannot be determined from the header.
The following example illustrates a typical scenario: sue@college.edu wants to send an executable program to bob@example.com. To do this, Sue might issue the following two commands:
When Bob receives this mail message he should issue the following commands:
% pmdf encode program program.txt % pmdf send -subject=\"Bob, here\'s the program\" program.txt bob@example.com
After decoding the file, Bob may now proceed to run
% mail ...extract the message... % ! Remove any extra material at the beginning and ending of the file. % pmdf decode program.txt programprogram
.Note that Sue could also have used Pine to send the file, bypassing the need to use
pmdf encode
in the first place. See the context sensitive help within Pine for help on sending files from Pine.
Previous | Next | Contents | Index |