[Standards-JIG] imap 2 xmpp
bernhard
bz at datenkueche.com
Sun Jan 22 11:27:46 CST 2006
I have some ideas to map imap to xmpp
1.) Email messages are MIME based XMPP messages are xml based
First of all, the email-messages must be converted to XML.
It makes not much sense to base64 encode mime messages an put the base64
into
<message type="badidea">base64 </message>
HTML must be converted to XHTML and Javascript should not be allowed in
Mails.
All XML and text data must be readable directly - they must not be
base64 encoded.
No MIME in Jabber!
If there is no text only version of the email, a html-mail must be
converted to text as an option for the client.
There may be a mechanism to handle binary data - but that's not the
first goal.
A text only email can be converted very easy to a jabber message.
The only pitfall is the encoding.
2.) Where does the data live
The Emails go from IMAP to XMPP.
IMAP can be very slow and does not fit very well to the jabber environment.
The messages should not be deleted from imap when they are delivered to
jabber.
In jabber there will be a mirror of all email-messages.
It is possible to store email and jabber messages in pubsub.
I did some tests with pubsub. pubsub seems to be a good place for a
(email+xmpp) message archive.
The "only" problem is, that it is not possible to have private data in
pubsub (everbody can read everything in ejabberd 1.0)
but this is a pubsub issue.
3.) Synchronization (far in the future)
pubsub triggers an sends a message if data are modified. If there is a
process that is subscribed to the pubsub node, the event can
be used to synchronize the imap data.
4.) Node or item
In pubsub it is possible to create "Nodes". This nodes may have subnodes.
There my be nodes for "inbox", "sent", "drafts", ...
Inside the nodes there are "items". In ejabberd the default
configuration limits the max amount of items to 20.
The max size of an item is 100kByte.
If the max-item limitation is set to a much higher limit, the items can
*be* email and xmpp messages.
5.) Search messages
To have quick access to the messages there should be an index.
There should be a mechanism in pubsub that allows to add a
db-search-index to a node.
This index should speed up searching an XPATH expression in all message.
(XPath instead of SQL)
<pubsub xmlns="...makeindex">
<item node="/home/jaim.at/pubsub/inbox" xpath="/message/@from"/>
</pubsub>
To get an item-list from a pubsub node it should be possible to use an
xpath espression.
<getitems node="/home/jaim.at/pubsub/inbox"
select="/message/@from='xy at jabber.org' "/>
6.) Mail and Jabber Addresses
no idea how to map jabber to email addresses.
---
Thanks for reading
Bernhard
More information about the Standards-JIG
mailing list