Change the Location of the Opera Mail Storage Directory

Store Opera Mail emails in a custom folder

Opera Mail is at the end-of-life stage of its product lifecycle; this means neither technical support nor product and security updates will be provided. The product is no longer available for download. 

Changing the mail storage database in Opera Mail is useful if you like to keep your email files stored in a specific location, like on an external hard drive or cloud storage service.

Fortunately, you can make one small change to the settings in Opera Mail to force the program to use a different folder to store your emails. However, there are some things to be aware of before you make this change.

Email on tablet and phone
 pictafolio/Getty Images

Important Information

When you change the default mail directory, Opera Mail will no longer look in the original folder for your emails. This means that once you make the change to use a different location for the mail directory, the email account you were using previously will no longer show up when you open Opera Mail.

However, there's one extremely easy way to import all of your mail to the new location, and that is to simply move all the information in the old mail directory to the new one. Opera Mail will work the exact same way but will be using a new folder to store emails.

Something else to remember is that if you're using Opera Mail for the first time or with a new account, you should make the directory change as outlined below before you set up the email account. That way, once the folder has been changed, you can use Opera Mail as-is, and any new account you add will have its data stored in the new folder—no need to do any copying.

Change the Location of the Opera Mail Storage Directory

  1. Select the Opera Mail menu button.

  2. Select Help > About Opera Mail to open a new tab.

  3. Find the "Paths" section and then copy the path that's written next to the "Preferences" line. It should point to an INI file, most likely operaprefs.ini if you're using an updated version of Opera Mail.

  4. Now you need to open the INI file in a text editor. You can get there in Windows by pasting the path you copied into the Run dialog box (use Windows Key + R to get there). On a macOS device, use the the TextEdit application.

    Older versions of Opera Mail might use a preferences INI file called opera[version number].ini, such as opera6.ini. It's the same file, just with a different name.

  5. In the INI file, find the section titled [Mail]. just below it, type the following:

    Mail Root Directory=

    Some versions of Opera Mail already have the "Mail Root Directory" parameter in the INI file. If that's the case for you, just delete the path that's already there (if there is one) and type in the one you want to use.

  6. After "=", type the path where you want the mail directory to be located. It can be anywhere you want, including an external hard drive, another folder on your primary hard drive, or a network location.

    Here's an example where we've changed the Opera Mail email directory to be the root of the C drive, in a folder called "OperaMail":

    Mail Root Directory=C:\OperaMail\

    If the location for the mail directory is on the network, like on a shared computer, you need to use two backslashes like this to designate that the location isn't local: \\remotecomputer\OperaMail

  7. Save the file and exit the INI document.

    Take note of the "Mail directory" folder. You may need it again below.

  8. If Opera Mail was open this whole time, shut it down and then reopen the program.

If there's already another entry under the [Mail] section, put this new entry above it so that it's positioned just below the [Mail] text like shown above.

How to Move Old Mail to a New Location

If you were using Opera Mail before you changed the mail directory location, then you probably want to keep using that same account with all of those emails. The easiest way to do that is to copy the data from the original folder, and then paste it into this new folder you created above.

Here's how to do that:

  1. Close out of Opera Mail if it's currently open.

  2. Go to the default folder that you changed above. It's probably C:\Users\[username]\AppData\Local\Opera Mail\Opera Mail\mail, but use the "Mail directory" path you copied during Step 3 to be sure.

  3. In the "mail" folder, select every single folder and file that you see there. Press Ctrl+A on your keyboard to quickly select all files. There should be a folder called imap, indexer, and store, and various files like an accounts, index, and omailbase file.

  4. Now copy everything by pressing Ctrl+C. Another way is to right-click or tap-and-hold on the selection and then choose the Copy option from the menu.

  5. Open the folder that you chose in the section above (such as C:\OperaMail\ ).

  6. Paste everything you copied a few steps back. Do this by pressing Ctrl+V or by right-clicking or tapping-and-holding, and then choosing the Paste option.

  7. Reopen Opera Mail. Everything should look exactly the same as before, only now your email data is being stored in a new location.

    The new folder should be empty, but it won't be if you set up an account after you changed the mail directory above. If you've done this, consider whether you need those email files or if you can overwrite them

Was this page helpful?