bincimap

Log | Files | Refs | LICENSE

bincimap-manual.tex (26736B)


      1 \documentclass[11pt,a4paper,twoside,openright]{report}
      2 \usepackage[latin1]{inputenc}
      3 \usepackage[T1]{fontenc}
      4 \usepackage[colorlinks=true]{hyperref}
      5 \usepackage[usenames]{color}
      6 \usepackage{fancyvrb,varioref}
      7 
      8 \pagestyle{headings}
      9 % \pagecolor[rgb]{0.134,0.40,0.40}
     10 
     11 \begin{document}
     12 
     13 % \color{white}
     14 \title{Binc IMAP manual (DRAFT)}
     15 \author{Andreas Aardal Hanssen}
     16 
     17 \maketitle
     18 \tableofcontents
     19 
     20 %----------------------------------------------------------------
     21 %----------------------------------------------------------------
     22 %----------------------------------------------------------------
     23 \chapter[Introducing Binc IMAP]{Introduction}
     24 
     25 \begin{quote}
     26 ``As an alternative to existing similar IMAP servers, Binc IMAP
     27 strives to be very easy to use, but robust, stable and secure.''
     28 \end{quote}
     29 Welcome to Binc IMAP, a project started December 2003 by Andreas
     30 Aardal Hanssen. Binc IMAP is an open source IMAP project which differs
     31 from existing IMAP projects. Here is a list of the project goals:
     32 
     33 \begin{enumerate}
     34 \item Binc IMAP will always have a helpful, hospitable community.
     35   \begin {itemize}
     36   \item Although it is expected that users of Binc IMAP do their
     37   homework before posting to the mailing list, the server author and
     38   community of the Binc IMAP project will be friendly and will
     39   approach everyone with respect. The same behavior is expected from
     40   those who post to the list.
     41 
     42   \item There will be no RTFM\footnote{According to acronymfinder.com,
     43   RTFM stands, among many other suggestions, for ``Read The Fscking
     44   Manual'' (fsck is a Unix filesystem checker)} on the project's
     45   mailing list. Flaming and personal insults on the project's mailing
     46   list will result in banning of the originator.
     47 
     48   \item The community is encouraged to pay back to the project's
     49   contributors by sharing their own experience and contributions to
     50   Binc IMAP through the GPL license.
     51   \end{itemize}
     52 
     53 \item Binc IMAP will not compete with other IMAP projects
     54   \begin{itemize}
     55   \item Under no circumstance will this project be in market driven
     56   competition with other IMAP servers.
     57 
     58   \item Binc IMAP will first and foremost be a quality driven project.
     59 
     60   \item This project is meant to influence the community of authors of
     61   similar network protocols and servers, and hopes to increase the
     62   general quality of software that is used all over the globe and
     63   beyond.
     64   \end{itemize}
     65 
     66 \item Binc IMAP provides security through good design
     67   \begin{itemize}
     68   \item A well designed server is less exposed to bugs than a poorly
     69   designed server.
     70 
     71   \item The server will strive to use every kind of security enhancing
     72   feature, while keeping the implementation details as good and simple
     73   as possible.
     74 
     75   \item The source is open and downloadable. Potential bugs and/or
     76   nasty pieces of code are easily uncovered when the whole community
     77   is able to study every line of code in detail. Bugs should always be
     78   reported to the project's mailing list.
     79   \end{itemize}
     80 
     81 \item Binc IMAP is modular
     82   \begin{itemize}
     83   \item Where possible and practical from both a usage and design
     84     stand point, modules will be seperated and replaceable through
     85     \textit{pluggable extension support}. Examples of future
     86     replaceables and enhancements include:
     87     \begin{itemize}
     88     \item authentication modules (shadow, PAM, LDAP)
     89     \item search modules
     90     \item protocol extensions modules (namespaces, ACL, shared folders)
     91     \item mailbox formats (Maildir, mbox, MySQL, POP3 proxy)
     92     \end{itemize}
     93 
     94   \item With a modular and good object oriented design, it will be
     95   easy to quickly understand what every method and function does. This
     96   will increase third party developers' ability to write extensions
     97   and modifications fast.
     98 
     99   \end{itemize}
    100 
    101 \item Binc IMAP favors quality over quantity
    102   
    103   \begin{itemize}
    104   \item Binc IMAP's releases are milestones. We strive for perfection.
    105 
    106   \item Work on improving the existing design and extensibility will
    107   always go ahead of adding new features.
    108 
    109   \item Through extensive module support, the community is encouraged
    110   to contribute to the adding and testing of new features.
    111 
    112   \item Core design and implementation will always focus on quality.
    113   \end{itemize}
    114 
    115 \end{enumerate}
    116 
    117 \textbf{This document serves as the server's main documentation.}
    118 
    119 %----------------------------------------------------------------
    120 %----------------------------------------------------------------
    121 %----------------------------------------------------------------
    122 \chapter[Installing Binc IMAP]{Installation}
    123 
    124 The installation procedure for Binc IMAP is designed to be quick and
    125 easy, and in most cases you will get what you want at your first
    126 attempt. The source code is designed to be able to compile on most
    127 UNIX-like platforms.
    128 
    129 If you experience problems with compiling and installing this package
    130 on your own platform, don't hesitate to post your problem to the
    131 project's mailing list.
    132 
    133 %----------------------------------------------------------------
    134 \section{Downloading the package}
    135 
    136 Binc IMAP is available for a number of platforms and distributions.
    137 Download the package most suitable for your distribution from one
    138 of the following locations:
    139 
    140 \begin{itemize}
    141 
    142 \item Red Hat Linux:
    143   \begin{itemize}
    144   \item \url{http://www.bincimap.org/}
    145   \item \url{http://www.bincimap.andreas.hanssen.name/}
    146   \item \url{http://bincimap.argonsoft.de/}
    147   \end{itemize}
    148 
    149 \item Mandrake Linux:
    150   \begin{itemize}
    151   \item \url{ftp://sunsite.uio.no/linux/Mandrake/Mandrake-devel/contrib}
    152   \end{itemize}
    153 
    154 \item Debian Linux:
    155   \begin{itemize}
    156   \item \url{http://packages.debian.org/testing/mail/bincimap.html}
    157   \item \url{http://packages.debian.org/unstable/mail/bincimap.html}
    158   \end{itemize}
    159 
    160 \item FreeBSD:
    161   \begin{itemize}
    162   \item \url{http://www.freebsd.org/cgi/ports.cgi?query=bincimap&stype=all}
    163   \end{itemize}
    164 
    165 \item Other (tarball):
    166   \begin{itemize}
    167   \item \url{http://www.bincimap.org/}
    168   \item \url{http://www.bincimap.andreas.hanssen.name/}
    169   \item \url{http://bincimap.argonsoft.de/}
    170   \end{itemize}
    171 
    172 \end{itemize}
    173 
    174 %----------------------------------------------------------------
    175 \section{Building from the tarball}
    176 \label{buildfromtarball}
    177 
    178 This section describes how you can build the Binc IMAP server using
    179 the compressed tar archive (\textit{tarball}). This approach should
    180 work on all supported platforms.
    181 
    182 The tarball creates a seperate directory in which it installs all
    183 source files. The installation procedure is typical for open source C
    184 and C++ software that uses the \texttt{autoconf} and \texttt{automake}
    185 tools. First, unpack the tarball:
    186 
    187 \begin{Verbatim}
    188 # zcat bincimap-1.2.1.tar.gz | tar xvf -
    189 <outputs a list of files>
    190 \end{Verbatim}
    191 Now, enter the directory that was created. In this directory, you will
    192 find the \texttt{configure} script.
    193 
    194 \begin{Verbatim}
    195 # cd bincimap-1.2.1
    196 # ls configure
    197 configure
    198 #
    199 \end{Verbatim}
    200 Run the configure script with all options you find appropriate. The
    201 \texttt{configure} options are listed in
    202 section\vref{configureoptions}. Most users will be ok with these
    203 common options:
    204 
    205 \begin{Verbatim}
    206 # ./configure --prefix=/opt/bincimap --sysconfdir=/etc/opt/bincimap
    207 \end{Verbatim}
    208 The \texttt{configure} script will produce many lines of output, and
    209 finally, if all goes well, it will create all the \texttt{Makefile}s
    210 we need to build this projectm We can now run \texttt{make}:
    211 
    212 \begin{Verbatim}
    213 # make
    214 \end{Verbatim}
    215 If the compile finishes with no problems, you can install your new
    216 software:
    217 
    218 \begin{Verbatim}
    219 # make install
    220 \end{Verbatim}
    221 If the \texttt{prefix} option is \texttt{/opt/bincimap}, \texttt{make
    222 install} will create the following files:
    223 
    224 \begin{Verbatim}
    225 /opt/bincimap/bin/bincimap-up              # Startup stub
    226 /opt/bincimap/bin/bincimapd                # Main server
    227 /opt/bincimap/man/man1/bincimap-up.1       # Man page
    228 /opt/bincimap/man/man1/bincimapd.1         # Man page
    229 /opt/bincimap/man/man5/bincimap.conf.5     # Man page
    230 \end{Verbatim}
    231 The \texttt{sysconfdir} option tells Binc IMAP where to install the
    232 configuration files. If \texttt{sysconfdir} is set to
    233 \texttt{/etc/opt/bincimap}, \texttt{make install} will create the
    234 following files:
    235 
    236 \begin{Verbatim}
    237 /etc/opt/bincimap/bincimap.conf            # Main conf file
    238 /etc/opt/bincimap/xinetd/imap              # xinetd conf file
    239 /etc/opt/bincimap/xinetd/imaps             # xinetd conf file
    240 /etc/opt/bincimap/service/imap/run         # service conf file
    241 /etc/opt/bincimap/service/imap/log/run     # service conf file
    242 /etc/opt/bincimap/service/imaps/run        # service conf file
    243 /etc/opt/bincimap/service/imaps/log/run    # service conf file
    244 \end{Verbatim}
    245 You are now ready to configure Binc IMAP. Read more about this in
    246 section\vref{configuration}.
    247 
    248 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    249 \subsection{Options to configure}
    250 \label{configureoptions}
    251 
    252 \begin{itemize}
    253 
    254 \item \Verb@--prefix=<dir>@\\
    255   Where to install binary files and man pages. Binary files
    256   will be installed under \Verb@<dir>/bin@ and man pages go
    257   under \Verb@<dir>@/man.
    258 
    259 \item \Verb@--sysconfdir=<dir>@\\
    260   Where to install configuration files. The main conf file
    261   goes under \Verb@<dir>/bincimap.conf@ and other conf files
    262   go under \Verb@<dir>/<path>/...@, depending on the type
    263   of conf files.
    264 
    265   \textbf{Note:} The bundled service files
    266   must \textbf{not} be stored on an NFS partition or any partition
    267   that does not support file locking.
    268 
    269 \item \Verb@--localstatedir=<dir>@\\
    270   Where log directories go for multilog logging. Directories
    271   \texttt{log/bincimap} and \texttt{log/bincimap-ssl} will be created
    272   under this prefix.
    273 
    274 \item \Verb@--disable-ssl@\\
    275   Compile Binc IMAP with no SSL code, and without the OpenSSL
    276   requirement. Also removes the STARTTLS capability.
    277 
    278 \item \Verb@--enable-ssl@ (default)\\
    279   Compile Binc IMAP with SSL code, and with the OpenSSL
    280   requirement. Enables the STARTTLS capability.
    281 
    282 \item \Verb@--enable-static@\\
    283   Compile Binc IMAP with static linkage.
    284 
    285 \item \Verb@--without-optimization@\\
    286   Compile Binc IMAP with -O0 (no optimization).
    287 
    288 \end{itemize}
    289 
    290 \section{Building from the src.rpm}
    291 
    292 The \texttt{src.rpm} packages are designed for the Red Hat Linux
    293 distribution. If you are not running Red Hat Linux or similar
    294 distributions and this procedure fails, then you should build Binc
    295 IMAP from the tarball (section\vref{buildfromtarball}).
    296 
    297 \begin{itemize}
    298 
    299 \item Make sure you have the \texttt{rpmbuild} program installed. In
    300 Red Hat, it is a part of the \texttt{rpm-build} package.
    301 
    302 \item As root\footnote{It is possible to build src.rpm packages as
    303 non-root. There is info available on http://www.rpm.org/
    304 about this.}, run the following command:
    305 
    306 \begin{Verbatim}
    307 rpmbuild --rebuild bincimap-1.2.1-1.src.rpm
    308 \end{Verbatim}
    309 
    310 \item If the command succeeds, you will have generated a binary rpm
    311 package that you can install.
    312 
    313 \begin{Verbatim}
    314 rpm -i bincimap-1.2.1-1.i386.rpm
    315 \end{Verbatim}
    316 
    317 \end{itemize}
    318 
    319 \section{After building and installing the package}
    320 
    321 When the service has been installed successfully, you should take your
    322 time to configure it properly. Please refer to
    323 section\vref{configuration}.
    324 
    325 %----------------------------------------------------------------
    326 %----------------------------------------------------------------
    327 %----------------------------------------------------------------
    328 \chapter[Configuring Binc IMAP]{Configuration}
    329 \label{configuration}
    330 
    331 With most services, the hardest thing to get right is the
    332 configuration file. With Binc IMAP, this should not be a problem for
    333 the administrator. There are few options to set, and the package also
    334 provides a default configuration file whose default settings are fine
    335 for most uses.
    336 
    337 This section will first give an overview of the format of Binc IMAP's
    338 configuration file, and it will then explain every option that you
    339 can set.
    340 
    341 \section{Introduction to \texttt{Binc::Storage}}
    342 
    343 Binc IMAP uses a special file format, called \texttt{Binc::Storage}
    344 after its C++ class name. This file format is human readable and
    345 editable, it's fast to parse programmatically, and it has very little
    346 overhead when representing data. It also groups options together in
    347 sections, supports comments (c-style) and arbitrary whitespace usage.
    348 
    349 The structure of the file is as follows:
    350 
    351 \begin{enumerate}
    352 \item Aliases
    353 \item Section1
    354   \begin{enumerate}
    355     \item key1=value1
    356     \item key2=value2
    357     \item ...
    358   \end{enumerate}
    359 \item Section2
    360   \begin{enumerate}
    361     \item key1=value1
    362     \item key2=value2
    363     \item ...
    364   \end{enumerate}
    365 \item SectionN...
    366 \end{enumerate}
    367 Moving on to the actual format, the file starts with an optional list
    368 of aliases. These aliases start with a question mark (?), followed by
    369 the alias, a colon (:), the replacement text, and finally a semicolon
    370 (;). This example defines the alias "m" to represent the text
    371 "myfirstsection":
    372 
    373 \begin{Verbatim}
    374 ?m:MyFirstSection;
    375 \end{Verbatim}
    376 Then comes sections. A section starts with an identifier --- the
    377 section name. The name contains only alphanumeric (a to z, A to Z and
    378 0-9) characters, and it's case sensitive (``hello'' and ``HELLO''
    379 could be two different sections). The section content itself is
    380 enclosed in braces, as in the following example.
    381 
    382 \begin{Verbatim}
    383 MyFirstSection {
    384 
    385 }
    386 \end{Verbatim}
    387 Inside a section we have a comma seperated list of key=value pairs.
    388 The keys and values consist of a sequence of one or more alphanumeric
    389 words. The value can also contain quoted strings:
    390 
    391 \begin{Verbatim}
    392 MyFirstSection {
    393     certificate path = "/etc/path/certificate.txt",
    394     optional argument = yes
    395 }
    396 \end{Verbatim}
    397 The aliases from the start of the configuration file are useful if we
    398 wish to appreviate long words in a key or section name in order to
    399 save space. Normally this is only used in generated files, but they
    400 can also make a manually edited conf file more compact. Here we have
    401 replaced ``MyFirstSection'' with its alias ``m'':
    402 
    403 \begin{Verbatim}
    404 m {
    405     certificate path = "/etc/path/certificate.txt",
    406     optional argument = "yes"
    407 }
    408 \end{Verbatim}
    409 When accessed by Binc IMAP, the two sections are treated equally, as
    410 if there was no alias subsitution.
    411 
    412 The following sections describe the \texttt{Binc::Storage} sections
    413 that Binc IMAP recognizes.
    414 
    415 \section{Sections in \texttt{bincimap.conf}}
    416 
    417 Now followes a brief description of all recognized sections in
    418 \texttt{bincimap.conf}.
    419 
    420 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    421 \subsection{Authentication}
    422 
    423 The authentication details in Binc IMAP are set in a section called \texttt{Authentication}:
    424 
    425 \begin{Verbatim}
    426 Authentication {
    427 
    428 }
    429 \end{Verbatim}
    430 The recognized options are:
    431 
    432 \begin{itemize}
    433 
    434 \item \texttt{allow plain auth in non ssl = yes{|}no}
    435   \begin{itemize}
    436     \item[\texttt{yes}] Clients are allowed to authenticate using
    437       plain text passwords when transport is not encrypted with SSL.
    438     \item[\texttt{no}] Clients are \textit{not} allowed to
    439       authenticate using plain text passwords when transport is not
    440       encrypted with SSL.
    441   \end{itemize}
    442 
    443 \item \texttt{auth penalty = \Verb@<n>@}
    444   \begin{itemize}
    445     \item [] If a user tries to authenticate but the password or
    446       username is wrong, the server will sleep for \Verb@<n>@ seconds
    447       before allowing the user to try again.
    448   \end{itemize}
    449 \end{itemize}
    450 This is an example of an \texttt{Authentication} section in
    451 \texttt{bincimap.conf}:
    452 
    453 \begin{Verbatim}
    454 Authentication {
    455     allow plain auth in non ssl = no,
    456     auth penalty = 4
    457 }
    458 \end{Verbatim}
    459 
    460 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    461 \subsection{Logging}
    462 
    463 The logging details in Binc IMAP are set in a section called \texttt{Log}:
    464 
    465 \begin{Verbatim}
    466 Log {
    467 
    468 }
    469 \end{Verbatim}
    470 The recognized options are:
    471 
    472 \begin{itemize}
    473 
    474 \item \texttt{type = syslog{|}multilog}
    475   \begin{itemize}
    476   \item [\texttt{syslog}] Binc IMAP will log using syslog.
    477   \item [\texttt{multilog}] Binc IMAP will log to \textit{stderr},
    478     which is the default input for \texttt{multilog}.
    479   \end{itemize}
    480 
    481 \item \texttt{environment ip variable = <var>}
    482   \begin{itemize}
    483   \item [] If configured to log using \texttt{multilog}, Binc IMAP
    484     attempts to find the remote host's IP address in the environment
    485     variables.  This option allows the administrator to suggest which
    486     variable the IP address is stored in.
    487   \end{itemize}
    488 
    489 \item \texttt{syslog facility = <facility>}
    490   \begin{itemize}
    491     \item [] If Binc IMAP is configured to log using syslog, it will
    492       log using the syslog facility described by the alias
    493       \Verb@<facility>@.
    494   \end{itemize}
    495 
    496 \item \texttt{syslog facility number = <facilitynr>}
    497   \begin{itemize}
    498     \item [] If Binc IMAP is configured to log using syslog, it will
    499       log using the syslog facility number \Verb@<facilitynr>@. This
    500       is typically used if the textual facility name is not recognized
    501       by Binc IMAP.
    502   \end{itemize}
    503 \end{itemize}
    504 This is an example of a \texttt{Log} section in
    505 \texttt{bincimap.conf}:
    506 
    507 \begin{Verbatim}
    508 Log {
    509     type = syslog,
    510     syslog facility = LOG_DAEMON
    511 }
    512 \end{Verbatim}
    513 
    514 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    515 \subsection{Security}
    516 
    517 The security details in Binc IMAP are set in a section called \texttt{Security}:
    518 
    519 \begin{Verbatim}
    520 Security {
    521 
    522 }
    523 \end{Verbatim}
    524 The recognized options are:
    525 
    526 \begin{itemize}
    527 \item \texttt{jail path = <path>}
    528   \begin{itemize}
    529     \item [] Binc IMAP's invocation stub, \texttt{bincimap-up}, enters
    530       a ``chroot jail'' path after starting the main server. The path
    531       is given in this setting and it must exist for Binc IMAP to
    532       function properly.
    533   \end{itemize}
    534 \item \texttt{jail user = <userid>}
    535   \begin{itemize}
    536     \item [] Binc IMAP's invocation stub is by default run as the
    537       privileged user \texttt{root}. Before the stub enters its
    538       ``chroot jail'', it changes to the \Verb@<userid>@ user, which
    539       should be a user with no privileges.
    540   \end{itemize}
    541 \item \texttt{jail group = <groupid>}
    542   \begin{itemize}
    543     \item [] As with \texttt{jail user}, but sets the \textit{group}
    544       that the invocation stub changes to before entering the jail.
    545   \end{itemize}
    546 \end{itemize}
    547 This is an example of a \texttt{Security} section in
    548 \texttt{bincimap.conf}:
    549 
    550 \begin{Verbatim}
    551 Security {
    552     jail path = "/opt/bincimap/bin",
    553     jail user = nobody,
    554     jail group = nobody
    555 }
    556 \end{Verbatim}
    557 
    558 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    559 \subsection{Mailbox settings}
    560 
    561 The mailbox settings in Binc IMAP are set in a section called \texttt{Mailbox}:
    562 
    563 \begin{Verbatim}
    564 Mailbox {
    565 
    566 }
    567 \end{Verbatim}
    568 The recognized options are:
    569 
    570 \begin{itemize}
    571 \item \texttt{type = <type>}
    572   \begin{itemize}
    573     \item [] Sets the type of mailbox that Binc IMAP should
    574       use as default. Currently, the only supported format is
    575       \texttt{Maildir}.
    576   \end{itemize}
    577 \item \texttt{depot = <depottype>}
    578   \begin{itemize}
    579     \item [] Sets the type of depot that Binc IMAP should use. The
    580       depot decides how the contents of an IMAP user's mail path is
    581       interpreted. Currenty, the two supported depot types are
    582       \texttt{IMAPdir} and \texttt{Maildir++}..
    583   \end{itemize}
    584 \item \texttt{path = <path>}
    585   \begin{itemize}
    586     \item [] When a user authenticates, Binc IMAP can optionally
    587       change to a seperate mail directory within the user's home area.
    588       This directory is set with the \texttt{path} setting. For mail
    589       storage configurations where there is no seperate area for mail,
    590       set \texttt{path=""}.
    591   \end{itemize}
    592 \item \texttt{auto create inbox = yes{|}no}
    593   \begin{itemize}
    594     \item [yes] Binc IMAP will create the INBOX mailbox if the IMAP
    595       user does not already have one.
    596     \item [no] The server will \textit{not} create INBOX when the user
    597       logs in for the first time.
    598   \end{itemize}
    599 \item \texttt{auto subscribe mailboxes = <mailboxlist>}
    600   \begin{itemize}
    601     \item [] When logging onto the IMAP service for the first time,
    602       the user will automatically be subscribed to the mailboxes in
    603       the comma seperated list \Verb@<mailboxlist>@. The content of
    604       the list if for example "INBOX,Trash,Drafts,Sent".
    605   \end{itemize}
    606 \item \texttt{umask = <number>}
    607   \begin{itemize}
    608     \item [] All operations in a user's mail directory will be
    609       performed using this umask.
    610   \end{itemize}
    611 
    612 
    613 \end{itemize}
    614 This is an example of a \texttt{Mailbox} section in
    615 \texttt{bincimap.conf}:
    616 
    617 \begin{Verbatim}
    618 Mailbox {
    619     path = "Maildir",
    620     type = "Maildir",
    621     depot = "IMAPdir",
    622     auto create inbox = yes,
    623     auto subscribe mailboxes = "INBOX,Work,Work/Sent",
    624     umask = 0777
    625 }
    626 \end{Verbatim}
    627 
    628 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    629 \subsection{Session}
    630 
    631 The session details in Binc IMAP are set in a section called \texttt{Session}:
    632 
    633 \begin{Verbatim}
    634 Session {
    635 
    636 }
    637 \end{Verbatim}
    638 The recognized options are:
    639 
    640 \begin{itemize}
    641 
    642 \item \texttt{auth timeout = <seconds>}
    643   \begin{itemize}
    644     \item [] Before authenticating, Binc IMAP will allow clients to
    645       idle (stay connected with no activity) for \Verb@<second>@
    646       seconds before automatically closing the IMAP session.
    647   \end{itemize}
    648 
    649 \item \texttt{idle timeout = <seconds>}
    650   \begin{itemize}
    651     \item [] After authenticating, Binc IMAP will allow clients to
    652       idle (stay connected with no activity) for \Verb@<second>@
    653       seconds before automatically closing the IMAP session.
    654   \end{itemize}
    655 
    656 \item \texttt{transfer timeout = <seconds>}
    657   \begin{itemize}
    658     \item [] Every chunk of data that is sent by Binc IMAP to the IMAP
    659       client has \Verb@<seconds>@ seconds to complete. If this timeout
    660       is exceeded, the IMAP session is closed.
    661   \end{itemize}
    662 
    663 \item \texttt{transfer buffer size = <nrofbytes>}
    664   \begin{itemize}
    665     \item [] To save network roundtrips, Binc IMAP buffers up to
    666       \Verb@<nrofbytes>@ bytes in memory before it is shipped off to
    667       the client. Greatly affects performance on high latency links.
    668   \end{itemize}
    669 \end{itemize}
    670 
    671 
    672 This is an example of a \texttt{Session} section in
    673 \texttt{bincimap.conf}:
    674 
    675 \begin{Verbatim}
    676 Session {
    677   auth timeout = 30,
    678   idle timeout = 1800,
    679   transfer timeout = 1200,
    680   transfer buffer size = 1024
    681 }
    682 \end{Verbatim}
    683 
    684 %- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
    685 \subsection{SSL/TLS}
    686 
    687 The SSL details in Binc IMAP are set in a section called \texttt{SSL}:
    688 
    689 \begin{Verbatim}
    690 SSL {
    691 
    692 }
    693 \end{Verbatim}
    694 The recognized options are:
    695 
    696 \begin{itemize}
    697 
    698 \item \texttt{pem file = <file>}
    699   \begin{itemize}
    700     \item [] Binc IMAP reads a PEM encoded SSL certificate from this
    701       location. This file can often be generated with scripts under
    702       \texttt{/usr/share/ssl/certs}.
    703   \end{itemize}
    704 
    705 \item \texttt{ca file = <file>}
    706   \begin{itemize}
    707     \item [] Gives Binc IMAP a file that contains certificate
    708       authorities.  The purpose of this file is specific to the SSL
    709       protocol and it is used in the SSL hand shake.
    710   \end{itemize}
    711 
    712 \item \texttt{ca path = <path>}
    713   \begin{itemize}
    714     \item [] Gives Binc IMAP a path in which the SSL library can
    715       search for files containing certificate authorities.  The
    716       purpose of this path is specific to the SSL protocol and it is
    717       used in the SSL hand shake.
    718   \end{itemize}
    719 
    720 \item \texttt{cipher list = <ciphers>}
    721   \begin{itemize}
    722     \item [] The string provided in \Verb@<ciphers>@ informs the SSL
    723       library of which ciphers are available.
    724   \end{itemize}
    725 
    726 \item \texttt{verify peer = yes{|}no}
    727   \begin{itemize}
    728     \item [] Informs Binc IMAP wether or not the server should attempt
    729       to verify the peer's certificate.
    730   \end{itemize}
    731 
    732 \end{itemize}
    733 This is an example of a \texttt{SSL} section in
    734 \texttt{bincimap.conf}:
    735 
    736 \begin{Verbatim}
    737 SSL {
    738   pem file = "/usr/share/ssl/certs/server.pem",
    739   ca file = "",
    740   ca path = "",
    741   cipher list = "!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP",
    742   verify peer = no
    743 }
    744 \end{Verbatim}
    745 
    746 %----------------------------------------------------------------
    747 %----------------------------------------------------------------
    748 %----------------------------------------------------------------
    749 \chapter{The Binc IMAP Depot}
    750 
    751 The main role of an IMAP server is to give email clients an interface
    752 through which they can authenticate and then access email and
    753 mailboxes located on a (remote) mail server. The mails are stored on
    754 the mail servers in a special structure, and this structure varies
    755 from system to system.
    756 
    757 Most often we distinguish between the mailbox \textit{structure} (or
    758 \textit{hierarchy structure}) and its \textit{format}. The structure
    759 determines how the different mailboxes and submailboxes are stored,
    760 and the format decides how each and every email is stored within one
    761 mailbox.
    762 
    763 Binc IMAP uses the generic container object \textit{Depot} to describe
    764 the map between the hierarchy structure and its translation to
    765 selectable mailboxes in IMAP. The Depot has two specializations: one
    766 for IMAPdir and one for Maildir++.
    767 
    768 %----------------------------------------------------------------
    769 \section{Maildir++}
    770 
    771 Courier-IMAP defines the hierarchy structure Maildir++, which provides
    772 a way for existing Maildir users (Maildir is a mailbox format) to have
    773 multiple mailboxes and submailboxes inside the directory that contains
    774 the default mailbox ``INBOX'' (which often resides in \Verb@~/Maildir@
    775 for each UNIX user).
    776 
    777 Read more about the Maildir++ format at the following location:
    778 
    779 \begin{itemize}
    780 \item [] \url{http://www.inter7.com/courierimap/README.maildirquota.html}
    781 \end{itemize}
    782 
    783 Binc IMAP supports this mailbox structure with a few limitations and a
    784 few enhancements:
    785 
    786 \begin{itemize}
    787 \item The \textit{maildirfolder} file is not created inside each
    788 Maildir submailbox. The reason for this is that this only works with
    789 mailbox formats that store a mailbox inside a directory, such as
    790 Maildir.
    791 \item Maildir++ quotas are not supported
    792 \item No Maildir++ restrictions to mailbox names apply (such as
    793 \texttt{.Trash})
    794 \item Mailboxes inside a Maildir++ structure can be of any format, not
    795 just Maildir.
    796 \end{itemize}
    797 
    798 %----------------------------------------------------------------
    799 \section{IMAPdir}
    800 
    801 IMAPdir is Binc IMAP's native mailbox structure. It is open and usable
    802 for most existing local mail clients. For a full description, look up
    803 the following web site, or search for the
    804 \texttt{bincimap-imapdir.html} file in the packaged documentation.
    805 
    806 \begin{itemize}
    807 \item [] \url{http://www.bincimap.org/bincimap-imapdir.html}
    808 \end{itemize}
    809 
    810 IMAPdir does not extend/change any mailbox formats; it merely defines
    811 a way to describe mailboxes and submailboxes in a way that is suitable
    812 for an IMAP server, with as few restrictions as necessary.
    813 
    814 
    815 \end{document}
    816