[Top][All Lists]
[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 15:54:42 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Marc Schiereck <address@hidden> 02/10/29 15:54:42
Modified files:
doc/pegboard/email_storage--marc: peg.rst
Log message:
update
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/doc/pegboard/email_storage--marc/peg.rst.diff?tr1=1.1&tr2=1.2&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.1
gzz/doc/pegboard/email_storage--marc/peg.rst:1.2
--- gzz/doc/pegboard/email_storage--marc/peg.rst:1.1 Mon Oct 28 15:29:03 2002
+++ gzz/doc/pegboard/email_storage--marc/peg.rst Tue Oct 29 15:54:41 2002
@@ -2,42 +2,79 @@
PEG email_storage
===============================================================
:Authors: Marc Schiereck
-:Date: $Date: 2002/10/28 20:29:03 $
-:Revision: $Revision: 1.1 $
+:Date: $Date: 2002/10/29 20:54:41 $
+:Revision: $Revision: 1.2 $
:Date-Created: 2002-10-28
:Status: incomplete
+ ...
+
Issues
------
* How are emails stored in a mediaserver.
+ - Separate header and body? - Yes: See Rationale
+
- The way header and body of e-mails get separated.
- The same for multipart-message.
-
+
- How are header-blocks and body-blocks connected.
Rationale
---------
+ ...
+
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
+``````````````````````
+
When saving non-multipart-messages, header and body get
separated and saved in a block respectively. In order
to preserve the connection between header and body the
content-type of the e-mail needs to be changed to
message/external-body. In addition a new access-type,
-called ``storm`` is introduced. It has a parameter
+called ``x-storm`` is introduced. It has a parameter
``block`` which holds the ID of the block containing
-the body.
+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.
+After the block's header the following is inserted::
+
+ Content-Type: message/external-body;
+ access-type="x-storm";
+ block="<ID>"
+
+where <ID> is the ID of the body's block.
An example::
+ Content-Type: message/rfc822
+
Content-Type: message/external-body;
- access-type="storm";
- block="ID"
+ access-type="x-storm";
+ block="ID"
+
+ From: Marc Schiereck <address@hidden>
+ To: gzz developers list <address@hidden>
+ Subject: Sample message
+ Content-Type: text/plain
+
+Multipart messages
+``````````````````
This works similar for multipart-messages. The message
header stays untouched. Only the bodies of the individual
@@ -48,22 +85,42 @@
message/external-body and the parameters ``access-type``
and ``block`` are added as in non-multipart-messages.
-An example for a multipart-header::
+An example for a multipart-header block::
From: Marc Schiereck <address@hidden>
To: gzz developers list <address@hidden>
Subject: Sample message
Content-type: multipart/mixed;
boundary="boundary"
+
--boundary
Content-Type: message/external-body;
- access-type="storm";
+ access-type="x-storm";
block="<ID-part1>"
+
+ Content-Type: ...
+ Content-Transfer-Encoding: binary
--boundary
Content-Type: message/external-body;
- access-type="storm";
+ access-type="x-storm";
block="<ID-part2>"
+ Content-Type: ...
+ Content-Transfer-Encoding: binary
+
--boundary--
+
+Implementation
+--------------
+
+The implementation language is Python 2.1.
+
+To store a single mail the following function will
+be defined::
+
+ storeMail(mail, mediaserver)
+
+``mail`` is a string holding the complete mail (header
+and body. They get separated inside the function).