Query Thunderbird Inbox from a SQL database

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

Query Thunderbird Inbox from a SQL database

Post by abeaton »

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
Freee!!
Posts: 15562
Joined: January 28th, 2005, 5:52 am
Location: Home, with my son!
Contact:

Post by Freee!! »

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.
Post Reply