HACKER Q&A
📣 a-user-you-like

Self hosted email, Cloud storage and dovecot


If I am self hosting my email for friends and family, but have a volume attached where dovecot stores the email, can I dynamically add another volume to the VM and tell dovecot to balance mail storage between 2 directories?


  👤 pengaru Accepted Answer ✓
That's best not done at the application (dovecot) level. LVM, md, or filesystems like btrfs or zfs can spread data across devices in myriad ways.

Kudos for doing this for friends and family.


👤 martinkivi
Your question doesn't directly indicate which problem you are trying to solve. It would be helpful if you would mention the hosting provider as their service offerings do differ.

If you are trying to solve storage reliability for single mail server then creating a file system level failover would be way to go as mentioned previously (LVM, soft RAID over multiple volumes, etc).

If you are trying to solve mail service reliability/failover then adding second mail server would be helpful. In that case you can use dsync (does master/master sync) to keep emails on both servers in sync.


👤 asne11
Not addressing your question, but FWIW:

Mail is the one thing I eventually caved on and offload to Microsoft. It's an uphill battle keeping your mail out of Spam folders. You setup DKIM, SPF, etc. according to the latest spec, and at the end of the day, the MS and Google still drop your mail in spam. They simply don't care.

Second, the forces and money keeping MS above legally bound 99.9% uptime tower in comparison to any one person's own resources. Is your daily driver even operational 99% of the time you use it? We hackers can't help but to tinker, so I suppose not.

MS has teams of engineers paid specifically to keep the thing running and NOT tinker. At only ~$10 / month that's a no brainer.


👤 lathiat
I would do this with LVM. You can grow LVM to expand onto a second volume and expand the file system with it. Or ZFS.

https://wiki.archlinux.org/title/LVM#Add_physical_volume_to_...

However note self hosting mail used to be super easy but these days most report you have a real hard time getting people to accept your mail. When your IP has no prior history and small volume you’ll get false flagged as spam a lot. Likely to be your larger challenge.


👤 zxcvbn4038
Sadly self hosted e-mail is a 24/7 job where you will be fighting against big players for the luxury of sending e-mail from your own system. Despite the dozen or so different standards to attest you are a legitimate sender it has basically boiled down to a handful of big e-mail providers that trust each other and everyone else is eyed with utter suspicion and contempt - and it has nothing to do with the fact every member of the “in” crowd makes significant money selling access to their infrastructure - honest (sarcasm).

👤 rmdes
One battleground tested self-hosted solution : Cloudron.io

👤 ThePowerOfFuet
I recommend something like Migadu instead of rolling it yourself.