\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
Save the following file (also attached to this page) to \texttt{horde/lib/Auth/cpanel.php}:

<pre><code class="language-php">
<?php

require\_once dirname(\_\_FILE\_\_) . '/imap.php';

class Auth\_cpanel extends Auth\_imap \{

    /**
     * Constructs a new cpanel authentication object.
     *
     * @param array \$params  A hash containing connection parameters.
     */
    function Auth\_cpanel(\$params = array())
    \{
        \$this->capabilities['transparent'] = true;
        parent::Auth\_imap(\$params);
    \}

    /**
     * Automatic authentication.
     *
     * @return boolean  Whether or not the client is allowed.
     */
    function transparent()
    \{
        if (\$this->\_authenticate(getenv('REMOTE\_USER'),
                                 array('password' => getenv('REMOTE\_PASSWORD')))) \{
            \$this->setAuth(getenv('REMOTE\_USER'),
                           array('transparent' => 1,
                                 'password' => getenv('REMOTE\_PASSWORD')));
            return true;
        \} else \{
            return false;
        \}
    \}

\}
</code></pre>
Then add the following line to \texttt{horde/config/conf.php} \textit{after} the line saying \texttt{/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */}:

<pre><code class="language-php">
\$conf['auth']['driver'] = 'cpanel';
</code></pre>
Don't change anything else in the \texttt{conf.php} file.

\end{document}
