There are a various reasons a server administrator might want to enable archiving of user messages. Prosody has a number of modules to cater for different setups. The table below gives an overview of the available modules, all of which are available from the prosody-modules project.
|mod_message_logging||None||Text files||Prosody 0.9+||Recommended for archiving for compliance/auditing purposes.|
|mod_log_messages_sql||None||External SQL storage||Prosody 0.9+||Recommended alternative to mod_message_logging when logging to SQL is a requirement.|
|mod_log_messages||None||Text files||Prosody 0.9+||Inefficient, for example purposes only.|
|mod_mam||XEP-0313||Internal archive storage||Prosody 0.9+||In-memory unless coupled with an appropriate storage module.|
|mod_archive||XEP-0136||Internal object storage||Prosody 0.9+||Inefficient.|
|mod_mam_archive||XEP-0136||Internal archive storage||Prosody 0.10+||Unmaintained community module, may be buggy. For legacy clients that do not support XEP-0313.|
If you are archiving messages for compliance/auditing purposes, you should choose one of the modules with no protocol associated with them. These log to files or a database, which can be backed up or rotated as necessary.
Alternatively if you want users to be able to access and manage their archive, choose a module with either XEP-0136 or XEP-0313 support. The user's client must implement the same protocol to be able to access the archive.