CryptoMail.og


Sign Up
Login
Download
System
Requirements
Manuals
How To
Protocol
Specifications
White Paper
About CryptoMail Getting Started Documentation Forum FAQs

The CyptoMail XMAP (Xml Messaging Access Protocol) Specification

Joshua Teitelbaum (joshuat@cryptomail.org)
Version 0.90
April 22, 2000

Introduction

The intention of this document is to specify in full detail, a way to access files and messages from a server via an intuitive XML like protocol. Much work has already gone into doing such tasks, the like the IMAP protocol and implementation, however the focus of this document is provide a subset of the functionality put forth in that specification, and to use XML as the protocol of all messages passed between entities.

What an XMAP server is intended to do?

In short, an XMAP server is intended to provide simple mail and file system services via passing XML messages.

An XMAP server MUST:

  1. Have a concept of users which partition the "File System" universe
  2. Allow an agent to list all folders
  3. Allow an agent to list the contents of a particular folder
  4. Allow an agent to retrieve a file within a folder
  5. Allow an agent to delete a file from a folder
  6. Allow an agent to copy files from one folder to another
  7. Allow an agent to move files from one folder to another
  8. Allow an agent to rename a folder
  9. Allow an agent to rename a file
  10. Allow an agent to move a folder
  11. Allow an agent to delete a folder
  12. Allow an agent to create a folder
  13. Allow an agent to create/upload a file within a folder
  14. Allow an agent to send a message

XMAP XML Data Dictionary

XMAP uses a common theme for manipulating files, directories, and messages. The following represents some of the common protocol elements:

FOLDER Tag

<FOLDER Name="Name"/>
  • The name is in a UNIX like path format, like "/CryptoMail/CypherPunx/Rule"

MESSAGEHEADER Tag

<MESSAGEHEADER MessageHandle="MessageHandle" MessageFlags="MessageStatus" MessageDate="MessageDate" MessageFrom="MessageFrom" MessageTo="MessageTo" MessageSubject="MessageSubject" MessageAttachments="MessageAttachments" MessageLength="MessageLength" MessageSessionKey="MessageSessionKey"/>
  • MessageHandle is an unsigned long in a string format
  • MessageStatus can assume one of these values: READ, NEW, ANSWERED, FORWARDED, DRAFT
  • MessageDate is a date
  • MessageFrom is from whom the message originated
  • MessageTo is to whom the message is intended
  • MessageSubject is the subject of the message
  • MessageAttachments are the number of attachments with the message
  • MessageLength is the length of the message
  • MessageSessionKey is the publicly encrypted blowfish session key of the message (This is not truly needed here unless we decide to encrypt some of the meta-data) Internal emails that would not necessarily require the use of an SMTP agent may benefit from the added security of encryption of recipients, subject etc., but it should be noted that the current implemenation makes no such distinction between internal and external recipents, and this feature is not used for decrypting any of the quick listing fields in this table)

FILEHEADER Tag

<FILEHEADER Name="Name" Date="Date" Length="Length" Key="Key"/>
  • Name is the full path of the file
  • Date is a date
  • Length is the length of the file
  • Key is the ElGamal (or Asymmetrically) encrypted blowfish (or Symmetric) key used to decrypt the file TBD(key specifiers via key meta-data attributes: Asym="ElGamal" | "RSA" Sym="BlowfishCBC" | "TwoFish"...)

XMAP Commands

  1. LISTALLFOLDERS
  2. LISTFOLDER
  3. GETFILE
  4. GETMESSAGE
  5. DELETEFILE
  6. DELETEMESSAGE
  7. DELETEITEMS
  8. EMPTYFOLDER
  9. MOVEFILE
  10. MOVEMESSAGE
  11. MOVEITEMS
  12. COPYFILE
  13. COPYMESSAGE
  14. COPYITEMS
  15. NEWFILEUPLOAD
  16. NEWMESSAGEUPLOAD
  17. UPDATEMESSAGEUPLOAD
  18. UPDATEFILEUPLOAD
  19. CREATEFOLDER
  20. RENAMEFOLDER
  21. MOVEFOLDER
  22. SENDMAIL

Client Messages To The Server

COMMAND DESCRIPTION XML SCHEMA
LISTALLFOLDERS Lists all the folders that belong to the user <LISTALLFOLDERS/>
LISTFOLDER Lists the folder with "Name" <LISTFOLDER Name="TargetFolder"/>
GETFILE Retrieves a file from the system <GETFILE Name="Full Path"/>
GETMESSAGE Retrieves a message from the system <GETMESSAGE MessageHandle="Handle"/>
DELETEFILE Deletes a file from the system <DELETEFILE Name="Full Path"/>
DELETEMESSAGE Deletes a message from the system <DELETEMESSAGE MessageHandle="Handle"/>
DELETEITEMS Deletes a group of items, messages or files, specified by the child nodes. <DELETEITEMS>

