[foaf-protocols] Bootstrapping the Semantic Inbox

Toby Inkster mail at tobyinkster.co.uk
Sun Sep 26 11:48:06 CEST 2010

Melvster brought up the concept of the Semantic Inbox on #swig the
other day. My semantic inbox would be an HTTP(S) URI that accepted POST
requests, preferably in semantic formats such as RDF and Atom, and held
them for me to do something with.

The Semantic Web is, in a way, not a product but a process; not a
destination but a journey. The goal being to take our existing web and
make it more meaningful.

The Semantic Inbox I think should be the same, but what should the
starting point of the Semantic Inbox journey be? I think it should be
the HTTP inbox. With that in mind, I've written a few quick scripts to
easily set up an HTTP inbox:


This initial implementation just acts as a gateway, forwarding incoming
messages to a mailbox via SMTP. Copy all the files onto your server,
and edit mbox.php as appropriate. Feel free to rename mbox.php to
whatever you want - that's the file that is your Semantic Inbox.

If accessed over HTTPS, the inbox will perform WebID authentication,
and pick up the sender's email address from their foaf:mbox. The sender
email address can also be provided explicitly using the HTTP From

The script calls webid.pl - a Perl implementation of WebID. If you
don't have Perl and the prerequisite modules installed, then WebID
support won't work. (I plan on adding support for libAuthentication
too, but couldn't be bothered to set up MySQL. Coming soon...)

Once you have an HTTP inbox, you should link to it in your FOAF so that
it can be discovered:

	    <http://tobyinkster.co.uk/mbox> .

I encourage people on this list to set themselves up an HTTP inbox.
Once there are a few people with this set up, we can start to figure
out what's possible with the technology.

You can send me a message using curl:

	echo 'Hello Toby!' | curl -X POST \
	  -k -E path/to/your/x509/cert.pem \
	  -H 'Content-Type: text/plain' \
	  -d @- \

Let's force a From address and Subject line:

	echo 'Hello Toby!' | curl -X POST \
	  -k -E path/to/your/x509/cert.pem \
	  -H 'Content-Type: text/plain' \
	  -H 'From: you at example.net' \
	  -H 'Subject: blah blah blah' \
	  -d @- \

Let's do a non-authenticated request:

	echo 'Hello Toby!' | curl -X POST \
	  -H 'Content-Type: text/plain' \
	  -H 'From: you at example.net' \
	  -H 'Subject: blah blah blah' \
	  -d @- \

Toby A Inkster
<mailto:mail at tobyinkster.co.uk>

More information about the foaf-protocols mailing list