The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

How to Fix a Corrupted Mail Folder

Forums » Documentation and Tutorials » Mail Client ("M2")

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

21. November 2011, 23:25:10

burnout426

Posts: 13202

How to Fix a Corrupted Mail Folder

If your mail folder is so messed up that M2 just isn't working correctly, you need to start with a fresh mail folder. But, you'll want to save your messages at least. To do this, you'll need to import messages from your broken mail folder into the new folder. Unfortunately, you can't use the "Import from Opera" wizard as that will just duplicate the problems from the bad mail folder. Instead, you'll have to import using the generic mbox importer. Here's how you do that.

Backup Your Contacts:

Goto "Menu -> settings -> import and export -> export Opera contacts" and save as abook.adr.

Backup Feeds List:

Goto "Menu -> settings -> import and export -> export feed list" and save as feeds.opml

Note: You can only export and import the feeds *list*. Already-fetched feed messages that are no longer on the feed page will be lost. The only way to save those messages is to import them as regular email messages into a POP account (new or existing). Opera doesn't support importing feed messages into existing feed views under the "Feeds" account.

Also note that the update interval for each feed is not saved in the exported list. So, when you import later, you'll have to go in the properties of all your feeds and set the update intervals back to where you had them.

Move Bad Mail Folder:

Close down Opera and move the mail folder to a safe place.

Delete Contacts.adr:

In the preferences folder, delete contacts.adr.

Setup Mail Accounts:

Start up Opera and setup each mail account just like you would if using Opera for the first time.

Import POP Messages from the Bad Mail Folder:

For each of the POP accounts you just set up, you'll need to import their corresponding messages from the bad mail folder into them. You do this one POP account at a time.

First, open accounts.ini in the bad mail folder so you can see what account number each of your POP accounts is.

Then, in Opera:


  • Goto "Menu -> settings -> import and export -> import mail -> import generic mbox file -> add folder".

  • Browse to the "store/accountN" (where N is the number of the pop account) in the bad mail folder.

  • Choose the correct account in the "import into drop-down.

  • Click "import" and let Opera do its stuff. When it's finished, close out of the import dialog completely. Do not click back to try another one.

  • Repeat for each of the other POP accounts.




You do not need to import anything into the IMAP accounts you set up. Just set them up.

For Newsgroup accounts, you can try and set them up and import old messages from the bad mail folder. But, I've never tested that.

Delete Duplicates:

When importing your POP messages from the bad mail folder into the new pop account, you're going to get duplicates of any messages that are still on the server: the ones Opera fetched when you set up the account and the ones you imported.

What you want to do is delete the imported copies and not the newly-fetched, unread copies as an imported copy isn't tied to the message on the server like the newly-fetched copy.

To make this slightly easier, use the account selector to only shows messages for the account you're working with at the time.

Repeat this for each pop account.

Finding Imported Sent Messages:

If your imported sent messages don't show up in "All Messages/Sent", you can create labels for your sent messages.

