view @ 438:687c9f95c8ad

Edited wiki page mod_email_pass through web user interface.
date Thu, 13 Mar 2014 15:41:53 +0000
parents 46342407997c
children 4d4d81fa31fa
line wrap: on
line source

#summary XEP-0313: Message Archive Management using SQL
#labels Stage-Alpha, Deprecated

= Introduction =

Implementation of [ XEP-0313: Message Archive Management] backed by a SQL database.  Like [mod_mam], but using SQL.

= Details =

See [mod_mam] for details.

= Usage =

First copy the module to the prosody plugins directory.

Then add "mam_sql" to your modules_enabled list:
    modules_enabled = {
                    -- ...
                    -- ...

You should probably run the SQL to create the archive table/indexes:

CREATE TABLE `prosodyarchive` (
        `host` TEXT,
        `user` TEXT,
        `store` TEXT,
        `when` INTEGER,
        `with` TEXT,
        `resource` TEXT,
        `stanza` TEXT
CREATE INDEX `hus` ON `prosodyarchive` (`host`, `user`, `store`);
CREATE INDEX `with` ON `prosodyarchive` (`with`);
CREATE INDEX `thetime` ON `prosodyarchive` (`when`);

(*NOTE*: I ran the following SQL to initialize the table/indexes on MySQL):

CREATE TABLE prosodyarchive (
  `host`     VARCHAR(1023) NOT NULL,
  `user`     VARCHAR(1023) NOT NULL,
  `store`    VARCHAR(1023) NOT NULL,
  `when`     INTEGER     NOT NULL,
  `with`     VARCHAR(2047) NOT NULL,
  `resource` VARCHAR(1023),
  `stanza`   TEXT        NOT NULL
CREATE INDEX hus ON prosodyarchive (host, user, store);
CREATE INDEX `with` ON prosodyarchive (`with`);
CREATE INDEX thetime ON prosodyarchive (`when`);

You may want to tweak the column sizes a bit; I did for my own purposes.

= Configuration =

This module uses the same configuration settings that [mod_mam] does, in addition to the [ SQL storage settings].  You may also name the SQL connection settings 'mam_sql' if you want.

= Compatibility =
|| 0.8 || ? ||
|| 0.9 || Works ||
|| trunk || Works ||