Tinymail: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 16: Line 16:
Note that the tool that receives these messages can be anything. As long as it writes the messages in the mbox or Maildir storage format (these are specified and standards). Whether that tool is going to be a small SMTP server or a plugin for the instant messaging infrastructure, doesn't matter.
Note that the tool that receives these messages can be anything. As long as it writes the messages in the mbox or Maildir storage format (these are specified and standards). Whether that tool is going to be a small SMTP server or a plugin for the instant messaging infrastructure, doesn't matter.


The goal of tinymail is not to build yet-another SMTP-like service. It wouldn't be right to put this in the tinymail framework (it's clearly another tool or piece of software). A small software that pulls messages from a nearby (suitable) server that is in range and stores it on the local disk in Maildir, sounds like a trivial task (for example by basing it on the already existing fetchmail tool). In case the Maildir nor mbox formats are suitable, it would be easy to create support for yet-another-such local-storage-format in tinymail (it basically means implementing a few interfaces like "get a message with this id" and "get all headers" and other stuff like that).
The goal of tinymail is not to build yet-another SMTP-like service. It wouldn't be right to put this in the tinymail framework (it's clearly another tool or piece of software). A small software that pulls messages from a nearby (suitable) server that is in range and stores it on the local disk (for example using the Maildir or mbox format), sounds like a trivial task (for example by basing it on the already existing fetchmail tool). In case the Maildir nor mbox formats are suitable, it would be easy to create support for yet-another-such local-storage-format in tinymail (it basically means implementing a few interfaces like "get a message with this id" and "get all headers" and other stuff like that).


ps. Because it looks like at least the author of the question was confused about this, the website of the tinymail framework is now adapted to reflect support for these local folders. At first I didn't mention it, because support for local folders was, for me, obvious ;-)
ps. Because it looks like at least the author of the question was confused about this, the website of the tinymail framework is now adapted to reflect support for these local folders. At first I didn't mention it, because support for local folders was, for me, obvious ;-)

Revision as of 16:00, 3 November 2006

The big question is

OLPC can't depend on server infrastructure

According to the website it supports IMAP, Exchange and NNTP. It can be used to send messages over SMTP.

Given that the OLPC is used in an environment where there are no servers running IMAP, NNTP or SMTP, what use is it?

If it included a built-in IMAP and SMTP server that would hold messages for relay when a suitable server comes in range, then it might be more useful. Read the Instant messaging challenges page to see what the issues and use-cases are.

Answer

The tinymail framework also supports local message stores like mbox and Maildir (Maildir is what Courier's imapd typically also uses).

The software that fetches or receives the messages can store it in an mbox or Maildir on the device. Tinymail can access that (without having to use a build-in IMAP service). You could also run a small IMAP service locally (but I fail to see the reason for that, as tinymail can also use these local message stores, Maildir and mbox efficiently itself).

Note that the tool that receives these messages can be anything. As long as it writes the messages in the mbox or Maildir storage format (these are specified and standards). Whether that tool is going to be a small SMTP server or a plugin for the instant messaging infrastructure, doesn't matter.

The goal of tinymail is not to build yet-another SMTP-like service. It wouldn't be right to put this in the tinymail framework (it's clearly another tool or piece of software). A small software that pulls messages from a nearby (suitable) server that is in range and stores it on the local disk (for example using the Maildir or mbox format), sounds like a trivial task (for example by basing it on the already existing fetchmail tool). In case the Maildir nor mbox formats are suitable, it would be easy to create support for yet-another-such local-storage-format in tinymail (it basically means implementing a few interfaces like "get a message with this id" and "get all headers" and other stuff like that).

ps. Because it looks like at least the author of the question was confused about this, the website of the tinymail framework is now adapted to reflect support for these local folders. At first I didn't mention it, because support for local folders was, for me, obvious ;-)

Information about tinymail

Documentation about building


Building a tinymail suitable for OLPC

svn co https://svn.tinymail.org/svn/tinymail
cd tinymail/trunk
./autogen.sh --prefix=/opt/tinymail-olpc --with-platform=olpc --enable-python-bindings
make && make install

note: You can also use jhbuild. It's in the build files of sugar

Creating an account

This is for the TnyAccountStore implementation of the libtinymail-olpc platform implementation (Jul 31 2006). You can find it here

mkdir -p $HOME/.tinymail/accounts/
vi $HOME/.tinymail/accounts/01
[tinymail]
type=store
proto=imap
hostname=IMAPSERVER
user=USERNAME
name=OLPC test

Using the Python bindings

cd tests/python-demo/
export PYTHONPATH=/opt/tinymail-olpc/lib/python2.4/site-packages/tinymail-1.0
python tinymail-python-test.py