html2 VM User's Manual: 22. VM Internals
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

22. VM Internals

This section gives a sketchy overview of the VM internals for the developers/programmers.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

22.1 Folder Internals

By default, VM stores mail folders in the Unix mbox format, described in the RFC 4155 specification of the Internet Engineering Task Force. In this format, the mail folder is a text file consisting of a sequence of messages, with each message consisting of a series of headers followed by a message body. The beginning of each message is delineated by a separator line starting with the string “From ” and the end by a blank line. To make sure that such a line exists, VM adds its own header line of the form “From VM ...” where the “...” records the time at which VM first saw the message. The format of the individual messages is as per the RFC 2822 specification, except that Line-Feed characters may be used to delineate the end of lines in the "Unix" format.

In addition to the Unix mbox format (which is called the From_ format), VM also handles the MMDF format and two versions of the System V Unix format and the Emacs Rmail’s Babyl format. The variable vm-folder-type stores the type of the folder being used.

To every message, VM adds a header with the field name “X-VM-v5-Data:” and stores in it the information about the message it wishes to remember between sessions. This header line is used merely for speed of processing. If, for any reason, a VM folder is corrupted, it is safe to delete all the X-VM-v5-Data headers, and VM will generate them afresh when the folder is visited.

The first message of the VM folder file contains additional headers that VM uses for remembering information between sessions.

Internal to Emacs, VM stores the folder as simply a text buffer. However, it remembers a variety of data about the message contents in the buffer through internal variables.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

22.2 Message Internals

The message data structure is a vector containing various pieces of data:


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by root on November 23, 2013 using texi2html 1.82.