bincimap

Log | Files | Refs | LICENSE

bincimap-faq.html (27746B)


      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 - FAQ</TITLE>
      9   <META NAME="revisit-after" CONTENT="14 days">
     10   <META NAME="keywords" CONTENT="Binc IMAP FAQ 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 - FAQ</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 &lt;andreas@hanssen.name&gt;
     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 <UL>
     50   <LI>General questions
     51     <BLOCKQUOTE>
     52       <P><A HREF="#q1">Q: Why did you start writing Binc IMAP?</A></P>
     53       <P><A HREF="#q2">Q: What is "Binc"?</A></P>
     54     </BLOCKQUOTE>
     55   </LI>
     56   <LI>About Binc IMAP
     57     <BLOCKQUOTE>
     58       <P><A HREF="#q3">Q: What are the advantages of Binc IMAP?</A></P>
     59       <P><A HREF="#q4">Q: So Binc IMAP doesn't focus on security?</A></P>
     60       <P><A HREF="#q5">Q: Is Binc IMAP <I>fast</I>?</A></P>
     61       <P><A HREF="#q6">Q: Is Binc IMAP a stable, secure server?</A></P>
     62     </BLOCKQUOTE>
     63   </LI>
     64   <LI>Configuration
     65     <BLOCKQUOTE>
     66       <P><A HREF="#q7">Q: Which configuration files are used by Binc IMAP?</A></P>
     67       <P><A HREF="#q12">Q: How can I tell Binc IMAP where my mailboxes/folders are?</A></P>
     68       <P><A HREF="#q13">Q: How can I get SSL to work?</A></P>
     69     </BLOCKQUOTE>
     70   </LI>
     71   <LI>Usage
     72     <BLOCKQUOTE>
     73       <P><A HREF="#q14">Q: How do I find my folders in Binc IMAP?</A></P>
     74     </BLOCKQUOTE>
     75   </LI>
     76   <LI>Authentication
     77     <BLOCKQUOTE>
     78       <P><A HREF="#q8">Q: How does Binc IMAP authentication work?</A></P>
     79     </BLOCKQUOTE>
     80   </LI>
     81   <LI>Compiling
     82     <BLOCKQUOTE>
     83       <P><A HREF="#q15">Q: How do I fix this: "Unable to find required function getopt_long"?</A></P>
     84       <P><A HREF="#q16">Q: How do I fix this: "Unable to find the crypto library which is part of OpenSSL"?</A></P>
     85       <P><A HREF="#q17">Q: How do I fix this: "Unable to find the ssl library which is part of OpenSSL"?</A></P>
     86     </BLOCKQUOTE>
     87   </LI>
     88   <LI>Installing
     89     <BLOCKQUOTE>
     90       <P><A HREF="#q10">Q: How do I install Binc IMAP?</A></P>
     91       <P><A HREF="#q11">Q: Why does Binc IMAP (RPM) install under /opt?</A></P>
     92     </BLOCKQUOTE>
     93   </LI>
     94 </UL>
     95 
     96 <HR>
     97 
     98 <A NAME="q1">
     99 <B><U>Q: Why did you start writing Binc IMAP?</U></B>
    100 </A>
    101 
    102 <BLOCKQUOTE>
    103 <P>First of all, I work a lot with qmail servers, and there haven't
    104 really been many Maildir capable IMAP4rev1 servers around. I used
    105 Courier-IMAP for years, but after loads of abuse from the Courier
    106 community and its author, I found that earth had room for one more
    107 IMAP4rev1 server.</P>
    108 
    109 <P>Enjoying the simplicity of qmail-pop3d, I decided to create an IMAP
    110 server that was equally simple to install and use, and that could work
    111 side-by-side with qmail-pop3d to provide IMAP service to qmail
    112 users.</P>
    113 
    114 <P>I had already written an IMAP server for proxying POP3-accounts at
    115 work, and I had so many good experiences from that project that I
    116 beleived that I could really write a great IMAP server.</P>
    117 
    118 <P>Well, it's up to you to determine how great it is, but I swear it has
    119 it's advantages over the existing Maildir capable IMAP servers out
    120 there.</P>
    121 </BLOCKQUOTE>
    122 
    123 <HR>
    124 
    125 <A NAME="q2">
    126 <B><U>Q: What is "Binc"?</U></B>
    127 </A>
    128 
    129 <BLOCKQUOTE>
    130 
    131 <P>This should be quite obvious: Binc Is Not Courier-IMAP :-).</P>
    132 
    133 </BLOCKQUOTE>
    134 
    135 <HR>
    136 
    137 <A NAME="q3">
    138 <B><U>Q: What are the advantages of Binc IMAP?</U></B>
    139 </A>
    140 
    141 <BLOCKQUOTE>
    142 
    143 <P>Binc IMAP is a <I>light weight alternative</I> to existing IMAP
    144 servers. It's easier to install, easier to maintain, and it's easy to
    145 integrate into existing (perhaps legacy) authentication
    146 environments.</P>
    147 
    148 <P>Binc IMAP is small and simple. The total number of lines of source
    149 code is much smaller in Binc than in the other servers. Version
    150 1.0.24-1 of Binc IMAP has about 18000 lines of code. There are only
    151 17000 lines of hand written code, including comments. Few lines in
    152 itself does <I>not</I> imply that the code is better, but it's
    153 certainly much easier to maintain.</P>
    154 
    155 <P>It is also written in C++, using standard C++ data components. If
    156 this server crashes, it'll most likely abort, and not suffer a
    157 segmentation fault, which is the most common reason for exploits.</P>
    158 
    159 <P>Binc IMAP uses an object oriented design all the way. A modular,
    160 simple design with few lines of code means that it's easier to uncover
    161 bugs, and it's easier to fix them without disturbing the rest of the
    162 source code.</P>
    163 
    164 </BLOCKQUOTE>
    165 
    166 <HR>
    167 
    168 <A NAME="q4">
    169 <B><U>Q: So Binc IMAP doesn't focus on security?</U></B>
    170 </A>
    171 
    172 <UL>
    173   <LI>Security comes naturally with a service with a clean, correct
    174   design and no bugs</LI>
    175 
    176   <LI>Security can not be claimed. To prove that a server is not
    177   secure, one must simply find a way to exploit it. <I>Claiming</I>
    178   that a server is secure is like claiming that nobody can find a way
    179   to break it.</LI>
    180 
    181   <LI>The only true argument is to <I>prove</I> that it's secure. And
    182   that's almost impossible.</LI>
    183 
    184   <LI>Binc IMAP focuses on creating a service with a clean, correct
    185   design with no bugs. Time and experience will tell wether it's a
    186   secure server or not.</LI>
    187 </UL>
    188 
    189 <HR>
    190 
    191 <A NAME="q5">
    192 <B><U>Q: Is Binc IMAP <I>fast</I>?</U></B>
    193 </A>
    194 
    195 <P>Binc IMAP focuses its optimizations on the type of activity that
    196 dominates the lifetime of an IMAP connection, which is idle time.</P>
    197 
    198    <UL>
    199      <LI>Pending updates: When a client issues NOOP, CHECK or similar,
    200      the server must give the latest changes to the depository. If no
    201      changes have been made, this operation will with Binc IMAP
    202      consist of only two stat-calls, which is extremely fast.</LI>
    203 
    204      <LI>FETCH: Multiple subsequent operations on the same message
    205      will never cause the message to be parsed more than twice - once
    206      for header-only operations and once for full message info.</LI>
    207 
    208      <LI>STATUS: The status command is typically used to check for
    209      new messages in all subscribed mailboxes. If no changes have been
    210      made to a mailbox, the status command in Binc IMAP consists of
    211      only two stat calls, which is extremely fast.</LI>
    212 
    213      <LI>SEARCH: The search keys are weighted, and the search query is
    214      sorted with lightest-search first. This prevents unnecessary
    215      processing of slow search keys if the light search keys do not
    216      match the message set.</LI>
    217    </UL>
    218 
    219 <P>Some activity is not optimal in Binc IMAP, and searching for random
    220 text in particular is no faster than a sequential search using
    221 standard UNIX tools such as <I>grep</I>. Searching for text in a large
    222 mailbox is quite rare, however, compared to the random activity of
    223 close-to-idle clients.</P>
    224 
    225 <HR>
    226 
    227 <A NAME="q6">
    228 <B><U>Q: Is Binc IMAP a stable, secure server?</U></B>
    229 </A>
    230 
    231 <BLOCKQUOTE>
    232 <P>It's hard to write bug free programs, especially with a complex
    233 protocol like IMAP4rev1. Any attempts to verify code usually comes
    234 down to the limitations in the author's experience with
    235 verification. Or as
    236 <A HREF="http://www-cs-faculty.stanford.edu/~knuth/">Donald Knuth</A>
    237 said (my favorite quote):</P>
    238 
    239 <P><I>"Beware of bugs in the above code; I have only proved it correct,
    240  not tried it."</I></P>
    241 
    242 <P>Knuth teaches that it can be easy to prove that your code is
    243 correct, but who's going to prove that your <I>proof</I> is correct?
    244 Proving your proof might turn out to be close to impossle. What you
    245 can have, is conventions and principles that prevent bugs from showing
    246 up in your programs. Here are mine:</P>
    247 
    248 <UL>
    249   <LI>Don't reinvent the wheel. Unless absolutely necessary, write
    250   code that doesn't exist already.</LI>
    251   <LI>Spend your time on making it work as simple as possible,
    252   then start making optimizations.</LI>
    253   <LI>Don't let optimization obfuscate your source code.</LI>
    254   <LI>Find a better algorithm, or if you can't get the speed that you
    255   want, change to a more efficient programming language.</LI>
    256   <LI>Handle all error conditions.</LI>
    257   <LI>Avoid buffers altogether.</LI>
    258   <LI>Don't hand write parsers unless strictly necessary - they are
    259   hard to get right.</LI>
    260   <LI>For G's sake, be compliant! If the standard has flaws, then
    261   <I>help fix the flaws</I> - don't break the standard.</LI>
    262 </UL>
    263 
    264 <P>Now I don't pay $2.56^n where n equals the total number of
    265 bugs discovered in Binc IMAP, but I will certainly give you
    266 many pats on the back if I get the chance. :-)</P>
    267 
    268 <P>I could go on and on, but the point is that I have tried my best to
    269 perform all the expected tasks in the most logical and obvious way
    270 possible, using all my C++ security experience to aid me. But at the
    271 time of writing, the server is young, the community small, and we are
    272 only in Beta.  So time will have to tell how stable and secure we
    273 are.</P>
    274 
    275 </BLOCKQUOTE>
    276 
    277 <HR>
    278 
    279 <A NAME="q7">
    280 <B><U>Q: Which configuration files are used by Binc IMAP?</U></B>
    281 </A>
    282 
    283 <BLOCKQUOTE>
    284 <UL>
    285   <LI>/etc/opt/bincimap/supervise/imap/run</LI>
    286   <LI>/etc/opt/bincimap/supervise/imaps/run</LI>  
    287   <LI>/etc/opt/bincimap/xinetd/imap</LI>
    288   <LI>/etc/opt/bincimap/xinetd/imaps</LI>    
    289 </UL>
    290 
    291 <P>These files are for administrators. You can set up Binc IMAP's
    292 authentication method here.</P>
    293 
    294 <UL>
    295 <LI>/etc/opt/bincimap/bincimap.conf</LI>
    296 </UL>
    297 
    298 <P>This first file is for setting global administrator settings, such
    299 as paths to the host's SSL certificate, timeouts for idle clients and
    300 so on. It need not be readable for anyone but root.</P>
    301 
    302 <UL>
    303 <LI>$HOME/.bincimap</LI>
    304 </UL>
    305 
    306 <P>This file is for individual settings, such as what the exact path
    307 is to this user's depository, which default Mailbox type to use and
    308 which type of depository the user uses.</P>
    309 
    310 </BLOCKQUOTE>
    311 
    312 <HR>
    313 
    314 <A NAME="q12">
    315 <B><U>Q: How can I tell Binc IMAP where my mailboxes/folders are?</U></B>
    316 </A>
    317 
    318 <BLOCKQUOTE>
    319 
    320 <P>The configuration file has a section called <B>Mailbox</B>. You can
    321 set the <B>path</B> to your users' mail depository there, relative to
    322 the users' home areas.</P>
    323 
    324 <P>If your depository is not is users' homeareas, for instance if your
    325 depository has a <B>/var/mail/user/</B> structure, you can safely set
    326 <B>path</B> to <B>"."</B> or <B>""</B>. Your authenticator must then
    327 change to the full path of the depository, <B>/var/mail/user/</B>,
    328 before invoking bincimapd.</P>
    329 
    330 <P>For a <B>Maildir++</B> depository under standard home areas, with
    331 the mailbox path set to "Maildir" in bincimap.conf, your structure
    332 would typically look something like this:</P>
    333 
    334 <TABLE ALIGN="center" CELLSPACING="5" CELLPADDING="5">
    335   <TR>
    336     <TH BGCOLOR="#555555">File system
    337     </TH>
    338     <TH BGCOLOR="#555555">IMAP
    339     </TH>
    340     <TH BGCOLOR="#555555">Description
    341     </TH>
    342   </TR>
    343   <TR>
    344     <TD BGCOLOR="#555555">
    345       <PRE>
    346 ~/Maildir/
    347 ~/Maildir/.Sent/
    348       </PRE>
    349     </TD>
    350     <TD BGCOLOR="#555555">
    351       <PRE>
    352 "INBOX"
    353 "INBOX/Sent"
    354       </PRE>
    355     </TD>
    356     <TD BGCOLOR="#555555">
    357       <PRE>
    358 The main mailbox, the INBOX.
    359 A user created mailbox.
    360       </PRE>
    361     </TD>
    362   </TR>
    363 </TABLE>
    364 
    365 <P>If you use IMAPdir (setting depot="IMAPdir" and for instance
    366 path="IMAPdir"), the structure would be slightly different:</P>
    367 
    368 <TABLE ALIGN="center" CELLSPACING="5" CELLPADDING="5">
    369   <TR>
    370     <TH BGCOLOR="#555555">File system
    371     </TH>
    372     <TH BGCOLOR="#555555">IMAP
    373     </TH>
    374     <TH BGCOLOR="#555555">Description
    375     </TH>
    376   </TR>
    377   <TR>
    378     <TD BGCOLOR="#555555">
    379       <PRE>
    380 ~/IMAPdir/INBOX -> ../Maildir
    381 ~/IMAPdir/Sent/
    382 ~/IMAPdir/Sent.2003/
    383 ~/Maildir/
    384       </PRE>
    385     </TD>
    386     <TD BGCOLOR="#555555">
    387       <PRE>
    388 "INBOX"
    389 "Sent"
    390 "Sent/2003"
    391 &lt;zip&gt;
    392       </PRE>
    393     </TD>
    394     <TD BGCOLOR="#555555">
    395       <PRE>
    396 The main mailbox symlink, the INBOX.
    397 A user created mailbox.
    398 A sublevel user created mailbox.
    399 Invisible.
    400       </PRE>
    401     </TD>
    402   </TR>
    403 </TABLE>
    404 
    405 <P>With no seperate directory for the mail depository, your structure
    406 would be like this with IMAPdir, and similar with Maildir++ <I>(the
    407 prefix folder is simply dropped, and INBOX itself is a Maildir, note
    408 that the MTA must be instructed to deliver to INBOX and not
    409 Maildir)</I>:</P>
    410 
    411 <TABLE ALIGN="center" CELLSPACING="5" CELLPADDING="5">
    412   <TR>
    413     <TH BGCOLOR="#555555">File system
    414     </TH>
    415     <TH BGCOLOR="#555555">IMAP
    416     </TH>
    417     <TH BGCOLOR="#555555">Description
    418     </TH>
    419   </TR>
    420   <TR>
    421     <TD BGCOLOR="#555555">
    422       <PRE>
    423 ~/INBOX
    424 ~/Sent/
    425 ~/Sent.2003/
    426       </PRE>
    427     </TD>
    428     <TD BGCOLOR="#555555">
    429       <PRE>
    430 "INBOX"
    431 "Sent"
    432 "Sent/2003"
    433       </PRE>
    434     </TD>
    435     <TD BGCOLOR="#555555">
    436       <PRE>
    437 The main mailbox, the INBOX, a Maildir.
    438 A user created mailbox.
    439 A sublevel user created mailbox.
    440       </PRE>
    441     </TD>
    442   </TR>
    443 </TABLE>
    444 
    445 </BLOCKQUOTE>
    446 
    447 <HR>
    448 
    449 <A NAME="q13">
    450 <B><U>Q: How can I get SSL to work?</U></B>
    451 </A>
    452 
    453 <BLOCKQUOTE>
    454 
    455 <P>SSL in Binc IMAP is quite simple to set up. First you need a PEM
    456 encoded certificate file. In some distributions, you can generate this
    457 file by changing to /usr/share/ssl/certs and running "make". A script
    458 will give you the option to build a PEM file.</P>
    459 
    460 <P>When you have a PEM file, edit <B>bincimap.conf</B> in the SSL
    461 section . You need to add an item called <B>pem file</B> and set it to
    462 point to your PEM certificate. The path name must be absolute. For
    463 example:</P>
    464 
    465 <PRE>
    466   SSL {
    467     pem file = "/usr/share/ssl/certs/mypemfile.pem",
    468     ca file = "",
    469     cipher list = "!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP",
    470     verify peer = "no"
    471   }
    472 </PRE>
    473 
    474 <P>The item <B>ca file</B> in <B>bincimap.conf</B> tells Binc IMAP
    475 which file on your system contains a bundle of <B>certificate
    476 authorities</B>.</P>
    477 
    478 <P>Next comes the item called <B>cipher list</B>. It tells Binc IMAP
    479 about which ciphers you want your server to support. This depends on
    480 what version of OpenSSL you're running.</P>
    481 
    482 <P>Last comes an option called <B>verify peer</B>. This tells Binc
    483 IMAP wether to attempt to verify the client's identity.</P>
    484 
    485 <P>Visit <A
    486 HREF="http://httpd.apache.org/docs-2.0/ssl/ssl_intro.html">this link
    487 at the Apache.org website</A> to read more about SSL and TLS
    488 principles.</P>
    489 
    490 </BLOCKQUOTE>
    491 
    492 <HR>
    493 
    494 <A NAME="q14">
    495 <B><U>Q: How do I find my folders in Binc IMAP?</U></B>
    496 </A>
    497 
    498 <BLOCKQUOTE>
    499 
    500 <P>Binc IMAP can be configured to use two types of depositories:
    501 Maildir++ and IMAPdir.</P>
    502 
    503 <P>Using Maildir++, all folders in Binc IMAP must be subfolders of
    504 INBOX. This is the default setting.</P>
    505 
    506 <P>This means that if you want to create a folder called <B>work</B>,
    507 you have to create <B>INBOX.work</B> or <B>INBOX/work</B>.</P>
    508 
    509 <P>For some graphical IMAP clients like <B>Outlook</B> (look out!) or
    510 <B>Mozilla Mail</B>, this means you need to <I>right click</I> on
    511 <B>INBOX</B> and select "Create subfolder".</P>
    512 
    513 <P>Using IMAPdir, folders can be created in any levels. See also <A
    514 HREF="#q12">this question</A>.</P>
    515 
    516 </BLOCKQUOTE>
    517 
    518 <HR>
    519 
    520 <A NAME="q8">
    521 <B><U>Q: How does Binc IMAP authentication work?</U></B>
    522 </A>
    523 
    524 <BLOCKQUOTE>
    525 <P>Binc IMAP is spawned by xinetd, tcpserver or any other TCP wrapper
    526 running as root.</P>
    527 
    528 <P>It immediately goes into pre-authentication mode, where it expects
    529 the client to enter STARTTLS if the client is not already running an
    530 SSL connection. When in TLS/SSL mode, it will accept clear text
    531 authentication.</P>
    532 
    533 <P>Binc IMAP uses the same authentication method as
    534 <U>qmail-pop3d</U>, checkpassword. The pre-authentication stub invokes
    535 the checkpassword compatible authenticator, which if the password is
    536 correct in turn invokes the main Binc IMAP daemon.</P>
    537 
    538 <P>The <A HREF="http://cr.yp.to/checkpwd.html">checkpassword documentation</A> is
    539 required reading for everyone running Binc IMAP.</P>
    540 
    541 </BLOCKQUOTE>
    542 
    543 <HR>
    544 
    545 <A NAME="q15">
    546 <B><U>Q: How do I fix this: "Unable to find required function getopt_long"?</U></B>
    547 </A>
    548 
    549 <BLOCKQUOTE>
    550 
    551 <P>The <U>getopt_long</U> function is a GNU extension to the POSIX.2 <U>getopt</U>
    552 function. It allows long arguments such as <B>--enable-ssl</B>.</P>
    553 
    554 <P>Unfortunately, this function is not defined on all
    555 platforms. Specifically, it is known to not exist on FreeBSD.</P>
    556 
    557 <P>For FreeBSD users, install <U>gnugetopt</U> from ports. Otherwise,
    558 post this problem with as much relevant info as you can provide, to
    559 the mailing list.</P>
    560 
    561 </BLOCKQUOTE>
    562 
    563 <HR>
    564 
    565 <A NAME="q16">
    566 <B><U>Q: How do I fix this: "Unable to find the crypto library which is part of OpenSSL"?</U></B>
    567 </A>
    568 
    569 <BLOCKQUOTE>
    570 
    571 <P>The <U>crypto</U> library is a part of <A HREF="http://www.openssl.org">OpenSSL</A>. This
    572 library is required for Binc IMAP to compile.</P>
    573 
    574 <P>If you can not get Binc IMAP to compile with OpenSSL, there should
    575 be a <A HREF="dl/RPMS">static RPM package</A> available for download.</P>
    576 
    577 </BLOCKQUOTE>
    578 
    579 <HR>
    580 
    581 <A NAME="q17">
    582 <B><U>Q: How do I fix this: "Unable to find the ssl library which is part of OpenSSL"?</U></B>
    583 </A>
    584 
    585 <BLOCKQUOTE>
    586 
    587 <P>The <U>crypto</U> library is a part of <A HREF="http://www.openssl.org">OpenSSL</A>. This
    588 library is required for Binc IMAP to compile.</P>
    589 
    590 <P>If you can not get Binc IMAP to compile with OpenSSL, there should
    591 be a <A HREF="dl/RPMS">static RPM package</A> available for download.</P>
    592 
    593 </BLOCKQUOTE>
    594 
    595 <HR>
    596 
    597 <A NAME="q10">
    598 <B><U>Q: How do I install Binc IMAP?</U></B>
    599 </A>
    600 
    601 <BLOCKQUOTE>
    602 
    603 <P>The <I>easiest</I> way to install Binc IMAP on your server is to
    604 follow these instructions:</P>
    605 
    606 <UL>
    607   <LI>Download the RPM from <A HREF="dl/RPMS">http://www.bincimap.andreas.hanssen.name/dl/RPMS</A></LI>
    608   <LI>Install the RPM</LI>
    609   <LI>Copy, edit and perhaps symlink the configuration files:
    610     <UL>
    611     <LI>with daemontools:
    612       <UL>
    613         <LI>ln -s /etc/opt/bincimap/supervise/imap /service/imap</LI>
    614         <LI>ln -s /etc/opt/bincimap/supervise/imaps /service/imaps</LI>	
    615       </UL>
    616     </LI>
    617     <LI>with xinetd:
    618       <UL>
    619         <LI>ln -s /etc/opt/bincimap/xinetd/imap /etc/xinetd.d/imap</LI>
    620         <LI>ln -s /etc/opt/bincimap/xinetd/imaps /etc/xinetd.d/imaps</LI>
    621 	<LI>service xinetd restart</LI>
    622       </UL>
    623     </LI>
    624     </UL>
    625   </LI>
    626   <LI>Check that the service is up by connecting using a standard IMAP client</LI>
    627 </UL>
    628 
    629 <P>If you want to build Binc IMAP from source, there's a <B>README</B>
    630 file that gives you the instructions step by step, inside the
    631 tarball. You can also get some clues by inspecting the bundled
    632 <B>bincimap-spec</B> file's <B>install</B> section.</P>
    633 
    634 </BLOCKQUOTE>
    635 
    636 <HR>
    637 
    638 <A NAME="q11">
    639 <B><U>Q: Why does Binc IMAP (RPM) install under /opt?</U></B>
    640 </A>
    641 
    642 <BLOCKQUOTE>
    643 
    644 <P>The reason for this is that I have tried my best to follow the <A
    645 HREF="http://www.pathname.com/fhs/">File System Hierarchy
    646 Standard</A>.</P>
    647 
    648 <P>Binaries go under <B>/opt/bincimap/bin</B></P>
    649 
    650 <P>Host specific configuration goes under <B>/etc/opt/bincimap</B></P>
    651 
    652 <P>If you want your files elsewhere, there's always the option to build
    653 the project from source. :-)</P>
    654 
    655 </BLOCKQUOTE>
    656 
    657 <HR>
    658 
    659 <TABLE WIDTH="99%" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="4">
    660   <TR>
    661     <TD CLASS="bodytext" BGCOLOR="#FFFFFF"></TD>
    662   </TR>
    663   <TR>
    664     <TD CLASS="headtext" BGCOLOR="#226666">
    665       <A HREF="http://validator.w3.org/check/referer">
    666         <IMG BORDER="0" SRC="http://www.w3.org/Icons/valid-html401"
    667          ALT="Valid HTML 4.01!" HEIGHT="31" WIDTH="88">
    668       </A>
    669       <A HREF="http://cr.yp.to/djbdns.html"><IMG BORDER="0" WIDTH="88"
    670       HEIGHT="31" SRC="djbdns.jpg" ALT="Powered by djbdns!"></A>
    671       <IMG BORDER="0" WIDTH="88" HEIGHT="30" SRC="binclogo.gif"
    672       ALT="Powered by Binc IMAP">
    673     </TD>
    674   </TR>
    675 </TABLE>
    676 
    677 </DIV>
    678 </TD>
    679 </TR>
    680 </TABLE>
    681 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    682 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    683 
    684 </BODY>
    685 </HTML>
    686 +FLAGS \Flagged
    687 * FETCH (FLAGS (\Seen \Flagged))
    688 8 OK STORE completed
    689       </PRE>
    690     </LI>
    691   </UL>
    692 </P>
    693 
    694 <P>If all these tests work fine, try connecting with an IMAP client
    695 such as Mozilla, Outlook, Eudora, Netscape, Mutt or Pine.</P>
    696 
    697 </BLOCKQUOTE>
    698 
    699 <HR>
    700 
    701 <A NAME="q14">
    702 <B><U>Q: How do I find my folders in Binc IMAP?</U></B>
    703 </A>
    704 
    705 <BLOCKQUOTE>
    706 
    707 <P>Binc IMAP can be configured to use two types of depositories:
    708 Maildir++ and IMAPdir.</P>
    709 
    710 <P>Using Maildir++, all folders in Binc IMAP must be subfolders of
    711 INBOX. This is the default setting.</P>
    712 
    713 <P>This means that if you want to create a folder called <B>work</B>,
    714 you have to create <B>INBOX.work</B> or <B>INBOX/work</B>.</P>
    715 
    716 <P>For some graphical IMAP clients like <B>Outlook</B> (look out!) or
    717 <B>Mozilla Mail</B>, this means you need to <I>right click</I> on
    718 <B>INBOX</B> and select "Create subfolder".</P>
    719 
    720 <P>Using IMAPdir, folders can be created in any levels. See also <A
    721 HREF="#q12">this question</A>.</P>
    722 
    723 </BLOCKQUOTE>
    724 
    725 <HR>
    726 
    727 <A NAME="q8">
    728 <B><U>Q: How does Binc IMAP authentication work?</U></B>
    729 </A>
    730 
    731 <BLOCKQUOTE>
    732 <P>Binc IMAP is spawned by xinetd, tcpserver or any other TCP wrapper
    733 running as root.</P>
    734 
    735 <P>It immediately goes into pre-authentication mode, where it expects
    736 the client to enter STARTTLS if the client is not already running an
    737 SSL connection. When in TLS/SSL mode, it will accept clear text
    738 authentication.</P>
    739 
    740 <P>Binc IMAP uses the same authentication method as
    741 <U>qmail-pop3d</U>, checkpassword. The pre-authentication stub invokes
    742 the checkpassword compatible authenticator, which if the password is
    743 correct in turn invokes the main Binc IMAP daemon.</P>
    744 
    745 <P>The <A HREF="http://cr.yp.to/checkpwd.html">checkpassword documentation</A> is
    746 required reading for everyone running Binc IMAP.</P>
    747 
    748 </BLOCKQUOTE>
    749 
    750 <HR>
    751 
    752 <A NAME="q19">
    753 <B><U>Q: What does this mean: "Server broke for <userid>, /bin/checkpassword returned 111 (internal error)"?</U></B>
    754 </A>
    755 
    756 <BLOCKQUOTE>
    757 
    758 <P>This log line is printed by <U>bincimap-up</U>, and reflects how
    759 confusing checkpassword can be at times. Most often, though, the
    760 problem is easy to solve.</P>
    761 
    762 <P>Log in as the user who tried to log in. If you are using a virtual
    763 mail account system like vpopmail, become the user that mail accounts
    764 are stored as.</P>
    765 
    766 <P>Try running the bincimapd daemon manually. If you can execute the
    767 binary, there will be no output and the server will simply exit. Most
    768 often, however, you will get an error such as "command not found" or
    769 "permission denied". This should explain quite easily what the problem
    770 is. Note that the bincimapd binary must have read and execute
    771 permissions for all users (755).</P>
    772 
    773 <P>If this didn't solve your problem, please post to the mailing list
    774 a stack trace. To create a stacktrace, attach to tcpserver/xinetd
    775 using "strace -s 1024 -f -p <pid> 2>&1 >dump". Log in to reproduce the
    776 error.  Then interrupt the strace program and email the "dump" file to
    777 the mailing list. <B>Note:</B> It is likely that the dump file
    778 contains passwords in plain text.</P>
    779 
    780 </BLOCKQUOTE>
    781 
    782 <HR>
    783 
    784 <A NAME="q15">
    785 <B><U>Q: How do I fix this: "Unable to find required function getopt_long"?</U></B>
    786 </A>
    787 
    788 <BLOCKQUOTE>
    789 
    790 <P>Note: This only applies to versions 1.1.6 or older.</P>
    791 
    792 <P>The <U>getopt_long</U> function is a GNU extension to the POSIX.2 <U>getopt</U>
    793 function. It allows long arguments such as <B>--enable-ssl</B>.</P>
    794 
    795 <P>Unfortunately, this function is not defined on all
    796 platforms. Specifically, it is known to not exist on FreeBSD.</P>
    797 
    798 <P>For FreeBSD users, install <U>gnugetopt</U> from ports. Otherwise,
    799 post this problem with as much relevant info as you can provide, to
    800 the mailing list.</P>
    801 
    802 </BLOCKQUOTE>
    803 
    804 <HR>
    805 
    806 <A NAME="q16">
    807 <B><U>Q: How do I fix this: "Unable to find the crypto library which is part of OpenSSL"?</U></B>
    808 </A>
    809 
    810 <BLOCKQUOTE>
    811 
    812 <P>The <U>crypto</U> library is a part of <A HREF="http://www.openssl.org">OpenSSL</A>. This
    813 library is required for Binc IMAP to compile.</P>
    814 
    815 <P>If you can not get Binc IMAP to compile with OpenSSL, there should
    816 be a <A HREF="dl/RPMS">static RPM package</A> available for download.</P>
    817 
    818 </BLOCKQUOTE>
    819 
    820 <HR>
    821 
    822 <A NAME="q17">
    823 <B><U>Q: How do I fix this: "Unable to find the ssl library which is part of OpenSSL"?</U></B>
    824 </A>
    825 
    826 <BLOCKQUOTE>
    827 
    828 <P>The <U>crypto</U> library is a part of <A HREF="http://www.openssl.org">OpenSSL</A>. This
    829 library is required for Binc IMAP to compile.</P>
    830 
    831 <P>If you can not get Binc IMAP to compile with OpenSSL, there should
    832 be a <A HREF="dl/RPMS">static RPM package</A> available for download.</P>
    833 
    834 </BLOCKQUOTE>
    835 
    836 <HR>
    837 
    838 <A NAME="q10">
    839 <B><U>Q: How do I install Binc IMAP?</U></B>
    840 </A>
    841 
    842 <BLOCKQUOTE>
    843 
    844 <P>The <I>easiest</I> way to install Binc IMAP on your server is to
    845 follow these instructions:</P>
    846 
    847 <UL>
    848   <LI>Download the RPM from <A HREF="dl/RPMS">http://www.bincimap.andreas.hanssen.name/dl/RPMS</A></LI>
    849   <LI>Install the RPM</LI>
    850   <LI>Copy, edit and perhaps symlink the configuration files:
    851     <UL>
    852     <LI>with daemontools:
    853       <UL>
    854         <LI>ln -s /etc/opt/bincimap/supervise/imap /service/imap</LI>
    855         <LI>ln -s /etc/opt/bincimap/supervise/imaps /service/imaps</LI>	
    856       </UL>
    857     </LI>
    858     <LI>with xinetd:
    859       <UL>
    860         <LI>ln -s /etc/opt/bincimap/xinetd/imap /etc/xinetd.d/imap</LI>
    861         <LI>ln -s /etc/opt/bincimap/xinetd/imaps /etc/xinetd.d/imaps</LI>
    862 	<LI>service xinetd restart</LI>
    863       </UL>
    864     </LI>
    865     </UL>
    866   </LI>
    867   <LI>Check that the service is up by connecting using a standard IMAP client</LI>
    868 </UL>
    869 
    870 <P>If you want to build Binc IMAP from source, there's a <B>README</B>
    871 file that gives you the instructions step by step, inside the
    872 tarball. You can also get some clues by inspecting the bundled
    873 <B>bincimap-spec</B> file's <B>install</B> section.</P>
    874 
    875 </BLOCKQUOTE>
    876 
    877 <HR>
    878 
    879 <A NAME="q11">
    880 <B><U>Q: Why does Binc IMAP (RPM) install under /opt?</U></B>
    881 </A>
    882 
    883 <BLOCKQUOTE>
    884 
    885 <P>The reason for this is that I have tried my best to follow the <A
    886 HREF="http://www.pathname.com/fhs/">File System Hierarchy
    887 Standard</A>.</P>
    888 
    889 <P>Binaries go under <B>/opt/bincimap/bin</B></P>
    890 
    891 <P>Host specific configuration goes under <B>/etc/opt/bincimap</B></P>
    892 
    893 <P>If you want your files elsewhere, there's always the option to build
    894 the project from source. :-)</P>
    895 
    896 </BLOCKQUOTE>
    897 
    898 <HR>
    899 
    900 <TABLE WIDTH="99%" ALIGN="CENTER" CELLSPACING="0" CELLPADDING="4">
    901   <TR>
    902     <TD CLASS="bodytext" BGCOLOR="#FFFFFF"></TD>
    903   </TR>
    904   <TR>
    905     <TD CLASS="headtext" BGCOLOR="#226666">
    906       <A HREF="http://validator.w3.org/check/referer">
    907         <IMG BORDER="0" SRC="http://www.w3.org/Icons/valid-html401"
    908          ALT="Valid HTML 4.01!" HEIGHT="31" WIDTH="88">
    909       </A>
    910       <A HREF="http://cr.yp.to/djbdns.html"><IMG BORDER="0" WIDTH="88"
    911       HEIGHT="31" SRC="djbdns.jpg" ALT="Powered by djbdns!"></A>
    912       <IMG BORDER="0" WIDTH="88" HEIGHT="30" SRC="binclogo.gif"
    913       ALT="Powered by Binc IMAP">
    914     </TD>
    915   </TR>
    916 </TABLE>
    917 
    918 </DIV>
    919 </TD>
    920 </TR>
    921 </TABLE>
    922 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    923 <BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
    924 
    925 </BODY>
    926 </HTML>