On 2020-05-12 10:35, filbar@centrum.cz wrote:
Hello, is it possible to compress by zlib only selected folders? My e-mail accounts have archive folder and this folder contains old comunications with my customers and this I use very rare, so I want to compress them by zlib to save space. Is this possible?
Presumably you are the admin for the email server?
If so, you could move your mail store to a btrfs or zfs filesystem with compression support. I am not sure about zfs, but I know that with btrfs it is possible to set different default compression settings for individual files & directories as well as the FS as a whole.
You should ask yourself if it is worth the trouble. Disk space is cheap, and emails tend to be reasonably small, so it might be more prudent to just buy some larger disks. Also if all the disk space is being used by attachments, then you should check if they are compressible, as image files or encrypted files are usually not.
I am running a personal mail server using dovecot with the email store on a btrfs volume, but I have not enabled compression because I care more about speed and reliability. An additional advantage of btrfs is that you can use the snapshot feature to make backups more reliable. --
David Pottage