Exporting Opera mail and importing into Apple Mail
Monday, 9. March 2009, 23:53:11
Today I needed to export a few e-mail messages to a friend. I'm using Opera as my mail client (I've been using it since version 7 or 6; and the current version is 9.63). My friend is using Apple Mail version 3.5 (930.3) on his Mac OS X version 10.5.6.
So, created a filter (AKA folder) in Opera, put there the messages I wanted to export, right-clicked on it and selected Export.... Opera can only export as .mbs file.
Then I sent that file to my friend, and he tried to import it as Mailbox (mbox). However, Apple Mail imported everything as one huge 4.7MB message, instead of separate messages. Obviously, that was not what we wanted.
He also tried importing as other formats, like Thunderbird format, but without success. I've suggested renaming the extension from .mbs to .mbx, since maybe Apple Mail works like another Apple software which is sensitive to file extension even if the file contents is the same. No luck, still importing as one big message.
After looking at some forum posts [1] [2], I found a small tool called mbs2mbx. It supposedly converts Opera's .mbs files to .mbx. It is written in Python, and uses TkInter graphical toolkit, and thus should run on Windows, Linux and Mac.
I download this tool and gave it a try. It managed to convert all messages from the .mbs file to a .mbx file... except one, which was a spam. Since that one was not important, I'm ignoring it.
Then I gave the new .mbx file to my friend... and Apple Mail could successfully import all messages! Great!
So, what is the difference between the .mbs and the .mbx file? Is Opera format really incompatible with other clients? Well... Not really.
Running gvimdiff, I found that the ONLY difference between those files was that the .mbs had \r\n (CRLF), while the .mbx had \n (LF).
So, I've learned today that Apple Mail is sensitive to newlines when importing a mailbox file.








Dan Alexandru # 10. March 2009, 12:42