Add option to compress incoming email

jandafields shared this idea 10 months ago
Pre-Release

In Dovecot, the "mdbox" mailbox format is supported starting in cPanel v58.

In addition, the mdbox mailbox format supports email compression (within dovecot official), although that is not a settable option through cPanel. Dovecot does all the work, all you have to do is turn on the option in the dovecot config.

Using compression, you can save significant server space because most email is just text which is easily compressed.

I have been using this email compression on my cpanel server with v58, and it is working perfect. I only had to modify the dovecot local template file to add the compression options... and it just simply works. The end users see absolutely no change because the emails are compressed/uncompressed by the server on the fly as needed.

Making this an official option through the dovecot settings in the whm gui would be a great idea... and I cannot think of any disadvantages to it, because dovecot handles all of it automatically.

So, I'm not asking you to make it possible, because it already works great. I'm asking to make it an official option in the whm gui so I don't have to use a dovecot local template.

Best Answer
photo

This is feature is now available in EDGE under WHM, Service Configuration, Mailserver Configuration

040b4c5a802aff1e371319aa3bf90bd7

Comments (7)

photo
1

This is something we'd be very interested in seeing as well - Dovecot's storage compression doesn't even rely on cpanel's introduction of mdbox as it works just as well with maildir.

Enabling it for new message deliveries only involves a couple of minor adjustments to Dovecot's config file (as with the OP, on systems where we manually use compression already we just do so via a .local template file currently) with literally 4 lines added and 1 more changed we typically see a 30-40% reduction in storage usage for mail, which is HUGE.

Enabling compression in Dovecot will cause newly-stored mail to be compressed (which is a great start) but doesn't compress existing stored mail, ideally we'd also like to see the feature include a mailbox conversion tool to compress existing stored mail (the process for doing so is again trivial, we use our own script for the purpose and the process is fully documented on Dovecot's wiki)..

photo
1

What would the CPU hit be for having all the email be compressed though?

photo
1

Revisiting this after a few months... The manual method of enabling this feature is still working well with cPanel v64 (although I had to modify the new .local dovecot file after the upgrade to v64 because that file changed and reverted back to the default .main file).

The CPU hit would depend on the level of compression you specify (on a scale of 1 to 10). I use the default of 6 and have no issues here. Again, this would be a very nice feature for cPanel to decrease disk space usage, and it would be very simple to officially add because all of the functionality is already there, it's just a matter of adding the zlib plugin to a few places in the dovecot file.

photo
1

This is currently being investigated. The work has been assigned case COBRA-4455

photo
1

Hi Nick,

Great to see this is now underway - Could I ask whether the intention here is for cPanel to handle mail compression only when mdbox is in use, or to also support it when using maildir? (We'd much prefer the latter, and Dovecot itself appears to essentially not care which mailbox format is in use for the purposes of its compression).

photo
1

This is feature is now available in EDGE under WHM, Service Configuration, Mailserver Configuration

040b4c5a802aff1e371319aa3bf90bd7

photo
1

Is there an automated option or script to compress existing messages?