For each POP account:


  • Create a "Label" under the "Labels" access point. Name it "Sent from your_email_address".

  • Right-click on the label, goto properties and then options.

  • Uncheck "Apply rules only to new messages".

  • Check "Hide these messages from other views" (if you don't want sent messages mixed in with regular messages in other views).

  • Switch to the rules tab and add a rule where the from header contains your email address for the account.




Then, you'll be able to tell what message are sent messages for each account by looking in the labels. Just note that the labels might show imported drafts too.

Now, if you really need to make the imported sent messages show up in "All Messages/Sent", you can export each sent label you created, shift + del the sent messages in the label, goto "Menu -> settings -> import and export -> import mail -> import generic mbox -> add mbox" and set the mbs file in the "move to sent" drop-down when you import into the account you want. Then, you can delete the label.

Finding Imported Trash and Spam Messages:

Nothing you can do about this. You just have to search for them and move them to the trash or mark them as spam.

Labels:

You'll just have to create your labels again from scratch and add rules and or apply the messages you want to them.

Import Contacts:

Goto "Menu -> settings -> import and export -> import Opera contacts" and import abook.adr.

Import Feeds List:

Goto "Menu -> settings -> import and export -> import feed list" and import feeds.opml.

You'll have to go in the properties of each one and set the interval to what you want.

That's It!:

There you go. You should now have a nice, clean mail folder with your mail restored (as much as possible).

Note that the directions above apply to replacing the mail folder in an existing Opera profile. However, the same ideas apply if you're just importing from a mail folder you previously backed up into a separate, newly-installed Opera, with a fresh mail folder with no accounts set up in it.

Note that you can import newsgroup messages too. However, you can only import them into the newsgroup account itself and not the individual views for each subscribed group.

9. August 2012, 18:15:35

casals

Posts: 1567

I did most of this today. Brilliant! Two thoughts:

--the generic mbox importer sorts the received and sent mail into the right places (yay!); I didn't find any left over trash (although I do delete it religiously every few days.

--my two mail servers (one an Exchange/Office 365, the other Gmail) keep tons of mail. If you create your account without doing anything else, Opera/M2 will load in all that mail. (Sadly, this isn't very helpful, since you will bring in all the mail that you've already deleted, and for Exchange, none of your sent mail.) You can keep it from doing this by looking under

mail/pop/

for the file beginning

uidl_

(for example: uidl_account2_ver8)

and the account you are recreating; this file contains the list of the emails that have already been downloaded. You can prevent Opera from loading all the old mail by:

(a) create the new account with your network connection disconnected;
(b) shut Opera down;
(c) copy over the uidl file to your new fresh account.

When you restart Opera, it will only download new emails for that account.
O/M2 12.16 (Build 1860) on MacBook OS X 10.8.5

16. October 2012, 19:30:05

guenter

Posts: 28

I've done this today for my crashed, huge Opera Mail Folder (several accounts, nearly 98.000 in Inbox, 34.000 in Sent, collected over aprox. 10 years). As far as I can see by now everything worked quite fine. Three small notes on the whole process as it is kindly described above:

- Don't know if this happened before or after the first step of "Finding Imported Sent Messages" (i.e. labeling the sent mails) but surely before taking the second step of "Finding Imported Sent Messages" (beginning with "Actually, you could export the label, ...") all my sent messages showed up in the proper "All Messages/Sent"-view. So everything was fine before this rather complicated second step.

- To avoid dublicates I've worked offline during the whole process. After successful re-import of all eMails I've gone to the webmail-views of my accounts (in another browser) and deleted the old entries there before going online again with Opera.

- Old feeds entries are lost. But this isn't a big problem. (Maybe it would even be possible to import them the same way as eMails; but for me this isn't important enough.)


Many thanks to burnout426 for the guidance.

Günter

17. October 2012, 09:10:07

burnout426

Posts: 13202

Originally posted by guenter:

Old feeds entries are lost



Yes. This can't be avoided currently. Opera can only import and export the feed *list*.

Originally posted by guenter:

Maybe it would even be possible to import them the same way as eMails



You can indeed import old feed messages. Unfortunately, you can't import them as feeds, only as regular emails.

Originally posted by guenter:

Don't know if this happened before or after the first step of "Finding Imported Sent Messages" (i.e. labeling the sent mails) but surely before taking the second step of "Finding Imported Sent Messages" (beginning with "Actually, you could export the label, ...") all my sent messages showed up in the proper "All Messages/Sent"-view. So everything was fine before this rather complicated second step.



I'll edit that section a bit.

8. March 2013, 14:11:11

GeekK

14° 29' E

Posts: 778

Thanks, I was able to recover my mail accounts in Opera very easily with help from your guide.

Is there any way to recover chat accounts?
Opera 12.16 |Windows 7 64-bit | Intel Pentium Dual-Core E5500 2.8 GHz | 4 GB | Nederlandse/Vlaamse forums | Opera topic op GoT

8. March 2013, 16:21:49

burnout426

Posts: 13202

Originally posted by GeekK:

Is there any way to recover chat accounts?



Not that I know of. Simply copying the sections from the old accounts.ini, renaming their numbers to follow the new accounts.ini, adding them to the new accounts.ini and updating the account count and next account number might be enough. If it does work, you'd have to retype your passwords.

28. December 2013, 11:20:40

HemiDragon

Posts: 4

Thank you for the tutorial! Managed to make the error message go away and get access back to "Mail and Chat Acc" section, been bugging me for almost a year.

Forums » Documentation and Tutorials » Mail Client ("M2")