<DELETEMESSAGE MessageHandle="MessageHandle"/>

<DELETEFILE Name="Full Path"/>

</DELETEITEMS>
EMPTYFOLDER Removes all folder contents regardless of itemized specification <EMPTYFOLDER Name="Full Path"/>
MOVEFILE Moves a file <MOVEFILE Name="Full Path" TargetFolder="Full Path"/>
MOVEMESSAGE Moves a message <MOVEMESSAGE MessageHandle="Handle" TargetFolder="Full Path"/>
MOVEITEMS Moves a group of items, messages or files, specified by the child nodes. <MOVEITEMS>

<MOVEMESSAGE MessageHandle="MessageHandle" TargetFolder="Full Path"/>

<MOVEFILE Name="Full Path" TargetFolder="Full Path"/>

</MOVEITEMS>
COPYFILE Copies a file <COPYFILE Name="Full Path" TargetFolder="Full Path"/>
COPYMESSAGE Copies a message <COPYMESSAGE MessageHandle="Handle" TargetFolder=Full Path"/>
COPYITEMS Copies a group of items, messages or files, specified by the child nodes. <COPYITEMS>

<COPYMESSAGE MessageHandle="MessageHandle" TargetFolder="Full Path"/>

<COPYFILE Name="Full Path" TargetFolder="Full Path"/>

</COPYITEMS>
NEWFILEUPLOAD Uploads a file <NEWFILEUPLOAD Name="Full Path" TargetFolder="Full Path"/>

<?GOREALLYSLOW?>

</NEWFILEUPLOAD> BLOB DATA
NEWMESSAGEUPLOAD Uploads a new message <NEWMESSAGEUPLOAD TargetFolder="Full Path" MessageFlags="FLAGS"/>

<?GOREALLYSLOW?>

</NEWMESSAGEUPLOAD> BLOB DATA
UPDATEMESSAGEUPLOAD Updates an existing message <UPDATEMESSAGEUPLOAD MessageHandle="Handle" MessageFlags="FLAGS"/>

<?GOREALLYSLOW?>

</UPDATEMESSAGEUPLOAD> BLOB DATA
UPDATEFILEUPLOAD Updates an existing file <UPDATEFILEUPLOAD Name="Full Path" FileKey="File Key"/>

<?GOREALLYSLOW?>

</UPDATEFILEUPLOAD> BLOB DATA
CREATEFOLDER Creates a folder <CREATEFOLDER Name="Full Path"/>
RENAMEFOLDER Renames a folder <RENAMEFOLDER Name="Full Path" Destination="Full Path"/>
MOVEFOLDER Moves a folder <MOVEFOLDER Name="Full Path" Destination="Full Path"/>
SENDMAIL Sends Mail via SMTP and deletes existing message handle if present, and makes a copy and puts it into the target folder if present. <SENDMAIL MessageHandle="Existing Message Handle" TargetFolder="Full Path of where to be copied"/>

<?GOREALLYSLOW?>

</SENDMAIL> BLOB DATA

Some notes:
For the file manipulation commands (NEWFILEUPLOAD, UPDATEFILEUPLOAD), BLOB DATA must be treated as raw binary data, while the message commands (NEWMESSAGEUPLOAD, UPDATEMESSAGEUPLOAD) BLOB DATA must be encapsulated within a MIME package. The server will interpret the contents of the MIME encapsulated BLOB in order to fill out some of the Meta-Data of the message in the server's DataTables.


Server Responses To The Client

COMMAND DESCRIPTION XML SCHEMA
LISTALLFOLDERS Lists all the folders that belong to the user <XMAPROOT>

<LISTALLFOLDERS>

<FOLDER Name="Full Path"/>

</LISTALLFOLDERS>

</XMAPROOT>
LISTFOLDER Lists the folder with "Name" <XMAPROOT>

<LISTFOLDER Name="TargetFolder">

<MESSAGEHEADER MessageHandle="MessageHandle" MessageFlags="MessageStatus" MessageDate="MessageDate" MessageFrom="MessageFrom" MessageTo="MessageTo" MessageSubject="MessageSubject" MessageAttachments="MessageAttachments" MessageLength="MessageLength" MessageSessionKey="MessageSessionKey"/>

