Prosody should provide various options to help the operator clean up
inactive accounts, old offline msgs etc.
Inactive accounts are generally understood as accounts that have been used
atleast once but not in the last X days.
"delete_inactive_user = X;" should delete user-accounts if they are older
than X days.
"delete_expired_msg = X;" should delete offline messages if they are older
than X days.
This is especially helpful if there's no limit to the amount of
offline-msgs a user can have. (See Issue #129)
Some operators wish to delete unused (an account that has been created but
not used atleast once) sooner than those accounts that have been used
"delete_unused_user = X"; should delete user-accounts if they are older
than X days and never been used.
I suggest the following default values:
"delete_inactive_user = 365;"
"delete_expired_msg = 90;"
"delete_unused_user = 7";
This can probably be extended to inactive/unused MUC rooms, pubsub nodes etc, someone
with more knowledge of what a user can leave behind in the world of XMPP may round up
The methods behind those options should also be available through prosodyctl in case
an operator would like to use cron etc. to trigger them.
Heh, I like mod_housekeeping for a name, but feel free to suggest others :)
Are there any plans to finish this in the near future?
Again: Are there any plans to finish this in the near future?
Hi. It depends how you define "near" :)
mod_housekeeping itself isn't a difficult module, but it relies on information such as user activity that we haven't had available. These things are being worked on, and eventually we'll be able to close this issue.
Thanks for your patience!
I would also like to vote for such a module.
With mod_lastlog the information needed is provided. At least of "normal" users.
An interesting question is how to work with users who did not login since activating mod_lastlog. I would say that every user gets purged if there is no lastlog record in the database. So it is the job of the admin to decide when to first run mod_housekeeping.
BTW: I like the name, no other suggestions. ;-)
With default file based "internal" storage, you could possibly make up mod_lastlog data for users missing it by using filesystem timestamps. Or just wait for a year and assume that if they don't have any data then they aren't using the service anymore.
Also, mod_list_inactive can produce lists of users from mod_lastlog data, which can be filtered and piped to the telnet console to delete.