Enhancement #564: Unused accounts spring cleanup
Mailbox spring cleanup
We most probably have several unused mailboxes. I think the following plugin could help track unused ones: https://wiki2.dovecot.org/Plugins/LastLogin
We could then generate admin report when mailboxes are unused for too long.
#3 Updated by Marc Dequènes almost 2 years ago
- % Done changed from 10 to 50
I created the adm_check_mb script in the admin repo.
Here is the current output:
ERR 'guihome' is a forwarding account ERR 'pilou' has no mail account ERR 'marius' has no mail account ERR 'youpi' is a forwarding account ERR 'kalagan' has no mail account ERR 'oxmoz' has no mail account ERR 'sylphe' is a forwarding account ERR 'glibersat' is a forwarding account
Checking mailbox use i not implemented yet. I need to figure out how to properly access the Dovecot's database; it is a sqlite file, so less practical. Migrating to PG would make things easier but would tie Dovecot to a new service.
Also as we do not know the mailbox creation time, if is was created long ago and never used is the same as just created and not yet used. We need to figure out a way to find this out.
If the DEBUG environment variable is set, then the script dumps a structure which could later be used for aggregation.
#5 Updated by Marc Dequènes over 1 year ago
After one month we have the following used accounts:
sqlite> select username, datetime(last_login, 'unixepoch', 'localtime') from users; username|datetime(last_login, 'unixepoch', 'localtime') banya|2017-08-08 09:39:14 arnau|2017-09-02 04:25:37 duck|2017-09-02 05:38:27 rtp|2017-09-02 06:15:40 matthieu|2017-09-01 19:33:05 happypeng|2017-09-02 06:12:17 gorou|2017-09-01 09:27:35 bea|2017-09-01 14:34:56 alice|2017-09-01 11:34:41
Here is the list of mbox (with annotations):
alex alice arnau banya: our magic bot banya-dev: test mbox for development of the bot bea boulon cecile david dc-projects: ??? dc-spamfilter-ham-retrain: HAM retraining via email dc-spamfilter-spam-retrain: SPAM retraining via email dkm duck duck-test finger georgesleyeti gorou happypeng kilobug laure marc matthieu mmenal mp-webapps-filter: SPAM filtering for mails emanating from websites nebuchadnezzar nefou neryel pikapika pilou pmota rtp tsuna xilun zedek
There's probably a lot of unused mbox originating from the golden HurdFr period.
#6 Updated by Marc Dequènes over 1 year ago
- % Done changed from 50 to 80
I cleaned things from HurdFr and Andesi, and contacted a few users too.
Here is the current output:
ERR 'pilou' has no mail account
Here is the list of mbox:
alice arnau banya banya-dev bea cecile david dc-projects dc-spamfilter-ham-retrain dc-spamfilter-spam-retrain duck duck-test finger georgesleyeti gorou happypeng laure matthieu mmenal mp-webapps-filter pilou rtp tsuna xilunRemaining accounts I'm trying to clarify because I guess it has been unused for quite some time:
IMAP/POP3 usage (last connection):
banya|2017-09-19 19:33:40 arnau|2017-09-19 19:14:44 duck|2017-09-19 19:32:58 rtp|2017-09-19 19:57:29 matthieu|2017-09-19 09:34:01 happypeng|2017-09-19 19:24:59 gorou|2017-09-19 17:01:55 bea|2017-09-19 12:48:13 alice|2017-09-18 14:05:35