I have a collection of old email messages,
archived as follows:
1) One file per message.
2) Messages (=files) distributed in
a hierarchy of dirs under mailarch.
3) 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:
1) All important metadata are in the file name.
2) You can verify the integrity of each message
using only its own data and metadata.
3) Each file name is unique.
4) It is compatible with maildir (qmail)
unique names (uniq).
5) If a dir is sorted alphabetically,
then it is ordered chronologically.
6) 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:
1) using hard links.
2) 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.