Digital Ocean Storage Issues

Hey Everyone,

Hope all is well. My company uses MIAB for daily emails and I use Digital Ocean to store the data. I’ve Upgraded it twice over the years and I just don’t want to keep paying Digital Ocean more monthly to store more data. Can anyone walk me through or send a link regarding backing up old data? Ideally Id like to store any emails before 2020 either on a physical drive or somewhere else.

Thank you,

Just curious … if you’d be willing to share …

What specs are you paying for with DO and how much per month? Also how many employees (users) do you have?

Maybe you’re just using the wrong provider …

@alento - I tend to agree, maybe he is using the wrong provider.

That being said there is no built in functionality to remove emails before some arbitrary date.

You would need to go into each user’s directory where mail is stored and delete mail based on a criteria.


so maybe something like this:

 is the path to the files.

-mtime is used to specify the number of days old that the file is. +365 will find files older than 365 days which is one year

-exec allows you to pass in a command such as rm.

/home/user-data/mail/mailboxes/<DOMAIN>/<USER>/cur  -mtime +365 -exec rm {} \;

I definitely didn’t do any testing on this… Totally recommend doing your own testing and ensure you have backups.

Users could also “download” mail from roundcube or archive emails with a email client like Thunderbird or Outlook to a private folder that is stored on the PC rather then the mailserver (this would have to be done for each user)

Ultimately this is why I think this project needs to have “quotas” and why I tend to stay with the quota’s fork. If you give users a certain GB limit then users have to police their own inbox. They wont be able to send or receive mail if they are over their quota.

Also keep in mind you end up getting into a weird situation by using this fork because it doesn’t get consistently updated. At some point Ill need to choose to move away from jrsupplee’s fork and adopt davness’s fork, which include jrsupplee’s quota fork → GitHub - ddavness/power-mailinabox: A Mail-in-a-Box with extra capabilities and more customizability. Not just for power users!

OK, Probably said to much…

1 Like

Echo the comments above re service sizing, however you might want to look into the Dovecot Doveadm tools (not part of MIAB)

You might use the following tools:




These commands can operate across all email boxes and would allow you to select all messages before a certain date for example.

Usual caveats about trying out in a safe environment first.

Example use of doveadm-expunge:

$DOVEADM expunge -A mailbox Spam savedbefore 60d

This will remove all messages from Spam if older than 60 days in all mailboxes.

Backup solutions aside, since there’s already 2 answers above.

Use Volumes

Instead of upgrading your droplet. (eg, Basic tier of $6 to the next tier is $12, with 25gb additional storage.), use their Volume service. 25gb is only $2.50.

You can then symbolic link your /home/user-data to /mnt/externalvolume.

I used Volumes, hence during the upgrade from ubuntu 18 to 22 recently, all I did was just remount the drive and skipped all the duplicity backup/restore altogether.

From DO’s website I get the impression that their volume’s are available in 100gb increments, so in your experience is 25gb available?

@alento yes you can customise the size. I think the minimum is 10GB ($1).

You may also upsize anytime. (no downsizing)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.