gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/doc/pegboard/email_storage--marc peg.rst


From: Marc Schiereck
Subject: [Gzz-commits] gzz/doc/pegboard/email_storage--marc peg.rst
Date: Tue, 29 Oct 2002 18:12:21 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Marc Schiereck <address@hidden> 02/10/29 18:12:21

Modified files:
        doc/pegboard/email_storage--marc: peg.rst 

Log message:
        More examples and some parts rewritten.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/email_storage--marc/peg.rst.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: gzz/doc/pegboard/email_storage--marc/peg.rst
diff -u gzz/doc/pegboard/email_storage--marc/peg.rst:1.2 
gzz/doc/pegboard/email_storage--marc/peg.rst:1.3
--- gzz/doc/pegboard/email_storage--marc/peg.rst:1.2    Tue Oct 29 15:54:41 2002
+++ gzz/doc/pegboard/email_storage--marc/peg.rst        Tue Oct 29 18:12:21 2002
@@ -2,26 +2,40 @@
 PEG email_storage
 ===============================================================
 :Authors:      Marc Schiereck
-:Date:         $Date: 2002/10/29 20:54:41 $
-:Revision:     $Revision: 1.2 $
+:Date:         $Date: 2002/10/29 23:12:21 $
+:Revision:     $Revision: 1.3 $
 :Date-Created: 2002-10-28
 :Status:       incomplete
 
- ...
+Description of a concept for storing mails in Storm.
 
 Issues
 ------
 
-* How are emails stored in a mediaserver.
+* How are emails stored in a Storm-Pool.
+
+  - Separate header and body? 
 
-  - Separate header and body? - Yes: See Rationale
+    RESOLVED: Yes: We store messages in Storm blocks,
+    where we have to consider some points:
 
   - The way header and body of e-mails get separated.
+
+    RESOLVED: The Header is saved in one block and
+    the body of the mail in another.
   
   - The same for multipart-message.
+
+    RESOLVED: The individual body parts get stored in 
+    a block for each part while the headers get stored 
+    in a single block.
    
   - How are header-blocks and body-blocks connected.
 
+    RESOLVED: Introducing a new Acces-Type ``x-storm``
+    with a parameter block for the ID of the email body's
+    block.
+
 Rationale
 ---------
 
@@ -30,12 +44,6 @@
 Description
 -----------
 
-We store emails in Storm blocks, where the header of
-an email is stored in one block, and the body in another.
-In the case of multipart messages, the individual body
-parts get stored in a block for each part while the 
-headers get stored in a single block.
-
 Non-multipart messages
 ``````````````````````
 
@@ -48,10 +56,7 @@
 ``block`` which holds the ID of the block containing 
 the body. 
 
-The Content-Type of the block is ``message/rfc822``.
-Additionally the message-ID (if existent) and the
-Content-Transfer-Encoding are field of the header.
-Nothing more.
+The Content-Type of the header-block is ``message/rfc822``.
 After the block's header the following is inserted::
 
     Content-Type: message/external-body;
@@ -59,8 +64,28 @@
                   block="<ID>"
   
 where <ID> is the ID of the body's block.
+Then the original mail header follows. There 
+``Content-ID: xxx`` and ``Content-Transfer-Encoding: binary`` 
+are added.
+
+The body-block's header has the following fields, and only these::
+
+    Content-Type: <content-type of the mail>
+    Message-ID: <message-ID of the mail, if existent>
+    Content-Transfer-Encoding: <...>
+
+An example:
+
+E-Mail::
+
+    From: Marc Schiereck <address@hidden>
+    To: gzz developers list <address@hidden>
+    Subject: Sample message 
+    Content-Type: text/plain    
 
-An example::
+    Sample message.
+
+Header block::
 
     Content-Type: message/rfc822
 
@@ -71,34 +96,82 @@
     From: Marc Schiereck <address@hidden>
     To: gzz developers list <address@hidden>
     Subject: Sample message 
+    Message-ID: <address@hidden>
+    Content-ID: storm:block:01A1F452AE2B3441AB2234B1A2378B24DFA12B3212
     Content-Type: text/plain    
+    Content-Transfer-Encoding: binary
+
+Body Block::
+
+    Content-Type: text/plain
+    Message-ID: <address@hidden>
+
+    Sample message.
 
 Multipart messages
 ``````````````````
 
-This works similar for multipart-messages. The message
-header stays untouched. Only the bodies of the individual
-parts get stored in mediaserver blocks (one for each
-body) while the message header and the heades of the
-individual parts get saved in the same block. The 
-content-type of the message-parts gets changed to 
-message/external-body and the parameters ``access-type``
-and ``block`` are added as in non-multipart-messages.
+Storing multipart messages works similar as storing
+non-multipart messages. There is one block for the
+headers and a block for each part's body.
+
+Content-Type of the header-block is ``message/rfc822``.
+The header of the message stays untouched. Just the headers
+of the individual parts are changed. They are replaced
+by::
+
+    Content-Type: message/external-body;
+                  access-type="x-storm";
+                  block="<block-ID>"
+
+    <replaced header>
+    Content-ID: xxx
+    Content-Transfer-Encoding: binary
+
+where <block-ID> is the ID of the body's block.
+
+The body blocks have the same format as the body blocks
+of non-multipart messages.
+
+An example:
+
+E-Mail::
+
+    From: Marc Schiereck <address@hidden>
+    To: gzz developers list <address@hidden>
+    Subject: Sample message 
+    Content-type: multipart/mixed;
+                  boundary="boundary" 
+    Message-ID: <address@hidden>
+
+    --boundary
+    Content-Type: text/plain
+    
+    part1 
+    --boundary
+    Content-Type: text/plain
+
+    part2
+    --boundary--
+
+Header block::
 
-An example for a multipart-header block::
+    Content-Type: message/rfc822
 
     From: Marc Schiereck <address@hidden>
     To: gzz developers list <address@hidden>
     Subject: Sample message 
     Content-type: multipart/mixed;
                   boundary="boundary" 
+    Message-ID: <address@hidden>
 
     --boundary
     Content-Type: message/external-body;
                   access-type="x-storm";
                   block="<ID-part1>"
 
-    Content-Type: ...
+    Content-Type: text/plain
+    Content-ID: storm:block:01A1F452AE2B3441AB2234B1A2378B24DFA12B3213
     Content-Transfer-Encoding: binary
      
     --boundary
@@ -106,15 +179,31 @@
                   access-type="x-storm";
                   block="<ID-part2>"
 
-    Content-Type: ...
+    Content-Type: text/plain
+    Content-ID: storm:block:01A1F452AE2B3441AB2234B1A2378B24DFA12B3214
     Content-Transfer-Encoding: binary
 
     --boundary--
 
+Body block 1::
+
+    Content-Type: text/plain
+    Message-ID: <address@hidden>
+
+    part1
+
+Body block 2::
+
+    Content-Type: text/plain
+    Message-ID: <address@hidden>
+
+    part2
+
 Implementation
 --------------
 
-The implementation language is Python 2.1.
+This functionality will be implemented in a 
+Jython module, ``gzz.modules.email.converter``.
 
 To store a single mail the following function will
 be defined::




reply via email to

[Prev in Thread] Current Thread [Next in Thread]