Thunderbird mailbox file format

Discussion of general topics about Mozilla Thunderbird
Locked
Howard Kaikow
Posts: 606
Joined: November 6th, 2004, 4:41 pm
Contact:

Thunderbird mailbox file format

Post by Howard Kaikow »

Where is the Thunderbird mailbox format documented?
User avatar
couldabeen
Posts: 6729
Joined: September 9th, 2003, 11:24 am
Location: I'm Right Here

Post by couldabeen »

Here is a link from a Google search for mbox. mbox being the 'format' of TB's mailbox(es).
http://en.wikipedia.org/wiki/Mbox

Here is the Google search link.
http://www.google.com/search?q=mbox&ie= ... =firefox-a
Howard Kaikow
Posts: 606
Joined: November 6th, 2004, 4:41 pm
Contact:

Post by Howard Kaikow »

couldabeen wrote:Here is a link from a Google search for mbox. mbox being the 'format' of TB's mailbox(es).
http://en.wikipedia.org/wiki/Mbox

Here is the Google search link.
http://www.google.com/search?q=mbox&ie= ... =firefox-a


THanx.

I already tried the first search supra.
Could not find definitive answer.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Post by tanstaafl »

What problem are you trying to solve?

Thunderbird uses an mboxrd variation with more complex From line quoting rules. However, if you're trying to create Thunderbird compatible mbox files keep in mind that it normally has no problem with unconverted mbox files imported from a wide variety of other email clients.

http://homepages.tesco.net./~J.deBoyneP ... rmats.html
has slightly more information about mboxrd.
Howard Kaikow
Posts: 606
Joined: November 6th, 2004, 4:41 pm
Contact:

Post by Howard Kaikow »

tanstaafl wrote:What problem are you trying to solve?


Using the Attachment Extractor extension, or some other means, I can save ALL the attachments from a particular mailbox.

I would then use a standalone VB 6 program to create a response mail message. for each file.
These responses would be saved in a standalone "Unsent Messages" file.

I would then use that file as the "Unsent Messages" file in Thunderbird to send the messages.

I could do all of this programmatically in either Eudora or Outloook.
Last I heard, Thunderbird still will not work with VB 6.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Post by tanstaafl »

Thunderbird doesn't support OLE or COM calls. It supports XPCOM which is similar (but incompatible) to COM. There aren't any XPCOM bindings for VB, though you could use Javascript, C++ or Python. Mono has code to support XPCOM, but that doesn't help you since you're using Windows and VB6.

http://www.mozilla.org/projects/embeddi ... cAPIs.html
http://developer.mozilla.org/en/docs/XPCOM

However, since all of the messages are stored in flat plain text files you could write a VB6 program that browsed the inbox mbox file and looked at the X-Mozilla-Status header in each message to determine if its a new message, extracted the attachment and/or headers, and created a response that you add to the Unsent Messages mbox file. You could make a SimpleMAPI call to have Thunderbird send it if you wanted, rather than putting it in the Unsent Messages mbox.

You should be able to do what you want from VB6, it just will take more work since you won't be able to rely upon the add-on extracting the attachments. You might be able to use something like readmsg (spawn it and redirect its output to a text file) from the GNU mail utilities to parse the mbox file for you.

http://www.eyrich-net.org/mozilla/X-Moz ... us.html?en
http://www.gnu.org/software/mailutils/
Howard Kaikow
Posts: 606
Joined: November 6th, 2004, 4:41 pm
Contact:

Post by Howard Kaikow »

tanstaafl wrote:Thunderbird doesn't support OLE or COM calls. It supports XPCOM which is similar (but incompatible) to COM. There aren't any XPCOM bindings for VB, though you could use Javascript, C++ or Python. Mono has code to support XPCOM, but that doesn't help you since you're using Windows and VB6.

http://www.mozilla.org/projects/embeddi ... cAPIs.html
http://developer.mozilla.org/en/docs/XPCOM

However, since all of the messages are stored in flat plain text files you could write a VB6 program that browsed the inbox mbox file and looked at the X-Mozilla-Status header in each message to determine if its a new message, extracted the attachment and/or headers, and created a response that you add to the Unsent Messages mbox file. You could make a SimpleMAPI call to have Thunderbird send it if you wanted, rather than putting it in the Unsent Messages mbox.

You should be able to do what you want from VB6, it just will take more work since you won't be able to rely upon the add-on extracting the attachments. You might be able to use something like readmsg (spawn it and redirect its output to a text file) from the GNU mail utilities to parse the mbox file for you.

http://www.eyrich-net.org/mozilla/X-Moz ... us.html?en
http://www.gnu.org/software/mailutils/


About 12 years ago, I wrote a program using, ugh!, WordBasic to process the attachments received by Eudora, and to create a mailbox which I then put in Eudora for sending.

Since then, I've made the program a standalone VB 6 program to create an Unsent Messages mailbox.
I can use the Attachment Extractor extension to get the attachments.
Each attachment will contain, among other things, the email address of the sender.

The above should work, unless I decide to include an attachment in the response, in which case, I can either:

1. Learn how to (ab)use XPCOM.
2. Change the VB6 code to send the messages via Eudora or Outlook, so I can add the attachments programmatically.
User avatar
Freee!!
Posts: 15562
Joined: January 28th, 2005, 5:52 am
Location: Home, with my son!
Contact:

Post by Freee!! »

If you can write messages in mbox format into a mailbox, you can add attachments to that message too. Mime64 encoding isn't that difficult and there are enough sources around that can show you how to do it. Mime64 decoding might be a bit more difficult, but that seems to be not your problem at this moment.
Howard Kaikow
Posts: 606
Joined: November 6th, 2004, 4:41 pm
Contact:

Post by Howard Kaikow »

Freee!! wrote:If you can write messages in mbox format into a mailbox, you can add attachments to that message too. Mime64 encoding isn't that difficult and there are enough sources around that can show you how to do it. Mime64 decoding might be a bit more difficult, but that seems to be not your problem at this moment.

Yes, but part of the issue is time.
A lot easier to send via Outlook/Eudora with VB 6 if I have to add an attachment.
Borneq
Posts: 5
Joined: August 6th, 2008, 6:42 am

Re: Thunderbird mailbox file format

Post by Borneq »

Mbox format is described in http://en.wikipedia.org/wiki/Mbox
What is format msf?
User avatar
LIMPET235
Moderator
Posts: 39956
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Re: Thunderbird mailbox file format

Post by LIMPET235 »

Locking due to very old age.
[Ancient Amateur Astronomer.]
Win-10-H/64 bit/500G SSD/16 Gig Ram/450Watt PSU/350WattUPS/Firefox-115.0.2/T-bird-115.3.2./SnagIt-v10.0.1/MWP-7.12.125.

(Always choose the "Custom" Install.)
Locked