March 2006

Code and Email and Systems21 Mar 2006 at 14:27 by Jean-Marc Liotier

A month ago I published and, two scripts that scour a maildir hierarchy to records all addresses from the headers in the lbdb m_inmail database in order to feed whole maildirs to LBDB for Mutt’s address completion.

A month of running these scripts has revealed a few problems wich are now corrected with a speed optimization thrown in for good measure :

As I mentioned earlier, if you do not have an existing lbdb database, you should run first. Once you have done that you can from time to time update your database with who does the same thing as but only for messages not older than a certain user-set age.

Jabber and PHP03 Mar 2006 at 17:52 by Jean-Marc Liotier

Nathan Fritz reports Lars Mikkelsen patching class.jabber.php to support Google Talk. Nathan is reviewing the patch and considers including it in a next release of class.jabber.php.

So we learn simultaneously that class.jabber.php does not support Google Talk and that it soon will…

Jabber03 Mar 2006 at 17:44 by Jean-Marc Liotier

When I open a chat with a contact from any client, I want to see our past conversation. Jabber server-side message archiving capable is what I need to really make instant messaging the tool it should be. Being a long time user of Dircproxy, an IRC proxy that does just that, I sorely miss it when using Jabber. Now that Google Talk features “Chat History” the clamor from the masses is growing for implementations of Message Archiving as described in JEP-0136.

Right now the only choice seems to be Datasink, an external component that implements Message Archiving (JEP-0136). It is theoritically pluggable into any Jabber server. There is a good recipe for installing Datasink along Ejabberd. But client support is lacking : apart from JWChat I have not found a single client supporting the functionnality provided by Datasink. As the author of Datasink says : “Datasink uses MySQL as storage backend. It’s been written mainly for having a chat history with JWChat as it can’t save to a local disk itself due to security restrictions“. So we can consider that anything else is a lucky by-product.

The Google Talk “Chat History” is not JEP-0136. But as a recent conversation on [jdev] about Google Talk and server-side logging testifies, the topic raises significant interest.

A discussion on the Ejabberd development forum mentions that “JEP-136 seems to be implemented [..] by Jabberd 1.4.5“. But I have found no trace of that anywhere else. Right now, JEP-0136 implementation is a wishlist item for Ejabberd. I’ll think about it for my next letter to Santa Claus.

Jabber and PHP03 Mar 2006 at 14:06 by Jean-Marc Liotier

You may have noticed that I have added a to the Jabber presence indicator on my personal web page. It is provided by Edgar, a sophisticated Web Jabber presence indicator based on class.jabber.php. To use the Edgar service, all you need is an image tag such as :

Edgar displays status fast because it splits processing in two independant parts sharing a database :

  • edgar.php is a command line script that collects presence data into the database.
  • status.php reads the database and displays presence on an HTML page.

Edgar is licensed under the GPL so you can download it and set it up on your own host.

I like Edgar and I will certainly study it as an exemple of a non-trivial implementation of class.jabber.php. But I shall continue to use my pathetic Web Jabber presence indicator based on one of the examples provided with class.jabber.php because Edgar does not yet display ressources whereas the script I use does.

Code and Jabber and PHP and Systems03 Mar 2006 at 12:37 by Jean-Marc Liotier

One of the problems with my Jabber presence indicator on a web page was that the page’s presence was being sent to the polled account instead of being hidden. I fixed that and the updated code is available. The fix was trivial :

< $JABBER->SendPresence();

> $JABBER->SendPresence(“invisible”);

Although widely implemented (even Edgar does it that way), the “invisible” presence type is not XMPP compliant. JEP 126 explains how to provide selective visibility in a XMPP compliant manner. Of course this is less trivial. But since JEP 126 provides the appropriate XML snippets, I could probably do it the right way using SendPacket($xml) to send the raw XML. Maybe next time… Meanwhile I reported the standard compliance issue on the Edgar bug tracker.