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

\begin{verbatim}

<?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;
        }
    }

}
\end{verbatim}

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

\begin{verbatim}

$conf['auth']['driver'] = 'cpanel';
\end{verbatim}

Don't change anything else in the \texttt{conf.php} file.

\end{document}
