EssentialsX

EssentialsX

2M Downloads

Feature request: /essentials cleanup mail <all/days old>

DeusNinja opened this issue ยท 5 comments

commented

I'd really appreciate any way of deleting all the mails from the user files. Not sure about the practicality of adding this feature, hope it can be done.

commented

What would this feature provide for the users/game, other than obviously just deleting the mails?

commented

I guess it might be useful in conserving space, but to me purging old mail seems to defeat the point of mail.

commented

I came here to make a feature request for the same thing and found this one. Yes, conserving space. My hosting service allocates "unlimited" space but charges for backup storage by the amount used. I also copy the files to different servers for testing and a second set of backups. As a workaround I've been using the native cleanup command to purge inactive users and wrote a quick-and-dirty PowerShell script to offline remove mail from the userdata files, but decided that was too labor intensive and the risk of damaging files outweighed regular cleanup. On my small-ish server the directory went from 1GB to 100MB and should be just a couple MB.

commented

Currently, EssentialsX doesn't track when mails are sent, so we can only purge all mail unless we add a timestamp to mails (which would conflict with existing, timestamp-less mails).

commented

Closing this issue as I'm not sure it's necessary. I'm also in agreement about deleting mails kind of defeating the point of mail. Many players would like to keep their log of mails. If there is a space concern, I would probably advise not using mail and instead using some sort of other announcement plugin.

Will leave this as open to pr though in case someone feels like making a major overhaul of how the mail system works.