home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / next / misc / 24013 < prev    next >
Encoding:
Internet Message Format  |  1993-01-23  |  7.3 KB

  1. Path: sparky!uunet!portal!rtbrain!rightbrain.com
  2. From: glenn@rightbrain.com (Glenn Reid)
  3. Newsgroups: comp.sys.next.misc
  4. Subject: Re: Next-Attachment header
  5. Message-ID: <1077@rtbrain.rightbrain.com>
  6. Date: 23 Jan 93 00:15:02 GMT
  7. References: <1jhkp3INNnbb@shelley.u.washington.edu>
  8. Sender: glenn@rightbrain.com
  9. Reply-To: glenn@rightbrain.com
  10. Lines: 199
  11.  
  12.  
  13. This is a repost of an article posted by Avie Tevanian of NeXT a bit
  14. over a year ago.  It details the NeXTmail format header, so you don't
  15. have to guess.  It looks like it's formatted a bit weirdly in this post
  16. window, but I'm too lazy to re-break the lines.
  17.  
  18. --
  19.  Glenn Reid                NeXTmail: glenn@rightbrain.com
  20.  RightBrain Software        415-326-2974 (NeXTfax 326-2977)
  21.  Palo Alto, California        Electronic Frontier Foundation, member #054
  22.  
  23.  
  24. From: avie@next.com (Avadis Tevanian)
  25. Subject: Re: NeXTMail and proprietary file formats (was: NeXTMail on a MAC)
  26. Date: 21 Sep 91 03:32:12 GMT
  27. Sender: news@NeXT.COM
  28.  
  29. Our Mail program does not use a proprietary format.  I encourage you to write  
  30. mail programs for other platforms, or even other UI's for our software  
  31. environment that can send and receive this format.  To assist you, I am  
  32. including the specification of the format in this message.  Thanks go to  
  33. Kevin 
  34. Wells for writing this all up, we give it out to anyone that asks.  [Note  
  35. that 
  36. Kevin's version is full of fancy formatting options, but I won't post in RTF  
  37. to 
  38. reduce the potential flamage :-)].
  39.  
  40. NeXTmail Message Format
  41.  
  42. Copyright  1990 by NeXT Computer, Inc.  All Rights Reserved.
  43.  
  44. The NeXT logo is a registered trademark of NeXT Computer, Inc. in the U.S.  
  45. and  
  46. other countries.   NeXT and NeXTmail are trademarks of NeXT Computer, Inc.   
  47. UNIX is a registered trademark of AT&T.  All other trademarks mentioned  
  48. belong  
  49. to their respective owners.
  50.  
  51. NeXTmail Message Format
  52.  
  53. This document describes the NeXTmail  multimedia transmission format for  
  54. users  
  55. and developers who want to access and create NeXTmail messages on other UNIX   
  56. platforms, or build gateways between NeXTmail and other mail systems.  The  
  57. procedures described here rely on utility programs found in most standard  
  58. UNIX  
  59. implementations.  This specification applies to NeXT  software releases 1.0  
  60. and  
  61. 2.0.
  62.  
  63. The NeXTmail system sends and receives both standard UNIX mail messages and  
  64. NeXTmail multimedia messages.  When sending a message, as soon as the user  
  65. attaches a document or formats the text with anything other than the default  
  66. font and paragraph formats, the message is converted to the NeXTmail  
  67. multimedia  
  68. format.  This change occurs at a specific time and is indicated by a change  
  69. in  
  70. the icon on the Deliver button in the send window.  Once this change occurs,  
  71. it  
  72. cannot be undone.  When receiving messages, NeXTmail automatically interprets  
  73. the multimedia format correctly.
  74.  
  75. Although the the NeXTmail multimedia format is straightforward and easily  
  76. specified, NeXT expects to change this format in the future, and thus has  
  77. chosen not to publish the specification.  The information in this document is  
  78. subject to change without notice and must be used with the full realization  
  79. that programs and procedures created based on this information will not  
  80. continue to work indefinitely.
  81.  
  82.  
  83.  
  84.  
  85. Receiving NeXTmail Format Messages
  86.  
  87. When a NeXTmail multimedia message is received, it contains a normal RFC822  
  88. header with an additional  Next-Attachment  field, and a block of ASCII  
  89. encoded  
  90. hexadecimal digits surrounded by lines containing the words begin and end.   
  91. The  
  92. body of the message has been put in uuencoded format to convert binary data  
  93. to  
  94. ASCII for transmission, and compressed for efficiency.  To reconstruct the  
  95. message, three operations must be performed:  The message must be unencoded,  
  96. uncompressed, and broken down into its component files.
  97.  
  98. To reconstruct NeXTmail messages, perform the following steps:
  99.  
  100. 1.    Save the text of the message in a file called mailfilename in its own  
  101. subdirectory.
  102.  
  103. 2.    Run the command:
  104.  
  105. uudecode mailfilename
  106.  
  107. This operation produces a file called .tar.nnn.subject.attach where nnn is  
  108. some  
  109. unique number, and subject is the subject of the mail message with blanks  
  110. replaced by underscores.  (Note that uudecode automatically ignores the mail  
  111. header.)
  112.  
  113. 3.    Run the command:
  114.  
  115. uncompress < .tar.nnn.subject.attach | tar xvf -
  116.  
  117. This operation uncompresses the message and breaks it up into its component  
  118. files.  At a minimum, there will be one file named index.rtf, which contains  
  119. the body of the message in Rich Text Format  (RTF).  (For information about  
  120. RTF  
  121. see the Rich Text Format specification available from Microsoft and published  
  122. in the Supplementary Documentation manual from the NeXT Developer's Library.)   
  123. In addition, if the message contains sound documents, pictures, or other  
  124. documents, these objects will appear in separate files.  For more information  
  125. on the UNIX commands specified here, see the relevant UNIX manual pages.
  126.  
  127.  
  128.  
  129.  
  130. RTF Format
  131.  
  132. NeXT has extended the standard RTF file format to allow references to  
  133. documents  
  134. to be attached to NeXTmail messages.  Such references are of the form:
  135.  
  136. {\attachmentnnn attachmentname
  137. }
  138.  
  139. where attachmentname is the file name of the attachment, and nnn is the  
  140. position of the attachment within the body of the mail message (specified as  
  141. the number of characters from the beginning of the file).  The attachment  
  142. reference can occur anywhere in the file, but multiple attachments must be  
  143. referenced in the order in which they appear in the message.
  144.  
  145. Following is an example of an RTF file with an embedded attachment reference:
  146.  
  147. {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;\f1\fmodern Ohlfs;\f2\fnil  
  148. Times-Roman;}
  149. \margl120
  150. \margr120
  151. {{\attachment86 attachmentname
  152. }
  153. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f1 
  154. \f 
  155. s28 this is some rich text
  156. \f0  this is some helvectica\
  157. \
  158. this is more helvetica\
  159.  
  160. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0 
  161. \b 
  162. 0\i0\ul0\fs28 \
  163.  
  164. \pard\f2\b\fs24 This is times bold
  165. \f0\b0 .\
  166. \
  167. and another line of text\
  168.  
  169. }
  170.  
  171.  
  172.  
  173.  
  174. Creating NeXTmail Format Messages
  175.  
  176. The procedure for creating NeXTmail messages on non-NeXT UNIX systems is the  
  177. inverse of the procedure for reconstructing NeXTmail messages.
  178.  
  179. Perform the following steps to create a NeXTmail message:
  180.  
  181. 1.    Create the index.rtf file containing the message body and references  
  182. to  
  183. any attached files as described above.
  184.  
  185. 2.    Put the index.rtf file and all of the files to be attached to the  
  186. message in a separate subdirectory.
  187.  
  188. 3.    Run the command:
  189.  
  190. tar cvf - * | compress | uuencode .tar.nnn.subject.attach > ../subject.temp
  191.  
  192. where subject is the subject of the message with blanks replaced by  
  193. underscores, and nnn is an arbitrary integer.  This operation produces a file  
  194. called subject.temp, in the parent directory of the directory where the files  
  195. to be mailed reside.  (Note that this command must be entered as a single  
  196. line.)
  197.  
  198. 4.    Mail this file in a message by itself, adding a header field of the  
  199. form:
  200.  
  201. Next-Attachment: .tar.nnn.subject.attach, bytes, 1/1, size, 0
  202.  
  203. where bytes is the length in bytes of the subject.temp file, and size is the  
  204. integer number of 48 byte blocks (counting the last partial block as a whole  
  205. block), multiplied by 66 characters per block.
  206. --
  207. Avadis Tevanian, Jr.    (Avie)
  208. Director, System Software
  209. NeXT, Inc.
  210. avie@NeXT.COM
  211.