fonginator

Registered
Oct 19, 2016
4
0
76
Montreal, Canada
cPanel Access Level
Root Administrator
Hello,

I'm taking baby steps to convert my mailboxes from Maildir to mdbox in 11.60. One account conversion seems to have gone off without a hitch but I've got questions.

- I chose to keep the old mailbox files; however, since the conversion seems to be OK, how do I get rid of these files? Do I just delete the "storage" directories that were created in the mail directory?

- What do we have to know about creating and restoring from backups now? With Maildir, it was just a matter of restoring files to the mail directories, but what about with mdbox?

- How concerned should I be about corrupted indexes and the like? My understanding is that the indexes hold all of the important metadata (flags, message status), and that losing the index effectively loses all of that. Does the risk of losing email increase with mdbox?

Thanks for any help here!

Any help here? I've got a few gigs worth of old emails that are eating up too much space and I really need to clear them out.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello @fonginator,

- I chose to keep the old mailbox files; however, since the conversion seems to be OK, how do I get rid of these files? Do I just delete the "storage" directories that were created in the mail directory?
The "--delete-old-format" flag is available as part of the conversion scripts to ensure the old files are removed after a successful conversion. It's documented at:

The Mailbox Format Conversion Scripts - Documentation - cPanel Documentation

- What do we have to know about creating and restoring from backups now? With Maildir, it was just a matter of restoring files to the mail directories, but what about with mdbox?
There's no native feature that will allow you to restore emails directly, but we have a feature request open that I encourage you to vote for at:

Adjust restore account to use dsync

However, aside from an official feature, you can use the dsync utility manually from the command line. Here's an example:

Code:
dsync mirror -u user1 'mdbox:/path/to/backup/cpuser1/homedir/mail'
dsync mirror -u [email protected] 'mdbox:/path/to/backup/cpuser1/homedir/mail/domain.tld/user1'
- How concerned should I be about corrupted indexes and the like? My understanding is that the indexes hold all of the important metadata (flags, message status), and that losing the index effectively loses all of that. Does the risk of losing email increase with mdbox?
It's true that you may lose emails due to corruption if the system does not have backups (or emails are delivered after the most recent backup generation), but the amount of emails lost would depend entirely on the level of corruption. That said, we've not seen any issue with corruption in testing thus far.

Thank you.
 

screege

Well-Known Member
Aug 11, 2004
190
1
166
Hello I did not did the conversion thru cli instead directly from whm where are the backups stored so I can delete them?

Also I presume that if we make daily backups of our accounts there is no trouble in restoring everything from cpbackup?

Regards
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
Hello I did not did the conversion thru cli instead directly from whm where are the backups stored so I can delete them?
Did you choose "Keep old mailbox files. This option maintains the old files in case of an error. You must remove these files manually." when converting the mailboxes via WHM? If so, here's a quote from our Mailbox Conversion document explaining where this data is stored:

If you select this option, the system creates a storage file in each account's /home/user/mail and /home/user/mail/domain/emailaccount directory. This file contains all of the account's email messages that existed before you converted the mailbox's format. The amount of mail that resides in this file does not count against the cPanel account's email account quota. However, this amount of mail does count against the cPanel account's disk space quota.
  • user represents the cPanel account's user.
  • domain represents the domain.
  • emailaccount represents the email account.
Also I presume that if we make daily backups of our accounts there is no trouble in restoring everything from cpbackup?
We've not seen any issues with corruption, but you are correct that backups would include the emails (though you could lose any emails delivered between the time the most recent backup finishes and when the corruption begins).

Thank you.