Install Datasink for Message Archiving

Datasink implements Message Archiving. This protocol enables Jabber clients such as JWChat to store chat history on the server.

This tutorial will help you to install Datasink when using ejabberd. Note that there also is a native module in development called mod_archive.


Datasink 0.2.6 does not work with newer JWChat versions, make sure to use a version a little older.

  1. Download Datasink

    mkdir datasink
    cd datasink
    chmod +x datasink
  2. Create MySQL Database

    mysqladmin -u root -ppassword create datasink
    mysql -u root -ppassword
    GRANT ALL PRIVILEGES ON datasink.* TO datasink@localhost IDENTIFIED BY 'secret';
    flush privileges;
    mysql -u datasink -psecret datasink < datasink.sql
  3. Install Required Perl Libraries

    perl -MCPAN -e'install Net::Jabber'
    perl -MCPAN -e'install DBI'
    perl -MCPAN -e'install Data::Dumper'
    perl -MCPAN -e'install Digest::MD5'
    perl -MCPAN -e'install Getopt::Long'
  4. Configure ejabberd

    Edit ejabberd.cfg:

    {host, ""}.
      {5261, ejabberd_service, [{host, "",
                              [{password, "secret"}]}]},
  5. Configure Datasink

    Edit config.xml:
  6. Start ejabberd and Datasink

    To Datasink:



  • Datasink 0.2.6 only works with older JWChat versions.
  • Set timezone to UTC for mysql to make timestamps work correctly.
  • There may be problems with non-ASCII characters... UTF-8...
Syndicate content