4 summary: 'XEP-0313: Message Archive Management'
10 Implementation of [XEP-0313: Message Archive Management].
15 This module will archive all messages that match the simple rules setup
16 by the user, and allow the user to access this archive.
21 First copy the module to the prosody plugins directory.
23 Then add "mam" to your modules\_enabled list:
40 ------------------------------ ----------------------- -----------
41 max\_archive\_query\_results number `50`
42 default\_archive\_policy boolean or `"roster"` `true`
43 archive\_expires\_after string `"1w"`
44 archive\_cleanup\_interval number `4*60*60`
50 mod\_mam uses the store "archive2"[^1]. See [Prosodys data storage
51 documentation][doc:storage] for information on how to configure storage.
53 For example, to use mod\_storage\_sql (requires Prosody 0.10 or later):
61 If no archive-capable storage backend can be opened then an in-memory
62 one will be used as fallback.
67 max_archive_query_results = 20;
69 This is the largest number of messages that are allowed to be retrieved
70 in one request *page*. A query that does not fit in one page will
71 include a reference to the next page, letting clients page through the
72 result set. Setting large number is not recommended, as Prosody will be
73 blocked while processing the request and will not be able to do anything
79 Messages in the archive will expire after some time, by default one
80 week. This can be changed by setting `archive_expires_after`:
83 archive_expires_after = "1d" -- one day
85 archive_expires_after = "1w" -- one week, the default
87 archive_expires_after = "2m" -- two months
89 archive_expires_after = "1y" -- one year
91 archive_expires_after = 60 * 60 -- one hour
93 archive_expires_after = "never" -- forever
96 The format is an integer number of seconds or a multiple of a period
97 given by a suffix that can be one of `d` (day), `w` (week), `m` (month)
98 or `y` (year). No multiplier means seconds.
100 Message matching policy
101 -----------------------
103 The MAM protocol includes a way for clients to control what messages
104 should be stored. This allows users to enable or disable archiving by
105 default or for specific contacts.
108 default_archive_policy = true
111 `default_archive_policy =` Meaning
112 ---------------------------- ------------------------------------------------------
113 `false` Store no messages.
114 `"roster"` Store messages to/from contacts in the users roster.
115 `true` Store all messages. This is the default.
120 ------- -----------------------
121 trunk Included with Prosody
122 0.10 Included with Prosody
125 ------- -----------------------
128 [^1]: Might be changed to "mam" at some point