[cvs] [Wiki] changed: SorkVacationWithVpopmail

Chuck Hagenbuch chuck at horde.org
Fri Jun 22 18:49:46 UTC 2007


chuck  Fri, 22 Jun 2007 11:49:46 -0700

Modified page: http://wiki.horde.org/SorkVacationWithVpopmail
New Revision:  1.3
Change log:  some cleanup, a title, a bit more wiki formatting

@@ -1,28 +1,22 @@
++ Vacation with Vpopmail in SORK
+
 The software used is:

-MTA: qmail/vpopmail with !MySQL backend - all domains loaded in
vpopmail.vpopmail table
-vacation program: Autorespond
-Horde version: 3.1.3
-vacation version: 3.0
+* MTA: qmail/vpopmail with !MySQL backend - all domains loaded in
vpopmail.vpopmail table
+* vacation program: Autorespond
+* Horde version: 3.1.3
+* vacation version: 3.0

-These changes will make sork vacations compatible with qmailadmin vacation
changes.  So you can modify your
-vacation message from either location.
+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.
+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, place into vacation/lib/Driver/
directory.
-Currently, it's located: 
http://www.havokmon.com/stuff/horde/vacation/vpopmailsql.php.txt
-This file will do all the heavy lifting, but you will need to make a couple
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 the config.php
-<code>
- <snip>
-  if (!empty($alias)) {
+First, get the vpopmailsql.php Driver, place into vacation/lib/Driver/
directory. Currently, it's located: 
http://www.havokmon.com/stuff/horde/vacation/vpopmailsql.php.txt
+This file will do all the heavy lifting, but you will need to make a couple
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 {{conf.php}}.
+
+<code type="php">
+        if (!empty($alias)) {
             $alias = $this->_makeEmailAddress($alias, $realm);
             if ($alias === false) {
                 return false;
             }
@@ -31,13 +25,12 @@
         $link = mysql_connect('localhost', 'vpopmail', 'vpoppass');
         if (!$link) {
                 die('Could not connect: ' . mysql_error());
         }
-  </snip>
 </code>

 Next, add the following to conf.php:
-<code>
+<code type="php">
 $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';
@@ -47,16 +40,17 @@
 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.
 An autorespond vacation message looks like:
+<code>
 From: email at home.com <newline>
 Subject: Vacation <newline>
 <newline>
 Text
 <newline>
+</code>

-Finally, apply the following diff to main.php v1.55.  This will fix the
display of the existing vacation notice,
-and properly submit a new one.
+Finally, apply the following diff to main.php v1.55. This will fix the
display of the existing vacation notice, and properly submit a new one.

 Diff is also here:
 http://www.havokmon.com/stuff/horde/vacation/main155.diff

@@ -69,9 +63,9 @@
          $vacationmsg = Util::getFormData('mess', false);
 +
          // Include the mail subject if the driver supports it.
 -        $my_email = Auth::getAuth();
--       if ($conf['vacation']['subject']) {
+-        if ($conf['vacation']['subject']) {
 -            $vacationtxt = 'From: ' . $my_email . "\n";
 -            $vacationtxt .= 'Subject: ' . Util::getFormData('subject') .
"\n\n" . $vacationmsg;
 +        if ($conf['vacation']['subject']) {
 +            $vacationtxt = 'Subject: ' . Util::getFormData('subject') .
"\n" . $vacationmsg;
@@ -111,10 +105,5 @@
 -
  $alias = Util::getFormData('alias');
  if (is_null($alias)) {
      $aliases = &Vacation_AliasDriver::singleton();
-
 </code>
-
-
-
-


More information about the cvs mailing list