bincimap-imapdir.html (8561B)
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <HTML> 3 4 <HEAD> 5 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> 6 <META HTTP-EQUIV="Content-Language" CONTENT="en"> 7 8 <TITLE>Binc IMAP - IMAPdir</TITLE> 9 <META NAME="revisit-after" CONTENT="14 days"> 10 <META NAME="keywords" CONTENT="Binc IMAP imapdir checkpassword daemontools tcpserver xinetd Maildir qmail"> 11 <META NAME="description" CONTENT="Andreas Aardal Hanssen"> 12 <META NAME="copyright" CONTENT="Copyright Andreas Aardal Hanssen 2002, 2003"> 13 <META NAME="distribution" CONTENT="global"> 14 <META NAME="author" CONTENT="Andreas Aardal Hanssen"> 15 <LINK REL="stylesheet" HREF="bincimap.css" TYPE="text/css"> 16 <LINK REL="icon" HREF="/favicon.ico" TYPE="image/ico"> 17 <LINK REL="shortcut icon" HREF="/favicon.ico"> 18 19 </HEAD> 20 21 <BODY BGCOLOR="#000000"> 22 23 <TABLE WIDTH="95%" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="4"> 24 <TR> 25 <TD BGCOLOR="#004444"> 26 27 <TABLE WIDTH="99%" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="4"> 28 <TR> 29 <TD CLASS="headtext" BGCOLOR="#226666" ALIGN="LEFT"> 30 <TABLE> 31 <TR> 32 <TD ALIGN="center" VALIGN="middle"><IMG ALT="Binc IMAP logo" SRC="b-button64.png" BORDER="0"></TD> 33 <TD ALIGN="center" VALIGN="middle">Binc IMAP - IMAPdir</TD> 34 </TR> 35 </TABLE> 36 </TD> 37 <TD CLASS="bodytext" BGCOLOR="#226666" ALIGN="RIGHT"> 38 <A HREF="http://www.gnu.org/licenses/gpl.html">GNU General Public License</A><BR> 39 Andreas Aardal Hanssen <andreas@hanssen.name> 40 </TD> 41 </TR> 42 <TR> 43 <TD CLASS="bodytext" BGCOLOR="#FFFFFF" COLSPAN="2"></TD> 44 </TR> 45 </TABLE> 46 47 <DIV CLASS="bodytext"> 48 49 <BLOCKQUOTE> 50 51 <P>This document describes the generic mail folder structure 52 <B>IMAPdir</B>.</P> 53 54 <P>The goal of the work behind this specification is to provide the 55 community with an unambiguous representation of a mailbox hierarchy 56 where a mailbox name has a one-to-one match against a file system 57 representation. The hierarchy and naming style is inspired by the 58 IMAP4 protocol.</P> 59 60 <P>Rather than being a completely new mailbox format, this specification 61 sets conventions on how to represent a mailbox hierarchy on a file 62 system, using existing mailbox formats. <B>IMAPdir</B> is not bound to 63 any protocol.</P> 64 65 <P><B>IMAPdir</B> works with any mailbox format where one mailbox can 66 be identified by a file, a directory or a symbolic link. One entry in 67 an <B>IMAPdir</B> folder is a candidate for a mailbox. If the 68 <B>IMAPdir</B> client can not identify a directory entry as a 69 selectable mailbox, then the client must either skip the entry or 70 mark it as invalid (in IMAP, marked as \NoSelect).</P> 71 72 <UL> 73 <LI>There is no limitation to the type of file system or the number of 74 file systems represented inside an <B>IMAPdir</B>.</LI> 75 <LI>There are no reserved ordinary folder 76 names such as "Sent", "Draft" or "Trash".</LI> 77 <LI>Clients of the mailboxes inside an <B>IMAPdir</B> 78 folder <I>must</I> follow the respective format and protocol conventions 79 strictly.</LI> 80 </UL> 81 82 <P>The format of a mailbox representation in <B>IMAPdir</B> is a 83 sequence of one or more US-ASCII characters (32-126), encoded using 84 the following rules:</P> 85 86 <UL> 87 <LI>A dot '.' character represents a soft hierarchy delimiter with two exceptions: 88 <UL> 89 <LI>A leading dot represents the dot itself.</LI> 90 <LI>A dot '.' preceded by a backslash '\' represents the dot '.' itself.</LI> 91 </UL> 92 </LI> 93 <LI>A backslash '\' preceded by a backslash '\' represents the backslash '\' itself. For all other cases than before a dot '.' or a backslash '\', a stray backslash '\' character is considered an error.</LI> 94 <LI>A backslash '\' as the first character of an entry is considered an error.</LI> 95 <LI>All other characters represent themselves.</LI> 96 </UL> 97 98 Note that the protocol used to fetch the mailbox using the 99 structuring <B>IMAPdir</B> convention may restrict the character set 100 allowed. The clients <I>must</I> in those cases translate the mailbox 101 names to a selectable format. 102 103 <P>As with <A 104 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A>, 105 submailboxes can not be represented in a recursive fashion in the file 106 system. The mailbox' representation name will contain the soft 107 hierarchy delimiter character dot '.', and all mailboxes must reside 108 in the same root level directory.</P> 109 110 <P>The following example shows the typical content of an 111 <B>IMAPdir</B> stored under the directory <B>mail/</B>. The <B>file 112 system</B> column displays the contents as viewed by the UNIX command 113 'ls -al -F'.</P> 114 115 <TABLE ALIGN="center" CELLSPACING="5" CELLPADDING="5"> 116 <TR> 117 <TH BGCOLOR="#555555">File system 118 </TH> 119 <TH BGCOLOR="#555555">IMAP 120 </TH> 121 <TH BGCOLOR="#555555">Description 122 </TH> 123 </TR> 124 <TR> 125 <TD BGCOLOR="#555555"> 126 <PRE> 127 mail/INBOX -> /var/mail/paul 128 mail/INBOX.old/ -> ../Maildir/ 129 mail/INBOX.outbox/ 130 mail/work 131 mail/3rd\. of July 132 mail/Sent.2003.Jan/ 133 mail/Sent.2003.Feb/ 134 mail/Sent.2003.Mar/ 135 mail/.foo 136 </PRE> 137 </TD> 138 <TD BGCOLOR="#555555"> 139 <PRE> 140 "INBOX" 141 "INBOX/old" 142 "INBOX/outbox" 143 "work" 144 "3rd. of July" 145 "Sent/2003/Jan" 146 "Sent/2003/Feb" 147 "Sent/2003/Mar" 148 ".foo" 149 </PRE> 150 </TD> 151 <TD BGCOLOR="#555555"> 152 <PRE> 153 Symbolic link to mbox 154 Symbolic link to Maildir 155 Maildir 156 mbox 157 mbox 158 Maildir 159 Maildir 160 Maildir 161 mbox 162 </PRE> 163 </TD> 164 </TR> 165 </TABLE> 166 167 <P>In other multi level mailbox formats, <B>INBOX</B> is treated as a 168 special case.</P> 169 170 <BLOCKQUOTE> 171 <P><U><B>Maildir++</B></U></P> 172 173 <UL> 174 <LI><A 175 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A> 176 defines the mail directory itself as 177 <B>INBOX</B>. Any subdirectories inside starting with a single dot 178 '.', and containing the file <B>maildirfolder</B> are interpreted as 179 a <A 180 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A> 181 submailbox. 182 183 <LI><P>A <A HREF="http://cr.yp.to/proto/maildir.html">Maildir</A> is by 184 Dan J. Bernstein's definition identified by a directory that 185 contains the subdirectories <B>cur</B>, 186 <B>new</B> and <B>tmp</B> and nothing else.</LI> 187 188 <LI>The <A 189 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A> 190 definition follows naturally from <A 191 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A> 192 being an extension to Dan J. Bernstein's <A 193 HREF="http://cr.yp.to/proto/maildir.html">Maildir</A> 194 format. However, although the directory ~/Maildir/ itself is a 195 standard representation of INBOX for <A 196 HREF="http://cr.yp.to/proto/maildir.html">Maildir</A> clients, it is 197 not standard for other mailbox formats. With <A 198 HREF="http://www.inter7.com/courierimap/README.maildirquota.html">Maildir++</A>, 199 your mailboxes and INBOX in particular must be a <A 200 HREF="http://cr.yp.to/proto/maildir.html">Maildir</A>. 201 </UL> 202 203 <P><U><B>mbox</B></U></P> 204 205 <UL> 206 <LI>When using the <B>mbox</B> storage format, the user's INBOX is typically 207 stored at /var/spool/mail/<username>.</LI> 208 209 <LI>Using this format, the mail depository client must both have the 210 path to the user's INBOX <I>and</I> the path to the user's local 211 mailbox depository, typically <B>mail/</B>.</LI> 212 </UL> 213 214 </BLOCKQUOTE> 215 216 <P>Note that although <B>IMAPdir</B> has no restrictions with regards 217 to mailbox names, the protocol that uses <B>IMAPdir</B> might. For 218 example, IMAP servers will require the mailbox <B>INBOX</B> to be 219 present.</P> 220 221 <HR> 222 223 <P>Last updated on <B>2003-03-20</B>.</P> 224 225 <P>Please direct comments to <B>IMAPdir</B> or this document to the 226 <A HREF="/#mailinglist">Binc IMAP mailing list</A>. Remember to <I>search the archives</I> 227 first.</P> 228 229 </BLOCKQUOTE> 230 231 <TABLE WIDTH="99%" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="4"> 232 <TR> 233 <TD CLASS="bodytext" BGCOLOR="#FFFFFF"></TD> 234 </TR> 235 <TR> 236 <TD CLASS="headtext" BGCOLOR="#226666"> 237 <A HREF="http://validator.w3.org/check/referer"> 238 <IMG BORDER="0" SRC="http://www.w3.org/Icons/valid-html401" 239 ALT="Valid HTML 4.01!" HEIGHT="31" WIDTH="88"> 240 </A> 241 <A HREF="http://cr.yp.to/djbdns.html"><IMG BORDER="0" WIDTH="88" 242 HEIGHT="31" SRC="djbdns.jpg" ALT="Powered by djbdns!"></A> 243 <IMG BORDER="0" WIDTH="88" HEIGHT="30" SRC="binclogo.gif" 244 ALT="Powered by Binc IMAP"> 245 </TD> 246 </TR> 247 </TABLE> 248 249 </DIV> 250 </TD> 251 </TR> 252 </TABLE> 253 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> 254 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR> 255 256 </BODY> 257 </HTML>