1

I have a directory with a few thousand email files from another Dovecot-based server, but they have no indexes. I'd like to "import" these into an existing, live Dovecot directory structure such that the index files and the new/, /cur and /tmp files are recreated.

Is there a way to do this?

I was thinking of using the email client to create a holding spot, and move them into the created ./cur directory, then asking the client to re-index, but I don't know if the server-side indexes will be updated.

EDIT: Even though I answered this question, I'd accept an answer which either (or both):

  • Explains how this happens: Does the client kick off a re-indexing on the server? How?
  • Explains how to do this entirely on the server via the command line, preferably for just one directory rather than all of them.

NOTE: I used Apple Mail client on Yosemite 10.10.5, and when I kicked off the re-indexing, I saw 47,000 messages being "read" from the server, even though only about 10,000 were in the newly added folder. This indicates that whatever Apple Mail did, it kicked of a global rebuild of the indices.

rholmes
  • 246
  • 2
  • 10

1 Answers1

2

Ok so I tried the experiment:

  • Create a new "mailbox" as a child of an existing mailbox using my email client.
  • Using shell on the server, replace /cur with the directory full of loose files.
  • Go back to the client and control-click to "Synchronize" that mailbox folder.

The CPU heats up and the fans start going, as it processes 34,639 messages (looks like it doesn't just select that one mailbox to synchronize.

The indices and cache files on the server start growing and changing their mod times -- Success!

rholmes
  • 246
  • 2
  • 10