""Matthew T. O'Connor"" <matthew@zeut.net> said: > Paul J Stevens wrote: [snip] >> customization. And export-tool for dumping a dbmail-database (or >> selected subset thereof) would for instance be a nice warming up >> excersize in accessing the current storage layout. >> >> #> dbmail-export --user=somefool --folder="/" --recursive >> --outdir="/home/somefool/Mail/" >> #> dbmail-export --user=somefool >> --folder="#Users/otheruser/readonly-folder" \ >> --outfile="/home/somefool/Users/otheruser/readonly-folder" >> >> something along those lines > > I agree, this type of tool would be a nice addition to the current > dbmail utilities.
I've been thinking about this tool for a while. We need to be able to import and export from mbox format, at the very least. Other popular file based formats such as Maildir, MH and mbx would be good, but mbox is critical. I started writing this tool, but quickly found that the current database layer doesn't provide a really sane way of requesting the message as a char array or direct to FILE pointer. I was too lazy to write a whole new access function at the time, as I had really hoped that it would simply be similar enough to the IMAP or POP3 access pattern as to share code. Perhaps not, though... [snip] >> >> After that, replacing dbmail-smtp, dbmail-util and dbmail-user with >> python-based rewrites could lead to a nice set of base-classes to [snip] > I don't understand the desire for a rewrite. Perhaps I'm missing > something, but DBMail isn't just some quick prototype someone scratched > up one night, its a good system that already does a lot of good things. I'd recommend against a rewrite. There's nothing in DBMail that cannot be fixed or improved, and nothing indicates to me that the problems are endemic to C or to the API's that we are now or are planning on working with (e.g. GMIME); rather, the problems are poor architectural planning and overly-hacked implementation (e.g. 1000+ line functions like _ic_fetch). Both of those features are easily implemented in Python, too ;-) Aaron --