Delete mails / Mailbox compaction

Hi ! I’m currently evaluating EagleFiler to archive my mails. So far I like it, but I do miss something working fine in DevonThink for instance: moving files from a mailbox to another; and above all a way to really delete mails (not just hide them).
Reading this forum I see that years ago you were talking about this, at least a “mailbox compaction” to regain disk space: is it still on your “to do” list?

Thanks!

There are currently two ways to compact a mailbox:

  1. Select all the (non-deleted) messages in the mailbox, choose Export, import the newly created mailbox file, and delete the original. (This way is faster but does not preserve the tags and notes on the messages.)

  2. Make a folder, move the non-deleted messages to the folder, select them in the folder and choose Merge Message Files, delete the original mailbox.

I do still plan to add a built-in “compact” command to do this in one step.

1 Like

OK, thanks fo the fast answer! I already tried both options actually, and it was quite slow (on only a few thousands of mails), anything simplifying and speeding the process would be great :wink:

I would expect the first option to be quite fast. Which part of the process was slow? Was there other stuff going on in EagleFiler’s Activity window at the time?

It’s way faster but still too long to my taste :slight_smile:
I did a test with a small mailbox of 131 mails. Export took a second, but import about 4mn (most of this time was for the re-indexation, according to the activity window). This is on a i7 macbook , 16go of ram and a ssd of course.

That is a much longer indexing time than I would expect. I just tested it with the same number of messages on my i7 Mac, and it took about 8 seconds (including the indexing). Do the messages in that mailbox have a lot of attachments? If not, there may be a performance issue that we should look into.

In any case:

  • The indexing happens in the background, and you can import multiple mailboxes at a time, so hopefully you wouldn’t have to sit there waiting for it to finish indexing.

  • If you need to do this sort of pruning or reorganization a lot and don’t have a huge number of messages, you might prefer to store the messages as .eml files instead of in mailboxes. Then there would be no need to reindex or compact as you move or delete them.

Yes all messages have one or two pictures attached, but the whole folder is about 300mo so that’s not huge… I will try on something else and let you know!

I already tried to export my mails from .mbox to a folder and got your warning stating that numerous .eml would be rather inefficient so I stopped!

Any sort of attachments will slow down indexing a bit because they need to be extracted and individually processed. However, I wouldn’t expect pictures to add much overhead because they have very little associated text (compared with, say, a big PDF file).

There’s some information here about how to enable logging for message indexing, which might give some clues about what’s causing the slowness.

300 .eml files in a folder is no problem, but, yes, for large numbers it will be noticeably more efficient to use mailboxes.