| 1 |
.TH MUNPACK 1 |
| 2 |
.SH NAME |
| 3 |
munpack \- unpack messages in MIME or split-uuencode format |
| 4 |
.SH SYNOPSIS |
| 5 |
.B munpack |
| 6 |
[ |
| 7 |
.B \-f |
| 8 |
] |
| 9 |
[ |
| 10 |
.B \-q |
| 11 |
] |
| 12 |
[ |
| 13 |
.B \-t |
| 14 |
] |
| 15 |
[ |
| •16 |
.B \-r |
| 17 |
.I character |
| 18 |
] |
| 19 |
[ |
| 20 |
.B \-C |
| 21 |
.I directory |
| 22 |
] |
| 23 |
[ |
| 24 |
.I "filename \&..." |
| 25 |
] |
| 26 |
.SH DESCRIPTION |
| •27 |
The |
| 28 |
.I munpack |
| 29 |
program reads each RFC-822 message |
| 30 |
.I filename |
| •31 |
and writes all non-text MIME parts |
| 32 |
or split-uuencoded files as files. |
| 33 |
If no filename argument is given, |
| 34 |
.B munpack |
| 35 |
reads from standard input. |
| 36 |
.LP |
| •37 |
If the message suggests a file name to use for the imbedded part, |
| 38 |
that name is cleaned of potential problem characters |
| 39 |
and used for the output file. |
| 40 |
If the suggested filename includes subdirectories, |
| 41 |
they will be created as necessary. |
| 42 |
If the message does not suggest a file name, |
| 43 |
the names "part1", "part2", etc.\& are used in sequence. |
| 44 |
.LP |
| 45 |
If the imbedded part was preceded with textual information, |
| 46 |
that information is also written to a file. |
| 47 |
The file is named the same as the imbedded part, |
| 48 |
with any filename extension replaced with ".desc". |
| 49 |
.SH OPTIONS |
| 50 |
.TP |
| 51 |
.B \-f |
| •52 |
Force overwriting of existing files. |
| 53 |
If a message suggests a file name of an existing file, |
| 54 |
the file will be overwritten. |
| 55 |
Without this flag, |
| 56 |
.B munpack |
| •57 |
appends ".1", ".2", etc.\& to find a nonexistent file. |
| 58 |
.TP |
| 59 |
.B \-q |
| •60 |
Be quiet. |
| 61 |
Suppresses messages about saving partial messages |
| 62 |
and about messages with no interesting information. |
| 63 |
.TP |
| 64 |
.B \-t |
| •65 |
Also write the text MIME parts of multipart messages as files. |
| •66 |
By default, |
| 67 |
text parts |
| 68 |
that do not have a filename parameter |
| 69 |
do not get unpacked. |
| 70 |
This option effectively disables the ".desc" file feature for MIME messages. |
| 71 |
.TP |
| 72 |
.BI \-r " character" |
| •73 |
If the suggested filename contains invalid characters, |
| 74 |
they are replaced with this character. |
| 75 |
The default replacement character is |
| 76 |
"X". |
| 77 |
.TP |
| 78 |
.BI \-C " directory" |
| •79 |
Change the current directory to |
| 80 |
.I directory |
| •81 |
before reading any files. This is useful when invoking |
| 82 |
.B munpack |
| 83 |
from a mail or news reader. |
| •84 |
.SH DECODING MIME |
| 85 |
To decode a MIME message, |
| 86 |
first save it to a text file. |
| 87 |
If possible, |
| 88 |
save it with all headers included. |
| 89 |
.I Munpack |
| 90 |
can decode some MIME files |
| •91 |
when the headers are missing or incomplete, |
| 92 |
other files |
| 93 |
it cannot decode without having the information in the headers. |
| 94 |
In general, |
| 95 |
messages which have a statement at the beginning |
| 96 |
that they are in MIME format |
| 97 |
can be decoded without the headers. |
| 98 |
Messages |
| 99 |
which have been split into multiple parts |
| 100 |
generally require all headers in order to be reassembled and decoded. |
| 101 |
.LP |
| 102 |
Some LAN-based mail systems and some mail providers |
| 103 |
(including America Online, as of the writing of this document) |
| 104 |
place the mail headers at the bottom of the message, |
| 105 |
instead of at the top of the message. |
| 106 |
If you are having problems decoding a MIME message on such a system, |
| 107 |
you need to convert the mail back into the standard format |
| 108 |
by removing the system's nonstandard headers |
| 109 |
and moving the standard Internet headers at the top of the message |
| 110 |
(separated from the message body with a blank line). |
| 111 |
.LP |
| •112 |
There must be exactly one message per file. |
| 113 |
.I Munpack |
| •114 |
cannot deal with multiple messages in a single file, |
| 115 |
to decode things correctly it must know |
| 116 |
when one message ends and the next one begins. |
| 117 |
.LP |
| •118 |
To decode a message, |
| 119 |
run the command: |
| 120 |
.IP |
| 121 |
.IB munpack " file" |
| 122 |
.LP |
| 123 |
where "file" is the name of the file containing the message. More than |
| 124 |
one filename may be specified, |
| 125 |
.I munpack |
| 126 |
will try to decode the message in |
| 127 |
each file. For more information on ways to run |
| 128 |
.IR munpack , |
| 129 |
see the section "OPTIONS" above. |
| 130 |
.SH ENVIRONMENT |
| 131 |
.TP |
| 132 |
.B TMPDIR |
| •133 |
Directory to store temporary files. Default is /tmp. |
| 134 |
.SH FILES |
| 135 |
.TP |
| 136 |
.B $TMPDIR/m-prts-$USER/ |
| 137 |
Directory used to store partial messages awaiting reassembly. |
| •138 |
.SH REPORTING BUGS |
| 139 |
Send all bug reports to mpack\[email protected]. |