Query Thunderbird Inbox from a SQL database

Discussion of general topics about Mozilla Thunderbird
Posts: 2
Joined: January 20th, 2007, 7:27 am

Post Posted January 20th, 2007, 7:30 am

Is there any way that one can run SQL database queries against the Thundirbird e-mail database? I am primarily interested in getting at the e-mail address and date recieved fields from outside of Thunderbird.


User avatar
Posts: 15562
Joined: January 28th, 2005, 5:52 am
Location: Home, with my son!

Post Posted January 20th, 2007, 7:55 am

I really doubt you can do it directly. The Thunderbird Inbox is an mbox file which for all intents and purposes is a flat file. SQL needs a well described database file. One way that might succeed is to describe the Thunderbird Inbox as an existing table with one field of varying size delimited by "/n" (the lines). That should allow you to search for lines with "@" in them (using the WHERE <field> LIKE "%@%") for e-mail addresses. You'll still need to parse those lines. The dates should be a bit simpler, but there you will have to pay attention to the date format. It is probably easier to write a program in C or C++ to handle it.

Return to Thunderbird General

Who is online

Users browsing this forum: No registered users and 1 guest