<FILEHEADER Name="Name" Date="Date" Length="Length" Key="Key"/>

</LISTFOLDER>

</XMAPROOT>
GETFILE Retrieves a file from the system BLOB DATA
GETMESSAGE Retrieves a message from the system BLOB DATA
DELETEFILE Deletes a file from the system <XMAPROOT>

<DELETEFILE Name="Full Path"/>

</XMAPROOT>
DELETEMESSAGE Deletes a message from the system <XMAPROOT>

<DELETEMESSAGE MessageHandle="Handle"/>

</XMAPROOT>
DELETEITEMS Deletes a group of items, messages or files, specified by the child nodes. <XMAPROOT>

<DELETEITEMS>

<DELETEMESSAGE MessageHandle="MessageHandle"/>

<DELETEFILE Name="Full Path"/>

</DELETEITEMS>

</XMAPROOT>
EMPTYFOLDER Removes all folder contents regardless of itemized specification <XMAPROOT>

<EMPTYFOLDER Name="Full Path"/>

</XMAPROOT>
MOVEFILE Moves a file <XMAPROOT>

<MOVEFILE Name="Full Path" TargetFolder="Full Path"/>

</XMAPROOT>
MOVEMESSAGE Moves a message <XMAPROOT>

<MOVEMESSAGE MessageHandle="Handle" TargetFolder="Full Path"/;>

</XMAPROOT>
MOVEITEMS Moves a group of items, messages or files, specified by the child nodes. <XMAPROOT>

<MOVEITEMS>

<MOVEMESSAGE MessageHandle="MessageHandle" TargetFolder="Full Path"/>

<MOVEFILE Name="Ful lPath" TargetFolder="Full Path"/>

</MOVEITEMS>

</XMAPROOT>
COPYFILE Copies a file <COPYFILE Name="Full Path" TargetFolder="Full Path"/>
COPYMESSAGE Copies a message <XMAPROOT>

<COPYMESSAGE MessageHandle="Handle" TargetFolder=Full Path">

</XMAPROOT>
COPYITEMS Copies a group of items, messages or files, specified by the child nodes. <XMAPROOT>

<COPYITEMS>

<COPYMESSAGE MessageHandle="MessageHandle" TargetFolder="Full Path"/>

<COPYFILE Name="Full Path" TargetFolder="Full Path"/>

</COPYITEMS>

</XMAPROOT>
NEWFILEUPLOAD Uploads a file <XMAPROOT>

<NEWFILEUPLOAD Name="Full Path"/>

</XMAPROOT>
NEWMESSAGEUPLOAD Uploads a new message <XMAPROOT>

<NEWMESSAGEUPLOAD MessageHandle="Message Handle"/>

</XMAPROOT>
UPDATEMESSAGEUPLOAD Updates an existing message <XMAPROOT>

<UPDATEMESSAGEUPLOAD MessageHandle="Handle"/>

</XMAPROOT>
UPDATEFILEUPLOAD Updates an existing file <XMAPROOT>

<UPDATEFILEUPLOAD Name="Full Path"/>

</XMAPROOT>
CREATEFOLDER Creates a folder <XMAPROOT>

<CREATEFOLDER Name="Full Path"/>

</XMAPROOT>
RENAMEFOLDER Renames a folder <XMAPROOT>

<RENAMEFOLDER Name="Folder Name"/>

</XMAPROOT>
MOVEFOLDER Moves a folder <XMAPROOT>

<MOVEFOLDER Name="Full Path"/>

</XMAPROOT>
SENDMAIL Sends Mail via SMTP and deletes existing message handle if present, and makes a copy and puts it into the target folder if present. <XMAPROOT>

<SENDMAIL MessageHandle="Handle if copied"/>

</XMAPROOT>

Legalese

All trademarks and logos are used for identification purposes only and are owned by their respective companies. CryptoMail.org does not guarantee any satisfaction and does not provide any warranties about this document (The CyptoMail XMAP Specification). This document is posted as public domain information. If you decide to quote any information from this document, you must attribute and state the source of this document. Copyright © 2000 CryptoMail, Inc. All rights reserved.

Joshua Teitelbaum (joshuat@cryptomail.org) wrote the first version of this document in 2000. Mail me if you have any questions about this document.

The CyptoMail XMAP Specification, Version 0.90, 4/22/2000

Home - About CryptoMail - Getting Started - Documentation - Forum - FAQs
Sign Up - Login - Download

Copyright © 2000-2005, CryptoMail.org. All Rights Reserved.