\documentclass{article}
\usepackage{ulem}
\pagestyle{headings}
\begin{document}
\part{ Vacation with Vpopmail in SORK}
The software used is:

\begin{itemize}
\item{MTA: qmail/vpopmail with MySQL backend - all domains loaded in vpopmail.vpopmail table}
\item{vacation program: Autorespond}
\item{Horde version: 3.1.3}
\item{vacation version: 3.0}
\end{itemize}
These changes will make sork vacations compatible with qmailadmin vacation changes.  So you can modify your vacation message from either location.

Like the original Qmail driver, It still uses ftp to put the data into the user's 'home' directory. Personally, I use Pureftp it will do SQL auths and grab the home dir from SQL, you can also specify a uid (89 is usually vpopmail), and set the users chroot.   All your users will have ftp access to their Maildir with the own vpopmail username/password. I would suggest only binding Pureftp to 127.0.0.1 if you don't want your users to do that externally.

First, get the vpopmailsql.php driver (attached to this page), and place it in vacation/lib/Driver/. This file will do all the heavy lifting, but you will need to make a couple of changes to it. Change the vpopmail/vpoppass to be your Vpopmail MySQL username password. Ultimately this driver should include  the code from sql.php driver to connect to the database, and your username/password will be in \texttt{conf.php}.

\begin{verbatim}

if (!empty($alias)) {
    $alias = $this->_makeEmailAddress($alias, $realm);
    if ($alias === false) {
        return false;
    }
}

$link = mysql_connect('localhost', 'vpopmail', 'vpoppass');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
\end{verbatim}

Next, add the following to conf.php:\newline
\begin{verbatim}

$conf['server']['params']['default']['table'] = 'vpopmail.vpopmail';
$conf['server']['params']['default']['path_col'] = 'pw_dir';
$conf['server']['params']['default']['user_col'] = 'pw_name';
$conf['server']['params']['default']['domain_col'] = 'pw_domain';
$conf['vacation']['path'] = '/usr/local/bin/autorespond';
\end{verbatim}

Make sure your autorespond is actually in the path.

Finally, main.php needs to be modified to work with the vacation message format that autorespond uses.\newline
An autorespond vacation message looks like:\newline
\begin{verbatim}

From: email@home.com <newline>
Subject: Vacation <newline>
<newline>
Text
<newline>
\end{verbatim}

Download \texttt{main155.diff} from this page's attachment list and apply the patch to main.php (revision 1.55 from CVS). This will fix the display of the existing vacation notice, and properly submit a new one.

\end{document}
