This one bit me as well last week. Exact same solution is already in my
git-tree.
Matthew T. O'Connor wrote:
> I'm trying to export my email out of DBMail using dbmail-export and ran
> into problems with nested folders. For example I have a user "testuser"
> with the following folders:
> INBOX
> mailing-lists
> mailing-lists/dbmail
> mailing-lists/lkml
>
> When I run dbmail-export -u testuser I get the following:
> testuser/INBOX
> testuser/mailing-lists
>
> and non of the mailboxes that are sub-dirs of mailing-lists get exported.
>
> I came up with a quick hack fix to this which is to add a .mbox suffix
> to the filename that the mailbox is being exported to which results in
> the following after export:
> testuser/INBOX
> testuser/mailing-lists.mbox
> testuser/mailing-lists/dbmail.mbox
> testuser/mailing-lists/lkml.mbox
>
> This works for my purposes, I don't know if it breaks other things of if
> there is a better way to do this type of export but anyway here is the
> patch I'm using:
>
>
> [EMAIL PROTECTED] dbmail-2.2.2]$ diff -C 4 export.c.orig export.c
> *** export.c.orig 2007-02-15 12:21:33.000000000 -0500
> --- export.c 2007-02-15 12:18:12.000000000 -0500
> ***************
> *** 266,274 ****
> } else if (!outfile) {
> outfile = ".";
> }
>
> ! dumpfile = g_strdup_printf("%s/%s", user, mailbox);
> qerrorf(" export mailbox /%s/%s -> %s/%s\n",
> user, mailbox, outfile, dumpfile);
> if (mailbox_dump(mailbox_idnr, dumpfile)) {
> g_free(dumpfile);
> goto freeall;
> --- 266,274 ----
> } else if (!outfile) {
> outfile = ".";
> }
>
> ! dumpfile = g_strdup_printf("%s/%s.mbox", user,
> mailbox);
> qerrorf(" export mailbox /%s/%s -> %s/%s\n",
> user, mailbox, outfile, dumpfile);
> if (mailbox_dump(mailbox_idnr, dumpfile)) {
> g_free(dumpfile);
> goto freeall;
>
> _______________________________________________
> Dbmail-dev mailing list
> [email protected]
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>
--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
Dbmail-dev mailing list
[email protected]
http://twister.fastxs.net/mailman/listinfo/dbmail-dev