imapext-2007

annotate docs/drivers.txt @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
rev   line source
yuuji@0 1 /* ========================================================================
yuuji@0 2 * Copyright 1988-2006 University of Washington
yuuji@0 3 *
yuuji@0 4 * Licensed under the Apache License, Version 2.0 (the "License");
yuuji@0 5 * you may not use this file except in compliance with the License.
yuuji@0 6 * You may obtain a copy of the License at
yuuji@0 7 *
yuuji@0 8 * http://www.apache.org/licenses/LICENSE-2.0
yuuji@0 9 *
yuuji@0 10 *
yuuji@0 11 * ========================================================================
yuuji@0 12 */
yuuji@0 13
yuuji@0 14 c-client Driver Characteristics
yuuji@0 15 Mark Crispin
yuuji@0 16 11 December 2006
yuuji@0 17
yuuji@0 18
yuuji@0 19 Drivers are code modules that support different mailbox storage
yuuji@0 20 technologies. A mailbox storage technology may be implemented by
yuuji@0 21 1) files and directories on the local system
yuuji@0 22 2) a database
yuuji@0 23 3) a network protocol.
yuuji@0 24
yuuji@0 25 In the case of files and directories on the local system, a
yuuji@0 26 driver supports a particular mailbox format. Mailbox formats are
yuuji@0 27 discussed in more detail in the file formats.txt.
yuuji@0 28
yuuji@0 29 As of the date this document was written, there was no bundled
yuuji@0 30 support for any databases in c-client. However, it should not be
yuuji@0 31 particularly difficult to write a driver that communicates with a
yuuji@0 32 database.
yuuji@0 33
yuuji@0 34 Network protocols supported by c-client drivers are the Internet
yuuji@0 35 Mail Access Protocol (all versions: IMAP4rev1, IMAP4, IMAP2bis, and
yuuji@0 36 IMAP2); the Post Office Protocol (version 3); and the Network News
yuuji@0 37 Transport Protocol (NNTP). In addition, c-client also supports NNTP
yuuji@0 38 and the Simple Mail Transport Protocol (SMTP) for mailbox transport.
yuuji@0 39
yuuji@0 40 By default, all drivers are enabled. There is little benefit to
yuuji@0 41 be gained by disabling a driver, with one exception. The mbox driver
yuuji@0 42 implements the behavior of automatically moving new mail from the
yuuji@0 43 spool directory to the "mbox" file on the user's home directory, if
yuuji@0 44 and *only* if the "mbox" exists and is in mailbox format. The mbox
yuuji@0 45 driver is listed under EXTRADRIVERS; if you wish to disable it just
yuuji@0 46 remove it from that list and rebuild.
yuuji@0 47
yuuji@0 48 I. Special name "INBOX"
yuuji@0 49
yuuji@0 50 The following rules to select INBOX and its format apply in
yuuji@0 51 the order given if "black box mode" is not in effect:
yuuji@0 52 1) mbox format is selected if file ~/mbox exists, and is in unix
yuuji@0 53 format or is zero-length.
yuuji@0 54 2) mx format is selected if file ~/INBOX/.mxindex exists.
yuuji@0 55 3) mbx format is selected if file ~/INBOX exists and is in mbx format.
yuuji@0 56 4) tenex format is selected if:
yuuji@0 57 a) file ~/mail.txt exists, and is in tenex format or is zero-length.
yuuji@0 58 b) file ~/INBOX exists and is in tenex format.
yuuji@0 59 5) mtx format is selected if:
yuuji@0 60 a) file ~/INBOX.MTX exists, and is in mtx format or is zero-length.
yuuji@0 61 b) file ~/INBOX exists and is in mtx format.
yuuji@0 62 6) mmdf format is selected if the spool directory file exists and is
yuuji@0 63 in mmdf format.
yuuji@0 64 7) unix format is selected if the spool directory file exists and is
yuuji@0 65 in unix format.
yuuji@0 66 8) the dummy driver is selected if the spool directory file does not
yuuji@0 67 exist, or exists and is empty.
yuuji@0 68
yuuji@0 69 If "black box mode" is not in effect, messages are automatically
yuuji@0 70 transferred ("snarfed") from the spool directory to an INBOX in mbox,
yuuji@0 71 mx, mbx, tenex, and mtx formats.
yuuji@0 72
yuuji@0 73 The following rules to select INBOX and its format apply in the order
yuuji@0 74 given if "black box mode" is in effect:
yuuji@0 75 1) mx format is selected if file ~/INBOX/.mxindex exists.
yuuji@0 76 2) mbx format is selected if file ~/INBOX exists and is in mbx format.
yuuji@0 77 3) tenex format is selected if file ~/INBOX exists and is in tenex format.
yuuji@0 78 4) mtx format is selected if file ~/INBOX exists and is in mtx format.
yuuji@0 79 5) mmdf format is selected if file ~/INBOX exists and is in mmdf format.
yuuji@0 80 6) unix format is selected if file ~/INBOX exists and is in unix format.
yuuji@0 81 7) the dummy driver is selected if ~/INBOX does not exist, or exists
yuuji@0 82 and is empty.
yuuji@0 83
yuuji@0 84 II. Special Name #mhinbox
yuuji@0 85
yuuji@0 86 #mhinbox always refers to the directory "inbox" in the MH path, which
yuuji@0 87 is declared in the ~/.mh_profile file. Messages are automatically
yuuji@0 88 transferred from the spool directory to #mhinbox mailbox.
yuuji@0 89
yuuji@0 90
yuuji@0 91 III. Special Prefix "#mh/"
yuuji@0 92
yuuji@0 93 Any name prefixed with "#mh/" always refers to a directory in the MH
yuuji@0 94 path, which is declared in the ~/.mh_profile file. For example, the name
yuuji@0 95 "#mh/foo" refers to directory "foo" in the MH path.
yuuji@0 96
yuuji@0 97
yuuji@0 98 IV. Special prefix "#news."
yuuji@0 99
yuuji@0 100 Any name prefixed with "#news" always refers to a newsgroup. For
yuuji@0 101 example, the name "#news.comp.mail.misc" refers to newsgroup
yuuji@0 102 "comp.mail.misc".
yuuji@0 103
yuuji@0 104
yuuji@0 105 V. All Other Names
yuuji@0 106
yuuji@0 107 The driver is selected by generating a file name from the mailbox
yuuji@0 108 name, and then examining the data of the object with the resulting
yuuji@0 109 name. The formats are checked in order: mx, mbx, tenex, mtx, mmdf,
yuuji@0 110 unix, and phile. The dummy driver is selected if the file is empty.
yuuji@0 111
yuuji@0 112 The file name is generated according to certain rules, based upon the
yuuji@0 113 prefix of the mailbox name. On UNIX, the following rules apply:
yuuji@0 114
yuuji@0 115 Prefix Interpretation of Suffix
yuuji@0 116 ------ ------------------------
yuuji@0 117 / [black box] preceeds a user name; "/foo/bar" means
yuuji@0 118 "black box user foo's mailbox bar"
yuuji@0 119 [not black box] preceeds an absolute path name.
yuuji@0 120 ~ [not black box] preceeds a user name; "~foo/bar" means
yuuji@0 121 "UNIX user foo's mailbox bar"
yuuji@0 122 #ftp/ preceeds UNIX user ftp's mailbox name
yuuji@0 123 #public/ preceeds UNIX user imappublic's mailbox name
yuuji@0 124 #shared/ preceeds UNIX user imapshared's mailbox name
yuuji@0 125
yuuji@0 126 All other names are interpreted in the context of the UNIX user's home
yuuji@0 127 directory (not black box), the black box user's black box directory
yuuji@0 128 (black box), or UNIX user ftp's home directory (anonymous).
yuuji@0 129
yuuji@0 130 The strings "..", "//", and /~ are forbidden in names in:
yuuji@0 131 black box mode
yuuji@0 132 #ftp, #public, or #shared names
yuuji@0 133 anonymous users
yuuji@0 134
yuuji@0 135 Anonymous users may only access:
yuuji@0 136 INBOX (belonging to UNIX user ftp)
yuuji@0 137 files in or below UNIX user ftp's home directory
yuuji@0 138 #ftp, #news, and #public namespace
yuuji@0 139
yuuji@0 140 VI. Driver Comparison
yuuji@0 141
yuuji@0 142 The following information about the local file drivers is an
yuuji@0 143 elaboration of a table compiled by Osma Ahvenlampi.
yuuji@0 144
yuuji@0 145 Driver CA CE UID Kwd Sub NFS Performance Layout
yuuji@0 146 ------ -- -- --- --- --- --- ----------- ------
yuuji@0 147 unix no no yes yes no limited fair file
yuuji@0 148 ;;; traditional UNIX format
yuuji@0 149 mbox no no yes yes no limited fair file
yuuji@0 150 ;;; traditional UNIX format, INBOX only, using ~/mbox with automatic
yuuji@0 151 ;;; moving from the mail spool directory.
yuuji@0 152 mmdf no no yes yes no limited fair file
yuuji@0 153 ;;; default on SCO systems
yuuji@0 154 mbx yes yes yes yes no no very good prefile
yuuji@0 155 ;;; best performing local file driver; preferred format at UW
yuuji@0 156 tenex yes no no limited no no good prefile
yuuji@0 157 ;;; compatible with UNIX MM
yuuji@0 158 mtx yes no no limited no no very good prefile
yuuji@0 159 ;;; PC Pine standard format; compatible with TOPS-20; identical to tenex
yuuji@0 160 ;;; but instead CRLF newlines instead of LF
yuuji@0 161 mx yes buggy yes yes yes no poor ixdir
yuuji@0 162 ;;; fullest function; *not* recommended due to performance problems and bugs;
yuuji@0 163 ;;; to be redesigned/rewritten
yuuji@0 164 mh yes no no no yes yes very poor dir
yuuji@0 165 ;;; compatible with mh; #mhinbox for INBOX, #mh/ prefix for all other names
yuuji@0 166 news yes no yes no yes yes very poor ixdir
yuuji@0 167 ;;; local news spool access; #news. prefix for all names
yuuji@0 168 phile no no no no no yes good file
yuuji@0 169 ;;; reads arbitrary file as a single readonly message
yuuji@0 170
yuuji@0 171 IMPORTANT: the "performance" ratings are relative to other drivers,
yuuji@0 172 and not necessarily to other software which implements those formats.
yuuji@0 173 They relate to the driver's performance in typical operations such as
yuuji@0 174 an IMAP "FETCH ALL".
yuuji@0 175
yuuji@0 176 Key to headings:
yuuji@0 177 CA: concurrent read/write access
yuuji@0 178 CE: expunge permitted in concurrent read/write access
yuuji@0 179 UID: sticky UIDs
yuuji@0 180 Kwd: keyword flags
yuuji@0 181 Sub: subfolders
yuuji@0 182 NFS: usable over network filesystems (NFS, AFS, etc.)
yuuji@0 183 Layout: file - single file
yuuji@0 184 prefile - file with preallocated space for state
yuuji@0 185 dir - directory, messages are files
yuuji@0 186 ixdir - directory, messages are files, with helper index
yuuji@0 187
yuuji@0 188 In addition, drivers imap, nntp, and pop3 support IMAP4rev1, NNTP, and
yuuji@0 189 POP3 protocols respectively.

UW-IMAP'd extensions by yuuji