5 Apr
2015
5 Apr
'15
8:12 p.m.
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.