Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

Schedule for deleting old e-mails

Lewis Faith shared this idea 6 years ago
Open Discussion

As a hosting provider, I would like the ability to set a limit on the lifetime of email messages (deleting after a certain number of days that I specify) so that I don’t have to manually delete emails for customers who have exceeded their quota due to too much mail.


---------------------------------------------------------


The problem:

Clients who use e-mail accounts created via cPanel are often not very sure on how to setup up their e-mail clients correctly. This is made worse by the fact that there are so many different e-mail clients available, often with a client user more than one (due to different devices reading the same e-mail account).

Setting up accounts at all is often troublesome, but even for those that manage nearly all clients in my experience (over 10 years) fail to adjust their settings so that read e-mails are deleted from the server after a given period of time. Often a mobile e-mail client wont even have that option. Desktop clients rarely have that option for sent items, only the inbox is maintained.

The net result of this is I routinely have clients using up their mailbox quotas. This means e-mails bounce and things are disrupted for their business. I then have to increase their quota or try and teach them about mailbox management (which never works). I can't keep increasing quotas as clients are now getting large mailboxes that are filling up the entire server.

At the moment the only other alternative is to talk to the client and discuss what e-mails can be deleted, and then I have to go and do this for them on cPanel using the Dovecot rules.

When this problem is repeated across an entire client base I end up losing many hours myself as well the issue the client has with not receiving e-mails.

The solution:

All I need is a single rule for all mailboxes that I can pass on to clients that is clear and understandable i.e messages over X months will be deleted. This would apply to sent and inbox folders. Ideally this would be a global setting on WHM, if that is not possible then it could be set via the cPanel.

The current arrangement is chaotic and unprofessional, it leads to uncertainty and impacts on the bottom line. I hope something like this can be implemented very soon.

Replies (5)

photo
2

I'm going through some of our historical requests, and I want to clarify yours a bit. Can you please clarify: do you mean that you wish to have email older than x number of days removed from an account? If so, this seems like something that could potentially cause customers to lose email that they wish to retain. In your mind is this something that would be managed by the cPanel user, or would it be managed by the root/reseller user?

photo
1

Any policy would be clearly communicated by the web host manager to the clients, and of course this would be optional and configurable. So if it was a system wide setting on WHM then each client using cPanel would be informed of the deletion cycle in place. I imagine it would be fairly long to allow for normal levels of client disorganisation, but that would be up to the host manager. From my experience I would set something like a 9-12 month deletion policy. Granulating the policy on a cPanel level may be desirable but I would be happy enough with this done at WHM to start with. If it was choice between the two (due to conflicts), I would certainly opt for a WHM master setting.

photo
photo
2

If I understand correctly, I think this may be referring specifically to something like the SpamAssassin Spam Box to prevent it from growing too large and unwieldy. I believe this is feasible by just extending Dovecot's auto-deletion plugin configuration for Trash folders to include the SpamAssassin Spam Box (.spam) folder.

photo
1

Something like this is necessary on a per folder/structure basis. For example, set trash folder to retain 30 days.. How many users just don't empty trash and just use and use and use up space? Also, for certain other types of folders/users this is useful. I have users that forward mail to other boxes/services but want to retain mail in the original inbox for the last 30/60/whatever days. This is easily done in mail client like Thunderbird or Outlook and most webmails support this (gmail, yahoo, even hotmail and aol) but cpanel mail boxes do not.


There should be cpanel account wide policy (like for trash), and there should be per email account/user per folder policies (that user can set or cpanel admin can set). Also, policy should be able to exclude emails marked a certain way (for example starred/flagged.) Again, gmail and other mail systems have made this standard and I'm surprised that cPanel is lacking this seemingly basic feature.

photo
1

I agree, but it would be good to start with something pretty basic and far reaching. I suppose a WHM level deletion cycle could have the option to only affect certain folder types across all all accounts. That would allow for a bit more control.

photo
1

I don't want to discourage "a good start" but an incomplete feature is incomplete any way you slice it.

Not being able to opt out certain users or folders, not being able to selectively exclude messages (ie via flags/stars) can make a wide policy more problem than solver, or at the very least as useless as nothing at all if no one wants to use it. Kinda the old adage about swatting flies with sledgehammers..

The feature I described is pretty verbatim from the implementation in Thunderbird mail client. Other clients I've seen are similar. On other mail servers it varies but this is about the least common denominator. This is not an extravagant implementation with bells and whistles I'm describing. It's pretty straightforward and these are about the bare minimums needed to be effective without getting up user ire.

Essentially the request is "take a basic no-frills client-side retention policy from any typical client and implement it on the server" where it makes the most sense.

photo
1

I agree with your additional requests. I do though see the usefulness of a very simple system wide setting. Most clients seem to have e-mails well over 2 years old sitting on the server unnecessarily. Most hosting managers could probably benefit from having that space freed up. Not knowing how this would be developed means I can't really offer any particular game plan. Maybe cPanel could give some indication of how long each feature would take.

photo
1

Clients may have a folder designated for storage/archival. I may have a closer relationship to most of my clients than most hands-off web hosts but that *is* a thing on my servers.If I can't exclude a folder that shouldn't be trimmed the entire feature cannot be enabled anywhere. Essentially a non-starter.

As for a game plan, seeing as the feature request we had before yours was over 2 years old without traction I'd say "don't hold your breath"

photo
photo
1

would be great to delete 30 days old emails automatically in all spam/trash folders ;)

photo
1

This makes sense, as with above comment, the only problem is that a lot of mail clients wont actually move mail around on the server in tandem with what the user is doing. I think as well as these more specific actions, there needs to be a failsafe that affects all mail-boxes. To ensure there is not a build up of old e-mails sitting around, that the client thinks they have deleted but in-fact remain on the server.

photo
photo
1

I would also very much like to see this.

Office365/Exchange has this, where per folder you can set the policy to auto delete after X days.

Very useful for folders that get a lot of server related notifications (eg: cpanel/root emails). Useful if you filter all your newsletters / marketing emails into a specific folder too.

Leave a Comment
 
Attach a file