1 MPACK

mpack pack a file in MIME format

2 SYNOPSIS
  mpack 
      -s        subject
      -d        descriptionfile
      -m        maxsize
      -c        content-type
     file
     "address \&..."
             or
     -o         outputfile
             or
     -n         newsgroups  (not supported on OpenVMS)
2 DESCRIPTION
The mpack program encodes the the named file in one or more
MIME messages. The resulting messages are mailed to one or
more recipients, written to a named file or set of files, or
posted to a set of newsgroups. 

2 OPTIONS
All options are given in lower case and must be preceded by 
a "-"

3 s
Usage:  -s " subject"

Set the Subject header field to Subject. By default, mpack
prompt for the contents of the subject header. 

3 d
Usage: -d " descriptionfile

Include the contents of the file descriptionfile in an
introductory section at the beginning of the first generated
message. 

3 m
Usage: -m " maxsize"

Split the message (if necessary) into partial messages, each
not exceeding maxsize characters.  The default limit is the
value of the SPLITSIZE environment variable, or no limit if
the environment variable does not exist. 

Specifying a maxsize of 0 means there is no limit to the
size of the generated message. 

3 c
Usage -c " content-type"
Label the included file as being of MIME type content-type,
which must be a subtype of: application, audio, image, or video.
If this switch is not given, mpack examines the file to
determine its type. 

3 o
Usage: -o " outputfile"

Write the generated message to the file "outputfile", which
must be a true file name, not a logical symbol.  It must 
terminate in filename.extension, ";version_number" is 
optional.

If the message has to be split, the partial messages will
instead be written to the files:

    filename_01.extension
    filename_02.extension
    filename_03.extension
    etc.

3 n
Usage -n " newsgroups"

NOT SUPPORTED ON OpenVMS!!!

Post the generated message(s) to the comma-separated netnews
newsgroups .

3 file

The name of the file to be encoded.

3 address

NOT Supported on OpenVMS!!!  Instead, generate the file(s),
then send it(them) with MAIL.

2 ENVIRONMENT

These logical symbols may be used to change the behavior of 
the program in certain ways:

TMPDIR      Directory to store temporary files.  Default is 
            the user's home directory as specified by SYS$LOGIN:

SPLITSIZE   Default value of the -m switch.

1 MUNPACK

   munpack - unpack messages in MIME or split-uuencode format

2 SYNOPSIS

  munpack [-f] [-q] [-t] [-"C" directory] "filename &..."

2 DESCRIPTION
The munpack program reads each RFC-822 message "filename"
and writes all non-text MIME parts or split-uuencoded files
as files. If no filename argument is given, munpack reads
from standard input (SYS$INPUT). 

If the message suggests a file name to use for the imbedded
part, that name is cleaned of potential problem characters
and used for the output file. If the suggested filename
includes subdirectories, they will be ignored, files are
always unpacked into the directory specified by the user,
not by the message. 

If the message does not suggest a file name, the names
"part.001", "part.002", etc are used in sequence.

If the imbedded part was preceded with textual information,
that information is also written to a file.  The file is
named the same as the imbedded part, with any filename
extension replaced with ".desc". 

2 OPTIONS
Most options are given in lower case and must be preceded by 
a "-".  The "C" option must be given in upper case and be 
quoted.

3 f
Usage: -f

On OpenVMS the default is to flag the attempted creation of higher numbered
versions of a file as a fatal error.  This prevents attacks by, for
instance, sending LOGIN.COM along with 400 other pieces in a MIME message. 
Using -f overrides this protection and allows newer (higher numbered)
versions of files to be created.  This option should rarely be used, but it
might be useful if a series of files are sent with names that are
degenerate as seen by the OpenVMS version of munpack, for instance
file.gif;1 and file.gif;2. 

3 q
Usage: -q
Be quiet.  Supresses messages about saving partial messages and about
messages with no interesting information.

3 t
Usage: -t

Also write the text MIME parts of multipart messages as files.  By
default, text parts that do not have a filename parameter do not get
unpacked.  This option effectively disables the ".desc" file feature
for MIME messages.

3 C
Usage: "-C" " directory"

Change the current directory to directory before reading any
files.  This is useful when invoking munpack from a mail or
news reader.  Note that it will look for the filename to unpack
in the directory indicated, that when munpack is invoked with:

  $ munpack "-C" [.subdir] file_to_unpack

it will look for [.subdir]file_to_unpack.  If you want to unpack an 
existing file into a particular directory where it is not located, use
this form:

  $ munpack "-C" [.subdir] DISK:[DIR1.DIR2]file_to_unpack

ie, provide a full path specification for the input file.

2 DECODING_MIME

To decode a MIME message, first save it to a text file.  If
possible, save it with all headers included.  Munpack can
decode some MIME files when the headers are missing or
incomplete, other files it cannot decode without having the
information in the headers.  In general, messages which have
a statement at the beginning that they are in MIME format
can be decoded without the headers.  Messages which have
been split into multiple parts generally require all headers
in order to be reassembled and decoded. 

Some LAN-based mail systems and some mail providers
(including America Online, as of the writing of this
document) place the mail headers at the bottom of the
message, instead of at the top of the message.  If you are
having problems decoding a MIME message on such a system,
you need to convert the mail back into the standard format
by removing the system's nonstandard headers and moving the
standard Internet headers at the top of the message
(separated from the message body with a blank line). 

There must be exactly one message per file. Munpack cannot
deal with multiple messages in a single file, to decode
things correctly it must know when one message ends and the
next one begins. 

To decode a message, run the command:

 munpack " file"

where "file" is the name of the file containing the message.
 More than one filename may be specified, munpack will try
to decode the message in each file.  For more information on
ways to run munpack, the section "OPTIONS" above.

2 ENVIRONMENT

This logical symbol may be used to change the behavior of 
the program in certain ways:

TMPDIR      Directory to store temporary files.  Default is 
            the user's home directory as specified by SYS$LOGIN:
