Using dovecot to serve an email archive
I have a collection of old email messages, archived as follows:
- One file per message.
- Messages (=files) distributed in a hierarchy of dirs under mailarch.
- Each file (=message) uses the name <seconds>.R<sha1>.mail Here <seconds> is the date of the message, expressed as the number of seconds from 1-1-1970 00:00 in 10 digits, and <sha1> is the SHA-1 hash of the message contents, expressed in hexadecimal, [0-9a-f].
The advantages of this file naming scheme are:
- All important metadata are in the file name.
- You can verify the integrity of each message using only its own data and metadata.
- Each file name is unique.
- It is compatible with maildir (qmail) unique names (uniq).
- If a dir is sorted alphabetically, then it is ordered chronologically.
- The extension .mail can be used to call an appropriate message reader.
From time to time I add new messages and dirs to the archive, but some dirs are closed forever, so it would be nice to tar.gz'ip them.
Now I am looking for an IMAP server that can serve this collection in a read-only (ro) manner. That is, the server should not write the mailarch dir at all.
I am exploring two possibilities:
- using hard links.
- using FUSE to set a rw layer on top of the ro archive layer.
But I am new to dovecot, so perhaps there is an easier way to achieve what I want, and therefore I would appreciate very much your advice.
Am 2015-04-05 um 19:12 schrieb Ramón Casares:
Now I am looking for an IMAP server that can serve this collection in a read-only (ro) manner. That is, the server should not write the mailarch dir at all.
Dovecot ACL might be what you want?
Probably still writes indices…
-- peter
On Mon, 06 Apr 2015 00:42:00 +0200 Peter Chiochetti pch@myzel.net wrote:
Am 2015-04-05 um 19:12 schrieb Ramón Casares:
Now I am looking for an IMAP server that can serve this collection in a read-only (ro) manner. That is, the server should not write the mailarch dir at all.
Dovecot ACL might be what you want?
Probably still writes indices…
-- peter
I was reading about dovecot ACL. It is a means to control what users can do, but the server itself seems to be free to write indices, move files from new to cur, etc.
The other problem is to force dovecot to accept the file naming scheme <seconds>.R<sha1>.mail
Nevertheless, thank you
Ramón Casares
participants (2)
-
Peter Chiochetti
-
Ramón Casares