[Dovecot] Integrate mbox into mdbox

Stan Hoeppner stan at hardwarefreak.com
Sun Apr 21 22:51:29 EEST 2013


On 4/21/2013 2:10 AM, lutz.niederer at gmx.net wrote:
>>> I have several mbox files (unstructured, only the big plain mbox files) and I would like to integrate/read these mbox files into mdbox subfolders of specific users. This is a production system and I don't want to disturb running services and I am a bit afraid of not using the right command and maybe destroying (or whatever) their mailboxes. I am sure it is pretty easy. Can someone please tell me the correct dsync command line that I should use to read each mbox file (one-way) into the specific folder of the mdbox folder structure of a specific user?
> 
>> More information about the nature of these mbox files, and how they are
>> or will be used, would be helpful.
> 
> These mbox files are left over from old installations.  The messages contained in these files should be moved into users' mdbox folders.  The user tells me the name of the folder and I was hoping for a dsync command line that reads all the messages from the mbox and feeds them into that specific mdbox folder.  Some users have 1 some have 5 mbox files left over that need to be imported.  After that the mbox files can be thrown away.
> 
>> Is there a reason you don't/won't/can't simply create a new namespace,
>> instead of copying the contents from the mbox files into users' mdbox files?
> 
> Simplicity.  I thought it would be much easier to push them into mdbox folders with the right command - one by one - than doing it with namespaces.  If there is no other way I will do it with namespaces.

Simplicity is the reason I mentioned this.  You should be able to simply
copy all the mbox files, possibly with a single command, to an
appropriate user directory, then create the namespace.

The way you've described this it seems these mbox files are archives,
not 'active' folders that were being used daily prior to your new
Dovecot deployment.  If that is correct the namespace route is probably
better, for many reasons, related both to Dovecot and filesystem
fragmentation, etc.

If these are folders that were being used daily, recently, then
migrating the contents to mdbox may be preferable, as future appends
will create less FS fragmentation vs mbox.

-- 
Stan



More information about the dovecot mailing list