home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / gethbi21.zip / mpack.doc < prev    next >
Text File  |  1995-02-15  |  15KB  |  362 lines

  1.                     mpack/munpack version 1.5 for os2
  2.  
  3. Mpack and munpack are utilities for encoding and decoding
  4. (respectively) binary files in MIME (Multipurpose Internet Mail
  5. Extensions) format mail messages.  For compatibility with older forms
  6. of transferring binary files, the munpack program can also decode
  7. messages in split-uuencoded format.  The Macintosh version can also
  8. decode messages in split-BinHex format.
  9.  
  10. Versions are included for unix, pc, os2, mac, amiga and archimedes
  11. systems.  The canonical FTP site for this software is
  12. ftp.andrew.cmu.edu:pub/mpack/
  13.  
  14. This MIME implementation is intended to be as simple and portable as
  15. possible.  For a slightly more sophisticated MIME implementation, see
  16. the program MetaMail, available via anonymous FTP to
  17. thumper.bellcore.com, in directory pub/nsb
  18.  
  19.  
  20. Decoding MIME messages:
  21.  
  22. To decode a MIME message, first save it to a text file.  If possible,
  23. save it with all headers included.  Munpack can decode some MIME files
  24. when the headers are missing or incomplete, other files it cannot
  25. decode without having the information in the headers.  In general,
  26. messages which have a statement at the beginning that they are in MIME
  27. format can be decoded without the headers.  Messages which have been
  28. split into multiple parts generally require all headers in order to be
  29. reassembled and decoded.
  30.  
  31. Some LAN-based mail systems and some mail providers (including America
  32. Online, as of the writing of this document) place the mail headers at
  33. the bottom of the message, instead of at the top of the message.  If
  34. you are having problems decoding a MIME message on such a system, you
  35. need to convert the mail back into the standard format by removing the
  36. system's nonstandard headers and moving the standard Internet headers
  37. to the top of the message (separated from the message body with a
  38. blank line).
  39.  
  40. There must be exactly one message per file.  Munpack cannot deal with
  41. multiple messages in a single file, to decode things correctly it must
  42. know when one message ends and the next one begins.
  43.  
  44. To decode a message, run the command:
  45.  
  46.     munpack file
  47.  
  48. where "file" is the name of the file containing the message.  More than
  49. one filename may be specified, munpack will try to decode the message in
  50. each file.  For more information on ways to run munpack, see the section
  51. "Using munpack" below.
  52.  
  53.  
  54. Reporting bugs:
  55.  
  56. Bugs and comments should be reported to mpack-bugs@andrew.cmu.edu.
  57. When reporting bugs or other problems, please include the following
  58. information:
  59.  
  60.   * The version number of Mpack
  61.   * The platform (Unix, PC, OS/2, Mac, Amiga, Archimedes)
  62.   * The EXACT output of any unsuccessful attempts.
  63.   * If having a problem decoding, the first couple of lines
  64.     of the input file.
  65.  
  66.  
  67. Compilation:
  68.  
  69. The os2 sources have been compiled with IBM Cset++ version 2.1.  The
  70. makefiles "mpack.os2" and "munpack.os2" are for mpack.exe and
  71. munpack.exe, respectively. Both makefiles also include statements to
  72. compile the sources with EMX 0.9a from Eberhard Mattes.
  73.  
  74. Using mpack:
  75.  
  76. Mpack is used to encode a file into one or more MIME format messages.
  77. The program is invoked with:
  78.  
  79.     mpack [options] -o outputfile file
  80.  
  81. or 
  82.  
  83.     mpack [options] file address...
  84.  
  85. or
  86.  
  87.     mpack [options] -n newsgroups file
  88.  
  89. Where "[options]" is one or more optional switches described below.
  90. "-o outputfile" is also described below. "file" is the name of the
  91. file to encode, "address..." is one or more e-mail address to mail the
  92. resulting messages to and "newsgroups" is a comma-separated list of
  93. newsgroups to post the resulting messages to.
  94.  
  95. The possible options are:
  96.  
  97.      -s subject
  98.           Set the Subject header field to Subject.   By default,
  99.           mpack will prompt for the contents of the subject
  100.           header.
  101.  
  102.      -d descriptionfile
  103.           Include the contents of the file descriptionfile in an
  104.           introductory section at the beginning of the first
  105.           generated message.
  106.  
  107.      -m maxsize
  108.           Split the message (if necessary) into partial messages,
  109.           each not exceeding maxsize characters.  The default
  110.           limit is the value of the SPLITSIZE environment 
  111.       variable, or no limit if the environment variable
  112.           does not exist.  Specifying a maxsize of 0 means there
  113.           is no limit to the size of the generated message.
  114.  
  115.      -c content-type
  116.           Label the included file as being of MIME type
  117.           content-type, which must be a subtype of application,
  118.           audio, image, or video.  If this switch is not given,
  119.           mpack examines the file to determine its type.
  120.  
  121.      -o outputfile
  122.           Write the generated message to the file outputfile.  If
  123.           the message has to be split, the partial messages will
  124.           instead be written to the files outputfile.01,
  125.           outputfile.02, etc.
  126.  
  127.      -f username
  128.       Specifies the user name to be used for mail or news. If
  129.       this option is ommitted, the environment variable LOGNAME
  130.       will be used to determine the user name.
  131.  
  132. The environment variables which control mpack's behavior are:
  133.  
  134.      SPLITSIZE
  135.           Default value of the -m switch.  Default "0".
  136.  
  137.      HOSTNAME
  138.           Fully qualified domain name to use in generated message-ids.
  139.       Default "random-pc" or "random-amiga".
  140.  
  141.      DOMAINNAME
  142.           If $HOSTNAME does not have a '.' in it, this is appended to
  143.           $HOSTNAME to get the domain to use. Default is
  144.           "random-domain".
  145.  
  146.      POSTNEWS
  147.       Command to use to post news. Compatible with UUPC inews.
  148.  
  149.      SENDMAIL
  150.       Command to use to send mail. Compatible with IBM sendmail.
  151.  
  152.      LOGNAME
  153.       User name for sending mail or posting news. Defaults to
  154.       "postmaster".
  155.  
  156.  
  157. Using munpack:
  158.  
  159. Munpack is used to decode one or more messages in MIME or
  160. split-uuencoded format and extract the embedded files.  The program is
  161. invoked with:
  162.  
  163.     munpack [options] filename...
  164.  
  165. which reads the messages in the files "filename...".  Munpack may also
  166. be invoked with just:
  167.  
  168.     munpack [options]
  169.  
  170. which reads a message from the standard input.
  171.  
  172. If the message suggests a file name to use for the imbedded part, that
  173. name is cleaned of potential problem characters and used for the
  174. output file.  If the suggested filename includes subdirectories, they
  175. will be created as necessary.  If the message does not suggest a file
  176. name, the names "part1", "part2", etc are used in sequence.
  177.  
  178. If the imbedded part was preceded with textual information, that
  179. information is also written to a file. The file is named the same as
  180. the imbedded part, with any filename extension replaced with
  181. ".dsc"
  182.  
  183. The possible options are:
  184.  
  185.      -f
  186.           Forces the overwriting of existing files.  If a message
  187.           suggests a file name of an existing file, the file will be
  188.           overwritten.  Without this flag, munpack replaces any
  189.           filename extension with ".1", ".2", etc to find a
  190.           nonexistent file.
  191.  
  192.      -t
  193.       Also unpack the text parts of multipart messages to files.
  194.       By default, text parts that do not have a filename parameter
  195.       do not get unpacked.
  196.  
  197.      -q
  198.           Be quiet--suppress messages about saving partial messages.
  199.  
  200.      -C directory
  201.           Change the current directory to "directory" before reading
  202.           any files.  This is useful when invoking munpack
  203.           from a mail or news reader.
  204.  
  205.      -e
  206.           Writes the MIME content type into the extended attribute 
  207.           "MIME-TYPE". This extended attribute can be used by any
  208.           software that post processes the decoded files. The 
  209.           following is an example program how to read this extended 
  210.           attribute in Rexx:
  211.  
  212. ---------------------------cut here---------------------------------
  213. /* This Rexx program demonstrates how to read the MIME-type        *
  214.  * parameter out of the EA of the decoded file. Note, that the     *
  215.  * options '-e' must be used to write this EA.                     */
  216.  
  217. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  218. call SysLoadFuncs
  219.  
  220. parse ARG name
  221.  
  222. if SysGetEA(name, "MIME-TYPE", "TYPEINFO") = 0 then
  223.    parse var typeinfo 4 type
  224. else 
  225.    type = "undefined"
  226.  
  227. say "MIME content-type is" type
  228. ---------------------------cut here---------------------------------
  229.  
  230. The environment variables which control munpack's behavior are:
  231.  
  232.      TMP
  233.           Root of directory to store partial messages awaiting
  234.           reassembly.  Default is "\tmp".  Partial messages are
  235.           stored in subdirectories of $TMP\parts\
  236.  
  237.  
  238. Acknowledgements:
  239.  
  240. Written by John G. Myers, jgm+@cmu.edu
  241.  
  242. The mac version was written by Christopher J. Newman, chrisn+@cmu.edu
  243.  
  244. The amiga port was done by Mike W. Meyer, mwm@contessa.phone.net and
  245. Peter Simons, simons@peti.GUN.de
  246.  
  247. The os2 port was done by Jochen Friedrich, jochen@audio.pfalz.de
  248.  
  249. The archimedes port was done by Olly Betts, olly@mantis.co.uk
  250.  
  251. Send all bug reports to mpack-bugs@andrew.cmu.edu 
  252.  
  253. Thanks to Nathaniel Borenstein for testing early versions of mpack and
  254. for making many helpful suggestions.
  255.  
  256.  
  257. PGP signature:
  258.  
  259. Starting with version 1.5, all official mpack distributions are PGP
  260. signed by "John Gardiner Myers <jgm+@cmu.edu>".  The PGP signatures
  261. are detached from the distributions themselves, in files with the
  262. ".asc" filename extension.  If the location where you obtained mpack
  263. does not include the PGP signature, or if the signature is not valid
  264. for the distribution, please complain to the maintainer of the
  265. relevant distribution site.
  266.  
  267. A valid PGP signature indicates that the distribution is the one that
  268. I put together; it specifically does not indicate any warranty of any
  269. kind on the software.  The Unix and DOS versions were done by myself,
  270. the DOS binaries were checked for viruses using an up-to-date virus
  271. checker.  The Macintosh version was done by a colleague I have reason
  272. to trust.  All other versions were done and compiled by people I have
  273. had no personal contact with.
  274.  
  275. My PGP public key follows:
  276.  
  277. -----BEGIN PGP PUBLIC KEY BLOCK-----
  278. Version: 2.6.1
  279.  
  280. mQBtAi5Sd2AAAAEDANBa5/iCcCUkCsDtSpWIKfwEhqAFOoIE61j7Q/Q+mdU4V/BK
  281. ttboCOk9ZDtGKYhMFvH31I7bAECruV1GIa/awbfI0EMfZwQ+U0YhOUScXfm2ARIv
  282. XotV0HJqmwnIWCbPjQAFEbQiSm9obiBHYXJkaW5lciBNeWVycyA8amdtK0BjbXUu
  283. ZWR1PokAlQMFEC77TI7FLUdtDb+QbQEBhMcD/1gmEtykw84iYmo9TjlCg8hfzqJs
  284. /TvRlUKoNF3oGG7M9h4zmP1AwL75B2/k3UnD39LsTc15J4ZWbH/VwVWPT73rRBwD
  285. hGS33ep1JAP1koB3f1RIjZ3jrRSbdVt45W2l1A+aAPP8oHs7Uf+eSINx7DA6THuu
  286. W14BeJyVu9acBKuriQCVAgUQLvs8nVsjC0SkKFUJAQHbFwP9Gzb+p3z73o6p4A9k
  287. 5xqwr8WpmTBMFITM6p9gLe//RlR3Mh2u6/rYZEPJ73wpokHi3ArEICCG2+58IZpt
  288. WTV0FUPoXZz1bZ+N45yGCPEw2Ibgr6AWHvQzUeIDICWS4D/IPN73QUfifRHQmEeb
  289. 3N7YIr63XoACun8oZZrM6OhVfIGJAJUDBRAu5r4dhxvAWY8bGaUBAdipA/4zxuYA
  290. A/C34f4M+3Ta/F3yY8ooxboLyYiqej0i5uK4w51XjJeRoS6c49hi8m5yw8SQ1VmQ
  291. Suk3pTHSYuE9hermX6ET7tMp5sGB1oIy/1zyoxZfLCbWj2UPHUsVJsMagAn3HbF0
  292. UHZMkCj4WothYNSrMfCnswoWjDKQxVIDVKLkpokAlAMFEC7woYNnNYxubw4jcQEB
  293. qQMD9RDnxCyCHatULx+/KUrJLIYaayZe1D/C2VC0QzzdmxHkcAcc5tjuD1S7igJW
  294. +9hftwlf4EJx1NCSjhteNk57W7bcrLEdi4PInwFNXAuiCUzhLvoBRXQbHEuhM39f
  295. hjATkSTIBX9OrwwSJS2IvuuEaZGy1PJSuCqHg88paZlPRYaJAFUDBRAu59rLqn0S
  296. 2IICPJ0BAYo8AgDCDXoqwVsLKofrHFvVc2/S2MHLtNFhWLmep5D26Uk1uKy6E6vw
  297. pFxjbmr41rPepxYdR32218yIYqEG5RQRcjdOiQCVAwUQLuf5rjJyiM5s7VOJAQHv
  298. UwQArtoqCX1Y9u21KuPP439P5Xcg2MexhAmnYD7JP0d5rHcvp0LYfUsOFAZKpRwl
  299. eLqvzkVnUjVR3X3ehmTQdRNRV6o9LVMXYQmMpoZUQlmR/+ilsNjflhKPwx3PpvYT
  300. AGDMv8QlALKc3gN8wJCxq9iW8DHbTWmoYFDiK74FwbDRjDWJAJUDBRAu5rwCRBVw
  301. zUZrQokBAR5pBADAm/0bxhJMfNGT1/d7eaaGWzo0DZ21UulyPzGGQKhvqT2OqFxJ
  302. ulUL+EYyxeKC7GxkcX7cICcQBNTRt9Ul0ooCT/szGneYeUnotp4dWRRxk8e09kjf
  303. +mLo5imR9OI1cUpjo8AJCpFvp/p6GRlS0WhCzdyD4dYsK3pDL3WCsOfD5YkAlQMF
  304. EC7oAXVJt7YjNP0hXQEBMoQD/R2IYpH9EluRureUWg6Oi3uZlMM6gCTz/cWhjNKC
  305. nwbP5VG/J0TqPIGq7VI6ORM9PwfN5CElYNAHhyetSPdH51+jdPY7g80bMvV1QH5U
  306.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CLb2Nvs8bBFps+rcBfsXtv66LZn4k
  322. ukan9MwUS02PK7L/cV3jURzpjead/vqkh7jYVlwB/Wg1c0aVkHt0F7XiRYkAlQMF
  323. EC7mv4WE37rmLVJ+MQEB0JsD/0ow7V3u78AOEj+FJAH182V03EFk+4YYpyHF1DHA
  324. cCWJoCQ9DrcQ+mnMd73hs4AsF5NRXQXpbI7ocZADOG7kqcTAyedX6xHUisYl08Pv
  325. vPlTRCQkgSRNAF1U2MWq8C7mI/LuyLvsSoFedQlaqi5J0Xm5x2IJzm1p3ukre3Sq
  326. 4CQCiQCVAgUQLlKInRNhgovrPB7dAQGF2wP/ZhaTYW2M8zTPAmCIgeZqHJeMWic+
  327. bGeiCB9ICvcQV0dsBXm/26YXwCXnOVoryY5ToCpj5d2zmvAPBTBOx8GrnAPCOHoH
  328. tumQn5ODeRXhyc+jcSKbk/1jAEteEyJJ+KBTVnJ5LymI3Ayv1aWUmdvJhLGavxl9
  329. Wi3bjI/bpV0eE+g=
  330. =pCCQ
  331. -----END PGP PUBLIC KEY BLOCK-----
  332.  
  333. Legalese:
  334.  
  335. (C) Copyright 1993,1994 by Carnegie Mellon University
  336. All Rights Reserved.
  337.  
  338. Permission to use, copy, modify, distribute, and sell this software
  339. and its documentation for any purpose is hereby granted without fee,
  340. provided that the above copyright notice appear in all copies and that
  341. both that copyright notice and this permission notice appear in
  342. supporting documentation, and that the name of Carnegie Mellon
  343. University not be used in advertising or publicity pertaining to
  344. distribution of the software without specific, written prior
  345. permission.  Carnegie Mellon University makes no representations about
  346. the suitability of this software for any purpose.  It is provided "as
  347. is" without express or implied warranty.
  348.  
  349. CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
  350. THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  351. AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
  352. FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  353. WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
  354. AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
  355. OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  356. SOFTWARE.
  357.  
  358. Portions of this software are derived from code written by Bell
  359. Communications Research, Inc. (Bellcore) and by RSA Data Security,
  360. Inc. and bear similar copyrights and disclaimers of warranty.
  361.  
  362.