summaryrefslogtreecommitdiffstats
path: root/doc/wiki/MailboxFormat.MH.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /doc/wiki/MailboxFormat.MH.txt
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/wiki/MailboxFormat.MH.txt')
-rw-r--r--doc/wiki/MailboxFormat.MH.txt52
1 files changed, 52 insertions, 0 deletions
diff --git a/doc/wiki/MailboxFormat.MH.txt b/doc/wiki/MailboxFormat.MH.txt
new file mode 100644
index 0000000..cbe7190
--- /dev/null
+++ b/doc/wiki/MailboxFormat.MH.txt
@@ -0,0 +1,52 @@
+MH Mailbox Format
+=================
+
+The MH mailbox format originated with a system developed by the RAND
+corporation and the University of California. Each email message is stored in
+a single file, with directories indicating folders and subfolders. The index
+or order of the messages in the folder determine what each message is named
+(which may not correspond to the inode index). The "safe" way to guarantee a
+message gets written to a mail folder is to first write the message out to a
+randomly chosen temporary file name, then link the file to the number LAST+1,
+where LAST is the last sequential message in the folder. If the link fails,
+increment the counter and try again.
+
+MH folders also maintains a meta-file called '~/Mail/.mh_context' that contains
+information about the most current folder and message chosen. Each sub-folder
+also contains a meta-file called '.mh_sequences' or '.xmhcache', which
+maintains keyword association lists for stored queries. New messages are
+stored in the "unseen" sequence for a folder. Procmail itself does not bother
+making changes to this file, rather simply delivers the message to the folder
+and leaves determining new messages as an exercise for the MUA. For example:
+
+---%<-------------------------------------------------------------------------
+unseen: 1-3 8 15
+projectB: 2-8 10
+---%<-------------------------------------------------------------------------
+
+shows two stored sequences of messages. Command-line utilities can then use
+these sequences as shortcuts.'show unseen', for example, is short-hand for
+'show 1-3 8 15'.
+
+Deleted emails are indicated by prepending a "," to the name. One of the
+largest problems that IMAP servers have with MH format is the volatility of the
+email message name itself. The command-line utility 'sortm' is used to sort
+mail folders by date or string matching. To do this, messages are actually
+renamed to reflect the new sort order. IMAP servers are required to maintain
+an index of the folder contents, so when the names of the file entries cannot
+be guaranteed to be stable, IMAP servers have to throw out previous index
+caches and re-index.
+
+When operating with a shell account on a machine that also provides IMAP access
+to folders, users are encouraged not to re-sort email locally while accessing
+the IMAP server remotely.
+
+Links
+
+ * NMH [http://www.nongnu.org/nmh/]: New MH Client
+ * Original RAND MH [http://rand-mh.sourceforge.net] Code
+ * MH-Book [http://rand-mh.sourceforge.net/book/]
+ * Mutt Manual [http://www.mutt.org/doc/manual/manual-4.html#ss4.6]: Describing
+ how it handles MH folders
+
+(This file was created from the wiki on 2019-06-19 12:42)