mailbox.mbox._pre_mailbox_hook

mbox._pre_mailbox_hook(f)

Called before writing the mailbox to file f.