MozillaZine

Thunderbird mailbox file format

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

Post Posted April 23rd, 2008, 5:01 pm

Where is the Thunderbird mailbox format documented?

couldabeen

User avatar
 
Posts: 6729
Joined: September 9th, 2003, 11:24 am
Location: I'm Right Here

Post Posted April 23rd, 2008, 5:05 pm

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

Post Posted April 23rd, 2008, 5:29 pm

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.

tanstaafl
Moderator

User avatar
 
Posts: 45412
Joined: July 30th, 2003, 5:06 pm

Post Posted April 23rd, 2008, 11:12 pm

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

Post Posted April 23rd, 2008, 11:47 pm

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.

tanstaafl
Moderator

User avatar
 
Posts: 45412
Joined: July 30th, 2003, 5:06 pm

Post Posted April 24th, 2008, 9:47 am

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

Post Posted April 24th, 2008, 11:49 am

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.

Freee!!

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

Post Posted April 24th, 2008, 1:40 pm

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

Post Posted April 24th, 2008, 2:48 pm

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

Post Posted May 2nd, 2012, 1:35 am

Mbox format is described in http://en.wikipedia.org/wiki/Mbox
What is format msf?

LIMPET235
Moderator

User avatar
 
Posts: 38701
Joined: October 19th, 2007, 1:53 am
Location: The South Coast of N.S.W. Oz.

Post Posted May 2nd, 2012, 3:45 am

Locking due to very old age.
Ancient Amateur Astronomer
Win-7-HP/IntelĀ® DualCore-2.0GHz/500G HDD/4 Gig Ram/550Watt PSU/350WattUPS/Firefox-20.0-57.0-61.0-62.0/T-bird-2.0.0.24/SnagIt-v10.0.1/MWP-7.11.0.
(Always choose the "Custom" Install.)

Return to Thunderbird General


Who is online

Users browsing this forum: No registered users and 1 guest