1 \section{\module{mailbox
} ---
2 Read various mailbox formats
}
4 \declaremodule{standard
}{mailbox
}
5 \modulesynopsis{Read various mailbox formats.
}
8 This module defines a number of classes that allow easy and uniform
9 access to mail messages in a (
\UNIX{}) mailbox.
11 \begin{classdesc
}{UnixMailbox
}{fp
}
12 Access a classic
\UNIX{}-style mailbox, where all messages are contained
13 in a single file and separated by ``From name time'' lines.
14 The file object
\var{fp
} points to the mailbox file.
17 \begin{classdesc
}{MmdfMailbox
}{fp
}
18 Access an MMDF-style mailbox, where all messages are contained
19 in a single file and separated by lines consisting of
4 control-A
20 characters. The file object
\var{fp
} points to the mailbox file.
23 \begin{classdesc
}{MHMailbox
}{dirname
}
24 Access an MH mailbox, a directory with each message in a separate
25 file with a numeric name.
26 The name of the mailbox directory is passed in
\var{dirname
}.
29 \begin{classdesc
}{Maildir
}{dirname
}
30 Access a Qmail mail directory. All new and current mail for the
31 mailbox specified by
\var{dirname
} is made available.
34 \begin{classdesc
}{BabylMailbox
}{fp
}
35 Access a Babyl mailbox, which is similar to an MMDF mailbox. Mail
36 messages start with a line containing only
\code{'*** EOOH ***'
} and
37 end with a line containing only
\code{'
\e{}037\e{}014'
}.
41 \subsection{Mailbox Objects
\label{mailbox-objects
}}
43 All implementations of Mailbox objects have one externally visible
46 \begin{methoddesc
}[mailbox
]{next
}{}
47 Return the next message in the mailbox, as a
\class{rfc822.Message
}
48 object (see the
\refmodule{rfc822
} module). Depending on the mailbox
49 implementation the
\var{fp
} attribute of this object may be a true
50 file object or a class instance simulating a file object, taking care
51 of things like message boundaries if multiple mail messages are
52 contained in a single file, etc.