Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/edigiacomo/splitmailbox

Simple tool to split your mailbox
https://github.com/edigiacomo/splitmailbox

mail mailboxes maildir-format mbox-format python3

Last synced: 29 days ago
JSON representation

Simple tool to split your mailbox

Awesome Lists containing this project

README

        

# splitmailbox

Simple tool to split your mailbox or maildir.

You can customize the directory, prefix, name and suffix of the output
mailboxes using the headers of the messages stored in your mailbox. Prefix,
name and suffix are expanded by `str.format` function.

## Path of output mailboxes
Prefix, name and suffix are expanded by `str.format` function. The keyword
arguments of the function are the header of the mail (see Python class
`email.message.Message`), with some extensions:

- `Date` header is a `datetime.datetime` object

## Examples

### Split messages by year
splitmailbox --suffix '_{Date:%Y}' mail/mbox

Will create the mailboxes `mail/mbox_2000`, `mail/mbox_2001`, ...

## Limitations

- Directory are not created at runtime (e.g. `--prefix '{Date:%Y}/{Date:%m}'`)