\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{The imap\_config parameter in IMP 4.1+'s \texttt{servers.php} file}
\textit{\textbf{As mentioned in the \texttt{servers.php} file, the Horde Project does not officialy support this parameter.  Use at your own risk.}}

\textbf{For information on configuring UW-IMAP servers, see <a href="https://wiki.horde.org/ImpUWIMAPNamespaces">IMP UW-IMAP/Namespace Configuration Tips</a>.}

\section{\textbf{This documentation is also valid for <a href="http://www.horde.org/mimp/">MIMP 1.0</a>.}}
\subsection{Why use this parameter?}
\begin{itemize}
\item The IMAP\_Client:: library does not currently support logins for your IMAP authentication type (i.e. kerberos, NTLM).


\item You \textbf{both} know what you are doing \textbf{and} you want to save a single login to the server at the beginning of a session.  (i.e. you are implementing IMP in a large environment, know what these IMAP configuration items are, and want to save a bit of bandwith/CPU cycles for each session by eliminating a server access needed to obtain the IMAP server information).  Quite honestly, if the auto-detect method of IMP - the default - correctly detects the IMAP server information, you really shouldn't be messing with this configuration option.


\end{itemize}

\noindent\rule{\textwidth}{1pt}
\subsection{Why is IMAP\_Client needed at all?  Or, why don't you guys just use the c-client library to get this information?}
Simple.  The php ``imap\_*()`` functions don't provide a way for us to get this information.  \textit{Trust us}, we would gladly use those functions if they existed.


\noindent\rule{\textwidth}{1pt}
\subsection{What is the format of the 'namespace' parameter?}
Please see the documentation for the \texttt{namespace} function in \texttt{imp/lib/IMAP/Client.php}.  Or you can try going to our <a href="http://dev.horde.org/api/imp/IMP/IMP_IMAPClient.html#getNamespace">API Documentation</a>. (No guarantees this link will remain correct).


\noindent\rule{\textwidth}{1pt}
\subsection{What does an example 'imap\_config' entry in \texttt{servers.php} look like for IMP?}
Thanks for asking.  It looks like the following (this is an example of a dovecot-1.0 IMAP server):

<pre><code>
'imap\_config' => array(
    'children' => true,
    'namespace' => array(
        '' => array(
            'name' => '',
            'delimiter' => '.',
            'type' => 'personal',
            'hidden' => false
        ),
        '\#foo.' => array(
            'name' => '\#foo.',
            'delimiter' => '.',
            'type' => 'shared',
            'hidden' => false
        ),
        '\#foo2.' => array(
            'name' => '\#foo2.',
            'delimiter' => '.',
            'type' => 'public', (or 'other' if using IMP 4.2+)
            'hidden' => false
        )
    ),
    'search\_charset' => array(
        'UTF-8' => true
    )
)
</code></pre>
This is an example of an UW-IMAP server:

<pre><code>
'imap\_config' => array(
    'children' => false,
    'namespace' => array(
        'INBOX/' => array(
            'name' => 'INBOX/',
            'delimiter' => '/',
            'type' => 'personal',
            'hidden' => false,
        ),
    ),
    'search\_charset' => array(
        'UTF-8' => true
    )
)
</code></pre>
Another UW-IMAP example:

<pre><code>
    'imap\_config' => array(
        'children' => false,
        'namespace' => array(
            'mail/' => array(
                'name' => 'mail/',
                'delimiter' => '/',
                'type' => 'personal',
                'hidden' => false,
            ),
        ),
        'search\_charset' => array(
            'UTF-8' => true
        )
    )
</code></pre>
Obviously, \textit{don't copy this code directly into servers.php and expect it to work!}  This is merely an example.  Your IMAP server configuration is almost certainly different.

\section{\textbf{Note:} MIMP does not require the 'search\_charset' value.<br />
\textbf{Note:} As of IMP 4.2.1, the 'children' value is no longer needed.}
\subsection{Notes for Perdition Imap/Pop3  Proxy}
Please, pay attention with imap capability command. IMAP\_Client run CAPABILITY before login, so, perdition proxy don't realy return a full capability string. You can use perdition parameter to fix it:

<pre><code>
imap\_capability "IMAP4rev1 CHILDREN NAMESPACE"
</code></pre>

\noindent\rule{\textwidth}{1pt}
\subsection{Notes for dovecot using maildir INBOX and mbox Mail/ folders with dimp 1.1.1}
There is a strange bug with imp1.1.1 and dovecot in the configuration in the subject.<br />
My old config which used to work fine with imp was:

<pre><code>
    'imap\_config' => array(
        'children' => true,
        'namespace' => array(
                'Mail/' => array(
                        'name' => 'Mail/',
                        'delimiter' => '/',
                        'type' => 'personal',
                        'hidden' => false
                ),
        ),
        'search\_charset' => array(
                'UTF-8' => true
        )
    )
</code></pre>
but using this config with dimp 1.1.1, when selecting a new message from the inbox, the preview would never show up and the "working" icon would never go away. if a message was not marked as new, it could be previewed without any problems. also preview of new messages under Mail/ folders worked fine as well.

To make the preview work for new messages in the INBOX i had to add a new namespace definition (maildir style):

<pre><code>
    'namespace' => array(
            '' => array(
            'name' => '',
            'delimiter' => '.',
            'type' => 'personal',
            'hidden' => true
            ),
</code></pre>
any maildir namespace will do to fix the issue. we dont want to support both formats so i am hiding this definition.

\end{document}
