mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
13.89k stars 1.43k forks source link

[Feature] Trash size features #617

Open nomandera opened 8 years ago

nomandera commented 8 years ago

Whilst migrating MIAB servers I spent more time than normal looking at user accounts and discovered a uncomfortably large percentage of mail was actually in users Trash bins.

When promoted, these trash emails were deleted recovering a healthy amount of disk space and reducing my backup burden.

I suggest showing the Trash usage per user in the user summary.

Other suggestions would be an email to users once trash size has passed a certain ceiling and autodelete beyond a larger limit (too unsafe?)

h8h commented 8 years ago

What about a policy that declaims: "Every message in the folder trash which is older than 30 days will be automatically removed".

Than run a monthly cronjob and find every message which is older than 30 days in folder .trash and remove them.

nomandera commented 8 years ago

Seems elegant to me.

bronson commented 8 years ago

That sounds a little scary to me because I'm finding some of my mail clients can't agree on Archive vs. Trash.

I keep moving messages out of my Trash and into Archive. :(

Until this is fixed, I'd be afraid of automatically deleting messages. Unless the user opts-in of course.

nomandera commented 8 years ago

Strongly agreed. I think it goes without saying that any "delete" action should be opt in only.

It may be worth setting some sanity check so that the status email suggests when Trash is becoming a problem or at the very least show some stats somewhere that can inform the admin of usage.

RhvsW commented 8 years ago

Dovecot has a plugin for this, see: http://wiki2.dovecot.org/Plugins/Expire

bronson commented 8 years ago

Just curious, how do you picture the users opting in? Add a per-user dashboard? Tweaks to Roundcube?

The Expire plugin looks a little fiddly but that page links to the autoexpunge setting that can be added to mailboxes.conf. That looks easy!

Alas, I don't see a way to set autoexpunge per-user... But I know very little about configuring dovecot, maybe it's easy.