[foaf-protocols] Bootstrapping the Semantic Inbox

Nathan nathan at webr3.org
Sun Sep 26 16:53:49 CEST 2010


Toby Inkster wrote:
> 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.

inspiring!

> 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:
> 
> http://goddamn.co.uk/viewvc/misc/php-mods/http-mbox/
> 
> 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.

awesome!

> 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
> header.
> 
> 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/#i>
> 	  <http://purl.org/NET/semantic-inbox#mbox>
> 	    <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 @- \
> 	  https://tobyinkster.co.uk/mbox
> 
> 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 @- \
> 	  https://tobyinkster.co.uk/mbox
> 
> 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 @- \
> 	  http://tobyinkster.co.uk/mbox
> 

done! Message sent with Message-ID: 
<http-mbox-gateway.007e058e44e349ba6a320c578c904df8 at 192.168.0.11>.

https:// is timing out, but standard port 80 worked fine.

Nice first step,

Nathan


More information about the foaf-protocols mailing list