Old mail filters for new profile?

Forums » Opera for Windows/Mac/Linux » Opera mail, chat and news

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

15. May 2010, 12:50:22

martintangsl

Posts: 294

Old mail filters for new profile?

Is there a way to copy the old mail filters to a new profile?

15. May 2010, 20:48:03

burnout426

Posts: 13195

Originally posted by martintangsl:

Is there a way to copy the old mail filters to a new profile?



Yes, but only by copying the whole mail folder to the new profile and using that.

You may be able to copy their sections from index.ini, place them in the index.ini of the other profile (while making sure what you're pasting doesn't use any existing IDs in there. Otherwise, change the one's you're pasting), start Opera and go into the properties of each filter and reapply the filter. But, that's untested and will probably mess up something or probably not work right. And, some auto-generated filters may not be in index.ini, so you might not be able to copy them.

So, there might be a way, but, there's no practical way.

16. May 2010, 02:48:20

martintangsl

Posts: 294

Thanks. The method seems to work. The "index count" may also need to be changed if multiple filters are added at once.
That's not practical but at least users can make conversion of many filters and rules faster by some programming.


The best should be a built-in function by Opera. bigsmile That is very useful if a user want to upgrade Opera and does not want to take the risk of losing a huge mail database while upgrading.

16. May 2010, 03:02:35

burnout426

Posts: 13195

So, did you have to manually reapply all the filters?

Before you pasted in the sections from the old index.ini, did you change each section's name and ID= so that it used the next available index number and id in the target index.ini? Or, did you just make sure the sections and IDs were not in use in the target index.ini and made no attempt to make them consecutive with the section numbers and ids already in there?

All the details will help others that decide to try this.

16. May 2010, 03:05:35

burnout426

Posts: 13195

Originally posted by martintangsl:

The best should be a built-in function by Opera.



When you export contacts to an adr file and import them into another Opera (after removing the m2indexid lines in the adr file), you're basically exporting and importing filters. That seems to work pretty well. So, it at least seems like it wouldn't be super hard to do the same for user-created filters (and their rules that go along with them). Hopefully Opera can do this someday.

16. May 2010, 04:04:05

martintangsl

Posts: 294

I only tried several filters. I changed 3 things:
1) [index xxx]
I didn't try non-consecutive index number.
It may or may not requires a sorted manner. I saw some manually added filters were placed in the top. Sorted again after adding another filter in Opera
2) ID={nothing}
3) index count=xxx
last index number for 1)

The filtters were reapplied after editing the file.

Forums » Opera for Windows/Mac/Linux » Opera mail, chat and news