Project

General

Profile

Actions

Enhancement #565

closed

Enhancement #564: Unused accounts spring cleanup

Mailbox spring cleanup

Added by Marc Dequènes almost 7 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Category:
Service :: Mail
Start date:
2017-06-24
Due date:
% Done:

100%

Estimated time:
Patch Available:
Confirmed:
No
Branch:
Entity:
DuckCorp
Security:
Help Needed:

Description

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.


Related issues 1 (0 open1 closed)

Related to DuckCorp Infrastructure - Enhancement #598: SpamFilter spring cleanupResolvedMarc Dequènes2017-09-26

Actions
Actions #1

Updated by Marc Dequènes over 6 years ago

  • Assignee deleted (DC Admins)
Actions #2

Updated by Marc Dequènes over 6 years ago

  • Status changed from New to In Progress
  • Assignee set to Marc Dequènes
  • % Done changed from 0 to 10

Activated dovecot plugin.

Actions #3

Updated by Marc Dequènes over 6 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.

Actions #4

Updated by Marc Dequènes over 6 years ago

Did a full cleanup, leaving only pilou safe.

Actions #5

Updated by Marc Dequènes over 6 years 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.

Actions #6

Updated by Marc Dequènes over 6 years 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
xilun

Remaining accounts I'm trying to clarify because I guess it has been unused for quite some time:
  • finger
  • georgesleyeti
  • mmenal
  • tsuna
  • xilun

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

Actions #7

Updated by Marc Dequènes over 6 years ago

  • % Done changed from 80 to 90
Accounts removed (user request):
  • finger
  • tsuna
  • xilun
Pingued users:
  • georgesleyeti
  • mmenal
Actions #8

Updated by Marc Dequènes over 6 years ago

Actions #9

Updated by Marc Dequènes over 6 years ago

georgesleyeti said he is using all his services except the mail account (not including the unrelated mail redirection), purged.

Actions #10

Updated by Marc Dequènes almost 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

mmenal did not reply to my ping but is using his mailbox.

That's all folks.

Actions

Also available in: Atom PDF