Do more on the web, with a fast and secure browser!

Download Opera browser with:

  • built-in ad blocker
  • battery saver
  • free VPN
Download Opera

Opera Mail restore problem - everything in Inbox

  • Hello,

    I am restoring Opera Mail 1.0.1044 after a crash.
    "Local" installation (in AppData\Local; there were issues after installing globally for all users)
    Replaced Local\Opera Mail and Roaming\Opera Mail from backup (save for cache directories that I hasn't backed up.

    Now when I start Opera everything is in place except that ALL my mail is in Inbox (including Sent items) - instead of label folders, Spam, Sent etc.

    What am I doing wrong?

  • Stupid me skipped in the backup "indexer" folder, thinking it's some disposable stuff akin to "lexicon"...

    Luckily I have some older backup of it, but... is there a way I could put something in Sent items manually?

  • @xyzzy said in Opera Mail restore problem - everything in Inbox:

    Luckily I have some older backup of it, but... is there a way I could put something in Sent items manually?

    Create a label has a rule of from contains you@example and uncheck "apply only to new messages". That should grab all the sent messages for the label. For the label's message list, you might have to click the button on the tool and check "show sent" to see them in the label.

    Anyway, you could right-click the label, and export it to an mbs file. Then, you could permanently delete all messages(ctrl + a and then shift + del) in the label and delete the label. Then, you could goto "Menu -> settings -> import and export -> import mail -> import generic mbox" and pick the mbs file that you exported. Then, you could choose what account to import into and then set the mbs file in the "move to sent" drop-down and then import. That'll get them treated as sent messages.

  • @burnout426

    Thanks, that is one neat trick!

    Is there a way I could preserve threads with this method? Now it seems every thread gets broken into pieces at the points of my replies.
    Like moving X-Opera- tags to the exported mbs?


  • @xyzzy I'm not sure. You can check the source of the sent messages and the replies to them to see if the Message-Id header is present and the In-Reply-To and Reference headers are there and match the parent message (the message they're replying to if any). Same type of thing mailing list messages. Also, check their List-Id headers.

    For any message lists in Opera where you want sent messages to show and threading to be on, make sure to click the "settings for this view" button on the toolbar and turn on "Show Sent" and "Threaded". For "Threaded", check the wrench icon at the top right of Opera to see if it's turned on globally first before you decide to override it per-view.

    Finally, because of a bug, you might have to override the default sorting, turn on threaded and toggle "show sent" back and forth and then turn off overriding to get threading to work. This is usually an issue for "All Messages/Sent" the most.

    Besides those things, I'm not sure what you can do.

    As for the X-Opera-Status header, I don't think it contains anything about threading. But, you can check yourself by putting the header value into the following page.


    <!DOCTYPE html>
            <meta charset="utf-8">
            <title>Get Message Status flags from X-Opera-Status header value</title>
                var flag_names = [
                    "currently unused bit",
                window.addEventListener("DOMContentLoaded", function() {
                    document.body.textContent = "";
                    var header = document.createElement("h1");
                    header.textContent = document.title;
                    var input_container = document.createElement("p");
                    var input = document.createElement("input");
                    input.size = 80;
                    var button = document.createElement("button");
                    button.textContent = "Get Flags";
                    var space = document.createElement("br");
                    var output_container = document.createElement("pre");
                    var hex_container = document.createElement("p");
                    var binary_container = document.createElement("p");
                    button.addEventListener("click", function() {
                        try {
                            hex_container.textContent = "";
                            binary_container.textContent = "";
                            output_container.textContent = "";
                            if (input.value.length < 114) {
                                alert("value must be 114 characters or more");
                            var flags_hex_str = input.value.substring(34, 42);
                            if (flags_hex_str.match(/^[A-Fa-f0-9]{8}$/) == null) {
                                alert("invalid flags hex value");
                            setTimeout(function() {
                                hex_container.textContent = "0x" + flags_hex_str;
                            }, 150);
                            var flags_int = parseInt(flags_hex_str, 16);
                            binary_container.textContent = "";
                            setTimeout(function() {
                                var flags_binary_str = flags_int.toString(2);
                                var len = flags_binary_str.length;
                                if (len < 32) {
                                    var toAdd = 32 - len;
                                    var padding = "";
                                    for (var i = 0; i < toAdd; ++i) {
                                        padding += "0";
                                    flags_binary_str = padding + flags_binary_str;
                                binary_container.textContent = flags_binary_str;
                            }, 150);
                            var resultText = "";
                            for (var i = 0; i < 32; ++i) {
                                var num = Math.pow(2, i);
                                resultText += flag_names[i];
                                resultText += "=";
                                resultText += (flags_int & num) === num ? "1" : "0"
                                resultText += "\n";
                            output_container.textContent = "";
                            setTimeout(function() {
                                output_container.textContent = resultText;
                            }, 150);
                        } catch(e) {
                            alert("invalid header value");
                    }, false);
                }, false);
            <p>This page requires Javascript.</p>
  • Big part of my problem was leaving some labels that interfered with labels created for export. Then, after importing, things did not fall correctly in place.

    I corrected this, but I think still there are cases of broken threads, but so few I am not going to investigate it further. Maybe message ids are not correct after all.