Aaron Stone wrote:
> Something I've been thinking about, though, is that I'd like to be able
> to dump items as they are being deleted. Generating maybe an mbox format
> file of all messages / physmessages / mailboxes dumped in a given
> session would provide some peace-of-mind and an audit trail in case
> something goes wrong.
> 
> I suppose an important question to ask is what an mbox formatted
> physmessage or mailbox looks like...

mbox format simply means the message starts with a From_ header.

in dbmail-mailbox.c you'll find

static size_t dump_message_to_stream(struct DbmailMessage *message,
GMimeStream *ostream)

which does just what you need: write a DbmailMessage in mbox format to a
stream. If the message doesn't have a From_ header yet, it constructs
one by deducing the envelope sender.

This is only being used by dbmail-export, but could easily be made a
separate entry-point for libdbmail.

-- 
  ________________________________________________________________
  Paul Stevens                                      paul at nfg.nl
  NET FACILITIES GROUP                     GPG/PGP: 1024D/11F8CD31
  The Netherlands________________________________http://www.nfg.nl

Reply via email to