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

8. May 2010, 08:25:05

hofl

Posts: 30

Delete old E-Mails

Hello,

is there a way to delete old E-Mails? I couldn't find any filter-specific field to setup a parameter like "remove E-Mail that is older than ... day/weeks/month/years". Or is it possible to write a script, that works directly on the filesystem, and parses the plain text to identify all mbs-Files, that could be removed? If yes, what will be the reaction of opera, if it does not find an E-Mail, that was indexed by it's M2?
--
hofl

8. May 2010, 08:53:52

burnout426

Posts: 13195

For pop accounts, Opera has an option to remove messages from the server after so many days. Opera also has an option to hide old emails by clicking on the View button on the mail toolbar, going to "period" and setting it to what you want.

However, Opera doesn't seem to have an option to automatically, permanently delete messages that are older than a certain date.

Originally posted by hofl:

Or is it possible to write a script, that works directly on the filesystem, and parses the plain text to identify all mbs-Files, that could be removed?



You could do that by going through the mbs files in the store folder, looking at the date header of each, parsing the date and deleting the mbs file if needed.

Originally posted by hofl:

If yes, what will be the reaction of opera, if it does not find an E-Mail, that was indexed by it's M2?



Opera would have entries in the message lists that no longer point to real messages. Setting opera:config#consistency to 0 and restart *might* fix that. Might not. You'd also want to be careful about doing this while Opera is open as Opera might be trying to read a certain mbs file or something.

So, it really wouldn't work right unless you reverse-engineer Opera's file formats and update the database and index too, all while Opera is closed.

Now, you might be able to create a filter that matches "Any Header" that starts with "Date:" and contains a date that's older than a certain time. But, you'd have to use the regex mode and a complicated expression. But, I think regex is broken for filter matching right now anyway.

Anyway, if you could get that to work, you'd ctrl + a in that filter and hit shift + del whenever you felt like deleting old messages.

But, speaking of that, in All Messages/Received, just sort your messages by date in descending order (arrow on date header pointing down), highlight the first, old message, hit shift + end and then shift + del. Although not automatic, it'd be pretty fast.

1. June 2010, 19:10:07

hofl

Posts: 30

Well it's late, but: great job!! Thank you.

One more question: I'm still working on a Opera 10.10 (under Ubuntu). Because of a crash, I had to renew my system. After installing Opera and a first start, replaced the new profile-folder ".opera" by the backuped version (made before the crash). Now I realized, that Opera's "quick search" doesn't find older messages (from 2009 or older). I don't realy know, if this "feature" was "enabled" before the crash OR if it is a new reaction. Any ideas?

Can I let Opera rebuild its index(files)?
--
hofl

1. June 2010, 22:12:41

burnout426

Posts: 13195


Can I let Opera rebuild its index(files)?



To rebuild the search index, you close down Opera and delete the lexicon folder.

However, if you're using IMAP, that won't work right unless you use Opera 10.10 or Opera 10.60 (currently in alpha at http://my.opera.com/desktopteam/blog/ ).

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