Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #100183

Re: Getting data out of Mozilla Thunderbird with Python?

From Cameron Simpson <cs@zip.com.au>
Newsgroups comp.lang.python
Subject Re: Getting data out of Mozilla Thunderbird with Python?
Date 2015-12-09 15:00 +1100
Message-ID <mailman.83.1449634906.12405.python-list@python.org> (permalink)
References <56671FB7.7090104@cajuntechie.org>

Show all headers | View raw


On 08Dec2015 12:21, Anthony Papillion <anthony@cajuntechie.org> wrote:
>I have a TON of email (years) stored in my Thunderbird. [...]
>I've been thinking about bringing Python into the mix to build a
>bridge between Thunderbird and SQLite or MySQL (probably sqlite) where
>all mail would be backed up to a database where I could run analytics
>against it and search it more effectively.
>
>I'm looking for a way to get at the mail stored in Thunderbird using
>Python and, so far, I can't find anything. I did find the mozmail
>package but it seems to be geared more towards testing and not really
>the kind of use I need.
>
>Can anyone suggest anything?

The local messges folders in Thunderbird are plain old mbox files IIRC. You can 
read these with the email.* modules and analyse them to your heart's content.

So I'd just write a Python program to read a single mbox file and break it into 
messages, make each one into an email Message object, and the process as you 
see fit.

Then point it at each of the TBird mbox files in turn.

Cheers,
Cameron Simpson <cs@zip.com.au>

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Getting data out of Mozilla Thunderbird with Python? Cameron Simpson <cs@zip.com.au> - 2015-12-09 15:00 +1100

csiph-web