[pkg-horde] [SCM] Debian Horde Packages repository: sork-vacation-h3 package branch, debian-sid, updated. ef8796fb85f1aadf7ed8355c2462c38db1f50c53

Gregory Colpart reg at foulademer.gcolpart.com
Sun May 31 21:22:46 UTC 2009


The following commit has been merged in the debian-sid branch:
commit 083be1d7dae797f4798573af28fdecd4fb346768
Author: Gregory Colpart <reg at foulademer.gcolpart.com>
Date:   Sun May 31 18:21:07 2009 +0200

    merge from upstream

diff --git a/LICENSE b/LICENSE
index cde41c2..b95305d 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2002-2006 The Horde Project.  All rights reserved.
+Copyright 2002-2009 The Horde Project.  All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are
diff --git a/README b/README
index c1fa138..7d171fe 100644
--- a/README
+++ b/README
@@ -1,8 +1,8 @@
 What is Vacation?
 =================
 
-:Last update:   $Date: 2006/08/21 15:02:06 $
-:Revision:      $Revision: 1.5.2.2 $
+:Last update:   $Date: 2008/10/09 17:37:27 $
+:Revision:      $Revision: 1.5.2.3 $
 :Contact:       sork at lists.horde.org
 
 .. contents:: Contents
diff --git a/config/conf.xml b/config/conf.xml
index bf5a5de..1d5ef02 100644
--- a/config/conf.xml
+++ b/config/conf.xml
@@ -1,21 +1,22 @@
 <?xml version="1.0"?>
-<!-- $Horde: vacation/config/conf.xml,v 1.15.2.8 2006/10/13 16:03:33 jan Exp $ -->
+<!-- $Horde: vacation/config/conf.xml,v 1.15.2.10 2008/10/09 17:37:27 jan Exp $ -->
 <configuration>
  <configsection name="vacation">
   <configheader>Vacation Settings</configheader>
   <configstring name="path" required="false" desc="Location of the vacation
   program, if necessary for your server">
-   /usr/local/bin/vacation
+   /usr/bin/vacation
   </configstring>
   <configstring name="validation_pattern" required="false" desc="You can
    restrict vacation messages to match a certain pattern, if you like. If this
    config value is non-empty, it is expected to be a PCRE regular
    expression. Include the pattern delimiters, and any modifiers that you want
    applied. See:
-   http://www.php.net/manual/en/pcre.pattern.syntax.php. Example: |^Subject:
-   .+\n.+|"/>
-  <configphp name="default" required="false" desc="The default vacation
-  message">'Subject: ' . _("On vacation message") . "\n" . _("I'm on vacation and will not be reading my mail for a while.") . "\n" . _("Your mail will be dealt with when I return.") . "\n";</configphp>
+   http://www.php.net/manual/en/pcre.pattern.syntax.php."/>
+  <configphp name="default_subject" required="false" desc="The default vacation
+  subject">_("On vacation message")</configphp>
+  <configphp name="default_message" required="false" desc="The default vacation
+  message">_("I'm on vacation and will not be reading my mail for a while.\nYour mail will be dealt with when I return.")</configphp>
   <configboolean name="subject" desc="Does your vacation setup support
    configurable email subjects?">true</configboolean>
   <configboolean name="from" desc="Does your vacation setup support
@@ -23,17 +24,16 @@
  </configsection>
  <configsection name="server">
   <configheader>Server configuration</configheader>
+  <configdescription>
+  If not using realms (multiple domains or virtual hosting) then there is only
+  one possible default configuration. Even if you are using realms/hosting,
+  you have to set a default configuration. This may be overriden by
+  realm/domain specific values by defining additional arrays, one per
+  realm/domain, with the realm/domain name as the key instead of the key
+  'default'. This not possible with this interface though.
+  </configdescription>
   <configswitch name="driver" desc="The driver to use">forwards
    <case name="forwards" desc="FTP driver for dot-forward compliant mailers">
-    <configdescription>
-     If not using realms (multiple domains or virtual hosting) then there is
-     only one possible default configuration.
-     Even if you are using realms/hosting, you have to set a default
-     configuration.  This may be overriden by realm/domain specific values by
-     defining additional arrays, one per realm/domain, with the realm/domain
-     name as the key instead of the key 'default'. This not possible with this
-     interface though.
-    </configdescription>
     <configsection name="params">
      <configsection name="default">
       <configstring name="host" desc="Hostname where the FTP server is running
@@ -46,6 +46,8 @@
         <value desc="Yes">true</value>
        </values>
       </configenum>
+      <configboolean name="ssl" required="false" desc="Use a secure SSL FTP
+      connection?"/>
       <configenum name="hordeauth" desc="Should we log the user automatically
        in with the username and password he uses to login to Horde?">
        <values>
@@ -67,21 +69,13 @@
         <value desc="Berkeley DB 4.x hash, big endian">hash4b</value>
         <value desc="Berkeley DB 2.x btree, little endian">btree</value>
         <value desc="GNU dbm (gdbm) database, little endian">gdbm</value>
+        <value desc="GNU dbm (gdbm) database, big endian">gdbmb</value>
        </values>
       </configenum>
      </configsection>
     </configsection>
    </case>
    <case name="qmail" desc="FTP driver for qmail compliant mailers">
-    <configdescription>
-     If not using realms (multiple domains or virtual hosting) then there is
-     only one possible default configuration.
-     Even if you are using realms/hosting, you have to set a default
-     configuration.  This may be overriden by realm/domain specific values by
-     defining additional arrays, one per realm/domain, with the realm/domain
-     name as the key instead of the key 'default'. This not possible with this
-     interface though.
-    </configdescription>
     <configsection name="params">
      <configsection name="default">
       <configstring name="host" desc="Hostname where the FTP server is running
@@ -94,6 +88,8 @@
         <value desc="Yes">true</value>
        </values>
       </configenum>
+      <configboolean name="ssl" required="false" desc="Use a secure SSL FTP
+      connection?"/>
       <configenum name="hordeauth" desc="Should we log the user automatically
        in with the username and password he uses to login to Horde?">
        <values>
@@ -109,70 +105,7 @@
      </configsection>
     </configsection>
    </case>
-   <case name="sql" desc="SQL driver">
-    <configdescription>
-     If not using realms (multiple domains or virtual hosting) then there is
-     only one possible default configuration.
-     Even if you are using realms/hosting, you have to set a default
-     configuration.  This may be overriden by realm/domain specific values by
-     defining additional arrays, one per realm/domain, with the realm/domain
-     name as the key instead of the key 'default'. This not possible with this
-     interface though.
-    </configdescription>
-    <configsection name="params">
-     <configsection name="default">
-      <configsql switchname="driverconfig">
-       <configstring name="table" desc="Database table">users</configstring>
-       <configstring name="user_col" desc="Column which contains user
-        names">user</configstring>
-       <configstring name="pass_col" desc="Column with
-        passwords">password</configstring>
-       <configstring name="message" desc="Column with vacation
-        message">vacation_sub</configstring>
-       <configstring name="subject" desc="Column with vacation
-        subject">vacation_sub</configstring>
-       <configstring name="vacation" desc="Vacation message yes or
-        no">vacation</configstring>
-      </configsql>
-      <configenum name="hordeauth" desc="Should we log the user automatically
-       in with the username and password he uses to login to Horde?">
-       <values>
-        <value desc="No">false</value>
-        <value desc="Yes, with the full username">full</value>
-        <value desc="Yes, but with everything after the @ stripped from the
-         username">true</value>
-       </values>
-      </configenum>
-     </configsection>
-     <configenum name="encryption" required="false" desc="The encryption to
-      use to store the password in the table">md5-hex
-      <values>
-       <value>crypt</value>
-       <value>crypt-blowfish</value>
-       <value>crypt-des</value>
-       <value>crypt-md5</value>
-       <value>md5-base64</value>
-       <value>md5-hex</value>
-       <value>plain</value>
-       <value>sha</value>
-       <value>smd5</value>
-       <value>ssha</value>
-      </values>
-     </configenum>
-     <configboolean name="show_encryption" required="false" desc="Prepend the
-      encryption in the password field?">false</configboolean>
-   </configsection>
-   </case>
    <case name="ldap" desc="LDAP driver">
-    <configdescription>
-     If not using realms (multiple domains or virtual hosting) then there is
-     only one possible default configuration.
-     Even if you are using realms/hosting, you have to set a default
-     configuration.  This may be overriden by realm/domain specific values by
-     defining additional arrays, one per realm/domain, with the realm/domain
-     name as the key instead of the key 'default'. This not possible with this
-     interface though.
-    </configdescription>
     <configsection name="params">
      <configsection name="default">
       <configstring name="host" desc="Hostname where the LDAP server is
@@ -227,6 +160,111 @@
      </configsection>
     </configsection>
    </case>
+   <case name="plesk" desc="Plesk driver">
+    <configsection name="params">
+     <configsection name="default">
+      <configphp name="host" desc="Hostname where the Plesk server is running
+       on">$_SERVER['SERVER_NAME']</configphp>
+      <configstring name="user" desc="Administrator or client user"/>
+      <configstring name="pass" desc="Password"/>
+     </configsection>
+    </configsection>
+   </case>
+   <case name="sql" desc="SQL driver">
+    <configsection name="params">
+     <configsection name="default">
+      <configsql switchname="driverconfig">
+       <configstring name="table" desc="Database table">users</configstring>
+       <configstring name="user_col" desc="Column which contains user
+        names">user</configstring>
+       <configstring name="pass_col" desc="Column with
+        passwords">password</configstring>
+       <configstring name="message" desc="Column with vacation
+        message">vacation_msg</configstring>
+       <configstring name="subject" desc="Column with vacation
+        subject">vacation_sub</configstring>
+       <configstring name="vacation" desc="Column with 'y' or 'n' whether
+        vacation messages are enabled">vacation</configstring>
+      </configsql>
+      <configenum name="hordeauth" desc="Should we log the user automatically
+       in with the username and password he uses to login to Horde?">
+       <values>
+        <value desc="No">false</value>
+        <value desc="Yes, with the full username">full</value>
+        <value desc="Yes, but with everything after the @ stripped from the
+         username">true</value>
+       </values>
+      </configenum>
+     </configsection>
+     <configenum name="encryption" required="false" desc="The encryption to
+      use to store the password in the table">md5-hex
+      <values>
+       <value>crypt</value>
+       <value>crypt-blowfish</value>
+       <value>crypt-des</value>
+       <value>crypt-md5</value>
+       <value>md5-base64</value>
+       <value>md5-hex</value>
+       <value>plain</value>
+       <value>sha</value>
+       <value>smd5</value>
+       <value>ssha</value>
+      </values>
+     </configenum>
+     <configboolean name="show_encryption" required="false" desc="Prepend the
+      encryption in the password field?">false</configboolean>
+    </configsection>
+   </case>
+   <case name="customsql" desc="SQL driver with custom queries">
+    <configsection name="params">
+     <configsection name="default">
+      <configdescription>
+        This driver allows for custom SQL queries into which variables will be
+        substituted. The current FULL username will be provided as \U,
+        vacation subjects as \S, vacation messages as \M, the vacation
+        message's From: address as \F, the alias address as \A, and the given
+        password as \P. If the query to check the vacation status returns no
+        rows, it will be assumed that vacation messages are not enabled. This
+        query expects the following column names in the result set (use AS if
+        necessary): "vacation" (Y or N), "message", "subject", "from".
+      </configdescription>
+      <configsql switchname="driverconfig">
+       <configstring name="query_set" desc="Query to set vacation messages"/>
+       <configstring name="query_unset" desc="Query to disable vacation
+       messages"/> 
+       <configstring name="query_get" desc="Query to retrieve vacation status"/>
+       <configstring name="query_password" required="false" desc="Query to
+       retrieve the current password"/>
+      </configsql>
+      <configenum name="hordeauth" desc="Should we log the user automatically
+       in with the username and password he uses to login to Horde?">
+       <values>
+        <value desc="No">false</value>
+        <value desc="Yes, with the full username">full</value>
+        <value desc="Yes, but with everything after the @ stripped from the
+         username">true</value>
+       </values>
+      </configenum>
+     </configsection>
+     <configenum name="encryption" required="false" desc="The encryption to
+      use to store the password in the table">md5-hex
+      <values>
+       <value>crypt</value>
+       <value>crypt-blowfish</value>
+       <value>crypt-des</value>
+       <value>crypt-md5</value>
+       <value>md5-base64</value>
+       <value>md5-hex</value>
+       <value>plain</value>
+       <value>sha</value>
+       <value>smd5</value>
+       <value>ssha</value>
+      </values>
+     </configenum>
+     <configboolean name="show_encryption" required="false" desc="Prepend the
+      encryption in the password field?">false</configboolean>
+    </configsection>
+   </case>
   </configswitch>
  </configsection>
 
@@ -247,8 +285,10 @@
        <value desc="Yes">true</value>
       </values>
      </configenum>
-     <configstring name="username" desc="Login name"></configstring>
-     <configstring name="password" desc="Password"></configstring>
+     <configboolean name="ssl" required="false" desc="Use a secure SSL FTP
+     connection?"/>
+     <configstring name="username" desc="Login name"/>
+     <configstring name="password" desc="Password"/>
      <configstring name="path" desc="Path to
       file">/etc/postfix/virtual</configstring>
      <configlist name="mydomains" desc="Comma-separated list of domains
diff --git a/docs/CHANGES b/docs/CHANGES
index 9e9d902..9777fe5 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,3 +1,24 @@
+----
+v3.1
+----
+
+[jan] Fix retrieving 'hordeauth' setting when using realms (Bug #7881).
+
+
+--------
+v3.1-RC1
+--------
+
+[jan] Add custom SQL driver.
+[cjh] Use the current password as the salt in the SQL driver (Bug #6496).
+[jan] Add Plesk driver.
+[jan] Add GDBM database template for big endian systems.
+[jan] Add SSL option to ftp and qmail drivers (Request #5511).
+[jan] Add full character set support (Request #5028).
+[jan] Fix retrieving vacation status from LDAP with mixed-case attribute names.
+[jan] Add Turkish translation (METU <horde-tr at metu.edu.tr>).
+
+
 ------
 v3.0.1
 ------
diff --git a/docs/CREDITS b/docs/CREDITS
index 9d864ea..737d69f 100644
--- a/docs/CREDITS
+++ b/docs/CREDITS
@@ -28,20 +28,20 @@ Brazilian Portuguese    Walber Alexandre de Castro <walber at lnls.br>
 Bulgarian               Miroslav Pendev <miro at cybershade.us>
 Chinese (Traditional)   David Chang <david at tmv.gov.tw>
 Czech                   Pavel Chytil <pavel at chytil.tk>
-Danish                  Espen Jürgensen <espen at hhkol.dk>
+Danish                  Espen Jürgensen <espen at hhkol.dk>
                         Brian Truelsen <horde+i18n at briantruelsen.dk>
 Dutch                   Arien Huisken <arien at huisken-systems.nl>
-Danish                  Espen Jürgensen <espen at hhkol.dk>
+Danish                  Espen Jürgensen <espen at hhkol.dk>
 Finnish                 Tero Matinlassi <terom at iki.fi>
 French                  Daniel Huhardeaux <daniel.huhardeaux at tootai.com>
-                        Benoit St-André
+                        Benoit St-André
                         Pierre Lachance <pl at pierrelachance.net>
 Galician                Rafael Varela <rafael.varela at usc.es>
                         Guillermo Mendez <guille at usc.es>
 German                  Jens A Tkotz <jens.tkotz at f2h9.de>
                         Jan Schneider <jan at horde.org>
 Greek                   Konstantinos C. Milosis <kmilosis at yahoo.com>
-Hungarian               Matin Tamás <matintom at web.de>
+Hungarian               Matin Tamás <matintom at web.de>
 Italian                 Alessio Ciregia <alessio at ifc.cnr.it>
                         Fabio Pedretti <fabio.pedretti at ing.unibs.it>
 Norwegian Nynorsk       Per-Stian Vatne <psv at orsta.org>
@@ -53,6 +53,7 @@ Slovenian               Duck <duck at obala.net>
 Spanish                 Juan Manuel Del Rio
                         Manuel Perez Ayala <mayala at unex.es>
 Swedish                 Jonatan Bagge <Jonatan.Bagge at material.uu.se>
+Turkish                 Middle East Technical University <horde-tr at metu.edu.tr>
 =====================   ======================================================
 
 
diff --git a/docs/INSTALL b/docs/INSTALL
index cead743..e4fa1b9 100644
--- a/docs/INSTALL
+++ b/docs/INSTALL
@@ -1,9 +1,9 @@
 =========================
- Installing Vacation 3.0
+ Installing Vacation 3.1
 =========================
 
-:Last update:   $Date: 2006/04/03 20:45:51 $
-:Revision:      $Revision: 1.17 $
+:Last update:   $Date: 2008/10/09 17:37:27 $
+:Revision:      $Revision: 1.17.2.1 $
 :Contact:       sork at lists.horde.org
 
 .. contents:: Contents
@@ -49,6 +49,10 @@ To function properly, Vacation **requires** the following:
    .. Important:: Vacation 3.0 requires version 3.0+ of the Horde Framework -
                   earlier versions of Horde will **not** work.
 
+   .. Important:: The Plesk driver requires the DOM library from version 3.2+
+      		  of the Horde Framework. If you have an older version of
+		  Horde, you can install the library manually.
+
    .. _`Horde Application Framework`: http://www.horde.org/horde/
 
    The Horde Framework can be obtained from the Horde website and FTP server,
@@ -74,6 +78,10 @@ To function properly, Vacation **requires** the following:
 
       LDAP support is necessary if you want to use the LDAP driver.
 
+   c. CURL support ``--with-curl`` [OPTIONAL]
+
+      CURL support is necessary if you want to use the Plesk driver.
+
 3. An FTP server installed, running, and working if you want to use one of the
    FTP drivers.
 
@@ -104,6 +112,26 @@ and would then find Vacation at the URL::
 
    http://your-server/horde/vacation/
 
+Installing Horde_DOM
+====================
+
+If you don't have Horde 3.2 or higher installed and want to use the Plesk
+driver, you need to separately install the Horde_DOM package through PEAR::
+
+   pear channel-discover pear.horde.org
+   pear install horde/Horde_DOM
+
+If you get an error message that downloading this package within the preferred
+state failed, try to add less stable states to the package name::
+
+   pear install horde/Horde_DOM-beta
+   pear install horde/Horde_DOM-alpha
+
+Since Plesk usually doesn't have a complete PEAR utility installed, you can
+alternatively download the package manually from http://pear.horde.org/,
+unpack it, and drop the ``DOM.php`` file into the
+``/usr/share/psa-horde/lib/Horde/`` directory on Linux/Unix servers, or the
+according directory on Windows servers.
 
 Configuring Vacation
 ====================
@@ -180,9 +208,8 @@ subscription information can be found at
 
   http://www.horde.org/mail/
 
-Lastly, Horde developers, contributors and users also make occasional
-appearances on IRC, on the channel #horde on the Freenode Network
-(irc.freenode.net).
+Lastly, Horde developers, contributors and users may also be found on IRC,
+on the channel #horde on the Freenode Network (irc.freenode.net).
 
 Please keep in mind that Vacation is free software written by volunteers.
 For information on reasonable support expectations, please read
diff --git a/docs/RELEASE_NOTES b/docs/RELEASE_NOTES
index 76a2d6f..203f61a 100644
--- a/docs/RELEASE_NOTES
+++ b/docs/RELEASE_NOTES
@@ -17,32 +17,28 @@ $this->notes['fm']['focus'] = 4;
 /* Mailing list release notes. */
 $this->notes['ml']['changes'] = <<<ML
 The Horde Team is pleased to announce the final release of the Vacation
-Auto-Responding Manager version H3 (3.0.1).
+Auto-Responding Manager version H3 (3.1).
 
 Vacation is a Horde module for managing user e-mail "vacation notices" or
 "auto-responders." It works via a local vacation program and the .forward
 style forwarding mechanism supported by several popular mailers.
 
-Right now, Vacation provides fairly complete support for managing .forward
-style vacation notices on Sendmail or Courier mail based systems via an FTP
-transport. It also has some support for LDAP, Qmail, and Exim SQL based
-servers.
+Vacation provides fairly complete support for managing .forward style vacation
+notices on Sendmail or Courier mail based systems via an FTP transport. It also
+has some support for LDAP, Qmail, and Exim SQL based servers.
 
-The major changes compared to the Vacation H3 (3.0) version are:
-    * Added support for Berkeley DB 4 vacation databases.
-    * Allowed users to set their From: address.
-    * Improved configuration for LDAP searches.
-    * Added Slovenian translation.
-    * Updated German and Traditional Chinese translations.
+The major changes compared to the Vacation H3 (3.0) versions are:
+    * Added custom SQL and Plesk drivers
+    * SSL support in the FTP and qmail drivers
+    * Full character set support
+    * Added Turkish translation
 ML;
 
 /* Freshmeat release notes. */
 $this->notes['fm']['changes'] = <<<FM
-Support for Berkeley DB 4 vacation databases has been added.
-Users are allowed to set their From: address now.
-Configuration for LDAP searches has been improved.
-A Slovenian translation has been added and German and Traditional Chinese
-translations have been updated.
+This version adds new custom SQL and Plesk drivers, adds SSL support in the FTP
+and qmail drivers, has full character set support for vacation messages, and
+adds a new Turkish translation.
 FM;
 
 $this->notes['name'] = 'Vacation';
diff --git a/docs/TODO b/docs/TODO
index 0407dd7..713d056 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -2,8 +2,8 @@
  Vacation Development TODO List
 ================================
 
-:Last update:   $Date: 2006/02/17 18:48:42 $
-:Revision:      $Revision: 1.11 $
+:Last update:   $Date: 2008/10/09 17:37:27 $
+:Revision:      $Revision: 1.11.2.1 $
 :Contact:       sork at lists.horde.org
 
 - Merge functionality into Ingo.
diff --git a/files/empty.btree.bin b/files/empty.btree.bin
old mode 100755
new mode 100644
diff --git a/files/empty.empty.bin b/files/empty.empty.bin
old mode 100755
new mode 100644
diff --git a/files/empty.gdbm.bin b/files/empty.gdbm.bin
old mode 100755
new mode 100644
diff --git a/files/empty.gdbmb.bin b/files/empty.gdbmb.bin
new file mode 100644
index 0000000..8783f62
Binary files /dev/null and b/files/empty.gdbmb.bin differ
diff --git a/files/empty.hash.bin b/files/empty.hash.bin
old mode 100755
new mode 100644
diff --git a/files/empty.hash3.bin b/files/empty.hash3.bin
old mode 100755
new mode 100644
diff --git a/index.php b/index.php
index b9c77ad..646a9da 100644
--- a/index.php
+++ b/index.php
@@ -1,11 +1,13 @@
 <?php
 /**
- * $Horde: vacation/index.php,v 1.18.2.2 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/index.php,v 1.18.2.4 2009/01/06 15:28:05 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+ *
+ * @author Eric Rostetter <eric.rostetter at physics.utexas.edu>
  */
 
 @define('VACATION_BASE', dirname(__FILE__));
diff --git a/lib/AliasDriver.php b/lib/AliasDriver.php
index a919ba9..7a985e2 100644
--- a/lib/AliasDriver.php
+++ b/lib/AliasDriver.php
@@ -3,19 +3,26 @@
  * Vacation_AliasDriver:: defines an API for implementing vacation backends
  * for the vacation module.
  *
- * $Horde: vacation/lib/AliasDriver.php,v 1.8.2.2 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/lib/AliasDriver.php,v 1.8.2.4 2009/01/06 15:28:06 jan Exp $
  *
- * Copyright 2004-2007 Cronosys, LLC <http://www.cronosys.com/>
+ * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
- * @author  Jason M. Felice <jfelice at cronosys.com>
+ * @author  Jason M. Felice <jason.m.felice at gmail.com>
  * @package Vacation
  */
 class Vacation_AliasDriver {
 
     /**
+     * The current user name.
+     *
+     * @var string
+     */
+    var $_user;
+
+    /**
      * Hash containing configuration data.
      *
      * @var array
@@ -25,10 +32,12 @@ class Vacation_AliasDriver {
     /**
      * Constructor
      *
+     * @param string $user   A user name.
      * @param array $params  Configuration parameters for the backend.
      */
-    function Vacation_AliasDriver($params = array())
+    function Vacation_AliasDriver($user, $params = array())
     {
+        $this->_user = $user;
         $this->_params = $params;
     }
 
@@ -49,10 +58,9 @@ class Vacation_AliasDriver {
      * Here we find all aliases which have only the specified user on the
      * right-hand-side (if there are more, it is assumed to be a list).
      *
-     * @param string $name      The name of the user.
-     * @return mixed An array of the aliases, or PEAR_Error on failure.
+     * @return mixed  An array of the aliases, or PEAR_Error on failure.
      */
-    function getAliasesForUser($name)
+    function getAliasesForUser()
     {
         $aliases = $this->getAliases();
         if (is_a($aliases, 'PEAR_Error')) {
@@ -61,7 +69,7 @@ class Vacation_AliasDriver {
 
         $result = array();
         foreach ($aliases as $src => $targets) {
-            if (count($targets) == 1 && $targets[0] == $name) {
+            if (count($targets) == 1 && $targets[0] == $this->_user) {
                 $result[] = $src;
             }
         }
@@ -70,8 +78,9 @@ class Vacation_AliasDriver {
     }
 
     /**
-     * Create a concrete Vacation_AliasDriver:: instance
+     * Creates a concrete Vacation_AliasDriver:: instance.
      *
+     * @param string $user    A user name.
      * @param string $driver  The type of concrete Vacation_AliasDriver
      *                        subclass to return.
      * @param array $params   A hash containing any additional configuration or
@@ -80,7 +89,7 @@ class Vacation_AliasDriver {
      * @return mixed  The newly created concrete Vacation_AliasDriver instance,
      *                or false on error.
      */
-    function &factory($driver = null, $params = null)
+    function factory($user, $driver = null, $params = null)
     {
         if (is_null($driver)) {
             $driver = $GLOBALS['conf']['aliases']['driver'];
@@ -95,7 +104,7 @@ class Vacation_AliasDriver {
         require_once dirname(__FILE__) . '/AliasDriver/' . $driver . '.php';
         $class = 'Vacation_AliasDriver_' . $driver;
         if (class_exists($class)) {
-            $alias = &new $class($params);
+            $alias = new $class($user, $params);
         } else {
             $alias = false;
         }
@@ -103,46 +112,4 @@ class Vacation_AliasDriver {
         return $alias;
     }
 
-    /**
-     * Get a concrete Vacation_AliasDriver instance.
-     *
-     * This method will only create a new instance if no Vacation_AliasDriver::
-     * instance with the same parameters currently exists.
-     *
-     * This should be used if multiple storage sources are required.
-     *
-     * This method must be invoked as: $var = &Vacation_Driver::singleton()
-     *
-     * @param string $driver  The type of concrete Vacation_AliasDriver
-     *                        subclass to return.
-     * @param array $params   A hash containing any additional configuration or
-     *                        connection parameters a subclass might need.
-     *
-     * @return mixed  The created concrete Vacation_AliasDriver instance, or
-     *                false on error.
-     */
-    function &singleton($driver = null, $params = null)
-    {
-        static $instances;
-
-        if (is_null($driver)) {
-            $driver = $GLOBALS['conf']['aliases']['driver'];
-        }
-
-        if (is_null($params)) {
-            $params = Horde::getDriverConfig('aliases', $driver);
-        }
-
-        if (!isset($instances)) {
-            $instances = array();
-        }
-
-        $signature = serialize(array($driver, $params));
-        if (!isset($instances[$signature])) {
-            $instances[$signature] = &Vacation_AliasDriver::factory($driver, $params);
-        }
-
-        return $instances[$signature];
-    }
-
 }
diff --git a/lib/AliasDriver/ftp.php b/lib/AliasDriver/ftp.php
index acb0281..9a17416 100644
--- a/lib/AliasDriver/ftp.php
+++ b/lib/AliasDriver/ftp.php
@@ -1,16 +1,16 @@
 <?php
 /**
- * Vacation_Driver:: defines an API for implementing vacation backends for the
+ * Vacation_AliasDriver:: defines an API for implementing vacation backends for the
  * vacation module.
  *
- * $Horde: vacation/lib/AliasDriver/ftp.php,v 1.5.2.1 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/lib/AliasDriver/ftp.php,v 1.5.2.4 2009/01/29 15:48:04 chuck Exp $
  *
- * Copyright 2004-2007 Cronosys, LLC <http://www.cronosys.com/>
+ * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (ASL). If you
  * did not receive this file, see http://www.horde.org/licenses/asl.php.
  *
- * @author  Jason M. Felice <jfelice at cronosys.com>
+ * @author  Jason M. Felice <jason.m.felice at gmail.com>
  * @package Vacation
  */
 class Vacation_AliasDriver_ftp extends Vacation_AliasDriver {
@@ -20,8 +20,9 @@ class Vacation_AliasDriver_ftp extends Vacation_AliasDriver {
         require_once 'VFS.php';
 
         $params = array('hostspec' => $this->_params['host'],
-                        'port' => $this->_params['port'],
-                        'pasv' => $this->_params['pasv'],
+                        'port'     => $this->_params['port'],
+                        'pasv'     => $this->_params['pasv'],
+                        'ssl'      => $this->_params['ssl'],
                         'username' => $this->_params['username'],
                         'password' => $this->_params['password']);
         $vfs = &VFS::singleton('ftp', $params);
@@ -51,7 +52,7 @@ class Vacation_AliasDriver_ftp extends Vacation_AliasDriver {
         for ($i = 0; $i < count($matches); $i++) {
             $key = $matches[$i][1];
             if (preg_match('/^(.*)@(.*)$/', $key, $kmatches)) {
-                if (!in_array(strtolower($kmatches[2]),
+                if (!in_array(String::lower($kmatches[2]),
                               $this->_params['mydomains'])) {
                     continue;
                 }
@@ -60,7 +61,7 @@ class Vacation_AliasDriver_ftp extends Vacation_AliasDriver {
             $values = preg_split('|\s*,\s*|', $matches[$i][2]);
             foreach ($values as $value) {
                 if (preg_match('/^(.*)@(.*)$/', $value, $vmatches)) {
-                    if (!in_array(strtolower($vmatches[2]),
+                    if (!in_array(String::lower($vmatches[2]),
                                   $this->_params['mydomains'])) {
                         continue;
                     }
diff --git a/lib/AliasDriver/none.php b/lib/AliasDriver/none.php
index 8fc9e11..8f9dfd2 100644
--- a/lib/AliasDriver/none.php
+++ b/lib/AliasDriver/none.php
@@ -1,16 +1,16 @@
 <?php
 /**
- * Vacation_Driver:: defines an API for implementing vacation backends
+ * Vacation_AliasDriver:: defines an API for implementing vacation backends
  * for the vacation module.
  *
- * $Horde: vacation/lib/AliasDriver/none.php,v 1.4.2.1 2007/01/02 13:55:22 jan Exp $
+ * $Horde: vacation/lib/AliasDriver/none.php,v 1.4.2.4 2009/01/29 15:48:04 chuck Exp $
  *
- * Copyright 2004-2007 Cronosys, LLC <http://www.cronosys.com/>
+ * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (ASL). If you
  * did not receive this file, see http://www.horde.org/licenses/asl.php.
  *
- * @author  Jason M. Felice <jfelice at cronosys.com>
+ * @author  Jason M. Felice <jason.m.felice at gmail.com>
  * @package Vacation
  */
 class Vacation_AliasDriver_none extends Vacation_AliasDriver {
diff --git a/lib/Block/summary.php b/lib/Block/summary.php
index aff20c5..8499579 100644
--- a/lib/Block/summary.php
+++ b/lib/Block/summary.php
@@ -3,7 +3,7 @@
 $block_name = _("Vacation Summary");
 
 /**
- * $Horde: vacation/lib/Block/summary.php,v 1.7 2005/09/09 04:33:25 chuck Exp $
+ * $Horde: vacation/lib/Block/summary.php,v 1.7.2.2 2009/01/29 11:57:31 jan Exp $
  *
  * @package Horde_Block
  */
@@ -13,31 +13,24 @@ class Horde_Block_Vacation_summary extends Horde_Block {
 
     function _title()
     {
-        global $registry;
-        return Horde::link(Horde::applicationUrl($registry->getInitialPage(), true)) . $registry->get('name') . '</a>';
+        return Horde::link(Horde::applicationUrl($registry->getInitialPage(), true))
+            . $registry->get('name') . '</a>';
     }
 
     function _content()
     {
-        global $registry;
         require_once dirname(__FILE__) . '/../base.php';
         require_once VACATION_BASE . '/lib/Driver.php';
 
-        // Get the current login credentials.
-        $split = explode('@', Auth::getAuth());
-        $user = @$split[0];
-        $realm = @$split[1];
-        $pass = Auth::getCredential('password');
-
         // Create the driver.
-        $driver = &Vacation_Driver::factory();
+        $driver = Vacation_Driver::factory(Auth::getAuth());
 
         // Find out if vacation is active.
-        if (!isset($driver)) {
+        if (!$driver) {
             return '<p><em>' . _("Failed to create a vacation driver") . '</em></p>';
         }
 
-        return '<p><strong>' . (!$driver->isEnabled($user, $realm, $pass) ?
+        return '<p><strong>' . (!$driver->isEnabled(Auth::getCredential('password')) ?
                                 _("Vacation is not active.") :
                                 _("Vacation is active.")) . '</strong></p>';
     }
diff --git a/lib/Driver.php b/lib/Driver.php
index df4e81f..c35fde3 100755
--- a/lib/Driver.php
+++ b/lib/Driver.php
@@ -3,20 +3,35 @@
  * Vacation_Driver:: defines an API for implementing vacation backends for the
  * vacation module.
  *
- * $Horde: vacation/lib/Driver.php,v 1.35.2.2 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/lib/Driver.php,v 1.35.2.6 2009/01/29 16:00:38 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter and Mike Cochrane
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
  * @author  Mike Cochrane <mike at graftonhall.co.nz>
  * @author  Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * @author  Jan Schneider <jan at horde.org>
  * @package Vacation
  */
 class Vacation_Driver {
 
     /**
+     * The current user name.
+     *
+     * @var string
+     */
+    var $_user;
+
+    /**
+     * The user's realm.
+     *
+     * @var string
+     */
+    var $_realm;
+
+    /**
      * Hash containing configuration data.
      *
      * @var array
@@ -24,82 +39,118 @@ class Vacation_Driver {
     var $_params;
 
     /**
-     * Error string returned to user if an eror occurs.
+     * The current vacation message.
      *
      * @var string
      */
-    var $err_str;
+    var $_message;
+
+    /**
+     * The current vacation subject.
+     *
+     * @var string
+     */
+    var $_subject;
+
+    /**
+     * The current vacation From: address.
+     *
+     * @var string
+     */
+    var $_from;
 
     /**
      * Constructor.
      *
+     * @param string $user   A user name.
      * @param array $params  Configuration parameters for the backend.
      */
-    function Vacation_Driver($params = array())
+    function Vacation_Driver($user, $params = array())
     {
         $this->_params = $params;
+
+        // Get the realm.
+        @list(, $realm) = explode('@', $user, 2);
+        if (empty($realm) || !isset($params[$realm])) {
+            $realm = 'default';
+        }
+        $this->_realm = $realm;
+
+        // Check if hordeauth is set to 'full'
+        $hordeauth = $this->getParam('hordeauth');
+        if ($hordeauth !== 'full') {
+            @list($user,) = explode('@', $user, 2);
+        }
+        $this->_user = $user;
     }
 
     /**
      * Return a parameter value.
      *
      * @param string $param  The parameter to check in.
-     * @param string $realm  The realm to retrieve the parameter from.
      *
      * @return mixed  The parameter value, or null if not found.
      */
-    function getParam($param, $realm = 'default')
+    function getParam($param)
     {
-        return isset($this->_params[$realm][$param]) ? $this->_params[$realm][$param] : null;
+        return isset($this->_params[$this->_realm][$param])
+            ? $this->_params[$this->_realm][$param]
+            : null;
     }
 
     /**
-     * Setup vacation notices for a user.
+     * Returns the current user.
      *
-     * @param string $user     The username to enable vacation notices for.
-     * @param string $realm    The realm of the user.
-     * @param string $pass     The password for the user.
-     * @param string $message  The text of the vacation notice.
-     * @param string $alias    Alias email address -- Not yet implemented in
-     *                         backends.
+     * @return string  The current user name.
+     */
+    function getUser()
+    {
+        return $this->_user;
+    }
+
+    /**
+     * Sets up vacation notices for a user.
+     *
+     * @abstract
      *
-     * @return boolean  Returns true on success, false on error.
+     * @param string $password  The password for the user.
+     * @param string $message   The text of the vacation notice.
+     * @param string $subject   The subject of the vacation notice.
+     * @param string $from      The From: address of the vacation notice.
+     * @param string $alias     The alias email address.
      */
-    function setVacation($user, $realm = 'default', $pass = '',
-                         $message, $alias = '')
+    function setVacation($password, $message, $subject, $from, $alias = '')
     {
-        return false;
+        return PEAR::raiseError('Abstract method setVacation() not implemented');
     }
 
     /**
      * Disables vacation notices for a user.
      *
-     * @param string $user   The user to disable vacation notices for.
-     * @param string $realm  The realm of the user.
-     * @param string $pass   The password of the user.
+     * @abstract
      *
-     * @return boolean  Returns true on success, false on error.
+     * @param string $password  The password of the user.
      */
-    function unsetVacation($user, $realm = 'default', $pass = '')
+    function unsetVacation($password)
     {
-        return false;
+        return PEAR::raiseError('Abstract method unsetVacation() not implemented');
     }
 
     /**
      * Retrieves status of vacation for a user.
      *
-     * @param string $user   The username of the user to check.
-     * @param string $realm  The realm of the user to check.
+     * @param string $password  The password for the user.
      *
-     * @return boolean  Returns true if vacation is enabled for the user
-     *                  or false if vacation is currently disabled.
+     * @return mixed  Returns 'Y' if vacation is enabled for the user, 'N' if
+     *                vacation is currently disabled, false if the status
+     *                cannot be determined, and PEAR_Error on error.
      */
-    function isEnabled($user, $realm, $password)
+    function isEnabled($password)
     {
         // Get current details.
-        $current_details = $this->_getUserDetails($user, $realm, $password);
-        if ($current_details === false) {
-            return false;
+        $current_details = $this->_getUserDetails($password);
+        if (is_a($current_details, 'PEAR_Error')) {
+            return $current_details;
         }
 
         // Check vacation flag.
@@ -117,171 +168,280 @@ class Vacation_Driver {
     /**
      * Retrieves current vacation message.
      *
-     * @param string $user   The username of the user.
-     * @param string $realm  The realm of the user.
+     * @param string $password  The password for user.
      *
      * @return string  The current vacation message, or false if none.
      */
-    function currentMessage($user, $realm, $password)
+    function currentMessage($password)
     {
-        $current_details = $this->_getUserDetails($user, $realm, $password);
-
-        // Check current vacation message.
-        return $current_details['message'];
+        if (!isset($this->_message)) {
+            $this->_processMessage($password);
+        }
+        return $this->_message;
     }
 
     /**
-     * Retrieve the current vacation details for the user.
+     * Retrieves current vacation subject.
      *
-     * @param string $user      The username for which to retrieve details.
-     * @param string $realm     The realm (domain) for the user.
      * @param string $password  The password for user.
      *
-     * @return  mixed        Vacation details or false.
+     * @return string  The current vacation subject, or false if none.
      */
-    function _getUserDetails($user, $realm, $password)
+    function currentSubject($password)
     {
-        return false;
+        if (!isset($this->_subject)) {
+            $this->_processMessage($password);
+        }
+        return $this->_subject;
     }
 
     /**
-     * Format a password using the current encryption.
+     * Retrieves current vacation From: address.
      *
-     * @param string $plaintext  The plaintext password to encrypt.
+     * @param string $password  The password for user.
      *
-     * @return string  The crypted password.
+     * @return string  The current vacation From: address, or false if none.
      */
-    function encryptPassword($plaintext)
+    function currentFrom($password)
     {
-        return Auth::getCryptedPassword($plaintext,
-                                        '',
-                                        $this->_params['encryption'],
-                                        $this->_params['show_encryption']);
+        if (!isset($this->_from)) {
+            $this->_processMessage($password);
+        }
+        return $this->_from;
     }
 
     /**
-     * Parse an email address list and return it in a known standard form.
-     * This will attempt to add the domain (realm) to unqualified addresses
-     * if the realm is non-blank and not 'default'.
+     * Builds a vacation message.
      *
-     * @param string $user   The email address.
-     * @param string $realm  The domain/realm to add if none is present.
+     * @param string $message  The text of the vacation notice.
+     * @param string $subject  The subject of the vacation notice.
+     * @param string $from     The From: address of the vacation notice.
      *
-     * @return string  The email address(es) on success, false on error.
+     * @return string  The complete vacation message including all headers.
      */
-    function _makeEmailAddress($user, $realm)
+    function _buildMessage($message, $subject, $from)
     {
-        $domain = ($realm != 'default') ? $realm : '';
-        $email = '';
-
-        if ($this->getParam('norealm', $realm)) {
-            $domain = '';
+        $vacationtxt = '';
+        // Include the mail subject if the driver supports it.
+        if ($GLOBALS['conf']['vacation']['subject']) {
+            $vacationtxt .= 'Subject: '
+                . MIME::encode($subject, NLS::getCharset()) . "\n";
+        }
+        // Include the mail sender if the driver supports it.
+        if ($GLOBALS['conf']['vacation']['from']) {
+            $vacationtxt .= 'From: '
+                . MIME::encode($from, NLS::getCharset()) . "\n";
         }
 
-        require_once 'Mail/RFC822.php';
-        $parser = &new Mail_RFC822();
-        $parsed_email = $parser->parseAddressList($user, $domain, false, false);
-        if (is_array($parsed_email) && count($parsed_email) > 0) {
-            for ($i = 0; $i < count($parsed_email); $i++) {
-               $email .= !empty($email) ? ',' : '';
-               if (is_object($parsed_email[$i])) {
-                 $email .= $parsed_email[$i]->mailbox;
-                 $email .= !empty($parsed_email[$i]->host)
-                        ? '@' . $parsed_email[$i]->host
-                        : '';
-              } else {
-                 $email .= $parsed_email[$i];
-              }
-            }
+        if (MIME::is8bit($message)) {
+            $vacationtxt .= "Content-Transfer-Encoding: quoted-printable\n"
+                . 'Content-Type: text/plain; charset=' . NLS::getCharset()
+                . "\n" . MIME::quotedPrintableEncode($message, "\n");
         } else {
-            $this->err_str = _("Can't parse your email address");
-            $email = false;
+            $vacationtxt .= $message;
         }
 
-        return $email;
+        return $vacationtxt;
     }
 
     /**
-     * Attempts to return a concrete Vacation_Driver instance based on $driver.
+     * Processes the current vacation message.
      *
-     * @param string    $driver    The type of concrete Vacation_Driver subclass
-     *                             to return.  The is based on the vacation
-     *                             driver ($driver).  The code is dynamically
-     *                             included.
+     * @param string $password  The password for user.
+     */
+    function _processMessage($password)
+    {
+        $current_details = $this->_getUserDetails($password);
+        if (is_a($current_details, 'PEAR_Error') ||
+            $current_details === false) {
+            return $current_details;
+        }
+
+        $this->_message = isset($current_details['message'])
+            ? $current_details['message']
+            : $GLOBALS['conf']['vacation']['default_message'];
+        $this->_subject = isset($current_details['subject'])
+            ? $current_details['subject']
+            : $GLOBALS['conf']['vacation']['default_subject'];
+        $this->_from    = isset($current_details['from'])
+            ? $current_details['from']
+            : $this->getFrom();
+    }
+
+    /**
+     * Parses a vacation message.
      *
-     * @param array     $params    A hash containing any additional
-     *                             configuration or connection parameters a
-     *                             subclass might need.
+     * @param string $message   A vacation message.
      *
-     * @return mixed    The newly created concrete Vacation_Driver instance, or
-     *                  false on an error.
+     * @return array  A hash with parsed results in the field 'message',
+     *                'subject' and 'from'.
      */
-    function &factory($driver = null, $params = null)
+    function _parseMessage($message)
     {
-        if (is_null($driver)) {
-            $driver = $GLOBALS['conf']['server']['driver'];
+        // Split the vacation text in a subject and a message if the driver
+        // supports it.
+        $subject = '';
+        if ($GLOBALS['conf']['vacation']['subject']) {
+            if (preg_match('/^Subject: ([^\n]*)\n(.+)$/s',
+                           $message, $matches)) {
+                $subject = MIME::decode($matches[1], NLS::getCharset());
+                $message = $matches[2];
+            }
         }
 
-        $driver = basename($driver);
-
-        if (is_null($params)) {
-            $params = Horde::getDriverConfig('server', $driver);
+        // Split the vacation text in a sender and a message if the driver
+        // supports it.
+        $from = '';
+        if ($GLOBALS['conf']['vacation']['from']) {
+            if (preg_match('/^From: ([^\n]*)\n(.+)$/s',
+                           $message, $matches)) {
+                $from = MIME::decode($matches[1], NLS::getCharset());
+                $message = $matches[2];
+            } else {
+                $from = $this->getFrom();
+            }
         }
 
-        require_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
-        $class = 'Vacation_Driver_' . $driver;
-        if (class_exists($class)) {
-            $vacation = &new $class($params);
-        } else {
-            $vacation = false;
+        // Detect Content-Type and Content-Transfer-Encoding headers.
+        if (preg_match('/^Content-Transfer-Encoding: ([^\n]+)\n(.+)$/s',
+                       $message, $matches)) {
+            $message = $matches[2];
+            if ($matches[1] == 'quoted-printable') {
+                $message = quoted_printable_decode($message);
+            }
+        }
+        if (preg_match('/^Content-Type: ([^\n]+)\n(.+)$/s',
+                       $message, $matches)) {
+            $message = $matches[2];
+            if (preg_match('/^text\/plain; charset=(.*)$/',
+                           $matches[1], $matches)) {
+                $message = String::convertCharset($message, $matches[1]);
+            }
         }
 
-        return $vacation;
+        return array('message' => $message,
+                     'subject' => $subject,
+                     'from' => $from);
+    }
+
+    /**
+     * Retrieves the current vacation details for the user.
+     *
+     * @abstract
+     *
+     * @param string $password  The password for user.
+     *
+     * @return array  Vacation details or PEAR_Error on failure.
+     */
+    function _getUserDetails($password)
+    {
+        return PEAR::raiseError('Abstract method _getUserDetails() not implemented');
+    }
+
+    /**
+     * Returns the default From: address of the current user.
+     *
+     * @return string  The default From: address.
+     */
+    function getFrom()
+    {
+        require_once 'Horde/Identity.php';
+        $identity = &Identity::singleton('none', $this->_user);
+        // Default "From:" from identities, with name (name <address>)
+        return $identity->getDefaultFromAddress(true);
     }
 
     /**
-     * Attempts to return a reference to a concrete Vacation_Driver instance
-     * based on $driver.  It will only create a new instance if no
-     * Vacation_Driver instance with the same parameters currently exists.
+     * Formats a password using the current encryption.
      *
-     * This should be used if multiple storage sources are required.
+     * @param string $plaintext  The plaintext password to encrypt.
+     * @param string $salt       The salt (or seed) to use.
      *
-     * This method must be invoked as: $var = &Vacation_Driver::singleton()
+     * @return string  The crypted password.
+     */
+    function _encryptPassword($plaintext, $salt = '')
+    {
+        return Auth::getCryptedPassword($plaintext,
+                                        $salt,
+                                        $this->_params['encryption'],
+                                        $this->_params['show_encryption']);
+    }
+
+    /**
+     * Parses an email address list and returns it in a known standard form.
      *
-     * @param string    $driver    The type of concrete Vacation_Driver subclass
-     *                             to return.  The is based on the vacation
-     *                             driver ($driver).  The code is dynamically
-     *                             included.
+     * This will attempt to add the domain (realm) to unqualified addresses if
+     * the realm is non-blank and not 'default'.
      *
-     * @param array     $params    A hash containing any additional
-     *                             configuration or connection parameters a
-     *                             subclass might need.
+     * @param string $user   The email address.
+     * @param string $realm  The domain/realm to add if none is present.
      *
-     * @return mixed    The created concrete Vacation_Driver instance, or false
-     *                  on error.
+     * @return string  The email address(es) on success, false on error.
      */
-    function &singleton($driver = null, $params = null)
+    function _makeEmailAddress($user)
     {
-        static $instances;
+        $domain = $this->_realm != 'default' ? $this->_realm : '';
+        if ($this->getParam('norealm')) {
+            $domain = '';
+        }
+        $email = '';
+
+        require_once 'Mail/RFC822.php';
+        $parser = new Mail_RFC822();
+        $parsed_email = $parser->parseAddressList($user, $domain, false, false);
+        if (!is_array($parsed_email) || !count($parsed_email)) {
+            return PEAR::raiseError(_("Cannot parse your email address"));
+        }
+
+        for ($i = 0; $i < count($parsed_email); $i++) {
+            if (!empty($email)) {
+                $email .= ',';
+            }
+            if (is_object($parsed_email[$i])) {
+                $email .= $parsed_email[$i]->mailbox;
+                if (!empty($parsed_email[$i]->host)) {
+                    $email .=  '@' . $parsed_email[$i]->host;
+                }
+            } else {
+                $email .= $parsed_email[$i];
+            }
+        }
 
+        return $email;
+    }
+
+    /**
+     * Attempts to return a concrete Vacation_Driver instance based on $driver.
+     *
+     * @param string $user    A user name.
+     * @param string $driver  The type of concrete Vacation_Driver subclass to
+     *                        return. The class name is based on the vacation
+     *                        driver ($driver). The code is dynamically
+     *                        included.
+     * @param array $params   A hash containing any additional configuration or
+     *                        connection parameters a subclass might need.
+     *
+     * @return mixed  The newly created concrete Vacation_Driver instance, or
+     *                false on an error.
+     */
+    function factory($user, $driver = null, $params = null)
+    {
         if (is_null($driver)) {
             $driver = $GLOBALS['conf']['server']['driver'];
         }
+        $driver = basename($driver);
 
         if (is_null($params)) {
             $params = Horde::getDriverConfig('server', $driver);
         }
 
-        if (!isset($instances)) {
-            $instances = array();
-        }
-
-        $signature = serialize(array($driver, $params));
-        if (!isset($instances[$signature])) {
-            $instances[$signature] = &Vacation_Driver::factory($driver, $params);
+        require_once dirname(__FILE__) . '/Driver/' . $driver . '.php';
+        $class = 'Vacation_Driver_' . $driver;
+        if (class_exists($class)) {
+            return new $class($user, $params);
         }
 
-        return $instances[$signature];
+        return false;
     }
 
 }
diff --git a/lib/Driver/customsql.php b/lib/Driver/customsql.php
new file mode 100644
index 0000000..60a5896
--- /dev/null
+++ b/lib/Driver/customsql.php
@@ -0,0 +1,311 @@
+<?php
+/**
+ * Vacation_Driver_sql implements the Vacation_Driver API for SQL servers.
+ *
+ * $Horde: vacation/lib/Driver/customsql.php,v 1.2.2.4 2009/01/29 16:02:55 jan Exp $
+ *
+ * Copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file LICENSE for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+ *
+ * @author  Jan Schneider <jan at horde.org>
+ * @since   Vacation 3.1
+ * @package Vacation
+ */
+class Vacation_Driver_customsql extends Vacation_Driver {
+
+    /**
+     * SQL connection object.
+     *
+     * @var DB
+     */
+    var $_db;
+
+    /**
+     * State of SQL connection.
+     *
+     * @var boolean
+     */
+    var $_connected = false;
+
+    /**
+     * Constructor.
+     *
+     * @param string $user   A user name.
+     * @param array $params  Configuration parameters for the backend.
+     */
+    function Vacation_Driver_customsql($user, $params = array())
+    {
+        $params = Horde::getDriverConfig('server', 'sql');
+        parent::Vacation_Driver($user, $params);
+    }
+
+    /**
+     * Sets up vacation notices for a user.
+     *
+     * @param string $password  The password for the user.
+     * @param string $message   The text of the vacation notice.
+     * @param string $subject   The subject of the vacation notice.
+     * @param string $from      The From: address of the vacation notice.
+     * @param string $alias     The alias email address.
+     */
+    function setVacation($password, $message, $subject, $from, $alias = '')
+    {
+        // Make sure the configuration file is correct
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
+        }
+
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
+
+        // Build username.
+        $myuser = $this->_buildUsername();
+
+        // Encrypt password.
+        $crypted_password = $this->_encryptPassword($password, $this->_getCurrentPassword($myuser));
+
+        // Build the SQL query.
+        $query = str_replace(
+            array('\U', '\M', '\S', '\F', '\A', '\P'),
+            array($this->_db->quote($myuser),
+                  $this->_db->quote($message),
+                  $this->_db->quote($subject),
+                  $this->_db->quote($from),
+                  $this->_db->quote($alias),
+                  $this->_db->quote($crypted_password)),
+            $this->_params[$this->_realm]['query_set']);
+
+        // Execute the query.
+        $result = $this->_db->query($query);
+        if (is_a($result, 'PEAR_Error')) {
+            Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return $result;
+        }
+        if ($this->_db->affectedRows() == 0) {
+            return PEAR::raiseError(_("The vacation notice cannot be set. Check the password."));
+        }
+        if ($result !== DB_OK) {
+            return PEAR::raiseError(_("An unknown error occured while enabling the vacation notice."));
+        }
+    }
+
+    /**
+     * Disables the vacation message for a user.
+     *
+     * @param string $password  The password of the user.
+     */
+    function unsetVacation($password)
+    {
+        // Make sure the configuration file is correct
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
+        }
+
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
+
+        // Build username.
+        $myuser = $this->_buildUsername();
+
+        // Encrypt password.
+        $crypted_password = $this->_encryptPassword($password, $this->_getCurrentPassword($myuser));
+
+        // Build the SQL query.
+        $query = str_replace(
+            array('\U', '\P'),
+            array($this->_db->quote($myuser),
+                  $this->_db->quote($crypted_password)),
+            $this->_params[$this->_realm]['query_unset']);
+
+        // Execute the query.
+        $result = $this->_db->query($query);
+        if (is_a($result, 'PEAR_Error')) {
+            Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return $result;
+        }
+        if ($this->_db->affectedRows() == 0) {
+            return PEAR::raiseError(_("The vacation notice cannot be set. Check the password."));
+        }
+        if ($result !== DB_OK) {
+            return PEAR::raiseError(_("An unknown error occured while enabling the vacation notice."));
+        }
+    }
+
+    /**
+     * Retrieves the current vacation details for the user.
+     *
+     * @param string $password  The password for user.
+     *
+     * @return array  Vacation details or PEAR_Error.
+     */
+    function _getUserDetails($password)
+    {
+        static $row;
+
+        // If we already have the details, return now.
+        if (isset($row)) {
+            return $row;
+        }
+
+        // Make sure the configuration file is correct
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
+        }
+
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
+
+        // Build username.
+        $myuser = $this->_buildUsername();
+
+        // Encrypt password.
+        $crypted_password = $this->_encryptPassword($password, $this->_getCurrentPassword($myuser));
+
+        // Build the SQL query.
+        $query = str_replace(array('\U', '\P'),
+                             array($this->_db->quote($myuser),
+                                   $this->_db->quote($crypted_password)),
+                             $this->_params[$this->_realm]['query_get']);
+
+        // Execute the query.
+        $result = $this->_db->query($query);
+
+        if (is_a($result, 'PEAR_Error')) {
+            Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return $result;
+        }
+
+        $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
+        if (is_a($row, 'PEAR_Error')) {
+            Horde::logMessage($row, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return $row;
+        }
+        if (is_array($row)) {
+            return $row;
+        }
+
+        return array('vacation' => false);
+    }
+
+    /**
+     * Retrieves the current password details for a user.
+     *
+     * @return string  Current password.
+     */
+    function _getCurrentPassword()
+    {
+        if (empty($this->_params[$this->_realm]['query_password'])) {
+            return '';
+        }
+            
+        // Build the SQL query.
+        $query = str_replace('\U',
+                             $this->_db->quote($this->_buildUsername()),
+                             $this->_params[$this->_realm]['query_password']);
+
+        // Execute the query.
+        $current_password = $this->_db->getOne($query);
+        if (is_a($current_password, 'PEAR_Error')) {
+            Horde::logMessage($current_password, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return '';
+        }
+
+        return $current_password;
+    }
+
+    /**
+     * Builds a username based on presence of realm.
+     *
+     * @return string  Fully qualified username.
+     */
+    function _buildUsername()
+    {
+        if ($this->_realm === 'default' ||
+            $this->_realm === '') {
+            return $this->_user;
+        } else {
+            return $this->_user . '@' . $this->_realm;
+        }
+    }
+
+    /**
+     * Checks if the realm has a specific configuration. If not, tries to fall
+     * back on the default configuration. If still not a valid configuration
+     * then exits with an error.
+     */
+    function _checkConfig()
+    {
+        // If no realm passed in, or no table config for the realm passed in,
+        // then we fall back to the default realm
+        if (empty($this->_params[$this->_realm]['query_set'])) {
+            $this->_realm = 'default';
+        }
+
+        if (empty($this->_params[$this->_realm]['query_get']) ||
+            empty($this->_params[$this->_realm]['query_set']) ||
+            empty($this->_params[$this->_realm]['query_unset'])) {
+            return PEAR::raiseError(_("The vacation application is not properly configured."));
+        }
+    }
+
+    /**
+     * Does an SQL connect and logs in as user with privilege to change
+     * vacation.
+     *
+     * @return boolean  True or PEAR_Error based on success of connect.
+     */
+    function _connect()
+    {
+        if ($this->_connected) {
+            return;
+        }
+
+        // Build the params array to pass to DB
+        $args = array_merge($this->_params, $this->_params[$this->_realm]);
+
+        Horde::assertDriverConfig($args, 'server', array('phptype'),
+                                  'Vacation SQL');
+
+        if (!isset($args['database'])) {
+            $args['database'] = '';
+        }
+        if (!isset($args['username'])) {
+            $args['username'] = '';
+        }
+        if (!isset($args['hostspec'])) {
+            $args['hostspec'] = '';
+        }
+
+        // Connect to the SQL server using the supplied parameters.
+        require_once 'DB.php';
+        $this->_db = &DB::connect($args,
+                                  array('persistent' => !empty($args['persistent'])));
+        if (is_a($this->_db, 'PEAR_Error')) {
+            return $this->_db;
+        }
+
+        // Set DB portability options.
+        switch ($this->_db->phptype) {
+            case 'mssql':
+                $this->_db->setOption(
+                    'portability',
+                    DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);
+                break;
+            default:
+                $this->_db->setOption(
+                    'portability',
+                    DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);
+        }
+
+        $this->_connected = true;
+    }
+
+}
diff --git a/lib/Driver/forwards.php b/lib/Driver/forwards.php
index 78bd313..9fc0cef 100644
--- a/lib/Driver/forwards.php
+++ b/lib/Driver/forwards.php
@@ -3,14 +3,15 @@
  * Vacation_Driver_forwards:: implements the Vacation_Driver API for ftp
  * driven dot-forward compliant mail servers.
  *
- * $Horde: vacation/lib/Driver/forwards.php,v 1.43.2.3 2007/01/02 13:55:22 jan Exp $
+ * $Horde: vacation/lib/Driver/forwards.php,v 1.43.2.6 2009/01/06 15:28:08 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
  * @author  Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * @author  Jan Schneider <jan at horde.org>
  * @package Vacation
  */
 class Vacation_Driver_forwards extends Vacation_Driver {
@@ -30,106 +31,93 @@ class Vacation_Driver_forwards extends Vacation_Driver {
     var $_details = null;
 
     /**
-     * Check if the realm has a specific configuration. If not, try to
-     * fall back on the default configuration. If still not a valid
-     * configuration then exit with an error.
+     * Sets up vacation notices for a user.
      *
-     * @param string $realm  The realm of the user, or "default" if none.
-     *                       Note: passed by reference so we can change its
-     *                       value.
-     */
-    function checkConfig(&$realm)
-    {
-        // If no realm passed in, or no host config for the realm
-        // passed in, then we fall back to the default realm
-        if (empty($realm) || empty($this->_params[$realm]['host'])) {
-            $realm = 'default';
-        }
-
-        // If still no host/port, then we have a misconfigured module.
-        if (empty($this->_params[$realm]['host']) ||
-            empty($this->_params[$realm]['port']) ) {
-            $this->err_str = _("The vacation application is not properly configured.");
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Set the vacation notice up.
-     *
-     * @param string $user      The username to enable vacation for.
-     * @param string $realm     The realm of the user.
      * @param string $password  The password for the user.
-     * @param string $message   The message to install.
-     * @param string $alias     The email alias to pass to vacation
-     *
-     * @return boolean  Returns true on success, false on error.
+     * @param string $message   The text of the vacation notice.
+     * @param string $subject   The subject of the vacation notice.
+     * @param string $from      The From: address of the vacation notice.
+     * @param string $alias     The alias email address.
      */
-    function setVacation($user, $realm, $password, $message, $alias)
+    function setVacation($password, $message, $subject, $from, $alias = '')
     {
         // Make sure the configuration file is correct
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
         // We need to find out what type of database file to use
-        $conf = &$GLOBALS['conf'];
-        $dbfile = VACATION_BASE . '/files/empty.' .
-                  $this->_params[$realm]['dbtype'] . '.bin';
+        $dbfile = VACATION_BASE . '/files/empty.'
+            . $this->getParam('dbtype') . '.bin';
 
-        // Build the params array to pass to VFS.
-        $_args = array('hostspec' => $this->_params[$realm]['host'],
-                       'port' => $this->_params[$realm]['port'],
-                       'pasv' => $this->_params[$realm]['pasv'],
-                       'username' => $user,
-                       'password' => $password);
-
-        // Create the VFS ftp driver.
-        require_once 'VFS.php';
-        $_vfs = &VFS::singleton('ftp', $_args);
+        // Connect to the server.
+        if (is_a($connected = $this->_connect($password), 'PEAR_Error')) {
+            return $connected;
+        }
 
-        // Try to login with the username/password, no realm.
-        $status = $_vfs->checkCredentials();
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            $this->err_str .= '  ' .  _("Check your username and password.");
-            return false;
+        // Run any pre-checks.
+        $result = $this->_setVacationPreCheck();
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
         }
 
+        // Build the message.
+        $full_message = $this->_buildMessage($message, $subject, $from);
+
         // Set up the vacation specific files first.
-        $status = $_vfs->writeData('', '.vacation.msg', $message);
+        $status = $this->_vfs->writeData('', '.vacation.msg', $full_message);
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+            return $status;
         }
-        $status = $_vfs->write('', '.vacation.pag', $dbfile);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
-        }
-        $status = $_vfs->write('', '.vacation.dir', $dbfile);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+        foreach (array('.vacation.pag' => $dbfile,
+                       '.vacation.dir' => $dbfile,
+                       '.vacation.db'  => $dbfile) as $file => $content) {
+            $status = $this->_vfs->write('', $file, $content);
+            if (is_a($status, 'PEAR_Error')) {
+                return $status;
+            }
         }
-        $status = $_vfs->write('', '.vacation.db', $dbfile);
+
+        // Create the vacation file.
+        $status = $this->_createVacationFile($alias);
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+            return $status;
         }
 
+        // Update the current details.
+        $this->_details = array('vacation' => 'Y',
+                                'message' => $message,
+                                'subject' => $subject,
+                                'from' => $from);
+    }
+
+    /**
+     * Runs any code required before creating the vacation file.
+     *
+     * @see Vacation_Driver_qmail::
+     */
+    function _setVacationPreCheck()
+    {
+    }
+
+    /**
+     * Creates the main vacation file.
+     *
+     * @param string $alias  The alias email address.
+     */
+    function _createVacationFile($alias)
+    {
         // Parse the email address and alias address passed in.
-        $my_email = $this->_makeEmailAddress($user, $realm);
-        if ($my_email === false) {
-            return false;
+        $my_email = $this->_makeEmailAddress($this->_user);
+        if (is_a($my_email, 'PEAR_Error')) {
+            return $my_email;
         }
         if (!empty($alias)) {
             $alias_list = preg_split('/[,\s]+/', $alias);
             foreach ($alias_list as $i => $elt) {
-                $addr = $this->_makeEmailAddress($elt, $realm);
-                if ($addr === false) {
-                    return false;
+                $addr = $this->_makeEmailAddress($elt);
+                if (is_a($addr, 'PEAR_Error')) {
+                    return $addr_email;
                 }
                 $alias_list[$i] = '-a ' . escapeshellarg($addr);
             }
@@ -140,172 +128,208 @@ class Vacation_Driver_forwards extends Vacation_Driver {
 
         // Now set up the .forward file
         if (!empty($alias) && ($alias != $my_email)) {
-           $contents = "\\$my_email, \"|" . $conf['vacation']['path'] .
-                       " $alias $my_email\"";
+           $contents = "\\$my_email, \"|"
+               . $GLOBALS['conf']['vacation']['path']
+               . " $alias $my_email\"";
         } else {
-           $contents = "\\$my_email, \"|" . $conf['vacation']['path'] .
-                       " $my_email\"";
+           $contents = "\\$my_email, \"|"
+               . $GLOBALS['conf']['vacation']['path']
+               . " $my_email\"";
         }
-        $status = $_vfs->writeData('', '.forward', $contents);
+        $status = $this->_vfs->writeData('', '.forward', $contents);
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+            return $status;
         }
 
         // Try to change the permissions, but ignore any errors.
-        $_vfs->changePermissions('', '.forward', '0600');
-
-        // Update the current details.
-        $this->_details = array('vacation' => 'y',
-                                'message' => $message);
-        return true;
+        $this->_vfs->changePermissions('', '.forward', '0600');
     }
 
     /**
-     * Remove any existing vacation notices.
+     * Removes any existing vacation notices.
      *
-     * @param string $user      The user to disable vacation notices for.
-     * @param string $realm     The realm of the user.
      * @param string $password  The password of the user.
-     *
-     * @return boolean  Returns true on success, false on error.
      */
-    function unsetVacation($user, $realm, $password)
+    function unsetVacation($password)
     {
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        $_args = array('hostspec' => $this->_params[$realm]['host'],
-                       'port' => $this->_params[$realm]['port'],
-                       'pasv' => $this->_params[$realm]['pasv'],
-                       'username' => $user,
-                       'password' => $password);
-
-        require_once 'VFS.php';
-        $_vfs = &VFS::singleton('ftp', $_args);
-
-        // Try to login with the username/password, no realm.
-        $status = $_vfs->checkCredentials();
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            $this->err_str .= '  ' .  _("Check your username and password.");
-            return false;
+        // Connect to the server.
+        if (is_a($connected = $this->_connect($password),
+                 'PEAR_Error')) {
+            return $connected;
         }
 
-        $status = $_vfs->deleteFile('', '.forward');
+        $status = $this->_deleteVacationFile();
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            $this->err_str .= '  ' . _("Maybe you didn't have a vacation notice installed?");
-            return false;
+            return $status;
         }
-        $status = $_vfs->deleteFile('', '.vacation.msg');
+        $status = $this->_vfs->deleteFile('', '.vacation.msg');
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+            return $status;
         }
 
         // We could, but don't, check for errors on these. They are
         // more-or-less harmless without the above two files.
-        $_vfs->deleteFile('', '.vacation.pag');
-        $_vfs->deleteFile('', '.vacation.dir');
-        $_vfs->deleteFile('', '.vacation.db');
+        $this->_vfs->deleteFile('', '.vacation.pag');
+        $this->_vfs->deleteFile('', '.vacation.dir');
+        $this->_vfs->deleteFile('', '.vacation.db');
 
         // Update the current details.
         $this->_details = null;
-        return true;
     }
 
     /**
-     * Retrieve the current vacation details for the user.
+     * Deletes the main vacation file.
+     */
+    function _deleteVacationFile()
+    {
+        $status = $this->_vfs->deleteFile('', '.forward');
+        if (is_a($status, 'PEAR_Error')) {
+            $status->message .= '  '
+                . _("Maybe you didn't have a vacation notice installed?");
+        }
+        return $status;
+    }
+
+    /**
+     * Retrieves the current vacation details for the user.
      *
-     * @param string $user      The username for which to retrieve details.
-     * @param string $realm     The realm (domain) for the user.
      * @param string $password  The password for user.
      *
-     * @return mixed  Vacation details or false.
+     * @return array  Vacation details or PEAR_Error on failure.
      */
-    function _getUserDetails($user, $realm, $password)
+    function _getUserDetails($password)
     {
-        if (is_null($this->_details)) {
-            if (!$this->checkConfig($realm)) {
-                return false;
-            }
+        if (!is_null($this->_details)) {
+            return $this->_details;
+        }
 
-            $_args = array('hostspec' => $this->_params[$realm]['host'],
-                           'port' => $this->_params[$realm]['port'],
-                           'pasv' => $this->_params[$realm]['pasv'],
-                           'username' => $user,
-                           'password' => $password);
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
+        }
 
-            require_once 'VFS.php';
-            $_vfs = &VFS::singleton('ftp', $_args);
+        // Connect to the server.
+        if (is_a($connected = $this->_connect($password),
+                 'PEAR_Error')) {
+            return $connected;
+        }
 
-            // Try to login with the username/password, no realm.
-            $status = $_vfs->checkCredentials();
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                $this->err_str .= '  ' .  _("Check your username and password.");
-                return false;
+        if ($this->_vfs->exists('', '.vacation.msg')) {
+            $message = $this->_vfs->read('', '.vacation.msg');
+            if (is_a($message, 'PEAR_Error')) {
+                return $message;
             }
+            $this->_details = $this->_parseMessage($message);
+        }
 
-            $file['forward'] = $_vfs->read('', '.forward');
-            $file['message'] = $_vfs->read('', '.vacation.msg');
-            foreach ($file as $f) {
-                if (is_a($f, 'PEAR_Error')) {
-                    $this->err_str = $f->getMessage();
-                    return false;
-                }
+        if ($this->_vfs->exists('', '.forward')) {
+            $forward = $this->_vfs->read('', '.forward');
+            if (is_a($forward, 'PEAR_Error')) {
+                return $forward;
             }
-
-            $this->_details['message'] = $file['message'];
-            $details = $this->_parseForward($user, $file['forward']);
+            $details = $this->_parseForward($forward);
             if ($details['vacation']['set']) {
                 // Driver.php wants output in y/n format:
-                $this->_details['vacation'] = 'y';
+                $this->_details['vacation'] = 'Y';
                 $this->_details['alias'] = $details['vacation']['alias'];
             } else {
-                $this->_details['vacation'] = 'n';
+                $this->_details['vacation'] = 'N';
             }
+        } else {
+            $this->_details['vacation'] = false;
         }
 
         return $this->_details;
     }
 
     /**
+     * Checks if the realm has a specific configuration. If not, tries to fall
+     * back on the default configuration. If still not a valid configuration
+     * then returns an error.
+     */
+    function _checkConfig()
+    {
+        // If no host config for the realm, then we fall back to the default
+        // realm.
+        if (empty($this->_params[$this->_realm]['host'])) {
+            $this->_realm = 'default';
+        }
+
+        // If still no host/port, then we have a misconfigured module.
+        if (empty($this->_params[$this->_realm]['host']) ||
+            empty($this->_params[$this->_realm]['port']) ) {
+            return PEAR::raiseError(_("The vacation application is not properly configured."));
+        }
+    }
+
+    /**
      * Parses a string from the .forward file.
      *
-     * @param string $user  The username for which to retrieve details.
      * @param string $str   The string from the .forward file.
      *
      * @return mixed  The contents of the file in an array
      */
-    function _parseForward($user, $str)
+    function _parseForward($str)
     {
         require_once 'Horde/MIME.php';
         $adrlist = MIME::rfc822Explode($str, ',');
         foreach ($adrlist as $adr) {
             $adr = trim($adr);
-            if ($adr == "\\$user") {
-                // This matches the way the forwards module writes
-                // $user.
+            if ($adr == '\\' . $this->_user) {
+                // This matches the way the forwards module writes the user
+                // name.
                 $content['forward']['metoo'] = true;
             } elseif (preg_match('/\|.*vacation\s*(-a\s+(.*))?\s+(.+)/',
                                  $adr, $matches)) {
-                // This matches the way the vacation module writes
-                // vacation command.
+                // This matches the way the vacation module writes vacation
+                // command.
                 $content['vacation']['alias'] = $matches[2];
-            } elseif ($adr != "") {
+            } elseif (!empty($adr)) {
                 // This matches everything else.
                 $buffer[] = $adr;
             }
         }
-        if ($content['forward']['set'] = (isset($buffer)&&is_array($buffer))) {
+        if ($content['forward']['set'] = isset($buffer) && is_array($buffer)) {
             $content['forward']['receivers'] = implode(', ', $buffer);
         }
-        $content['vacation']['set'] = (isset($content['vacation']) && is_array($content['vacation']));
+        $content['vacation']['set'] = isset($content['vacation']) &&
+            is_array($content['vacation']);
 
         return $content;
     }
 
+    /**
+     * Connects to the FTP server.
+     *
+     * @param string $password  The password to connect with.
+     */
+    function _connect($password)
+    {
+        if ($this->_vfs) {
+            return;
+        }
+
+        // Build the FTP array to pass to VFS.
+        $args = array('hostspec' => $this->_params[$this->_realm]['host'],
+                      'port' => $this->_params[$this->_realm]['port'],
+                      'pasv' => $this->_params[$this->_realm]['pasv'],
+                      'ssl' => $this->_params[$this->_realm]['ssl'],
+                      'username' => $this->_user,
+                      'password' => $password);
+
+        // Create the VFS ftp driver.
+        require_once 'VFS.php';
+        $vfs = &VFS::singleton('ftp', $args);
+        if (is_a($vfs, 'PEAR_Error')) {
+            return $vfs;
+        }
+        $this->_vfs = &$vfs;
+
+        // Try to login with the username/password, no realm.
+        return $this->_vfs->checkCredentials();
+    }
+
 }
diff --git a/lib/Driver/ldap.php b/lib/Driver/ldap.php
index 834e02f..7f1fe87 100644
--- a/lib/Driver/ldap.php
+++ b/lib/Driver/ldap.php
@@ -5,27 +5,27 @@
  *
  * Parameters:
  * (required)
- *   host       - hostname of the LDAP server
- *   port       - port number of the LDAP service
- *   basedn     - base DN of the user directory
- *   uid        - attribute to use for uid
- *   vacation   - attribute to use for storing the vacation message
- *   active     - attribute which determines if the vacation message is active
+ * - host     - hostname of the LDAP server
+ * - port     - port number of the LDAP service
+ * - basedn   - base DN of the user directory
+ * - uid      - attribute to use for uid
+ * - vacation - attribute to use for storing the vacation message
+ * - active   - attribute which determines if the vacation message is active
  * (optional)
- *   userdn     - another way of specifying the user DN (instead of
- *                constructing it from uid+basedn).
- *   version    - Protocol version for the LDAP server (PHP defaults
- *                to version 2. OpenLDAP >= 2.1.4 uses version 3, and
- *                so must be set explicitly).
+ * - userdn  - another way of specifying the user DN (instead of constructing
+ *             it from uid+basedn).
+ * - version - Protocol version for the LDAP server (PHP defaults to version 2.
+ *             OpenLDAP >= 2.1.4 uses version 3, and so must be set explicitly).
  *
- * $Horde: vacation/lib/Driver/ldap.php,v 1.17.2.10 2007/01/02 13:55:22 jan Exp $
+ * $Horde: vacation/lib/Driver/ldap.php,v 1.17.2.14 2009/01/06 15:28:08 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
  * @author  Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * @author  Jan Schneider <jan at horde.org>
  * @package Vacation
  */
 class Vacation_Driver_ldap extends Vacation_Driver {
@@ -36,264 +36,170 @@ class Vacation_Driver_ldap extends Vacation_Driver {
     var $_ds;
 
     /**
-     * Retrieves status of vacation for a user.
+     * Sets up vacation notices for a user.
      *
-     * @param string $user   The username of the user to check.
-     * @param string $realm  The realm of the user to check.
-     *
-     * @return boolean  Returns true if vacation is enabled for the user
-     *                  or false if vacation is currently disabled.
+     * @param string $password  The password for the user.
+     * @param string $message   The text of the vacation notice.
+     * @param string $subject   The subject of the vacation notice.
+     * @param string $from      The From: address of the vacation notice.
+     * @param string $alias     The alias email address.
      */
-    function isEnabled($user, $realm, $password)
+    function setVacation($password, $message, $subject, $from, $alias = '')
     {
-        // Get current details.
-        $current_details = $this->_getUserDetails($user, $realm, $password);
-        if (is_a($current_details, 'PEAR_Error')) {
-            return false;
+        // Make sure the configuration file is correct.
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        // Check vacation flag.
-        if ($current_details['vacation'] == 'y' ||
-            $current_details['vacation'] == 'Y' ||
-            $current_details['vacation'] == $this->_params[$realm]['enabled']) {
-            return 'Y';
-        } elseif ($current_details['vacation'] == 'n' ||
-                  $current_details['vacation'] == 'N' ||
-                  $current_details['vacation'] == $this->_params[$realm]['disabled']) {
-            return 'N';
+        // Get the user's DN.
+        if (isset($this->_params[$this->_realm]['userdn'])) {
+            $userdn = $this->_params[$this->_realm]['userdn'];
         } else {
-            return false;
+            $userdn = $this->_lookupdn();
+            if (is_a($userdn, 'PEAR_Error')) {
+                return $userdn;
+            }
         }
-    }
 
-    /**
-     * Connects to the LDAP server and binds as the guest user or as the
-     * optional userdn.
-     *
-     * @param string $userdn    The DN to use when binding non-anonymously.
-     * @param string $password  The password for $userdn.
-     * @param string $realm     The name of the realm.
-     *
-     * @return boolean  True on success, false otherwise.
-     *
-     */
-    function _connect($userdn = null, $password = null, $realm = 'default')
-    {
-        $this->_ds = ldap_connect($this->_params[$realm]['host'], $this->_params[$realm]['port']);
-        if (!$this->_ds) {
-            return PEAR::raiseError(_("Could not connect to ldap server"));
-        }
-        if (isset($this->_params[$realm]['version'])) {
-            ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION,
-                            $this->_params[$realm]['version']);
+        // Connect as the user.
+        $res = $this->_connect($userdn, $password);
+        if (is_a($res, 'PEAR_Error')) {
+            $this->_disconnect();
+            if ($res->getMessage() == _("Could not bind to ldap server")) {
+                return PEAR::raiseError(_("Incorrect Password"));
+            }
+            return $res;
         }
 
-        if (!empty($this->_params[$realm]['binddn'])) {
-            $result = @ldap_bind($this->_ds, $this->_params[$realm]['binddn'], $this->_params[$realm]['bindpw']);
-        } elseif (!is_null($userdn)) {
-            $result = @ldap_bind($this->_ds, $userdn, $password);
-        } else {
-            $result = @ldap_bind($this->_ds);
-        }
+        // Prepare the message. \n->\n\n and UTF-8 encode.
+        $full_message = $this->_buildMessage($message, $subject, $from);
+        $full_message = str_replace("\r\n", "\\n", $full_message);
+        $full_message = String::convertCharset($full_message, NLS::getCharset(), 'UTF-8');
 
-        if (!$result) {
-            return PEAR::raiseError(_("Could not bind to ldap server"));
+        // Change the user's vacation.
+        $newDetails[$this->_params[$this->_realm]['vacation']] = $full_message;
+        $newDetails[$this->_params[$this->_realm]['active']] = explode(
+            '|', $this->_params[$this->_realm]['enabled']);
+        $res = ldap_mod_replace($this->_ds, $userdn, $newDetails);
+        if (!$res) {
+            $res = PEAR::raiseError(ldap_error($this->_ds));
+            $this->_disconnect();
+            return $res;
         }
 
-        return true;
-    }
+        $res = $this->_setVacationAlias($userdn);
 
-    /**
-     * Close the ldap connection.
-     */
-    function _disconnect()
-    {
-        @ldap_close($this->_ds);
-    }
-
-    /**
-     * Check if the realm has a specific configuration.  If not, try to fall
-     * back on the default configuration.  If still not a valid configuration
-     * then exit with an error.
-     *
-     * @param string    $realm      The realm of the user, or "default" if none.
-     *                              Note: passed by reference so we can change
-     *                              it's value!
-     *
-     */
-    function checkConfig(&$realm)
-    {
-        // If no realm passed in, or no host config for the realm passed in,
-        // then we fall back to the default realm
-        if (empty($realm) || empty($this->_params[$realm]['server'])) {
-            $realm = 'default';
-        }
+        // Disconnect.
+        $this->_disconnect();
 
-        // If still no host/port, then we have a misconfigured module.
-        if (empty($this->_params[$realm]['host']) ||
-            empty($this->_params[$realm]['port']) ) {
-            $this->err_str = _("The module is not properly configured!");
-            return false;
-        }
-        return true;
+        return $res;
     }
 
     /**
-     * Lookup and return the user's dn.
+     * Sets or creates a vacation mail alias.
      *
-     * @param string $user    The username of the user.
-     * @param string $realm   The realm (domain) name of the user.
+     * Some MTA/LDAP/Vacation implementations require an extra mail alias
+     * (ex. user at example.org -> user at example.org, user at autoreply.example.org)
      *
-     * @return string    The ldap dn for the user.
+     * You should override this method in your extended LDAP driver class, if
+     * you need this feature.
+     *
+     * @param string $userdn  The LDAP DN for the current user.
      */
-    function _lookupdn($user, $realm)
+    function _setVacationAlias($userdn)
     {
-        // Bind as guest.
-        $this->_connect();
-
-        // Construct search.
-        $search = $this->_params[$realm]['uid'] . '=' . $user;
-        if (!empty($this->_params[$realm]['realm'])) {
-            $search .= '@' . $this->_params[$realm]['realm'];
-        }
-
-        /* Log the query at a DEBUG log level. */
-        Horde::logMessage(sprintf('LDAP query by Vacation_Driver_ldap::_lookupdn(): root = "%s"; filter = "%s"; timelimit = %d',
-                                  $this->_params[$realm]['basedn'], $search, $this->_params[$realm]['timeout']),
-                          __FILE__, __LINE__, PEAR_LOG_DEBUG);
-
-        // Get userdn.
-        $result = @ldap_search($this->_ds, $this->_params[$realm]['basedn'], $search, array(), 0, 0, $this->_params[$realm]['timeout']);
-        if (!$result ||
-            !($entry = ldap_first_entry($this->_ds, $result))) {
-            $this->_disconnect();
-            return PEAR::raiseError(_("User not found."));
-        }
-        $userdn = ldap_get_dn($this->_ds, $entry);
-
-        // Disconnect.
-        $this->_disconnect();
-
-        return $userdn;
+        return true;
     }
 
     /**
-     * Set the vacation notice up.
+     * Deactivates the vacation notice.
      *
-     * @param string $user     The username to enable vacation for.
-     * @param string $realm    The realm of the user.
-     * @param string $pass     The password of the user.
-     * @param string $message  The message to install.
+     * This does not delete the vacation message, just marks it as disabled.
      *
-     * @return boolean  Returns true on success, false on error.
+     * @param string $password  The password of the user.
      */
-    function setVacation($user, $realm, $pass, $message)
+    function unsetVacation($password)
     {
         // Make sure the configuration file is correct.
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        // Get the user's DN.
-        if (isset($this->_params[$realm]['userdn'])) {
-            $userdn = $this->_params[$realm]['userdn'];
+        // Get the user's dn.
+        if (isset($this->_params[$this->_realm]['userdn'])) {
+            $userdn = $this->_params[$this->_realm]['userdn'];
         } else {
-            $userdn = $this->_lookupdn($user, $realm);
+            $userdn = $this->_lookupdn();
             if (is_a($userdn, 'PEAR_Error')) {
-                $this->err_str = $userdn->getMessage();
-                return false;
+                return $userdn;
             }
         }
 
         // Connect as the user.
-        $res = $this->_connect($userdn, $pass, $realm);
-        if (is_a($res, 'PEAR_Error')) {
-            $this->err_str = $res->getMessage();
-            $this->err_str .= ' - ' .  _("Check your password");
-            return false;
+        $result = $this->_connect($userdn, $password);
+        if (is_a($result, 'PEAR_Error')) {
+            $this->_disconnect();
+            if ($result->getMessage() == _("Could not bind to ldap server")) {
+                return PEAR::raiseError(_("Incorrect Password"));
+            }
+            return $result;
         }
 
-        // Prepare the message. \n->\n\n and UTF-8 encode.
-        $message = str_replace("\r\n", "\\n", $message);
-        $message = String::convertCharset($message, NLS::getCharset(), 'UTF-8');
-
-        // Change the user's vacation.
-        $newDetails[$this->_params[$realm]['vacation']] = $message;
-        $newDetails[$this->_params[$realm]['active']] = explode("|", $this->_params[$realm]['enabled']);
-        $res = ldap_mod_replace($this->_ds, $userdn, $newDetails);
-        if (!$res) {
-            $res = PEAR::raiseError(ldap_error($this->_ds));
-            $this->_disconnect();
-            return false;
+        // Set the vacation message to inactive.
+        $newDetails[$this->_params[$this->_realm]['active']] =
+            $this->_params[$this->_realm]['disabled'];
+        $result = ldap_mod_replace($this->_ds, $userdn, $newDetails);
+        if (!$result) {
+            return PEAR::raiseError(ldap_error($this->_ds));
         }
 
-        $res = $this->_setVacationAlias($user, $realm, $userdn);
+        // Delete the unnecessary vacation alias (if present).
+        $result = $this->_unsetVacationAlias($userdn);
 
         // Disconnect.
         $this->_disconnect();
 
-        return $res;
+        return $result;
     }
 
     /**
-     * Set/create vacation mail alias.
-     *
-     * Some mta/ldap/vacation implementations requires an extra mail alias
-     * (ex. user at example.org -> user at example.org, user at autoreply.exmaple.org)
-     *
-     * You should override this method in your extended ldap driver class,
-     * if you need this feature.
-     *
-     * @access private
+     * Unsets or removes a vacation mail alias.
      *
-     * @param string $user   The username to enable vacation for.
-     * @param string $realm  The realm for the current user.
-     * @param string $userdn The LDAP DN for the current user.
+     * @see _setVacationAlias()
      *
-     * @return boolean  Success or failure.
+     * @param string $userdn  The LDAP DN for the current user.
      */
-    function _setVacationAlias($user, $realm, $userdn)
+    function _unsetVacationAlias($userdn)
     {
         return true;
     }
 
     /**
-     * Unset/remove vacation mail alias.
-     *
-     * @access private
+     * Retrieves the current vacation details for the user.
      *
-     * @param string $user   The username to enable vacation for.
-     * @param string $realm  The realm for the current user.
-     * @param string $userdn The LDAP DN for the current user.
+     * @param string $password  The password for user.
      *
-     * @return boolean  Success or failure.
-     *
-     * @see _setVacationAlias()
+     * @return array  Vacation details or PEAR_Error on failure.
      */
-    function _unsetVacationAlias($user, $realm, $userdn)
-    {
-        return true;
-    }
-
-    function _getUserDetails($user, $realm = 'default', $pass)
+    function _getUserDetails($password)
     {
         // Make sure the configuration file is correct.
-        if (!$this->checkConfig($realm)) {
-            return PEAR::raiseError('config check failed');
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
         // Get the user's DN.
-        if (isset($this->_params[$realm]['userdn'])) {
-            $userdn = $this->_params[$realm]['userdn'];
+        if (isset($this->_params[$this->_realm]['userdn'])) {
+            $userdn = $this->_params[$this->_realm]['userdn'];
         } else {
-            $userdn = $this->_lookupdn($user, $realm);
+            $userdn = $this->_lookupdn();
             if (is_a($userdn, 'PEAR_Error')) {
                 return $userdn;
             }
         }
 
         // Connect as the user.
-        $result = $this->_connect($userdn, $pass, $realm);
+        $result = $this->_connect($userdn, $password);
         if (is_a($result, 'PEAR_Error')) {
             $this->_disconnect();
             if ($result->getMessage() == _("Could not bind to ldap server")) {
@@ -302,113 +208,165 @@ class Vacation_Driver_ldap extends Vacation_Driver {
             return $result;
         }
 
-        $vac = $this->_getVacation($userdn, $realm, $user);
+        // Retrieve vacation information.
+        $vacation = $this->_getVacation($userdn);
+
+        // Prepare the message.
+        $vacation['message'] = String::convertCharset($vacation['message'], 'UTF-8');
 
-        // Prepare the message. \n->\n\n and UTF-8 decode.
-        $vac['message'] = str_replace("\\\\n", "\r\n", $vac['message']);
-        $vac['message'] = String::convertCharset($vac['message'], 'UTF-8');
+        // Parse message.
+        $vacation = array_merge($vacation, $this->_parseMessage($vacation['message']));
 
-        return $vac;
+        return $vacation;
     }
 
-    function _getVacation($userdn, $realm, $user)
+    function _getVacation($userdn)
     {
-        $filter = $this->_params[$realm]['uid'] . '=' . $user;
-        $searchAttrs = array($this->_params[$realm]['vacation'], $this->_params[$realm]['active']);
+        $filter = $this->_params[$this->_realm]['uid'] . '=' . $this->_user;
+        $searchAttrs = array($this->_params[$this->_realm]['vacation'],
+                             $this->_params[$this->_realm]['active']);
 
         /* Log the query at a DEBUG log level. */
         Horde::logMessage(sprintf('LDAP query by Vacation_Driver_ldap::_getVacation(): root = "%s"; filter = "%s"; attributes = "%s"; timelimit = %d',
-                                  $userdn, $filter, implode(', ', $searchAttrs), $this->_params[$realm]['timeout']),
+                                  $userdn, $filter, implode(', ', $searchAttrs),
+                                  $this->_params[$this->_realm]['timeout']),
                           __FILE__, __LINE__, PEAR_LOG_DEBUG);
 
         // Get the vacation message and the vacation status.
-        $sr = ldap_search($this->_ds, $userdn, $filter, $searchAttrs, 0, 0, $this->_params[$realm]['timeout']);
+        $sr = ldap_search($this->_ds, $userdn, $filter, $searchAttrs, 0, 0,
+                          $this->_params[$this->_realm]['timeout']);
 
         $entry = ldap_first_entry($this->_ds, $sr);
         if (!$entry) {
-            return false;
+            return array('vacation' => false);
         }
 
         $retAttrs = ldap_get_attributes($this->_ds, $entry);
         if (!$retAttrs) {
-            return false;
+            return array('vacation' => false);
         }
 
         // Set default values.
         $vacationInfo['message']  = '';
-        $vacationInfo['vacation'] = $this->_params[$realm]['disabled'];
+        $vacationInfo['vacation'] = $this->_params[$this->_realm]['disabled'];
 
         // Are there any returned attributes / values?
-        $messageAttr = String::lower($this->_params[$realm]['vacation']);
+        $messageAttr = $this->_params[$this->_realm]['vacation'];
         if (isset($retAttrs[$messageAttr])) {
             $vacationInfo['message'] = $retAttrs[$messageAttr][0];
         }
 
-        $vacationAttr = String::lower($this->_params[$realm]['active']);
+        $vacationAttr = $this->_params[$this->_realm]['active'];
         if (isset($retAttrs[$vacationAttr])) {
             unset($retAttrs[$vacationAttr]['count']);
-            $vacationInfo['vacation'] = implode("|", $retAttrs[$vacationAttr]);
+            $vacationInfo['vacation'] = implode('|', $retAttrs[$vacationAttr]);
         }
 
         return $vacationInfo;
     }
 
     /**
-     * Deactivate the vacation notice.
-     * NB: This does not delete the vacation message, just marks it as
-     * disabled.
-     *
-     * @param string $user   The user to disable vacation notices for.
-     * @param string $realm  The realm of the user.
-     * @param string $pass   The password of the user.
-     *
-     * @return boolean  Returns true on success, false on error.
+     * Check if the realm has a specific configuration.  If not, try to fall
+     * back on the default configuration.  If still not a valid configuration
+     * then exit with an error.
      */
-    function unsetVacation($user, $realm, $pass)
+    function _checkConfig()
     {
-        // Make sure the configuration file is correct.
-        if (!$this->checkConfig($realm)) {
-            return false;
+        // If no realm passed in, or no host config for the realm passed in,
+        // then we fall back to the default realm
+        if (empty($this->_params[$this->_realm]['server'])) {
+            $this->_realm = 'default';
         }
 
-        // Get the user's dn.
-        if (isset($this->_params[$realm]['userdn'])) {
-            $userdn = $this->_params[$realm]['userdn'];
-        } else {
-            $userdn = $this->_lookupdn($user, $realm);
-            if (is_a($userdn, 'PEAR_Error')) {
-                $this->err_str = $userdn->getMessage();
-                return false;
-            }
+        // If still no host/port, then we have a misconfigured module.
+        if (empty($this->_params[$this->_realm]['host']) ||
+            empty($this->_params[$this->_realm]['port']) ) {
+            return PEAR::raiseError(_("The module is not properly configured!"));
         }
+    }
 
-        // Connect as the user.
-        $result = $this->_connect($userdn, $pass, $realm);
-        if (is_a($result, 'PEAR_Error')) {
-            $this->_disconnect();
-            if ($result->getMessage() == _("Could not bind to ldap server")) {
-                $this->err_str = _("Incorrect Password");
-                return false;
-            }
-            $this->err_str = $result->getMessage();
-            return false;
-        }
+    /**
+     * Lookup and return the user's dn.
+     *
+     * @return string  The LDAP dn for the user.
+     */
+    function _lookupdn()
+    {
+        // Bind as guest.
+        $this->_connect();
 
-        // Set the vacation message to inactive.
-        $newDetails[$this->_params[$realm]['active']] = $this->_params[$realm]['disabled'];
-        $result = ldap_mod_replace($this->_ds, $userdn, $newDetails);
-        if (!$result) {
-            $this->err_str = ldap_error($this->_ds);
-            return false;
+        // Construct search.
+        $search = $this->_params[$this->_realm]['uid'] . '=' . $this->_user;
+        if (!empty($this->_params[$this->_realm]['realm'])) {
+            $search .= '@' . $this->_params[$this->_realm]['realm'];
         }
 
-        // Delete the unnecessary vacation alias (if present).
-        $result = $this->_unsetVacationAlias($user, $realm, $userdn);
+        /* Log the query at a DEBUG log level. */
+        Horde::logMessage(sprintf('LDAP query by Vacation_Driver_ldap::_lookupdn(): root = "%s"; filter = "%s"; timelimit = %d',
+                                  $this->_params[$this->_realm]['basedn'],
+                                  $search, $this->_params[$this->_realm]['timeout']),
+                          __FILE__, __LINE__, PEAR_LOG_DEBUG);
+
+        // Get userdn.
+        $result = @ldap_search($this->_ds, $this->_params[$this->_realm]['basedn'],
+                               $search, array(), 0, 0,
+                               $this->_params[$this->_realm]['timeout']);
+        if (!$result ||
+            !($entry = ldap_first_entry($this->_ds, $result))) {
+            $this->_disconnect();
+            return PEAR::raiseError(_("User not found."));
+        }
+        $userdn = ldap_get_dn($this->_ds, $entry);
 
         // Disconnect.
         $this->_disconnect();
 
-        return $result;
+        return $userdn;
+    }
+
+    /**
+     * Connects to the LDAP server and binds as the guest user or as the
+     * optional userdn.
+     *
+     * @param string $userdn    The DN to use when binding non-anonymously.
+     * @param string $password  The password for $userdn.
+     *
+     * @return boolean  True on success, PEAR_Error otherwise.
+     */
+    function _connect($userdn = null, $password = null)
+    {
+        $this->_ds = ldap_connect($this->_params[$this->_realm]['host'],
+                                  $this->_params[$this->_realm]['port']);
+        if (!$this->_ds) {
+            return PEAR::raiseError(_("Could not connect to ldap server"));
+        }
+        if (isset($this->_params[$this->_realm]['version'])) {
+            ldap_set_option($this->_ds, LDAP_OPT_PROTOCOL_VERSION,
+                            $this->_params[$this->_realm]['version']);
+        }
+
+        if (!empty($this->_params[$this->_realm]['binddn'])) {
+            $result = @ldap_bind($this->_ds, $this->_params[$this->_realm]['binddn'],
+                                 $this->_params[$this->_realm]['bindpw']);
+        } elseif (!is_null($userdn)) {
+            $result = @ldap_bind($this->_ds, $userdn, $password);
+        } else {
+            $result = @ldap_bind($this->_ds);
+        }
+
+        if (!$result) {
+            return PEAR::raiseError(_("Could not bind to ldap server"));
+        }
+
+        return true;
+    }
+
+    /**
+     * Close the ldap connection.
+     */
+    function _disconnect()
+    {
+        @ldap_close($this->_ds);
     }
 
 }
diff --git a/lib/Driver/plesk.php b/lib/Driver/plesk.php
new file mode 100644
index 0000000..1c147a8
--- /dev/null
+++ b/lib/Driver/plesk.php
@@ -0,0 +1,340 @@
+<?php
+/**
+ * Vacation_Driver_plesk implements the Vacation_Driver API for Plesk
+ * control panel servers.
+ *
+ * Plesk 8.1 or later is required.
+ *
+ * $Horde: vacation/lib/Driver/plesk.php,v 1.10.2.2 2009/01/06 15:28:08 jan Exp $
+ *
+ * Copyright 2008-2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file LICENSE for license information (BSD). If you
+ * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+ *
+ * @link    http://swdn.swsoft.com/en/library/plesk/
+ * @author  Jan Schneider <jan at horde.org>
+ * @package Vacation
+ * @since   Vacation 3.1
+ */
+
+class Vacation_Driver_plesk extends Vacation_Driver {
+
+    /**
+     * The curl resource handler
+     *
+     * @var resource
+     */
+    var $_curl;
+
+    /**
+     * The Plesk domain id of the current realm.
+     *
+     * @var integer
+     */
+    var $_domain_id;
+
+    /**
+     * The current vacation details.
+     *
+     * @var array
+     */
+    var $_details = null;
+
+    /**
+     * Returns a parameter value.
+     *
+     * @param string $param  The parameter to check in.
+     *
+     * @return mixed  The parameter value, or null if not found.
+     */
+    function getParam($param)
+    {
+        if ($param == 'hordeauth') {
+            return 'full';
+        }
+        return parent::getParam($param);
+    }
+
+    /**
+     * Setup vacation notices for a user.
+     *
+     * @param string $password The password for the user.
+     * @param string $message  The text of the vacation notice.
+     * @param string $subject  The subject of the vacation notice.
+     * @param string $from     The From: address of the vacation notice.
+     * @param string $alias    Alias email address -- Not yet implemented in
+     *                         backends.
+     */
+    function setVacation($password, $message, $subject, $from, $alias = '')
+    {
+        // Make sure the configuration file is correct
+        if (is_a($checked = $this->_checkConfig($password), 'PEAR_Error')) {
+            return $checked;
+        }
+
+        // Query the server.
+        @list($user,) = explode('@', $this->_user);
+        $request = '<mail><update><set><filter><domain_id>'
+            . $this->_domain_id . '</domain_id><mailname><name>'
+            . htmlspecialchars($user)
+            . '</name><autoresponders><enabled>true</enabled>'
+            . '<autoresponder><name>Horde</name><enabled>true</enabled>'
+            . '<subject>'
+            . htmlspecialchars(String::convertCharset($subject, NLS::getCharset(), 'UTF-8'), ENT_COMPAT, 'UTF-8')
+            . '</subject><text>'
+            . htmlspecialchars(String::convertCharset($message, NLS::getCharset(), 'UTF-8'), ENT_COMPAT, 'UTF-8')
+            . '</text><ans_freq>1</ans_freq></autoresponder></autoresponders></mailname></filter>'
+            . '</set></update></mail>';
+        $result = $this->_request($password, $request);
+
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
+        if (isset($result['mail']['update']['set']['result'])) {
+            $result = $result['mail']['update']['set']['result'];
+        } else {
+            $result = false;
+        }
+        if (isset($result['status']['_']) &&
+            $result['status']['_'] == 'error') {
+            return PEAR::raiseError(sprintf(_("Cannot set vacation notice for mail user %s: %s"), $this->_user, $result['errtext']['_']));
+        }
+        if (!isset($result['status']['_']) ||
+            $result['status']['_'] != 'ok' ||
+            empty($result)) {
+            return PEAR::raiseError(sprintf(_("Cannot set vacation notice for mail user %s."), $this->_user));
+        }
+    }
+
+    /**
+     * Removes any existing vacation notices.
+     *
+     * @param string $password  The password of the user.
+     */
+    function unsetVacation($password)
+    {
+        // Make sure the configuration file is correct
+        if (is_a($checked = $this->_checkConfig($password), 'PEAR_Error')) {
+            return $checked;
+        }
+
+        // Query the server.
+        @list($user,) = explode('@', $this->_user);
+        $request = '<mail><update><set><filter><domain_id>'
+            . $this->_domain_id . '</domain_id><mailname><name>'
+            . htmlspecialchars($user)
+            . '</name><autoresponders><enabled>false</enabled>'
+            . '<autoresponder><name>Horde</name><enabled>false</enabled>'
+            . '</autoresponder></autoresponders></mailname></filter>'
+            . '</set></update></mail>';
+        $result = $this->_request($password, $request);
+
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
+        if (isset($result['mail']['update']['set']['result'])) {
+            $result = $result['mail']['update']['set']['result'];
+        } else {
+            $result = false;
+        }
+        if (isset($result['status']['_']) &&
+            $result['status']['_'] == 'error') {
+            return PEAR::raiseError(sprintf(_("Cannot remove vacation notice for mail user %s: %s"), $this->_user, $result['errtext']['_']));
+        }
+        if (!isset($result['status']['_']) ||
+            $result['status']['_'] != 'ok' ||
+            empty($result)) {
+            return PEAR::raiseError(sprintf(_("Cannot remove vacation notice for mail user %s."), $this->_user));
+        }
+    }
+
+    /**
+     * Retrieves current vacation From: address.
+     *
+     * @param string $password  The password for user.
+     *
+     * @return string  The current or default vacation From: address.
+     */
+    function currentFrom($password)
+    {
+        return $this->_user;
+    }
+
+    /**
+     * Retrieves the current vacation details for the user.
+     *
+     * @param string $password  The password for user.
+     *
+     * @return mixed  Vacation details, or PEAR_Error.
+     */
+    function _getUserDetails($password)
+    {
+        if (!is_null($this->_details)) {
+            return $this->_details;
+        }
+
+        if (is_a($checked = $this->_checkConfig($password),
+                 'PEAR_Error')) {
+            return $checked;
+        }
+        @list($user,) = explode('@', $this->_user);
+
+        // Query the server.
+        $request = '<mail><get_info><filter><domain_id>'
+            . $this->_domain_id . '</domain_id><name>'
+            . htmlspecialchars($user)
+            . '</name></filter><autoresponders/></get_info></mail>';
+        $result = $this->_request($password, $request);
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
+        if (isset($result['mail']['get_info']['result']['status']['_']) &&
+            $result['mail']['get_info']['result']['status']['_'] == 'error') {
+            return PEAR::raiseError(sprintf(_("Cannot retrieve information about mail user %s: %s"), $this->_user, $result['mail']['get_info']['result']['errtext']['_']));
+        } elseif (!isset($result['mail']['get_info']['result']['status']['_']) ||
+                  $result['mail']['get_info']['result']['status']['_'] != 'ok' ||
+                  !isset($result['mail']['get_info']['result']['mailname'])) {
+            return PEAR::raiseError(sprintf(_("Cannot retrieve information about mail user %s."), $this->_user));
+        }
+
+        if (!isset($result['mail']['get_info']['result']['mailname']['autoresponders'])) {
+            return array('vacation' => false);
+        }
+
+        $details = $result['mail']['get_info']['result']['mailname']['autoresponders']['autoresponder'];
+        if (key($details) === 0) {
+            $details = $details[0];
+        }
+        $this->_details['message'] = String::convertCharset($details['text']['_'], 'UTF-8');
+        $this->_details['subject'] = String::convertCharset($details['subject']['_'], 'UTF-8');
+        $this->_details['vacation'] = $result['mail']['get_info']['result']['mailname']['autoresponders']['enabled']['_'] == 'true' && $details['enabled']['_'] == 'true' ? 'y' :'n';
+
+        return $this->_details;
+    }
+
+    /**
+     * Checks if the realm has a specific configuration. If not, tries to fall
+     * back on the default configuration. If still not a valid configuration
+     * then returns an error.
+     *
+     * @param string $password  The password for the user.
+     */
+    function _checkConfig($password)
+    {
+        if (!(@include_once 'Horde/DOM.php')) {
+            return PEAR::raiseError(_("The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See http://pear.horde.org/index.php?package=Horde_DOM"));
+        }
+
+        // If no realm passed in, or no host config for the realm passed in,
+        // then we fall back to the default realm
+        if (empty($this->_params[$this->_realm]['host'])) {
+            $this->_realm = 'default';
+        }
+
+        if (!isset($this->_domain_id)) {
+            @list(, $domain) = explode('@', $this->_user, 2);
+            $request = '<domain><get><filter><domain_name>'
+                . htmlspecialchars($domain)
+                . '</domain_name></filter><dataset><gen_info/></dataset></get></domain>';
+            $result = $this->_request($password, $request);
+            if (is_a($result, 'PEAR_Error')) {
+                return $result;
+            }
+            if (isset($result['domain']['get']['result']['status']['_']) &&
+                $result['domain']['get']['result']['status']['_'] == 'ok' &&
+                isset($result['domain']['get']['result']['id']['_'])) {
+                $this->_domain_id = $result['domain']['get']['result']['id']['_'];
+            } elseif (isset($result['domain']['get']['result']['status']['_']) &&
+                      $result['domain']['get']['result']['status']['_'] == 'error') {
+                return PEAR::raiseError(sprintf(_("Cannot retrieve domain ID of domain %s: %s"), $domain, $result['domain']['get']['result']['errtext']['_']));
+            } else {
+                return PEAR::raiseError(sprintf(_("Cannot retrieve domain ID of domain %s."), $domain));
+            }
+        }
+
+        // If still no host/port, then we have a misconfigured module.
+        if (empty($this->_params[$this->_realm]['host']) ||
+            empty($this->_params[$this->_realm]['user']) ||
+            empty($this->_params[$this->_realm]['pass'])) {
+            return PEAR::raiseError(_("The vacation application is not properly configured."));
+        }
+    }
+
+    /**
+     * Connects to the Plesk RPC API server and sends a request.
+     *
+     * @param string $password  The password to connect with.
+     * @param string $packet    The XML fragment for the request.
+     *
+     * @return boolean  True on success, PEAR_Error otherwise.
+     */
+    function _request($password, $packet)
+    {
+        if (!$this->_curl) {
+            $url = 'https://' . $this->_params[$this->_realm]['host']
+                . ':8443/enterprise/control/agent.php';
+            $headers = array(
+                'HTTP_AUTH_LOGIN: ' . $this->_params[$this->_realm]['user'],
+                'HTTP_AUTH_PASSWD: ' . $this->_params[$this->_realm]['pass'],
+                'Content-Type: text/xml');
+            $this->_curl = curl_init();
+            curl_setopt($this->_curl, CURLOPT_SSL_VERIFYHOST, 0);
+            curl_setopt($this->_curl, CURLOPT_SSL_VERIFYPEER, false);
+            curl_setopt($this->_curl, CURLOPT_HTTPHEADER, $headers);
+            curl_setopt($this->_curl, CURLOPT_URL, $url);
+            curl_setopt($this->_curl, CURLOPT_RETURNTRANSFER, true);
+        }
+
+        $content = '<?xml version="1.0" encoding="' . NLS::getCharset()
+            . '"?><packet version="1.4.2.0">' . $packet . '</packet>';
+        curl_setopt($this->_curl, CURLOPT_POSTFIELDS, $content);
+        $retval = curl_exec($this->_curl);
+        if ($retval === false) {
+            return PEAR::raiseError(curl_error($this->_curl));
+        }
+
+        $doc = Horde_DOM_Document::factory(
+            array('xml' => $retval,
+                  'options' => HORDE_DOM_LOAD_REMOVE_BLANKS));
+        $result = array();
+        $this->_parseResponse($doc->root(), $result);
+        if (isset($result['packet']['system']['status']['_']) &&
+            $result['packet']['system']['status']['_'] == 'error') {
+            return PEAR::raiseError($result['packet']['system']['errtext']['_']);
+        }
+
+        return $result['packet'];
+    }
+
+    /**
+     * Parses the XML response body of the Plesk API call into a hash.
+     *
+     * @param Horde_DOM_Node $node  A DOM node object.
+     * @param array $array          The result hash.
+     */
+    function _parseResponse($node, &$array)
+    {
+        $name = $node->node_name();
+        $element = array();
+        if (isset($array[$name])) {
+            $array[$name] = array($array[$name]);
+            $array[$name][] = &$element;
+        } else {
+            $array[$name] = &$element;
+        }
+        $array[$name] = array();
+        if ($node->has_child_nodes()) {
+            for ($child = $node->first_child();
+                 $child;
+                 $child = $child->next_sibling())  {
+                if ($child->node_type() == XML_TEXT_NODE) {
+                    $array[$name]['_'] = $child->node_value();
+                } else {
+                    $this->_parseResponse($child, $array[$name]);
+                }
+            }
+        }
+    }
+
+}
diff --git a/lib/Driver/qmail.php b/lib/Driver/qmail.php
index 7dc998b..2164036 100644
--- a/lib/Driver/qmail.php
+++ b/lib/Driver/qmail.php
@@ -1,282 +1,119 @@
 <?php
+
+require_once dirname(__FILE__) . '/forwards.php';
+
 /**
- * Vacation_Driver_qmail:: implements the Vacation_Driver API for ftp driven
- * qmail mail servers.  This depends on Peter Samuel's qmail-vacation
- * program.
+ * Vacation_Driver_qmail implements the Vacation_Driver API for ftp driven
+ * qmail mail servers.  This depends on Peter Samuel's qmail-vacation program.
  *
- * $Horde: vacation/lib/Driver/qmail.php,v 1.27.2.2 2007/01/02 13:55:22 jan Exp $
+ * $Horde: vacation/lib/Driver/qmail.php,v 1.27.2.5 2009/01/06 15:28:08 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
  * @author  Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * @author  Jan Schneider <jan at horde.org>
  * @since   Vacation 2.2
  * @package Vacation
  */
-class Vacation_Driver_qmail extends Vacation_Driver {
-
-    /**
-     * The FTP stream we open via the VFS class.
-     * @var VFS_ftp
-     */
-    var $_vfs;
+class Vacation_Driver_qmail extends Vacation_Driver_forwards {
 
     /**
-     * The current vacation details.
-     * @var array
+     * Runs any code required before creating the vacation file.
      */
-    var $_details = null;
-
-    /**
-     * Check if the realm has a specific configuration.  If not, try
-     * to fall back on the default configuration.  If still not a
-     * valid configuration then exit with an error.
-     *
-     * @param string $realm  The realm of the user, or 'default' if none.
-     *                       Note: passed by reference so we can change its
-     *                       value!
-     */
-    function checkConfig(&$realm)
+    function _setVacationPreCheck()
     {
-        // If no realm passed in, or no host config for the realm
-        // passed in, then we fall back to the default realm.
-        if (empty($realm) || empty($this->_params[$realm]['host'])) {
-            $realm = 'default';
+        // Clean up old backup and move existing .qmail .
+        if ($this->_vfs->exists('', '.qmail_horde')) {
+            return PEAR::raiseError(_("Vacation notice already exists."));
         }
-
-        // If still no host/port, then we have a misconfigured module.
-        if (empty($this->_params[$realm]['host']) ||
-            empty($this->_params[$realm]['port']) ) {
-            $this->err_str = _("The module is not properly configured!");
-            return false;
+        if ($this->_vfs->exists('', '.qmail')) {
+            return $this->_vfs->rename('', '.qmail', '', '.qmail_horde');
         }
-        return true;
     }
 
     /**
-     * Set the vacation notice up.
+     * Creates the main vacation file.
      *
-     * @param string $user     The username to enable vacation for.
-     * @param string $realm    The realm of the user.
-     * @param string $pass     The password for the user.
-     * @param string $message  The message to install.
-     * @param string $alias    The email alias to pass to vacation
-     *
-     * @return boolean  Returns true on success, false on error.
+     * @param string $alias  The alias email address.
      */
-    function setVacation($user, $realm, $pass, $message, $alias)
+    function _createVacationFile($alias)
     {
-        // Make sure the configuration file is correct.
-        if (!$this->checkConfig($realm)) {
-            return false;
-        }
-
-        // We need to find out what type of database file to use.
-        $conf = &$GLOBALS['conf'];
-        $dbfile = VACATION_BASE . '/files/empty.' .
-            $this->_params[$realm]['dbtype'] . '.bin';
-
-        // Build the ftp array to pass to VFS.
-        $_args = array('hostspec' => $this->_params[$realm]['host'],
-                       'port' => $this->_params[$realm]['port'],
-                       'pasv' => $this->_params[$realm]['pasv'],
-                       'username' => $user,
-                       'password' => $pass);
-
-        // Create the VFS ftp driver.
-        require_once 'VFS.php';
-        $_vfs = &VFS::singleton('ftp', $_args);
-
-        // Try to login with the username/password, no realm.
-        $status = $_vfs->checkCredentials();
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            $this->err_str .= '  ' .  _("Check your username and password.");
-            return false;
-        }
-
-       // clean up old backup and move existing .qmail 
-        if ($_vfs->exists('', '.qmail_horde')) {
-            $this->err_str = _("Vacation notice already exists.");
-            return false;
-        }
-        if ($_vfs->exists('', '.qmail')) {
-            $status = $_vfs->rename('', '.qmail', '', '.qmail_horde');
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                return false;
-            }
-        }
-
-        // Set up the vacation specific files first.
-        $status = $_vfs->writeData('', '.vacation.msg', $message);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
-        }
-        $status = $_vfs->writeData('', '.vacation.pag', $dbfile);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
-        }
-        $status = $_vfs->writeData('', '.vacation.dir', $dbfile);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
-        }
-        $status = $_vfs->writeData('', '.vacation.db', $dbfile);
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
-        }
-
         // Parse the email address and alias address passed in.
-        $my_email = $this->_makeEmailAddress($user, $realm);
-        if ($my_email === false) {
-            return false;
+        $my_email = $this->_makeEmailAddress($this->_user);
+        if (is_a($my_email, 'PEAR_Error')) {
+            return $my_email;
         }
         if (!empty($alias)) {
-            $alias = $this->_makeEmailAddress($alias, $realm);
-            if ($alias === false) {
-                return false;
+            $alias = $this->_makeEmailAddress($alias);
+            if (is_a($alias, 'PEAR_Error')) {
+                return $alias;
             }
         }
 
         // Now set up the .forward file.
-        if (!empty($alias) && ($alias != $my_email)) {
-            $contents = '| ' . $conf['vacation']['path'] .
+        if (!empty($alias) && $alias != $my_email) {
+            $contents = '| ' . $GLOBALS['conf']['vacation']['path'] .
                 " -a $alias $my_email\n./Maildir/";
         } else {
-            $contents = '| ' . $conf['vacation']['path'] .
+            $contents = '| ' . $GLOBALS['conf']['vacation']['path'] .
                 " $my_email\n./Maildir/";
         }
-        $status = $_vfs->writeData('', '.qmail', $contents);
+        $status = $this->_vfs->writeData('', '.qmail', $contents);
         if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            return false;
+            return $status;
         }
 
         // Try to change the permissions, but ignore any errors.
-        $_vfs->changePermissions('', '.qmail', '0600');
-
-        // Update the current details.
-        $this->_details = array('vacation' => 'y',
-                                'message' => $message);
-        return true;
+        $this->_vfs->changePermissions('', '.qmail', '0600');
     }
 
     /**
-     * Remove any existing vacation notices.
-     *
-     * @param string $user   The user to disable vacation notices for.
-     * @param string $realm  The realm of the user.
-     * @param string $pass   The password of the user.
-     *
-     * @return boolean  Returns true on success, false on error.
+     * Deletes the main vacation file.
      */
-    function unsetVacation($user, $realm, $pass)
+    function _deleteVacationFile()
     {
-        if (!$this->checkConfig($realm)) {
-            return false;
+        // Restore previous .qmail, if any.
+        if ($this->_vfs->exists('', '.qmail_horde')) {
+            return $this->_vfs->rename('', '.qmail_horde', '', '.qmail');
         }
-
-        $_args = array('hostspec' => $this->_params[$realm]['host'],
-                       'port' => $this->_params[$realm]['port'],
-                       'pasv' => $this->_params[$realm]['pasv'],
-                       'username' => $user,
-                       'password' => $pass);
-
-        require_once 'VFS.php';
-        $_vfs = &VFS::singleton('ftp', $_args);
-
-        // Try to login with the username/password, no realm.
-        $status = $_vfs->checkCredentials();
-        if (is_a($status, 'PEAR_Error')) {
-            $this->err_str = $status->getMessage();
-            $this->err_str .= '  ' .  _("Check your username and password.");
-            return false;
-        }
-
-        if ($_vfs->exists('', '.vacation.msg')) {
-            $status = $_vfs->deleteFile('', '.vacation.msg');
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                return false;
-            }
-        } else {
-            $this->err_str = _("Vacation notice not found.");
-            return false;
-        }
-
-       // restore previous .qmail (if any)
-        if ($_vfs->exists('', '.qmail_horde')) {
-            $status = $_vfs->rename('', '.qmail_horde', '', '.qmail');
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                return false;
-            }
-        } else {
-            $status = $_vfs->deleteFile('', '.qmail');
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                return false;
-            }
-        }
-
-        // We could, but don't, check for errors on these. They are
-        // more-or-less harmless without the above two files.
-        $_vfs->deleteFile('', '.vacation.pag');
-        $_vfs->deleteFile('', '.vacation.dir');
-        $_vfs->deleteFile('', '.vacation.db');
-
-        // Update the current details.
-        $this->_details = false;
-        return true;
+        return $this->_vfs->deleteFile('', '.qmail');
     }
 
     /**
-     * Retrieve the current vacation details for the user.
+     * Retrieves the current vacation details for the user.
      *
-     * @param string $user      The username for which to retrieve details.
-     * @param string $realm     The realm (domain) for the user.
      * @param string $password  The password for user.
      *
-     * @return mixed  Vacation details or false.
+     * @return array  Vacation details or PEAR_Error on failure.
      */
-    function _getUserDetails($user, $realm, $password)
+    function _getUserDetails($password)
     {
-        if (is_null($this->_details)) {
-            if (!$this->checkConfig($realm)) {
-                return false;
-            }
-
-            $_args = array('hostspec' => $this->_params[$realm]['host'],
-                           'port' => $this->_params[$realm]['port'],
-                           'pasv' => $this->_params[$realm]['pasv'],
-                           'username' => $user,
-                           'password' => $password);
+        if (!is_null($this->_details)) {
+            return $this->_details;
+        }
 
-            require_once 'VFS.php';
-            $_vfs = &VFS::singleton('ftp', $_args);
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
+        }
 
-            // Try to login with the username/password, no realm.
-            $status = $_vfs->checkCredentials();
-            if (is_a($status, 'PEAR_Error')) {
-                $this->err_str = $status->getMessage();
-                $this->err_str .= '  ' .  _("Check your username and password.");
-                return false;
-            }
+        // Connect to the server.
+        if (is_a($connected = $this->_connect($password),
+                 'PEAR_Error')) {
+            return $connected;
+        }
 
-            $message = $_vfs->read('', '.vacation.msg');
+        if ($this->_vfs->exists('', '.vacation.msg')) {
+            $message = $this->_vfs->read('', '.vacation.msg');
             if (is_a($message, 'PEAR_Error')) {
-                $this->err_str = $message->getMessage();
-                return false;
+                return $message;
             }
-
-            $this->_details['message'] = $message;
+            $this->_details = $this->_parseMessage($message);
             $this->_details['vacation'] = 'y';
+        } else {
+            $this->_details = array('vacation' => false);
         }
 
         return $this->_details;
diff --git a/lib/Driver/sql.php b/lib/Driver/sql.php
index dd6fb99..e6884e6 100644
--- a/lib/Driver/sql.php
+++ b/lib/Driver/sql.php
@@ -2,15 +2,16 @@
 /**
  * Vacation_Driver_sql:: implements the Vacation_Driver API for SQL servers.
  *
- * $Horde: vacation/lib/Driver/sql.php,v 1.34.2.2 2007/01/02 13:55:22 jan Exp $
+ * $Horde: vacation/lib/Driver/sql.php,v 1.34.2.5 2009/01/06 15:28:08 jan Exp $
  *
- * Copyright 2001-2007 Ilya Krel and Mike Cochrane
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  *
  * @author  Ilya Krel <mail at krel.org>
  * @author  Mike Cochrane <mike at graftonhall.co.nz>
+ * @author  Jan Schneider <jan at horde.org>
  * @since   Vacation 2.1
  * @package Vacation
  */
@@ -27,287 +28,277 @@ class Vacation_Driver_sql extends Vacation_Driver {
     var $_connected = false;
 
     /**
-     * Checks if the realm has a specific configuration. If not, tries to fall
-     * back on the default configuration. If still not a valid configuration
-     * then exits with an error.
+     * Sets up vacation notices for a user.
      *
-     * @param string $realm  The realm of the user, or "default" if none.
-     *                       Note: passed by reference so we can change its
-     *                       value.
+     * @param string $password  The password for the user.
+     * @param string $message   The text of the vacation notice.
+     * @param string $subject   The subject of the vacation notice.
+     * @param string $from      The From: address of the vacation notice.
+     * @param string $alias     The alias email address.
      */
-    function checkConfig(&$realm)
-    {
-        // If no realm passed in, or no table config for the realm passed in,
-        // then we fall back to the default realm
-        if (empty($realm) || empty($this->_params[$realm]['table'])) {
-            $realm = 'default';
-        }
-
-        // If still no table,user_col,pass_col,message,subject,vacation then
-        // we have a misconfigured module.
-        if (empty($this->_params[$realm]['table']) ||
-            empty($this->_params[$realm]['user_col']) ||
-            empty($this->_params[$realm]['pass_col']) ||
-            empty($this->_params[$realm]['message']) ||
-            empty($this->_params[$realm]['subject']) ||
-            empty($this->_params[$realm]['vacation']) ) {
-            $this->err_str = _("The vacation application is not properly configured.");
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Enables a vacation message for a user.
-     *
-     * @param string $user      The username to enable vacation for.
-     * @param string $realm     The realm of the user.
-     * @param string $password  The password of the user.
-     * @param string $message   The message to install.
-     * @param string $alias     The email alias for vacation to use --
-     *                          Not yet implemented.
-     *
-     * @return boolean  True on success, false on error.
-     */
-    function setVacation($user, $realm, $password, $message, $alias)
+    function setVacation($password, $message, $subject, $from, $alias = '')
     {
         // Make sure the configuration file is correct
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        /* _connect() will die with Horde::fatal() upon failure. */
-        $this->_connect($realm);
-
-        /* Determine if $message contains Subject: and if it does split it. */
-        if (preg_match("/^Subject: ([^\n]+)\n(.+)$/s", $message, $matches)) {
-            $mysubject = $matches[1];
-            $mymessage = $matches[2];
-        } else {
-            $mysubject = '';
-            $mymessage = $message;
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
         }
 
         // Build username.
-        $myuser = $this->_buildUsername($user, $realm);
+        $myuser = $this->_buildUsername();
+
+        // Encrypt password.
+        $crypted_password = $this->_encryptPassword($password, $this->_getCurrentPassword($myuser));
 
         // Check if an entry already exists and create one otherwise
-        $query = 'SELECT ' . $this->_params[$realm]['vacation'] . ' AS vacation' .
-                 ' FROM ' . $this->_params[$realm]['table'] .
-                 ' WHERE ' . $this->_params[$realm]['user_col'] . ' = ?' .
-                 ' AND ' . $this->_params[$realm]['pass_col'] . ' = ?';
-        $values = array($myuser, $this->encryptPassword($password));
+        $query = 'SELECT ' . $this->_params[$this->_realm]['vacation'] . ' AS vacation' .
+                 ' FROM ' . $this->_params[$this->_realm]['table'] .
+                 ' WHERE ' . $this->_params[$this->_realm]['user_col'] . ' = ?' .
+                 ' AND ' . $this->_params[$this->_realm]['pass_col'] . ' = ?';
+        $values = array($myuser, $crypted_password);
         $result = $this->_db->query($query, $values);
         if (!is_a($result, 'PEAR_Error')) {
-            $query = 'INSERT INTO ' . $this->_params[$realm]['table'] .
-                     ' (' . $this->_params[$realm]['vacation'] . ',' .
-                     ' ' . $this->_params[$realm]['user_col'] . ',' .
-                     ' ' . $this->_params[$realm]['pass_col'] . ')' .
-                     ' VALUES ( ?, ?, ?)';
-            $values = array('n', $user, $this->encryptPassword($password));
+            $query = 'INSERT INTO ' . $this->_params[$this->_realm]['table'] .
+                     ' (' . $this->_params[$this->_realm]['vacation'] . ',' .
+                     ' ' . $this->_params[$this->_realm]['user_col'] . ',' .
+                     ' ' . $this->_params[$this->_realm]['pass_col'] . ')' .
+                     ' VALUES (?, ?, ?)';
+            $values = array('n', $myuser, $crypted_password);
             $result = $this->_db->query($query, $values);
         }
 
-        /* Build the SQL query. */
-        $query = 'UPDATE ' . $this->_params[$realm]['table'] .
-                 ' SET ' . $this->_params[$realm]['vacation'] . ' = ?,' .
-                 ' ' . $this->_params[$realm]['message'] . ' = ?,' .
-                 ' ' . $this->_params[$realm]['subject'] . ' = ?' .
-                 ' WHERE ' . $this->_params[$realm]['user_col'] . ' = ?' .
-                 ' AND ' . $this->_params[$realm]['pass_col'] . ' = ?';
-        $values = array('y', $mymessage, $mysubject, $myuser, $this->encryptPassword($password));
+        // Build the SQL query.
+        $query = 'UPDATE ' . $this->_params[$this->_realm]['table'] .
+                 ' SET ' . $this->_params[$this->_realm]['vacation'] . ' = ?,' .
+                 ' ' . $this->_params[$this->_realm]['message'] . ' = ?,' .
+                 ' ' . $this->_params[$this->_realm]['subject'] . ' = ?' .
+                 ' WHERE ' . $this->_params[$this->_realm]['user_col'] . ' = ?' .
+                 ' AND ' . $this->_params[$this->_realm]['pass_col'] . ' = ?';
+        $values = array('y', $message, $subject, $myuser, $crypted_password);
 
-        /* Execute the query. */
         $result = $this->_db->query($query, $values);
 
-        if (!is_a($result, 'PEAR_Error')) {
-            if ($result === DB_OK) {
-                $this->_disconnect();
-                return true;
-            } else {
-                $this->_disconnect();
-                return false;
-            }
-        } else {
-            $this->_disconnect();
-            return false;
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
+        if ($this->_db->affectedRows() == 0) {
+            return PEAR::raiseError(_("The vacation notice cannot be set. Check the password."));
+        }
+        if ($result !== DB_OK) {
+            return PEAR::raiseError(_("An unknown error occured while enabling the vacation notice."));
         }
     }
 
     /**
      * Disables the vacation message for a user.
      *
-     * @param string $user   The username of the user.
-     * @param string $realm  The realm of the user.
-     * @param string $pass   The password of the user.
-     *
-     * @return boolean  True on success, false on error.
+     * @param string $password  The password of the user.
      */
-    function unsetVacation($user, $realm, $password)
+    function unsetVacation($password)
     {
         // Make sure the configuration file is correct
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        /* _connect() will die with Horde::fatal() upon failure. */
-        $this->_connect($realm);
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
 
         // Build username.
-        $myuser = $this->_buildUsername($user, $realm);
+        $myuser = $this->_buildUsername();
 
-        /* Build the SQL query. */
-        $query = 'UPDATE ' . $this->_params[$realm]['table'] .
-                 ' SET ' . $this->_params[$realm]['vacation'] . ' = ?' .
-                 ' WHERE ' . $this->_params[$realm]['user_col'] . ' = ?' .
-                 ' AND ' . $this->_params[$realm]['pass_col'] . ' = ?';
-        $values = array('n', $myuser, $this->encryptPassword($password));
+        // Build the SQL query.
+        $query = 'UPDATE ' . $this->_params[$this->_realm]['table'] .
+                 ' SET ' . $this->_params[$this->_realm]['vacation'] . ' = ?' .
+                 ' WHERE ' . $this->_params[$this->_realm]['user_col'] . ' = ?' .
+                 ' AND ' . $this->_params[$this->_realm]['pass_col'] . ' = ?';
+        $values = array('n', $myuser,
+                        $this->_encryptPassword($password, $this->_getCurrentPassword($myuser)));
 
-        /* Execute the query. */
         $result = $this->_db->query($query, $values);
 
-        if (!is_a($result, 'PEAR_Error')) {
-            if ($result === DB_OK) {
-                $this->_disconnect();
-                return true;
-            } else {
-                $this->_disconnect();
-                return false;
-            }
-        } else {
-            $this->_disconnect();
-            return false;
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
+        if ($this->_db->affectedRows() == 0) {
+            return PEAR::raiseError(_("The vacation notice cannot be set. Check the password."));
+        }
+        if ($result !== DB_OK) {
+            return PEAR::raiseError(_("An unknown error occured while disabling the vacation notice."));
         }
     }
 
     /**
      * Retrieves the current vacation details for the user.
      *
-     * @param string $user      The username for which to retrieve details.
-     * @param string $realm     The realm (domain) for the user.
      * @param string $password  The password for user.
      *
-     * @return array|boolean  Vacation details or false.
+     * @return array  Vacation details or PEAR_Error.
      */
-    function _getUserDetails($user, $realm, $password)
+    function _getUserDetails($password)
     {
         // Make sure the configuration file is correct
-        if (!$this->checkConfig($realm)) {
-            return false;
+        if (is_a($checked = $this->_checkConfig(), 'PEAR_Error')) {
+            return $checked;
         }
 
-        /* _connect() will die with Horde::fatal() upon failure. */
-        $this->_connect($realm);
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
 
         // Build username.
-        $myuser = $this->_buildUsername($user, $realm);
-
-        /* Build the SQL query. */
-        $query = 'SELECT ' . $this->_params[$realm]['vacation'] . ' AS vacation,' .
-                 ' ' . $this->_params[$realm]['message'] . ' AS message,' .
-                 ' ' . $this->_params[$realm]['subject'] . ' AS subject' .
-                 ' FROM ' . $this->_params[$realm]['table'] .
-                 ' WHERE ' . $this->_params[$realm]['user_col'] . ' = ?' .
-                 ' AND ' . $this->_params[$realm]['pass_col'] . ' = ?';
-        $values = array($myuser, $this->encryptPassword($password));
-
-        /* Execute the query. */
+        $myuser = $this->_buildUsername();
+
+        // Build the SQL query.
+        $query = 'SELECT ' . $this->_params[$this->_realm]['vacation'] . ' AS vacation,' .
+                 ' ' . $this->_params[$this->_realm]['message'] . ' AS message,' .
+                 ' ' . $this->_params[$this->_realm]['subject'] . ' AS subject' .
+                 ' FROM ' . $this->_params[$this->_realm]['table'] .
+                 ' WHERE ' . $this->_params[$this->_realm]['user_col'] . ' = ?' .
+                 ' AND ' . $this->_params[$this->_realm]['pass_col'] . ' = ?';
+        $values = array($myuser,
+                        $this->_encryptPassword($password, $this->_getCurrentPassword($myuser)));
+
         $result = $this->_db->query($query, $values);
+        if (is_a($result, 'PEAR_Error')) {
+            return $result;
+        }
 
-        if (!is_a($result, 'PEAR_Error')) {
-            $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
-            if (is_array($row)) {
-                $this->_disconnect();
-                $row['message'] = 'Subject: ' . $row['subject'] . "\n" . $row['message'];
-                return $row;
-            } else {
-                $this->_disconnect();
-                return false;
-            }
-        } else {
-            $this->_disconnect();
-            return false;
+        $row = $result->fetchRow(DB_FETCHMODE_ASSOC);
+        if (is_a($row, 'PEAR_Error')) {
+            return $row;
+        }
+        if (is_array($row)) {
+            return $row;
         }
+
+        return array('vacation' => false);
     }
 
     /**
-     * Does an SQL connect and logs in as user with privilege to change
-     * vacation.
+     * Retrieves the current password details for a user.
      *
-     * @return boolean  True or False based on success of connect.
+     * @return string  Current password.
      */
-    function _connect($realm)
+    function _getCurrentPassword()
     {
-        if (!$this->_connected) {
-            // Build the params array to pass to DB
-            $_args = array_merge($this->_params, $this->_params[$realm]);
-
-            Horde::assertDriverConfig($_args, 'server',
-                array('phptype', 'table'),
-                'vacation authentication SQL');
-
-            if (!isset($this->_params['database'])) {
-                $this->_params['database'] = '';
-            }
-            if (!isset($this->_params['username'])) {
-                $this->_params['username'] = '';
-            }
-            if (!isset($this->_params['hostspec'])) {
-                $this->_params['hostspec'] = '';
-            }
-
-            /* Connect to the SQL server using the supplied parameters. */
-            require_once 'DB.php';
-            $this->_db = &DB::connect($_args,
-                                      array('persistent' => !empty($_args['persistent'])));
-            if (is_a($this->_db, 'PEAR_Error')) {
-                Horde::fatal(PEAR::raiseError(_("Unable to connect to SQL server.")), __FILE__, __LINE__);
-            }
-
-            // Set DB portability options.
-            switch ($this->_db->phptype) {
-            case 'mssql':
-                $this->_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);
-                break;
-            default:
-                $this->_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);
-            }
+        // Connect to database.
+        if (is_a($connected = $this->_connect(), 'PEAR_Error')) {
+            return $connected;
+        }
+
+        // Build the SQL query.
+        $query = 'SELECT ' . $this->_params[$this->_realm]['pass_col'] . ' AS password'
+            . ' FROM ' . $this->_params[$this->_realm]['table']
+            . ' WHERE ' . $this->_params[$this->_realm]['user_col'] . ' = ?';
+        $values = array($this->_user);
 
-            $this->_connected = true;
+        $current_password = $this->_db->getOne($query, $values);
+        if (is_a($current_password, 'PEAR_Error')) {
+            Horde::logMessage($current_password, __FILE__, __LINE__, PEAR_LOG_ERR);
+            return '';
         }
 
-        return true;
+        return $current_password;
     }
 
     /**
-     * Disconnects from the SQL server and clean up the connection.
+     * Builds a username based on presence of a realm.
      *
-     * @return boolean  True on success, false on failure.
+     * @return string  user at realm or user.
      */
-    function _disconnect()
+    function _buildUsername()
     {
-        if ($this->_connected) {
-            $this->_connected = false;
-            return $this->_db->disconnect();
+        if ($this->_realm === 'default' ||
+            $this->_realm === '') {
+            return $this->_user;
+        } else {
+            return $this->_user . '@' . $this->_realm;
         }
+    }
 
-        return true;
+    /**
+     * Checks if the realm has a specific configuration. If not, tries to fall
+     * back on the default configuration. If still not a valid configuration
+     * then exits with an error.
+     */
+    function _checkConfig()
+    {
+        // If no realm passed in, or no table config for the realm passed in,
+        // then we fall back to the default realm
+        if (empty($this->_params[$this->_realm]['table'])) {
+            $this->_realm = 'default';
+        }
+
+        // If still no table,user_col,pass_col,message,subject,vacation then
+        // we have a misconfigured module.
+        if (empty($this->_params[$this->_realm]['table']) ||
+            empty($this->_params[$this->_realm]['user_col']) ||
+            empty($this->_params[$this->_realm]['pass_col']) ||
+            empty($this->_params[$this->_realm]['message']) ||
+            empty($this->_params[$this->_realm]['subject']) ||
+            empty($this->_params[$this->_realm]['vacation']) ) {
+            return PEAR::raiseError(_("The vacation application is not properly configured."));
+        }
     }
 
     /**
-     * Builds a username based on presense of realm.
+     * Does an SQL connect and logs in as user with privilege to change
+     * vacation.
      *
-     * @return string  user at realm or user.
+     * @return boolean  True or PEAR_Error based on success of connect.
      */
-    function _buildUsername($user, $realm)
+    function _connect()
     {
-        if ($realm === 'default' ||
-            $realm === '') {
-            return $user;
-        } else {
-            return $user . '@' . $realm;
+        if ($this->_connected) {
+            return;
+        }
+
+        // Build the params array to pass to DB
+        $args = array_merge($this->_params, $this->_params[$this->_realm]);
+
+        Horde::assertDriverConfig($args, 'server', array('phptype', 'table'),
+                                  'vacation authentication SQL');
+
+        if (!isset($args['database'])) {
+            $args['database'] = '';
         }
+        if (!isset($args['username'])) {
+            $args['username'] = '';
+        }
+        if (!isset($args['hostspec'])) {
+            $args['hostspec'] = '';
+        }
+
+        // Connect to the SQL server using the supplied parameters.
+        require_once 'DB.php';
+        $this->_db = &DB::connect($args,
+                                  array('persistent' => !empty($args['persistent'])));
+        if (is_a($this->_db, 'PEAR_Error')) {
+            return $this->_db;
+        }
+
+        // Set DB portability options.
+        switch ($this->_db->phptype) {
+            case 'mssql':
+                $this->_db->setOption(
+                    'portability',
+                    DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);
+                break;
+            default:
+                $this->_db->setOption(
+                    'portability',
+                    DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);
+        }
+
+        $this->_connected = true;
     }
 
 }
diff --git a/lib/base.php b/lib/base.php
index d6dc0e0..dfde0f8 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -5,9 +5,9 @@
  * This file brings in all of the dependencies that every Vacation
  * script will need, and sets up objects that all scripts use.
  *
- * $Horde: vacation/lib/base.php,v 1.35.2.3 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/lib/base.php,v 1.35.2.6 2009/01/06 15:28:06 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
@@ -42,11 +42,3 @@ $notification->attach('status');
 
 // Help.
 require_once 'Horde/Help.php';
-
-/**
- * Default strings for vacation messages, just to have them in the source for
- * localization reasons.
- */
-_("On vacation message");
-_("I'm on vacation and will not be reading my mail for a while.");
-_("Your mail will be dealt with when I return.");
diff --git a/lib/version.php b/lib/version.php
index 0ae2ef3..b9527dd 100644
--- a/lib/version.php
+++ b/lib/version.php
@@ -1 +1 @@
-<?php define('VACATION_VERSION', 'H3 (3.0.1)') ?>
+<?php define('VACATION_VERSION', 'H3 (3.1)') ?>
diff --git a/locale/cs_CZ/LC_MESSAGES/vacation.mo b/locale/cs_CZ/LC_MESSAGES/vacation.mo
index 697fac6..6908229 100644
Binary files a/locale/cs_CZ/LC_MESSAGES/vacation.mo and b/locale/cs_CZ/LC_MESSAGES/vacation.mo differ
diff --git a/locale/de_DE/LC_MESSAGES/vacation.mo b/locale/de_DE/LC_MESSAGES/vacation.mo
index 4da1ff2..2673e22 100644
Binary files a/locale/de_DE/LC_MESSAGES/vacation.mo and b/locale/de_DE/LC_MESSAGES/vacation.mo differ
diff --git a/locale/en_US/help.xml b/locale/en_US/help.xml
index c2cac41..31b323e 100644
--- a/locale/en_US/help.xml
+++ b/locale/en_US/help.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0'?>
-<!-- $Horde: vacation/locale/en_US/help.xml,v 1.3 2002/11/14 22:38:51 ericr Exp $ -->
+<!-- $Horde: vacation/locale/en_US/help.xml,v 1.3.2.1 2008/10/09 17:37:30 jan Exp $ -->
 <help>
 
 <entry id="account-manager">
diff --git a/locale/es_ES/LC_MESSAGES/vacation.mo b/locale/es_ES/LC_MESSAGES/vacation.mo
index ce1dafb..2642e88 100644
Binary files a/locale/es_ES/LC_MESSAGES/vacation.mo and b/locale/es_ES/LC_MESSAGES/vacation.mo differ
diff --git a/locale/es_ES/help.xml b/locale/es_ES/help.xml
index 3f45dab..696e0ae 100644
--- a/locale/es_ES/help.xml
+++ b/locale/es_ES/help.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- $Horde: vacation/locale/es_ES/help.xml,v 1.1 2006/02/17 19:37:01 jan Exp $ -->
+<!-- $Horde: vacation/locale/es_ES/help.xml,v 1.1.2.1 2008/10/09 17:37:30 jan Exp $ -->
 <help>
 
 <entry id="account-manager" md5="8bea683af55ecd824f00a46097ca70db" state="uptodate">
diff --git a/locale/fi_FI/LC_MESSAGES/vacation.mo b/locale/fi_FI/LC_MESSAGES/vacation.mo
index 8486651..52222db 100644
Binary files a/locale/fi_FI/LC_MESSAGES/vacation.mo and b/locale/fi_FI/LC_MESSAGES/vacation.mo differ
diff --git a/locale/fi_FI/help.xml b/locale/fi_FI/help.xml
index 55ebe64..898e5af 100644
--- a/locale/fi_FI/help.xml
+++ b/locale/fi_FI/help.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- $Horde: vacation/locale/fi_FI/help.xml,v 1.1 2005/03/16 15:30:30 jan Exp $ -->
+<!-- $Horde: vacation/locale/fi_FI/help.xml,v 1.1.2.1 2008/10/09 17:37:31 jan Exp $ -->
 <help>
   <entry id="account-manager" md5="8bea683af55ecd824f00a46097ca70db" state="uptodate">
     <title>Valikkopainikkeet: K&#xE4;ytt&#xE4;j&#xE4;tunnuksen hallinta</title>
diff --git a/locale/fr_FR/LC_MESSAGES/vacation.mo b/locale/fr_FR/LC_MESSAGES/vacation.mo
index 0a274c0..bd01fd3 100644
Binary files a/locale/fr_FR/LC_MESSAGES/vacation.mo and b/locale/fr_FR/LC_MESSAGES/vacation.mo differ
diff --git a/locale/hu_HU/LC_MESSAGES/vacation.mo b/locale/hu_HU/LC_MESSAGES/vacation.mo
index 5a43f78..4ec65ed 100644
Binary files a/locale/hu_HU/LC_MESSAGES/vacation.mo and b/locale/hu_HU/LC_MESSAGES/vacation.mo differ
diff --git a/locale/it_IT/LC_MESSAGES/vacation.mo b/locale/it_IT/LC_MESSAGES/vacation.mo
index 417d823..226d5b2 100644
Binary files a/locale/it_IT/LC_MESSAGES/vacation.mo and b/locale/it_IT/LC_MESSAGES/vacation.mo differ
diff --git a/locale/nl_NL/LC_MESSAGES/vacation.mo b/locale/nl_NL/LC_MESSAGES/vacation.mo
index 3ff1870..992912f 100644
Binary files a/locale/nl_NL/LC_MESSAGES/vacation.mo and b/locale/nl_NL/LC_MESSAGES/vacation.mo differ
diff --git a/locale/nl_NL/help.xml b/locale/nl_NL/help.xml
index d5f4d1e..dba03d7 100644
--- a/locale/nl_NL/help.xml
+++ b/locale/nl_NL/help.xml
@@ -1,5 +1,5 @@
 <?xml version='1.0'?>
-<!-- $Horde: vacation/locale/nl_NL/help.xml,v 1.1 2003/04/01 08:31:27 jan Exp $ -->
+<!-- $Horde: vacation/locale/nl_NL/help.xml,v 1.1.4.1 2008/10/09 17:37:32 jan Exp $ -->
 <help>
 
 <entry id="account-manager">
diff --git a/locale/pl_PL/LC_MESSAGES/vacation.mo b/locale/pl_PL/LC_MESSAGES/vacation.mo
index 25907e5..2e14818 100644
Binary files a/locale/pl_PL/LC_MESSAGES/vacation.mo and b/locale/pl_PL/LC_MESSAGES/vacation.mo differ
diff --git a/locale/pt_BR/LC_MESSAGES/vacation.mo b/locale/pt_BR/LC_MESSAGES/vacation.mo
index 40bfe5b..906084d 100644
Binary files a/locale/pt_BR/LC_MESSAGES/vacation.mo and b/locale/pt_BR/LC_MESSAGES/vacation.mo differ
diff --git a/locale/sl_SI/LC_MESSAGES/vacation.mo b/locale/sl_SI/LC_MESSAGES/vacation.mo
index 708d681..48e3f47 100644
Binary files a/locale/sl_SI/LC_MESSAGES/vacation.mo and b/locale/sl_SI/LC_MESSAGES/vacation.mo differ
diff --git a/locale/tr_TR/LC_MESSAGES/vacation.mo b/locale/tr_TR/LC_MESSAGES/vacation.mo
new file mode 100644
index 0000000..9fc6f78
Binary files /dev/null and b/locale/tr_TR/LC_MESSAGES/vacation.mo differ
diff --git a/locale/zh_TW/LC_MESSAGES/vacation.mo b/locale/zh_TW/LC_MESSAGES/vacation.mo
index 4afe3c9..0376512 100644
Binary files a/locale/zh_TW/LC_MESSAGES/vacation.mo and b/locale/zh_TW/LC_MESSAGES/vacation.mo differ
diff --git a/main.php b/main.php
index df1602c..8edf2d8 100644
--- a/main.php
+++ b/main.php
@@ -1,37 +1,29 @@
 <?php
 /**
- * $Horde: vacation/main.php,v 1.55.2.5 2007/01/02 13:55:21 jan Exp $
+ * $Horde: vacation/main.php,v 1.55.2.8 2009/01/29 11:57:30 jan Exp $
  *
- * Copyright 2001-2007 Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * Copyright 2001-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+ *
+ * @author Eric Rostetter <eric.rostetter at physics.utexas.edu>
+ * @author Jan Schneider <jan at horde.org>
  */
 
 @define('VACATION_BASE', dirname(__FILE__));
 require_once VACATION_BASE . '/lib/base.php';
+require_once 'Horde/MIME.php';
 
 // Create a driver.
 require_once VACATION_BASE . '/lib/Driver.php';
-$driver = &Vacation_Driver::factory();
-
 require_once VACATION_BASE . '/lib/AliasDriver.php';
-
-// Get the current login username and realm.
- at list($user, $realm) = explode('@', Auth::getAuth(), 2);
-if (empty($realm) || empty($driver->_params[$realm])) {
-    $realm = 'default';
-}
+$driver = Vacation_Driver::factory(Auth::getAuth());
 
 // Check if hordeauth is set to 'full'
-$hordeauth = $driver->getParam('hordeauth', $realm);
-if ($hordeauth === 'full') {
-    $user = Auth::getAuth();
-}
-
-$submit = Util::getFormData('submit', false);
+$hordeauth = $driver->getParam('hordeauth');
 
-if ($submit) {
+if (Util::getFormData('submit')) {
     $vacationmode = Util::getFormData('mode', 'error');
     if ($vacationmode === 'error') {
         $notification->push(_("You must specify the mode (set or remove)"),
@@ -39,13 +31,15 @@ if ($submit) {
     }
 
     // Check for refused usernames, using current horde username.
-    if (in_array($user, $conf['user']['refused'])) {
-        $notification->push(sprintf(_("You can't change the vacation notice for %s."), $user), 'horde.error');
+    if (in_array($driver->getUser(), $conf['user']['refused'])) {
+        $notification->push(sprintf(_("You can't change the vacation notice for %s."),
+                                    $driver->getUser()),
+                            'horde.error');
         $vacationmode = 'error';
     } else {
         // Check for password
         if (empty($hordeauth)) {
-            $password = Util::getFormData('password', false);
+            $password = Util::getFormData('password');
             if (empty($password)) {
                 $notification->push(_("You must give your password"), 'horde.warning');
                 $vacationmode = 'error';
@@ -59,118 +53,102 @@ if ($submit) {
     switch ($vacationmode) {
     case 'set':
         if ($conf['aliases']['show']) {
-            $alias = Util::getFormData('alias', '');
+            $alias = Util::getFormData('alias');
         } else {
-            $aliases = &Vacation_AliasDriver::singleton();
-            $alias_list = $aliases->getAliasesForUser($user);
-            if (count($alias_list) > 0) {
-                $alias = join(', ', $alias_list);
-            } else {
-                $alias = '';
-            }
+            $aliases = Vacation_AliasDriver::factory($driver->getUser());
+            $alias_list = $aliases->getAliasesForUser();
+            $alias = count($alias_list) ? join(', ', $alias_list) : '';
         }
-        $vacationmsg = Util::getFormData('mess', false);
 
-        $vacationtxt = '';
-        // Include the mail subject if the driver supports it.
-        if ($conf['vacation']['subject']) {
-            $vacationtxt .= 'Subject: ' . Util::getFormData('subject') . "\n";
-        }
-        // Include the mail sender if the driver supports it.
-        if ($conf['vacation']['from']) {
-            $vacationtxt .= 'From: ' . Util::getFormData('from') . "\n";
-        }
-        $vacationtxt .= $vacationmsg;
-
-        if (!$vacationmsg) {
+        $message = Util::getFormData('mess');
+        if (empty($message)) {
             $notification->push(_("You must give a vacation message."),
-                                'horde.warning');
-        } elseif (!empty($conf['vacation']['validation_pattern']) &&
-                  !@preg_match($conf['vacation']['validation_pattern'], $vacationtxt)) {
+                                'horde.error');
+            break;
+        }
+        if (!empty($conf['vacation']['validation_pattern']) &&
+            !preg_match($conf['vacation']['validation_pattern'], $message)) {
             // Validation is required, and wasn't matched.
             $notification->push(_("Your vacation message is not in the proper format."),
-                                'horde.warning');
-        } else {
-            // Try and make sure to send Unix linefeeds.
-            $vacationtxt = str_replace("\r\n", "\n", $vacationtxt);
-            $vacationtxt = str_replace("\r", "\n", $vacationtxt);
-
-            // Wrap at 75 characters.
-            $vacationtxt = wordwrap($vacationtxt);
+                                'horde.error');
+            break;
+        }
 
-            if ($driver->setVacation($user, $realm, $password,
-                                     $vacationtxt, $alias)) {
-                $notification->push(_("Vacation notice successfully enabled."), 'horde.success');
-            } else {
-                $notification->push(sprintf(_("Failure in modifying vacation notice: %s"),
-                                            $driver->err_str), 'horde.error');
-            }
+        $result = $driver->setVacation($password, $message,
+                                       Util::getFormData('subject'),
+                                       Util::getFormData('from'), $alias);
+        if (is_a($result, 'PEAR_Error')) {
+            $notification->push($result);
+        } else {
+            $notification->push(_("Vacation notice successfully enabled."),
+                                'horde.success');
         }
         break;
 
     case 'unset':
-        if ($driver->unsetVacation($user, $realm, $password)) {
-            $notification->push(_("Vacation notice successfully removed."), 'horde.success');
+        $result = $driver->unsetVacation($password);
+        if (is_a($result, 'PEAR_Error')) {
+            $notification->push($result);
         } else {
-            $notification->push(sprintf(_("Failure in removing vacation notice: %s"),
-                                        $driver->err_str), 'horde.error');
+            $notification->push(_("Vacation notice successfully removed."),
+                                'horde.success');
         }
         break;
     }
 }
 
-// If we can tell if vacation notices are enabled, then say so. But if this
-// fails, it could be because it is disabled, or just because we can't tell,
-// so just be quiet about it.
-$pass = Auth::getCredential('password');
-$status = $driver->isEnabled($user, $realm, $pass);
+// If we can tell whether vacation notices are enabled, then say so. But if
+// this fails, it could be because it is disabled, or just because we can't
+// tell, so just be quiet about it.
 $onVacation = false;
-if ($status == 'Y') {
-    $curmessage = $driver->currentMessage($user, $realm, $pass);
-    $notification->push(_("Your vacation notice is currently enabled."), 'horde.message');
-    $onVacation = true;
-} elseif ($status == 'N') {
-    $curmessage = $driver->currentMessage($user, $realm, $pass);
-    if (empty($curmessage)) {
-        $curmessage = $conf['vacation']['default'];
-    }
-    $notification->push(_("Your vacation notice is currently disabled."), 'horde.message');
+$curmessage = $cursubject = $curfrom = '';
+$pass       = Auth::getCredential('password');
+$status     = $driver->isEnabled($pass);
+$curmessage = $driver->currentMessage($pass);
+$cursubject = $driver->currentSubject($pass);
+$curfrom    = $driver->currentFrom($pass);
+
+// Only show the status error if there is one, to avoid multiple errors of the
+// same kind.
+if (is_a($status, 'PEAR_Error')) {
+    $notification->push($status);
 } else {
-    // If the driver can't tell the difference between "disabled" and
-    // "unknown", be inscrutable.
-    $curmessage = $conf['vacation']['default'];
-}
-
-// Split the vacation text in a subject and a message if the driver supports
-// it.
-if ($conf['vacation']['subject']) {
-    if (preg_match('/^Subject: ([^\n]+)\n(.+)$/s', $curmessage, $matches)) {
-        $cursubject = $matches[1];
-        $curmessage = $matches[2];
-    } else {
-        $cursubject = '';
+    if (is_a($curmessage, 'PEAR_Error')) {
+        $notification->push($curmessage);
     }
-}
-
-// Split the vacation text in a sender and a message if the driver supports
-// it.
-if ($conf['vacation']['from']) {
-    if (preg_match('/^From: ([^\n]+)\n(.+)$/s', $curmessage, $matches)) {
-        $curfrom = $matches[1];
-        $curmessage = $matches[2];
-    } else {
-        require_once 'Horde/Identity.php';
-        $identity = &Identity::singleton();
-        // Default "From:" from identities, with name (name <address>)
-        $curfrom = $identity->getDefaultFromAddress(true);
+    if (is_a($cursubject, 'PEAR_Error')) {
+        $notification->push($cursubject);
+    }
+    if (is_a($curfrom, 'PEAR_Error')) {
+        $notification->push($curfrom);
+    }
+    if ($status === 'Y') {
+        $notification->push(_("Your vacation notice is currently enabled."),
+                            'horde.message');
+        $onVacation = true;
+    } elseif ($status === 'N') {
+        if (empty($curmessage)) {
+            $curmessage = $conf['vacation']['default'];
+        }
+        $notification->push(_("Your vacation notice is currently disabled."),
+                            'horde.message');
     }
 }
+if (is_a($curmessage, 'PEAR_Error')) {
+    $curmessage = $GLOBALS['conf']['vacation']['default_message'];
+}
+if (is_a($cursubject, 'PEAR_Error')) {
+    $cursubject = $GLOBALS['conf']['vacation']['default_subject'];
+}
+if (is_a($curfrom, 'PEAR_Error')) {
+    $curfrom = $driver->getFrom();
+}
 
 $alias = Util::getFormData('alias');
 if (is_null($alias)) {
-    $aliases = &Vacation_AliasDriver::singleton();
-    $alias_list = $aliases->getAliasesForUser($user);
-    if (is_array($alias_list) && count($alias_list) > 0) {
+    $aliases = Vacation_AliasDriver::factory($driver->getUser());
+    $alias_list = $aliases->getAliasesForUser();
+    if (is_array($alias_list) && count($alias_list)) {
         $alias = join(', ', $alias_list);
     }
 }
diff --git a/po/bg_BG.po b/po/bg_BG.po
index e5073a0..5557f02 100644
--- a/po/bg_BG.po
+++ b/po/bg_BG.po
@@ -1,5 +1,5 @@
 # Bulgarian translations for Vacation package.
-# Copyright (C) 2002 Horde Project
+# Copyright 2002-2009 The Horde Project
 # This file is distributed under the same license as the Vacation package.
 # Miroslav Pendev <miro at cybershade.us>, 2002.
 #
@@ -115,8 +115,8 @@ msgid ""
 "This is the main Vacation configuration file. It contains options for all "
 "Vacation scripts."
 msgstr ""
-"Òîâà å ãëàâíèÿ êîíôèãóðàöèîíåí ôàéë íà Vacation. Òîé ñúäúðæà ïúòèùà è îïöèè çà "
-"ñêðèïòîâåòå íà Vacation."
+"Òîâà å ãëàâíèÿ êîíôèãóðàöèîíåí ôàéë íà Vacation. Òîé ñúäúðæà ïúòèùà è îïöèè "
+"çà ñêðèïòîâåòå íà Vacation."
 
 msgid "Unable to connect to SQL server."
 msgstr "Íåâúçìîæíîñò çà âðúçêà ñ SQL ñúðâúð."
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index ddcc803..feecbdf 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -1,5 +1,5 @@
 # Czech translations for Vacation package.
-# Copyright (C) 2004 Horde Project
+# Copyright 2004-2009 The Horde Project
 # This file is distributed under the same license as the Horde package.
 # Pavel Chytil <pavel at chytil.tk>, 2004.
 #
diff --git a/po/da_DK.po b/po/da_DK.po
index 1208600..43b968d 100644
--- a/po/da_DK.po
+++ b/po/da_DK.po
@@ -1,6 +1,6 @@
 # Danish translations for Vacation package
 # Danske oversættelser for pakke Vacation.
-# Copyright (C) 2006 Horde Project
+# Copyright 2006-2009 The Horde Project
 # This file is distributed under the same license as the Vacation package.
 # Brian Truelsen <horde+i18n at briantruelsen.dk>, 2006.
 #
diff --git a/po/de_DE.po b/po/de_DE.po
index eb2ac7b..f1b9bf7 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -1,14 +1,15 @@
-# vacation module translations
-# Copyright (C) 2002-2005 Horde Project.
+# German translations for Vacation.
+# Copyright 2002-2009 The Horde Project
+# This file is distributed under the same license as the Vacation package.
 # Jens Tkotz <jens.tkotz at f2h9.de>, 2002.
-# Jan Schneider <jan at horde.org>, 2002-2005.
+# Jan Schneider <jan at horde.org>, 2002-2008.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: Vacation 3.0-cvs\n"
+"Project-Id-Version: Vacation 3.1-cvs\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2006-11-03 23:12+0100\n"
-"PO-Revision-Date: 2006-08-09 17:17+0200\n"
+"POT-Creation-Date: 2009-03-19 10:37+0100\n"
+"PO-Revision-Date: 2008-08-01 16:32+0200\n"
 "Last-Translator: Jan Schneider <jan at horde.org>\n"
 "Language-Team: German <i18n at lists.horde.org>\n"
 "MIME-Version: 1.0\n"
@@ -30,46 +31,88 @@ msgstr ""
 msgid "Alias addresses for this account (optional):"
 msgstr "Aliasadressen für dieses Konto (optional):"
 
-#: lib/Driver.php:197
-msgid "Can't parse your email address"
+#: lib/Driver/sql.php:133
+msgid "An unknown error occured while disabling the vacation notice."
+msgstr ""
+"Beim Deaktivieren der Abwesenheitsnachricht ist ein unbekannter Fehler "
+"aufgetreten."
+
+#: lib/Driver/customsql.php:92 lib/Driver/customsql.php:136
+#: lib/Driver/sql.php:92
+msgid "An unknown error occured while enabling the vacation notice."
+msgstr ""
+"Beim Aktivieren der Abwesenheitsnachricht ist ein unbekannter Fehler "
+"aufgetreten."
+
+#: lib/Driver.php:393
+msgid "Cannot parse your email address"
 msgstr "Ihre E-Mail-Adresse konnte nicht ausgewertet werden"
 
-#: main.php:178 templates/main/main.inc:34
-msgid "Change Vacation Notices"
-msgstr "Ändern Sie Ihre Abwesenheitsnotitz"
+#: lib/Driver/plesk.php:148
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
+msgstr ""
+"Die Abwesenheitsnotiz für den Mail-Benutzer %s konnte nicht gelöscht werden."
 
-#: lib/Driver/ldap.php:212
-msgid "Check your password"
-msgstr "Überprüfen Sie Ihr Passwort"
+#: lib/Driver/plesk.php:143
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
+msgstr ""
+"Die Abwesenheitsnotiz für den Mail-Benutzer %s konnte nicht gelöscht werden: "
+"%s"
 
-#: lib/Driver/forwards.php:96 lib/Driver/forwards.php:192
-#: lib/Driver/forwards.php:248 lib/Driver/qmail.php:96
-#: lib/Driver/qmail.php:198 lib/Driver/qmail.php:268
-msgid "Check your username and password."
-msgstr "Überprüfen Sie Ihren Benutzernamen und Ihr Passwort."
+#: lib/Driver/plesk.php:252
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
+msgstr "Die Domain-ID der Domain %s konnte nicht ausgelesen werden."
 
-#: lib/Driver/ldap.php:100 lib/Driver/ldap.php:299 lib/Driver/ldap.php:389
+#: lib/Driver/plesk.php:250
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
+msgstr "Die Domain-ID der Domain %s konnte nicht ausgelesen werden: %s"
+
+#: lib/Driver/plesk.php:198
+#, php-format
+msgid "Cannot retrieve information about mail user %s."
+msgstr ""
+"Die Informationen zum Mail-Benutzer %s konnten nicht ausgelesen werden."
+
+#: lib/Driver/plesk.php:194
+#, php-format
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr ""
+"Die Informationen zum Mail-Benutzer %s konnten nicht ausgelesen werden: %s"
+
+#: lib/Driver/plesk.php:106
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr ""
+"Die Abwesenheitsnotiz für den Mail-Benutzer %s konnte nicht angelegt werden."
+
+#: lib/Driver/plesk.php:101
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr ""
+"Die Abwesenheitsnotiz für den Mail-Benutzer %s konnte nicht angelegt werden: "
+"%s"
+
+#: main.php:156 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr "Ändern Sie Ihre Abwesenheitsnotitz"
+
+#: lib/Driver/ldap.php:68 lib/Driver/ldap.php:142 lib/Driver/ldap.php:205
+#: lib/Driver/ldap.php:358
 msgid "Could not bind to ldap server"
 msgstr "Verbindung zum LDAP-Server fehlgeschlagen"
 
-#: lib/Driver/ldap.php:84
+#: lib/Driver/ldap.php:341
 msgid "Could not connect to ldap server"
 msgstr "Verbindung zum LDAP-Server fehlgeschlagen"
 
-#: lib/Block/summary.php:37
+#: lib/Block/summary.php:30
 msgid "Failed to create a vacation driver"
 msgstr "Treiber für Abwesenheitsnotiz konne nicht erstellt werden"
 
-#: main.php:105
-#, php-format
-msgid "Failure in modifying vacation notice: %s"
-msgstr "Beim Ändern der Abwesenheitsnotiz ist ein Fehler aufgetreten: %s"
-
-#: main.php:115
-#, php-format
-msgid "Failure in removing vacation notice: %s"
-msgstr "Beim Löschen der Abwesenheitsnotiz ist ein Fehler aufgetreten: %s"
-
 #: templates/main/main.inc:88
 msgid ""
 "For your protection and safety, you must identify yourself with your login "
@@ -82,13 +125,16 @@ msgstr ""
 msgid "From:"
 msgstr "Von:"
 
-#: lib/base.php:51
-msgid "I'm on vacation and will not be reading my mail for a while."
+#: config/conf.xml
+msgid ""
+"I'm on vacation and will not be reading my mail for a while.\n"
+"Your mail will be dealt with when I return."
 msgstr ""
-"Ich bin zur Zeit im Urlaub und kann meine E-Mail-Nachrichten für eine Weile "
-"nicht lesen."
+"Ich bin zur Zeit im Urlaub und kann meine E-Mail-Nachrichten währenddessen "
+"nicht lesen.\n"
+"Ihre Nachricht wird bearbeitet, sobald ich zurückkehre."
 
-#: lib/Driver/ldap.php:300 lib/Driver/ldap.php:390
+#: lib/Driver/ldap.php:69 lib/Driver/ldap.php:143 lib/Driver/ldap.php:206
 msgid "Incorrect Password"
 msgstr "Falsches Passwort"
 
@@ -100,7 +146,7 @@ msgstr ""
 "Dies kann als nette Geste genutzt werden, um anderen einen Hinweis zu geben, "
 "warum Sie nicht antworten."
 
-#: lib/Driver/forwards.php:199
+#: lib/Driver/forwards.php:192
 msgid "Maybe you didn't have a vacation notice installed?"
 msgstr "Vielleicht haben Sie keine Abwesenheitsnotiz installiert?"
 
@@ -108,11 +154,11 @@ msgstr "Vielleicht haben Sie keine Abwesenheitsnotiz installiert?"
 msgid "Message:"
 msgstr "Nachricht:"
 
-#: lib/AliasDriver.php:43
+#: lib/AliasDriver.php:52
 msgid "Not implemented."
 msgstr "Nicht implementiert."
 
-#: lib/base.php:50
+#: config/conf.xml
 msgid "On vacation message"
 msgstr "Abwesenheitsnachricht"
 
@@ -128,14 +174,30 @@ msgstr "Betreff:"
 msgid "Submit"
 msgstr "Abschicken"
 
-#: lib/Driver/ldap.php:135 lib/Driver/qmail.php:52
+#: lib/Driver/plesk.php:226
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+"Der Plesk-Treiber benötigt das Horde_DOM-Paket aus Horde 3.2 oder größer. "
+"Siehe http://pear.horde.org/index.php?package=Horde_DOM"
+
+#: lib/Driver/ldap.php:284
 msgid "The module is not properly configured!"
 msgstr "Vacation ist nicht vollständig konfiguriert!"
 
-#: lib/Driver/forwards.php:52 lib/Driver/sql.php:54
+#: lib/Driver/forwards.php:264 lib/Driver/customsql.php:255
+#: lib/Driver/sql.php:248 lib/Driver/plesk.php:260
 msgid "The vacation application is not properly configured."
 msgstr "Vacation ist nicht vollständig konfiguriert."
 
+#: lib/Driver/customsql.php:89 lib/Driver/customsql.php:133
+#: lib/Driver/sql.php:89 lib/Driver/sql.php:130
+msgid "The vacation notice cannot be set. Check the password."
+msgstr ""
+"Die Abwesenheitsnachricht kann nicht angelegt werden. Überprüfen Sie das "
+"Passwort."
+
 #: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr ""
@@ -151,15 +213,11 @@ msgstr ""
 "erstellen (oder löschen). Sie sollten die voreingestellte Nachricht an Ihre "
 "Bedürfnisse anpassen."
 
-#: lib/Driver/sql.php:265
-msgid "Unable to connect to SQL server."
-msgstr "Verbindung zum SQL Server kann nicht hergestellt werden."
-
 #: templates/main/main.inc:52
 msgid "Unset/remove vacation notice"
 msgstr "Löschen Sie Ihre Abwesenheitsnotiz"
 
-#: lib/Driver/ldap.php:170
+#: lib/Driver/ldap.php:317
 msgid "User not found."
 msgstr "Benutzer nicht gefunden."
 
@@ -167,40 +225,36 @@ msgstr "Benutzer nicht gefunden."
 msgid "Vacation Summary"
 msgstr "Abwesenheitsübersicht"
 
-#: lib/Block/summary.php:42
+#: lib/Block/summary.php:35
 msgid "Vacation is active."
 msgstr "Die Abwesenheitsnotiz ist aktiv."
 
-#: lib/Block/summary.php:41
+#: lib/Block/summary.php:34
 msgid "Vacation is not active."
 msgstr "Die Abwesenheitsnotiz ist nicht aktiv."
 
-#: lib/Driver/qmail.php:102
+#: lib/Driver/qmail.php:30
 msgid "Vacation notice already exists."
 msgstr "Eine Abwesenheitsnotiz existiert bereits."
 
-#: lib/Driver/qmail.php:209
-msgid "Vacation notice not found."
-msgstr "Abwesenheitsnotiz nicht gefunden."
-
-#: main.php:103
+#: main.php:83
 msgid "Vacation notice successfully enabled."
 msgstr "Abwesenheitsnotiz erfolgreich aktiviert."
 
-#: main.php:113
+#: main.php:93
 msgid "Vacation notice successfully removed."
 msgstr "Abwesenheitsnotiz erfolgreich gelöscht."
 
-#: main.php:43
+#: main.php:35
 #, php-format
 msgid "You can't change the vacation notice for %s."
 msgstr "Sie können die Abwesenheitsnotiz für %s nicht ändern."
 
-#: main.php:86
+#: main.php:65
 msgid "You must give a vacation message."
 msgstr "Sie müssen eine Abwesenheitsnachricht angeben."
 
-#: main.php:50
+#: main.php:44
 msgid "You must give your password"
 msgstr "Sie müssen Ihr Passwort angeben"
 
@@ -214,26 +268,22 @@ msgstr ""
 msgid "You must provide your password"
 msgstr "Sie müssen Ihr Passwort angeben"
 
-#: main.php:37
+#: main.php:29
 msgid "You must specify the mode (set or remove)"
 msgstr "Sie müssen den Modus (Erstellen oder Entfernen) angeben"
 
-#: lib/base.php:52
-msgid "Your mail will be dealt with when I return."
-msgstr "Ihre Nachricht wird bearbeitet, sobald ich zurückkehre."
-
 #: templates/main/main.inc:93
 msgid "Your password:"
 msgstr "Ihr Passwort:"
 
-#: main.php:91
+#: main.php:72
 msgid "Your vacation message is not in the proper format."
 msgstr "Ihre Abwesenheitsnachricht hat kein korrektes Format."
 
-#: main.php:137
+#: main.php:133
 msgid "Your vacation notice is currently disabled."
 msgstr "Ihre Abwesenheitsnotiz ist zur Zeit deaktiviert."
 
-#: main.php:130
+#: main.php:126
 msgid "Your vacation notice is currently enabled."
 msgstr "Ihre Abwesenheitsnotiz ist zur Zeit aktiviert."
diff --git a/po/el_GR.po b/po/el_GR.po
index ace940a..6f6b876 100644
--- a/po/el_GR.po
+++ b/po/el_GR.po
@@ -1,5 +1,5 @@
 # vacation module translations
-# Copyright (C) 2002-2005 Horde Project.
+# Copyright 2002-2009 The Horde Project.
 # Milosis C. Konstantinos, 2005.
 #
 msgid ""
diff --git a/po/es_ES.po b/po/es_ES.po
index 7e1e8f3..6c0e6a8 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -1,23 +1,23 @@
-# Spanish translations for horde package
-# Traducciones al español para el paquete horde.
-# Copyright (C) 2004 Horde Project
-# This file is distributed under the same license as the horde package.
-# Automatically generated, 2004.
+# Spanish translations for vacation package
+# Traducciones al español para el paquete vacation.
+# Copyright 2008-2009 The Horde Project
+# This file is distributed under the same license as the vacation package.
+# Automatically generated, 2008.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: Vacation 3.0-cvs\n"
+"Project-Id-Version: Vacation 3.0.1\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2006-02-02 16:44+0100\n"
-"PO-Revision-Date: 2006-02-02 16:44+0100\n"
+"POT-Creation-Date: 2009-02-20 17:22+0100\n"
+"PO-Revision-Date: 2009-02-20 17:22+0100\n"
 "Last-Translator: Manuel P. Ayala <mayala at unex.es>\n"
 "Language-Team: i18n at lists.horde.org\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
-#: templates/main/main.inc:40
+#: templates/main/main.inc:42
 msgid ""
 "A vacation notice will automatically reply to any incoming mail you receive "
 "while you are away or unable to attend to your e-mail -- for example while "
@@ -29,51 +29,86 @@ msgstr ""
 "encuentra fuera del país por asuntos de negocios. Sirve de muestra de "
 "cortesía con los demás para indicarles por qué no contesta a sus correos."
 
-#: templates/main/main.inc:73
+#: templates/main/main.inc:79
 msgid "Alias addresses for this account (optional):"
 msgstr "Direcciones alternativas de esta identidad (opcional):"
 
-#: lib/Driver.php:182
-msgid "Can't parse your email address"
-msgstr "No se puede procesar su dirección electrónica"
+#: lib/Driver/sql.php:133
+msgid "An unknown error occured while disabling the vacation notice."
+msgstr ""
+"Se produjo un error desconocido al desactivar la notificación de ausencia."
 
-#: main.php:160 templates/main/main.inc:36
-msgid "Change Vacation Notices"
-msgstr "Cambiar la notificación de ausencia"
+#: lib/Driver/sql.php:92 lib/Driver/customsql.php:92
+#: lib/Driver/customsql.php:136
+msgid "An unknown error occured while enabling the vacation notice."
+msgstr "Se produjo un error al activar la notificación de ausencia."
+
+#: lib/Driver.php:393
+msgid "Cannot parse your email address"
+msgstr "No se puede procesar su dirección de correo"
+
+#: lib/Driver/plesk.php:148
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
+msgstr ""
+"No se puede eliminar la notificación de ausencia del usuario de correo %s."
+
+#: lib/Driver/plesk.php:143
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
+msgstr ""
+"No se puede eliminar la notificación de ausencia del usuario de correo %s: %s"
+
+#: lib/Driver/plesk.php:252
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
+msgstr "No se puede recuperar el ID de dominio del dominio %s."
+
+#: lib/Driver/plesk.php:250
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
+msgstr "No se puede recuperar el ID de dominio del dominio %s: %s"
+
+#: lib/Driver/plesk.php:198
+#, php-format
+msgid "Cannot retrieve information about mail user %s."
+msgstr "No se puede recuperar la información del usuario de correo %s."
+
+#: lib/Driver/plesk.php:194
+#, php-format
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr "No se puede recuperar la información de usuario de correo %s: %s"
 
-#: lib/Driver/ldap.php:204
-msgid "Check your password"
-msgstr "Compruebe la contraseña"
+#: lib/Driver/plesk.php:106
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr ""
+"No se puede definir la notificación de ausencia del usuario de correo %s."
 
-#: lib/Driver/forwards.php:96 lib/Driver/forwards.php:192
-#: lib/Driver/forwards.php:248 lib/Driver/qmail.php:96
-#: lib/Driver/qmail.php:198 lib/Driver/qmail.php:268
-msgid "Check your username and password."
-msgstr "Compruebe su nombre de usuario y contraseña."
+#: lib/Driver/plesk.php:101
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr ""
+"No se puede definir la notificación de ausencia del usuario de correo %s: %s"
 
-#: lib/Driver/ldap.php:98 lib/Driver/ldap.php:291 lib/Driver/ldap.php:371
+#: main.php:156 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr "Cambiar la notificación de ausencia"
+
+#: lib/Driver/ldap.php:68 lib/Driver/ldap.php:142 lib/Driver/ldap.php:205
+#: lib/Driver/ldap.php:358
 msgid "Could not bind to ldap server"
 msgstr "No se puede enlazar al servidor ldap"
 
-#: lib/Driver/ldap.php:84
+#: lib/Driver/ldap.php:341
 msgid "Could not connect to ldap server"
 msgstr "No se puede conectar al servidor ldap"
 
-#: lib/Block/summary.php:37
+#: lib/Block/summary.php:30
 msgid "Failed to create a vacation driver"
 msgstr "Fallo al crear un controlador de notificación de ausencia"
 
-#: main.php:103
-#, php-format
-msgid "Failure in modifying vacation notice: %s"
-msgstr "Fallo al modificar la notificación de ausencia: %s"
-
-#: main.php:113
-#, php-format
-msgid "Failure in removing vacation notice: %s"
-msgstr "Fallo al desactivar la notificación de ausencia: %s"
-
-#: templates/main/main.inc:89
+#: templates/main/main.inc:88
 msgid ""
 "For your protection and safety, you must identify yourself with your login "
 "password to verify this change."
@@ -81,11 +116,23 @@ msgstr ""
 "Para su protección y seguridad, debe introducir su contraseña para poder "
 "realizar el cambio."
 
-#: lib/Driver/ldap.php:292 lib/Driver/ldap.php:372
+#: templates/main/main.inc:65
+msgid "From:"
+msgstr "De:"
+
+#: config/conf.xml
+msgid ""
+"I'm on vacation and will not be reading my mail for a while.\n"
+"Your mail will be dealt with when I return."
+msgstr ""
+"Estoy ausente y no leeré mi correo por una temporada.\n"
+"Me ocuparé de su mensaje cuando regrese."
+
+#: lib/Driver/ldap.php:69 lib/Driver/ldap.php:143 lib/Driver/ldap.php:206
 msgid "Incorrect Password"
 msgstr "Contraseña incorrecta"
 
-#: templates/main/main.inc:41
+#: templates/main/main.inc:43
 msgid ""
 "It could be used as a courtesy to let others know why you are not answering "
 "their e-mail to you."
@@ -93,18 +140,22 @@ msgstr ""
 "El objetivo es hacerles saber la razón por la que no obtienen respuesta a "
 "sus correos."
 
-#: lib/Driver/forwards.php:199
+#: lib/Driver/forwards.php:192
 msgid "Maybe you didn't have a vacation notice installed?"
 msgstr "¿Puede que no tenga la notificación por ausencia activada?"
 
-#: templates/main/main.inc:65
+#: templates/main/main.inc:72
 msgid "Message:"
 msgstr "Mensaje:"
 
-#: lib/AliasDriver.php:42
+#: lib/AliasDriver.php:52
 msgid "Not implemented."
 msgstr "Sin desarrollar."
 
+#: config/conf.xml
+msgid "On vacation message"
+msgstr "Mensaje de ausencia"
+
 #: templates/main/main.inc:49
 msgid "Set/install vacation notice"
 msgstr "Activar/definir una notificación de ausencia"
@@ -113,24 +164,39 @@ msgstr "Activar/definir una notificaci
 msgid "Subject:"
 msgstr "Asunto:"
 
-#: templates/main/main.inc:96
+#: templates/main/main.inc:100
 msgid "Submit"
 msgstr "Enviar"
 
-#: lib/Driver/qmail.php:52 lib/Driver/ldap.php:133
+#: lib/Driver/plesk.php:226
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+"El manejador de Plesk precisa el paquete Horde_DOM de Horde 3.2 o superior. "
+"Consulte http://pear.horde.org/index.php?package=Horde_DOM"
+
+#: lib/Driver/ldap.php:284
 msgid "The module is not properly configured!"
 msgstr "¡El módulo no está bien configurado!"
 
-#: lib/Driver/forwards.php:52 lib/Driver/sql.php:53
+#: lib/Driver/sql.php:248 lib/Driver/plesk.php:260
+#: lib/Driver/customsql.php:255 lib/Driver/forwards.php:264
 msgid "The vacation application is not properly configured."
 msgstr "El módulo de ausencia no está bien configurado."
 
-#: templates/main/main.inc:90
+#: lib/Driver/sql.php:89 lib/Driver/sql.php:130 lib/Driver/customsql.php:89
+#: lib/Driver/customsql.php:133
+msgid "The vacation notice cannot be set. Check the password."
+msgstr ""
+"No se puede definir la notificación de ausencia. Compruebe la contraseña."
+
+#: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr ""
 "Envíe el formulario para que se pueda actualizar la notificación de ausencia."
 
-#: templates/main/main.inc:42
+#: templates/main/main.inc:44
 msgid ""
 "This form lets you install or remove a vacation notice for your e-mail "
 "account. You should edit the default message to meet your needs."
@@ -138,15 +204,11 @@ msgstr ""
 "Este formulario le permite activar o anular la notificación de ausencia de "
 "su cuenta. Modifique el mensaje por omisión según sus necesidades."
 
-#: lib/Driver/sql.php:265
-msgid "Unable to connect to SQL server."
-msgstr "Incapaz de conectarse al servidor SQL."
-
 #: templates/main/main.inc:52
 msgid "Unset/remove vacation notice"
 msgstr "Anular/eliminar la notificación de ausencia"
 
-#: lib/Driver/ldap.php:163
+#: lib/Driver/ldap.php:317
 msgid "User not found."
 msgstr "No se encontró el usuario."
 
@@ -154,40 +216,36 @@ msgstr "No se encontr
 msgid "Vacation Summary"
 msgstr "Resumen de notificación de ausencia"
 
-#: lib/Block/summary.php:42
+#: lib/Block/summary.php:35
 msgid "Vacation is active."
 msgstr "La notificación de ausencia está activa."
 
-#: lib/Block/summary.php:41
+#: lib/Block/summary.php:34
 msgid "Vacation is not active."
 msgstr "La notificación de ausencia está inactiva."
 
-#: lib/Driver/qmail.php:102
+#: lib/Driver/qmail.php:30
 msgid "Vacation notice already exists."
 msgstr "Ya se ha definido una notificación de ausencia."
 
-#: lib/Driver/qmail.php:209
-msgid "Vacation notice not found."
-msgstr "No se ha encontrado una notificación de ausencia."
-
-#: main.php:101
+#: main.php:83
 msgid "Vacation notice successfully enabled."
 msgstr "Se ha activado correctamente la notificación de ausencia."
 
-#: main.php:111
+#: main.php:93
 msgid "Vacation notice successfully removed."
 msgstr "Se ha eliminado correctamente la notificación de ausencia."
 
-#: main.php:45
+#: main.php:35
 #, php-format
 msgid "You can't change the vacation notice for %s."
 msgstr "No puede cambiar la notificación de ausencia de %s."
 
-#: main.php:84
+#: main.php:65
 msgid "You must give a vacation message."
 msgstr "Tiene que introducir un mensaje de ausencia."
 
-#: main.php:52
+#: main.php:44
 msgid "You must give your password"
 msgstr "Tiene que introducir su contraseña"
 
@@ -200,7 +258,7 @@ msgstr ""
 msgid "You must provide your password"
 msgstr "Tiene que introducir su contraseña"
 
-#: main.php:39
+#: main.php:29
 msgid "You must specify the mode (set or remove)"
 msgstr "Tiene que especificar el modo (establecer o eliminar)"
 
@@ -208,14 +266,14 @@ msgstr "Tiene que especificar el modo (establecer o eliminar)"
 msgid "Your password:"
 msgstr "Su contraseña:"
 
-#: main.php:89
+#: main.php:72
 msgid "Your vacation message is not in the proper format."
 msgstr "Su mensaje de ausencia no tiene el formato correcto."
 
-#: main.php:132
+#: main.php:133
 msgid "Your vacation notice is currently disabled."
 msgstr "Su notificación de ausencia está desactivada actualmente."
 
-#: main.php:128
+#: main.php:126
 msgid "Your vacation notice is currently enabled."
 msgstr "Su notificación de ausencia está activada actualmente."
diff --git a/po/fa_IR.po b/po/fa_IR.po
index 3fb17ca..344b41a 100644
--- a/po/fa_IR.po
+++ b/po/fa_IR.po
@@ -1,7 +1,7 @@
 # Persian translations for Vacation package.
 # This file is distributed under the same license as the Vacation package.
-# 
-# Copyright (C) 2004 High Concil of Informatics (www.shci.ir)
+#
+# Copyright 2004 High Concil of Informatics (www.shci.ir)
 # Provided by  Amirkabir Metanetworking Ltd, 2004 <persian-horde at metanetworking.com>
 # Mohsen Nader-Badr       <naderi at metanetworking.com>
 # Chakameh Mortezania     <mortezania at metanetworking.com>
@@ -9,7 +9,7 @@
 # Hamed Gheybi            <gheybi at metanetworking.com>
 # Vahid Ghafarpour        <ghafarpour at metanetworking.com>
 # Zahra Ahmadi Firouzjaee <ahmadi at metanetworking.com>
-# 
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: Vacation 3 ALPHA\n"
@@ -169,7 +169,7 @@ msgstr "پیام تعطیلات فعال نمی‌باشد."
 msgid "Vacation notice successfully enabled."
 msgstr "پیام تعطیلات با موفّقیّت فعال شد."
 
-# 
+#
 #: main.php:104
 msgid "Vacation notice successfully removed."
 msgstr "پیام تعطیلات با موفّقیّت حذف شد."
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 74040b3..84bcd8f 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -1,21 +1,21 @@
 # Finnish translation for Vacation.
-# Copyright (C)
+# Copyright
 # Tero Matinlassi <terom at iki.fi>, 2002.
-# Leena Heino <liinu at uta.fi>, 2002-2004.
+# Leena Heino <liinu at uta.fi>, 2002-2008.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: Vacation 3.0-cvs\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2004-12-01 13:58+0100\n"
-"PO-Revision-Date: 2004-12-10 12:59+0200\n"
+"POT-Creation-Date: 2009-02-02 18:03+0200\n"
+"PO-Revision-Date: 2008-11-03 12:59+0200\n"
 "Last-Translator: Leena Heino <liinu at uta.fi>\n"
 "Language-Team: Finnish <i18n at lists.horde.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=iso-8859-1\n"
 "Content-Transfer-Encoding: 8-bit\n"
 
-#: templates/main/main.inc:44
+#: templates/main/main.inc:42
 msgid ""
 "A vacation notice will automatically reply to any incoming mail you receive "
 "while you are away or unable to attend to your e-mail -- for example while "
@@ -25,51 +25,81 @@ msgstr ""
 "tuleviin sähköposteihin sillä aikaa kun olet poissa tai et pääse lukemaan "
 "sähköpostiasi -- esimerkiksi kun olet lomalla tai poissa paikkakunnalta."
 
-#: templates/main/main.inc:75
+#: templates/main/main.inc:79
 msgid "Alias addresses for this account (optional):"
 msgstr "Alias-sähköpostiosoite tälle käyttäjätilille (vapaaehtoinen):"
 
-#: lib/Driver.php:172
-msgid "Can't parse your email address"
+#: lib/Driver/sql.php:133
+msgid "An unknown error occured while disabling the vacation notice."
+msgstr "Tuntematon virhe tapahtui otettaessa poissaoloviestiä pois päältä."
+
+#: lib/Driver/customsql.php:92 lib/Driver/customsql.php:136
+#: lib/Driver/sql.php:92
+msgid "An unknown error occured while enabling the vacation notice."
+msgstr "Tuntematon virhe tapahtui laitettaessa päälle poissaoloviestiä."
+
+#: lib/Driver.php:393
+msgid "Cannot parse your email address"
 msgstr "Sähköpostiosoitettasi ei voi tulkita"
 
-#: main.php:146 templates/main/main.inc:37
-msgid "Change Vacation Notices"
-msgstr "Muuta poissaoloviestiä"
+#: lib/Driver/plesk.php:148
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
+msgstr "Ei voi poistaa poissaoloviestiä käyttäjältä %s."
 
-#: lib/Driver/ldap.php:185
-msgid "Check your password"
-msgstr "Tarkista salasanasi"
+#: lib/Driver/plesk.php:143
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
+msgstr "Ei voi poistaa poissaoloviestiä käyttäjältä %s: %s"
 
-#: lib/Driver/forwards.php:92 lib/Driver/forwards.php:187
-#: lib/Driver/forwards.php:242 lib/Driver/qmail.php:96
-#: lib/Driver/qmail.php:184 lib/Driver/qmail.php:241
-msgid "Check your username and password."
-msgstr "Tarkista käyttäjätunnus ja salasanasi."
+#: lib/Driver/plesk.php:252
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
+msgstr "Ei voida hakea domain ID toimialueelle %s."
+
+#: lib/Driver/plesk.php:250
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
+msgstr "Ei voida hakea domain ID toimialueelle %s: %s"
 
-#: lib/Driver/ldap.php:80 lib/Driver/ldap.php:230 lib/Driver/ldap.php:298
+#: lib/Driver/plesk.php:198
+#, php-format
+msgid "Cannot retrieve information about mail user %s."
+msgstr "Ei voida hakea tietoja käyttäjästä %s."
+
+#: lib/Driver/plesk.php:194
+#, php-format
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr "Ei voida hakea tietoja käyttäjästä %s: %s"
+
+#: lib/Driver/plesk.php:106
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr "Ei voida asettaa poissaoloviestiä käyttäjälle %s."
+
+#: lib/Driver/plesk.php:101
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr "Ei voida asettaa poissaoloviestiä käyttäjälle %s: %s"
+
+#: main.php:156 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr "Muuta poissaoloviestiä"
+
+#: lib/Driver/ldap.php:68 lib/Driver/ldap.php:142 lib/Driver/ldap.php:205
+#: lib/Driver/ldap.php:358
 msgid "Could not bind to ldap server"
 msgstr "LDAP-palvelinta ei voitu käyttää"
 
-#: lib/Driver/ldap.php:66
+#: lib/Driver/ldap.php:341
 msgid "Could not connect to ldap server"
 msgstr "LDAP-palvelimeen ei saatu yhteyttä"
 
-#: lib/Block/summary.php:37
+#: lib/Block/summary.php:30
 msgid "Failed to create a vacation driver"
 msgstr "Vacation ajurin luonti epäonnistui"
 
-#: main.php:96
-#, php-format
-msgid "Failure in modifying vacation notice: %s"
-msgstr "Virhe muokattaessa poissaoloviestiä: %s"
-
-#: main.php:106
-#, php-format
-msgid "Failure in removing vacation notice: %s"
-msgstr "Virhe poistettaessa poissaoloviestiä: %s"
-
-#: templates/main/main.inc:91
+#: templates/main/main.inc:88
 msgid ""
 "For your protection and safety, you must identify yourself with your login "
 "password to verify this change."
@@ -77,54 +107,85 @@ msgstr ""
 "Turvallisuutesi vuoksi tämä muutostoimenpide pitää varmistaa. Sinun täytyy "
 "todentaa itsesi käyttämällä tunnustasi ja salasanaasi."
 
-#: lib/Driver/ldap.php:231 lib/Driver/ldap.php:299
+#: templates/main/main.inc:65
+msgid "From:"
+msgstr "Lähettäjä:"
+
+#: config/conf.xml
+msgid ""
+"I'm on vacation and will not be reading my mail for a while.\n"
+"Your mail will be dealt with when I return."
+msgstr ""
+"Olen lomalla ja en voi lukea sähköpostiviestejäni.\n"
+"Luen viestisi palattuani."
+
+#: lib/Driver/ldap.php:69 lib/Driver/ldap.php:143 lib/Driver/ldap.php:206
 msgid "Incorrect Password"
 msgstr "Väärä salasana"
 
-#: templates/main/main.inc:45
+#: templates/main/main.inc:43
 msgid ""
 "It could be used as a courtesy to let others know why you are not answering "
 "their e-mail to you."
 msgstr ""
 "Voit tällä tavoin viestittää muille miksi et vastaa heidän sähköposteihinsa."
 
-#: lib/Driver/forwards.php:194 lib/Driver/qmail.php:192
+#: lib/Driver/forwards.php:192
 msgid "Maybe you didn't have a vacation notice installed?"
 msgstr "Ehkä sinulla ei ollut vacation toimintoa asennettuna?"
 
-#: templates/main/main.inc:67
+#: templates/main/main.inc:72
 msgid "Message:"
 msgstr "Viesti"
 
-#: lib/AliasDriver.php:41
+#: lib/AliasDriver.php:52
 msgid "Not implemented."
 msgstr "Ei ole toteutettu."
 
-#: templates/main/main.inc:53
+#: config/conf.xml
+msgid "On vacation message"
+msgstr "Poissaoloviestiin"
+
+#: templates/main/main.inc:49
 msgid "Set/install vacation notice"
 msgstr "Aseta poissaoloviesti"
 
-#: templates/main/main.inc:60
+#: templates/main/main.inc:57
 msgid "Subject:"
 msgstr "Otsikko:"
 
-#: templates/main/main.inc:98
+#: templates/main/main.inc:100
 msgid "Submit"
 msgstr "Lähetä"
 
-#: lib/Driver/ldap.php:115 lib/Driver/qmail.php:53
+#: lib/Driver/plesk.php:226
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+"Plesk-ajuri vaatii Horde_DOM paketin Horde versiosta 3.2 tai sitä uudemmasta "
+"versiosta. Tarkemmat tiedot: http://pear.horde.org/index.php?"
+"package=Horde_DOM"
+
+#: lib/Driver/ldap.php:284
 msgid "The module is not properly configured!"
 msgstr "Moduulia ei ole asennettu oikein!"
 
-#: lib/Driver/forwards.php:51 lib/Driver/sql.php:50
+#: lib/Driver/customsql.php:255 lib/Driver/forwards.php:264
+#: lib/Driver/plesk.php:260 lib/Driver/sql.php:248
 msgid "The vacation application is not properly configured."
 msgstr "Vacation-moduulia ei ole asennettu oikein"
 
-#: templates/main/main.inc:92
+#: lib/Driver/customsql.php:89 lib/Driver/customsql.php:133
+#: lib/Driver/sql.php:89 lib/Driver/sql.php:130
+msgid "The vacation notice cannot be set. Check the password."
+msgstr "Poissaoloviestiä ei voi asettaa. Tarkista salasana."
+
+#: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr "Lähetä sitten lomake päivittääksesi poissaoloviestisi."
 
-#: templates/main/main.inc:46
+#: templates/main/main.inc:44
 msgid ""
 "This form lets you install or remove a vacation notice for your e-mail "
 "account. You should edit the default message to meet your needs."
@@ -132,15 +193,11 @@ msgstr ""
 "Tällä lomakkeella voit asettaa tai poistaa poissaoloviestin "
 "sähköpostitunnuksellasi. Muokkaa oletusviestiä tarpeisiisi sopivaksi."
 
-#: lib/Driver/sql.php:249
-msgid "Unable to connect to SQL server."
-msgstr "SQL-palvelimeen ei saada yhteyttä."
-
-#: templates/main/main.inc:56
+#: templates/main/main.inc:52
 msgid "Unset/remove vacation notice"
 msgstr "Poista poissaoloviesti"
 
-#: lib/Driver/ldap.php:147
+#: lib/Driver/ldap.php:317
 msgid "User not found."
 msgstr "Käyttäjää ei löytynyt."
 
@@ -148,32 +205,36 @@ msgstr "K
 msgid "Vacation Summary"
 msgstr "Poissaoloviestin yhteenveto"
 
-#: lib/Block/summary.php:41
+#: lib/Block/summary.php:35
 msgid "Vacation is active."
 msgstr "Poissaoloviesti asetettu."
 
-#: lib/Block/summary.php:40
+#: lib/Block/summary.php:34
 msgid "Vacation is not active."
 msgstr "Poissaoloviesti ei ole asetettu."
 
-#: main.php:94
+#: lib/Driver/qmail.php:30
+msgid "Vacation notice already exists."
+msgstr "Poissaoloviesti on jo olemassa."
+
+#: main.php:83
 msgid "Vacation notice successfully enabled."
 msgstr "Poissaoloviesti on asetettu."
 
-#: main.php:104
+#: main.php:93
 msgid "Vacation notice successfully removed."
 msgstr "Poissaoloviesti on poistettu."
 
-#: main.php:45
+#: main.php:35
 #, php-format
 msgid "You can't change the vacation notice for %s."
 msgstr "Et voi muuttaa poissaoloviestiä käyttäjälle %s."
 
-#: main.php:77
+#: main.php:65
 msgid "You must give a vacation message."
 msgstr "Sinun täytyy antaa poissaoloviesti."
 
-#: main.php:52
+#: main.php:44
 msgid "You must give your password"
 msgstr "Sinun täytyy antaa salasanasi"
 
@@ -186,22 +247,22 @@ msgstr ""
 msgid "You must provide your password"
 msgstr "Sinun täytyy antaa salasanasi"
 
-#: main.php:39
+#: main.php:29
 msgid "You must specify the mode (set or remove)"
 msgstr "Sinun täytyy määritellä toiminto (aseta tai poista)"
 
-#: templates/main/main.inc:95
+#: templates/main/main.inc:93
 msgid "Your password:"
 msgstr "Salasanasi:"
 
-#: main.php:82
+#: main.php:72
 msgid "Your vacation message is not in the proper format."
 msgstr "Poissaoloviestisi ei ole oikeassa muodossa."
 
-#: main.php:123
+#: main.php:133
 msgid "Your vacation notice is currently disabled."
 msgstr "Poissaoloviestisi ei ole käytössä."
 
-#: main.php:120
+#: main.php:126
 msgid "Your vacation notice is currently enabled."
 msgstr "Poissaoloviestisi on käytössä."
diff --git a/po/fr_FR.po b/po/fr_FR.po
index f1e6497..fda76d3 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -1,6 +1,6 @@
 # translation of fr_FR.po to Français
 # vacation module translations
-# Copyright (C) 2002,2003, 2004 Free Software Foundation, Inc.
+# Copyright 2002,2003, 2004 Free Software Foundation, Inc.
 # Daniel Huhardeaux <daniel.huhardeaux at tootai.com>, 2002.
 # Pierre Lachance <pl at pierrelachance.net> et Benoit St-André (ben at benoitst-andre.net), 2003, 2004.
 #
diff --git a/po/gl_ES.po b/po/gl_ES.po
index ec8354d..afcf910 100644
--- a/po/gl_ES.po
+++ b/po/gl_ES.po
@@ -8,7 +8,7 @@
 # Universidade de Santiago de Compostela
 #
 # Revisada y corregida por:
-# 
+#
 # Servicio de normalizacion linguistica <snlusc at usc.es>
 # Universidade de Santiago de Compostela
 #
diff --git a/po/hu_HU.po b/po/hu_HU.po
index e447293..9e48ea3 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -1,5 +1,5 @@
 # Hungarian translations for horde package.
-# Copyright (C) 2005 Horde Project
+# Copyright 2005-2009 The Horde Project
 # This file is distributed under the same license as the horde package.
 # Automatically generated, 2005.
 #
diff --git a/po/it_IT.po b/po/it_IT.po
index 71e77c9..102179d 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -1,75 +1,107 @@
-# Traduzione in italiano del modulo vacation
-# Copyright (C) 2002 Horde Project.
+# Vacation module translations.
+# Copyright 2002-2009 The Horde Project.
 # Alessio Ciregia <alessio at ifc.cnr.it>, 2002.
-# Fabio Pedretti <fabio.pedretti at ing.unibs.it>, 2006.
+# Fabio Pedretti <fabio.pedretti at ing.unibs.it>, 2006-2008.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: 0.1\n"
+"Project-Id-Version: Vacation 3.1-cvs\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2006-03-31 10:00+0200\n"
-"PO-Revision-Date: 2002-08-13 12:23+0200\n"
+"POT-Creation-Date: 2008-06-24 10:55+0200\n"
+"PO-Revision-Date: 2008-06-24 17:23+0200\n"
 "Last-Translator: Fabio Pedretti <fabio.pedretti at ing.unibs.it>\n"
 "Language-Team: Italian <i18n at lists.horde.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=ISO-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: templates/main/main.inc:40
+#: templates/main/main.inc:42
 msgid ""
 "A vacation notice will automatically reply to any incoming mail you receive "
 "while you are away or unable to attend to your e-mail -- for example while "
 "on vacation or out of town on business."
 msgstr ""
-"Attivando questo servizio un messaggio di risposta automatica verrà "
-"inoltrato al mittente. Ciò è utile quando sei in ferie o comunque "
-"impossibilitato a leggere la posta per un determinato periodo."
+"Attivando questo servizio un messaggio di assenza verrà inoltrato al "
+"mittente. Ciò è utile quando sei in ferie o comunque impossibilitato a "
+"leggere la posta per un determinato periodo."
 
-#: templates/main/main.inc:73
+#: templates/main/main.inc:79
 msgid "Alias addresses for this account (optional):"
 msgstr "Indirizzo alias per questo account (opzionale):"
 
-#: lib/Driver.php:182
-msgid "Can't parse your email address"
+#: lib/Driver/sql.php:133
+msgid "An unknown error occured while disabling the vacation notice."
+msgstr ""
+"Si è verificato un errore sconosciuto disabilitando il messaggio di assenza."
+
+#: lib/Driver/sql.php:92
+msgid "An unknown error occured while enabling the vacation notice."
+msgstr ""
+"Si è verificato un errore sconosciuto abilitando il messaggio di assenza."
+
+#: lib/Driver.php:392
+msgid "Cannot parse your email address"
 msgstr "Impossibile processare il tuo indirizzo di posta"
 
-#: main.php:160 templates/main/main.inc:36
-msgid "Change Vacation Notices"
-msgstr "Modifica il messaggio di risposta automatica"
+#: lib/Driver/plesk.php:151
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
+msgstr "Impossibile rimuovere il messaggio di assenza per l'utente %s."
+
+#: lib/Driver/plesk.php:147
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
+msgstr ""
+"Impossibile rimuovere il messaggio di assenza per l'utente di posta %s: %s"
 
-#: lib/Driver/ldap.php:204
-msgid "Check your password"
-msgstr "Controlla la tua password"
+#: lib/Driver/plesk.php:257
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
+msgstr "Impossibile recuperare il domain ID del dominio %s."
 
-#: lib/Driver/forwards.php:96 lib/Driver/forwards.php:192
-#: lib/Driver/forwards.php:248 lib/Driver/qmail.php:96
-#: lib/Driver/qmail.php:198 lib/Driver/qmail.php:268
-msgid "Check your username and password."
-msgstr "Controlla il tuo nome utente e la password."
+#: lib/Driver/plesk.php:255
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
+msgstr "Impossibile recuperare il domain ID del dominio %s: %s"
 
-#: lib/Driver/ldap.php:98 lib/Driver/ldap.php:291 lib/Driver/ldap.php:371
+#: lib/Driver/plesk.php:203
+#, php-format
+msgid "Cannot retrieve information about mail user %s."
+msgstr "Impossibile recuperare informazioni sull'utente di posta %s."
+
+#: lib/Driver/plesk.php:199
+#, php-format
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr "Impossibile recuperare informazioni sull'utente di posta %s: %s"
+
+#: lib/Driver/plesk.php:106
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr "Impossibile impostare il messaggio di assenza per l'utente %s."
+
+#: lib/Driver/plesk.php:102
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr "Impossibile impostare il messaggio di assenza per l'utente %s: %s"
+
+#: main.php:162 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr "Modifica il messaggio di assenza"
+
+#: lib/Driver/ldap.php:68 lib/Driver/ldap.php:142 lib/Driver/ldap.php:205
+#: lib/Driver/ldap.php:358
 msgid "Could not bind to ldap server"
 msgstr "Impossibile eseguire il bind sul server ldap"
 
-#: lib/Driver/ldap.php:84
+#: lib/Driver/ldap.php:341
 msgid "Could not connect to ldap server"
 msgstr "Impossibile connettersi al server ldap"
 
-#: lib/Block/summary.php:37
+#: lib/Block/summary.php:36
 msgid "Failed to create a vacation driver"
 msgstr "Impossible creare un driver per vacation"
 
-#: main.php:103
-#, php-format
-msgid "Failure in modifying vacation notice: %s"
-msgstr "Modifica del messaggio fallita: %s "
-
-#: main.php:113
-#, php-format
-msgid "Failure in removing vacation notice: %s"
-msgstr "Rimozione del messaggio fallita: %s"
-
-#: templates/main/main.inc:89
+#: templates/main/main.inc:88
 msgid ""
 "For your protection and safety, you must identify yourself with your login "
 "password to verify this change."
@@ -77,11 +109,15 @@ msgstr ""
 "Per sicurezza, devi identificarti con la tua password di login per "
 "verificare la tua identità."
 
-#: lib/Driver/ldap.php:292 lib/Driver/ldap.php:372
+#: templates/main/main.inc:65
+msgid "From:"
+msgstr "Da:"
+
+#: lib/Driver/ldap.php:69 lib/Driver/ldap.php:143 lib/Driver/ldap.php:206
 msgid "Incorrect Password"
 msgstr "Password Errata"
 
-#: templates/main/main.inc:41
+#: templates/main/main.inc:43
 msgid ""
 "It could be used as a courtesy to let others know why you are not answering "
 "their e-mail to you."
@@ -89,113 +125,118 @@ msgstr ""
 "Può essere usato come una cortesia per far sapere ai tuoi corrispondenti che "
 "non puoi rispondere ai loro messaggi di posta."
 
-#: lib/Driver/forwards.php:199
+#: lib/Driver/forwards.php:189
 msgid "Maybe you didn't have a vacation notice installed?"
-msgstr "Forse non avevi abilitato un messaggio di risposta automatica?"
+msgstr "Forse non avevi abilitato un messaggio di assenza?"
 
-#: templates/main/main.inc:65
+#: templates/main/main.inc:72
 msgid "Message:"
 msgstr "Messaggio:"
 
-#: lib/AliasDriver.php:43
+#: lib/AliasDriver.php:52
 msgid "Not implemented."
 msgstr "Non implementato."
 
 #: templates/main/main.inc:49
 msgid "Set/install vacation notice"
-msgstr "Installa il messaggio di risposta automatica"
+msgstr "Installa il messaggio di assenza"
 
 #: templates/main/main.inc:57
 msgid "Subject:"
 msgstr "Oggetto:"
 
-#: templates/main/main.inc:96
+#: templates/main/main.inc:100
 msgid "Submit"
 msgstr "Imposta"
 
-#: lib/Driver/ldap.php:133 lib/Driver/qmail.php:52
+#: lib/Driver/plesk.php:231
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+"Il driver Plesk richiede il pacchetto Horde_DOM di Horde 3.2 o successivo. "
+"Si veda http://pear.horde.org/index.php?package=Horde_DOM"
+
+#: lib/Driver/ldap.php:284
 msgid "The module is not properly configured!"
 msgstr "Il modulo non è configurato correttamente!"
 
-#: lib/Driver/forwards.php:52 lib/Driver/sql.php:53
+#: lib/Driver/forwards.php:261 lib/Driver/plesk.php:265 lib/Driver/sql.php:248
 msgid "The vacation application is not properly configured."
 msgstr "Il modulo Vacation non è configurato correttamente."
 
-#: templates/main/main.inc:90
+#: lib/Driver/sql.php:89 lib/Driver/sql.php:130
+msgid "The vacation notice cannot be set. Check the password."
+msgstr ""
+"Il messaggio di assenza non può essere impostato. Controllare la password."
+
+#: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr "Quindi clicca su Imposta in modo che il messaggio venga aggiornato."
 
-#: templates/main/main.inc:42
+#: templates/main/main.inc:44
 msgid ""
 "This form lets you install or remove a vacation notice for your e-mail "
 "account. You should edit the default message to meet your needs."
 msgstr ""
-"Questo modulo ti permette di installare o rimuovere un messaggio di risposta "
-"automatica per il tuo account di posta. Puoi modificare il messaggio in base "
-"alle tue esigenze."
-
-#: lib/Driver/sql.php:265
-msgid "Unable to connect to SQL server."
-msgstr "Impossibile connettersi al server SQL."
+"Questo modulo ti permette di installare o rimuovere un messaggio di assenza "
+"per il tuo account di posta. Puoi modificare il messaggio in base alle tue "
+"esigenze."
 
 #: templates/main/main.inc:52
 msgid "Unset/remove vacation notice"
-msgstr "Rimuovi il messaggio di risposta automatica"
+msgstr "Rimuovi il messaggio di assenza"
 
-#: lib/Driver/ldap.php:163
+#: lib/Driver/ldap.php:317
 msgid "User not found."
 msgstr "Utente non trovato."
 
 #: lib/Block/summary.php:3
 msgid "Vacation Summary"
-msgstr "Sommario Risposta Automatica"
+msgstr "Sommario Assenza"
 
-#: lib/Block/summary.php:42
+#: lib/Block/summary.php:41
 msgid "Vacation is active."
-msgstr "Risposta automatica è attiva."
+msgstr "Messaggio di Assenza abilitato."
 
-#: lib/Block/summary.php:41
+#: lib/Block/summary.php:40
 msgid "Vacation is not active."
-msgstr "Risposta automatica non è attiva."
+msgstr "Messaggio di Assenza abilitato."
 
-#: lib/Driver/qmail.php:102
+#: lib/Driver/qmail.php:30
 msgid "Vacation notice already exists."
-msgstr "Un messaggio di risposta automatica esiste già."
+msgstr "Un messaggio di assenza esiste già."
 
-#: lib/Driver/qmail.php:209
-msgid "Vacation notice not found."
-msgstr "Messaggio di risposta automatica non trovato."
-
-#: main.php:101
+#: main.php:89
 msgid "Vacation notice successfully enabled."
-msgstr "Risposta automatica abilitata."
+msgstr "Messaggio di Assenza correttamente abilitato."
 
-#: main.php:111
+#: main.php:99
 msgid "Vacation notice successfully removed."
-msgstr "Risposta automatica disabilitata."
+msgstr "Messaggio di Assenza correttamente disabilitato."
 
-#: main.php:45
+#: main.php:41
 #, php-format
 msgid "You can't change the vacation notice for %s."
-msgstr "Non puoi cambiare la risposta automatica per l'utente %s."
+msgstr "Non puoi cambiare il messaggio d'assenza per l'utente %s."
 
-#: main.php:84
+#: main.php:71
 msgid "You must give a vacation message."
-msgstr "Devi inserire un messaggio per la risposta automatica."
+msgstr "Devi inserire un messaggio di assenza."
 
-#: main.php:52
+#: main.php:50
 msgid "You must give your password"
 msgstr "Devi fornire la tua password"
 
 #: templates/main/main.inc:14
 msgid "You must provide some message text to set a vacation notice"
-msgstr "Devi inserire un messaggio per impostare la risposta automatica"
+msgstr "Devi inserire del testo per impostare il messaggio d'assenza"
 
 #: templates/main/main.inc:8
 msgid "You must provide your password"
 msgstr "Devi fornire la tua password"
 
-#: main.php:39
+#: main.php:35
 msgid "You must specify the mode (set or remove)"
 msgstr "Devi specificare il modo (installa o rimuovi)."
 
@@ -203,14 +244,14 @@ msgstr "Devi specificare il modo (installa o rimuovi)."
 msgid "Your password:"
 msgstr "La tua password:"
 
-#: main.php:89
+#: main.php:78
 msgid "Your vacation message is not in the proper format."
-msgstr "Il tuo messaggio di risposta automatica non è nel formato corretto."
+msgstr "Il tuo messaggio di assenza non è nel formato corretto."
 
-#: main.php:132
+#: main.php:139
 msgid "Your vacation notice is currently disabled."
-msgstr "Il messaggio di risposta automatica è attualmente disabilitato."
+msgstr "Il messaggio di assenza è attualmente disabilitato."
 
-#: main.php:128
+#: main.php:132
 msgid "Your vacation notice is currently enabled."
-msgstr "Il messaggio di risposta automatica è attualmente abilitato."
+msgstr "Il messaggio di assenza è attualmente abilitato."
diff --git a/po/nl_NL.po b/po/nl_NL.po
index e5bfb10..0868b1c 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -1,5 +1,5 @@
 # vacation module translations
-# Copyright (C) 2006 Horde Project.
+# Copyright 2006-2009 The Horde Project.
 # Arien Huisken <arien at huisken-systems.nl> , 2006.
 #
 msgid ""
diff --git a/po/nn_NO.po b/po/nn_NO.po
index ca36b69..377a8df 100644
--- a/po/nn_NO.po
+++ b/po/nn_NO.po
@@ -1,5 +1,5 @@
 # Vacation Norwegian Nynorsk translation
-# Copyright (C) 2002 Per-Stian Vatne
+# Copyright 2002 Per-Stian Vatne
 # This file is distributed under the same license as the Vacation package.
 # Per-Stian Vatne <psv at orsta.org>, 2002.
 #
@@ -14,8 +14,14 @@ msgstr ""
 "Content-Type: text/plain; charset=iso-8859-1\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "A vacation notice will automatically reply to any incoming mail you receive while you are away or unable to attend to your e-mail -- for example while on vacation or out of town on business."
-msgstr "Ein feriemerknad vil automatisk svare på all innkomande e-post du mottek når du er borte eller ikkje kan lese e-posten din -- til dømes når du har ferie eller er bortreist i jobbsamanheng."
+msgid ""
+"A vacation notice will automatically reply to any incoming mail you receive "
+"while you are away or unable to attend to your e-mail -- for example while "
+"on vacation or out of town on business."
+msgstr ""
+"Ein feriemerknad vil automatisk svare på all innkomande e-post du mottek når "
+"du er borte eller ikkje kan lese e-posten din -- til dømes når du har ferie "
+"eller er bortreist i jobbsamanheng."
 
 msgid "Change Vacation Notices"
 msgstr "Endre feriemerknader"
@@ -44,8 +50,12 @@ msgstr "Feil ved fjerning av feriemerknad:"
 msgid "File open failed - File exists"
 msgstr "Kunne ikkje opne fil - fila eksisterer"
 
-msgid "For your protection and safety, you must identify yourself with your login password to verify this change."
-msgstr "For din tryggleik - du må identifisere deg med innlogging og passord for å stadfeste denne endringa."
+msgid ""
+"For your protection and safety, you must identify yourself with your login "
+"password to verify this change."
+msgstr ""
+"For din tryggleik - du må identifisere deg med innlogging og passord for å "
+"stadfeste denne endringa."
 
 msgid "Help"
 msgstr "Hjelp"
@@ -53,8 +63,12 @@ msgstr "Hjelp"
 msgid "I'm on vacation and will not be reading my mail for a while."
 msgstr "Eg er på ferie og kjem ikkje til å lese e-posten min på ei stund."
 
-msgid "It could be used as a courtesy to let others know why you are not answering their e-mail to you."
-msgstr "Den kan brukast som ein måte å la andre vite kvifor du ikkje svarar på e-posten dei sender til deg."
+msgid ""
+"It could be used as a courtesy to let others know why you are not answering "
+"their e-mail to you."
+msgstr ""
+"Den kan brukast som ein måte å la andre vite kvifor du ikkje svarar på e-"
+"posten dei sender til deg."
 
 msgid "Language"
 msgstr "Språk"
@@ -92,20 +106,40 @@ msgstr "Send"
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr "Send deretter inn skjemaet slik at feriemerknadet din kan oppdaterast."
 
-msgid "This file controls the default preferences for Vacation module, and also controls which preferences users can alter."
-msgstr "Denne fila kontrollerer standardinnstillingane for Ferie-modulen, og kontrollerer også kva innstillingar brukarane kan endre."
+msgid ""
+"This file controls the default preferences for Vacation module, and also "
+"controls which preferences users can alter."
+msgstr ""
+"Denne fila kontrollerer standardinnstillingane for Ferie-modulen, og "
+"kontrollerer også kva innstillingar brukarane kan endre."
 
-msgid "This file controls the stylesheet that is used to set colors and fonts in addition to or overriding Horde defaults."
-msgstr "Denne fila kontrollerer stilarket som blir brukt til å definere fargar og skrifttypar, og legg til eller overstyrer standardverdiane til Horde."
+msgid ""
+"This file controls the stylesheet that is used to set colors and fonts in "
+"addition to or overriding Horde defaults."
+msgstr ""
+"Denne fila kontrollerer stilarket som blir brukt til å definere fargar og "
+"skrifttypar, og legg til eller overstyrer standardverdiane til Horde."
 
-msgid "This form lets you install or remove a vacation notice for your e-mail account.  You should edit the default message to meet your needs."
-msgstr "Dette skjemaet let deg legge til eller fjerne ein feriemerknad for din e-postkonto. Du bør endre standardmeldinga til å passe inn med dine behov."
+msgid ""
+"This form lets you install or remove a vacation notice for your e-mail "
+"account.  You should edit the default message to meet your needs."
+msgstr ""
+"Dette skjemaet let deg legge til eller fjerne ein feriemerknad for din e-"
+"postkonto. Du bør endre standardmeldinga til å passe inn med dine behov."
 
-msgid "This form uses strong encryption to protect your password while in transmit to the web server."
-msgstr "Dette skjemaet brukar sterk kryptering for å verne om passordet ditt medan det blir overført til web-tenaren."
+msgid ""
+"This form uses strong encryption to protect your password while in transmit "
+"to the web server."
+msgstr ""
+"Dette skjemaet brukar sterk kryptering for å verne om passordet ditt medan "
+"det blir overført til web-tenaren."
 
-msgid "This is the main Vacation module configuration file. It contains paths and options for all Vacation module scripts."
-msgstr "Dette er hovedkonfigurasjonsfila for Ferie-modulen. Den inneheld katalognamn og alternativ for alle skripta i Ferie-modulen."
+msgid ""
+"This is the main Vacation module configuration file. It contains paths and "
+"options for all Vacation module scripts."
+msgstr ""
+"Dette er hovedkonfigurasjonsfila for Ferie-modulen. Den inneheld katalognamn "
+"og alternativ for alle skripta i Ferie-modulen."
 
 msgid "Unset/remove vacation notice"
 msgstr "Slå av/fjerne feriemerknad"
@@ -149,4 +183,3 @@ msgstr "Meldinga di vil bli lest n
 
 msgid "Your password:"
 msgstr "Passord:"
-
diff --git a/po/pl_PL.po b/po/pl_PL.po
index e5a73ed..6b81811 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -1,6 +1,6 @@
 # Polish translations for horde package
 # Polskie t³umaczenia dla pakietu horde.
-# Copyright (C) 2004 Piotr Kuczynski <pkuczynski at hypode.pl>
+# Copyright 2004 Piotr Kuczynski <pkuczynski at hypode.pl>
 # This file is distributed under the same license as the horde package.
 #
 msgid ""
diff --git a/po/ro_RO.po b/po/ro_RO.po
index 4a362e8..aad8e01 100644
--- a/po/ro_RO.po
+++ b/po/ro_RO.po
@@ -1,8 +1,7 @@
 # Vacation Romanian Translation.
-# Copyright (C) 2003 Horde Project
+# Copyright 2003-2009 The Horde Project
 # Eugen Hoanca <eugenh at urban-grafx.ro>, 2003.
 # Marius Dragulescu <mariusd at urban-grafx.ro>, 2003.
-
 msgid ""
 msgstr ""
 "Project-Id-Version: Vacation 2.2\n"
@@ -141,8 +140,8 @@ msgid ""
 "account.  You should edit the default message to meet your needs."
 msgstr ""
 "Acest formular permite instalarea sau stergerea unei notite de vacanta "
-"pentru contul tau de e-mail. Trebuie sa editezi mesajul implicit pentru "
-"a corespunde nevoilor tale."
+"pentru contul tau de e-mail. Trebuie sa editezi mesajul implicit pentru a "
+"corespunde nevoilor tale."
 
 msgid ""
 "This is the main Vacation module configuration file. It contains paths and "
diff --git a/po/sl_SI.po b/po/sl_SI.po
index 4619faf..56a9389 100644
--- a/po/sl_SI.po
+++ b/po/sl_SI.po
@@ -1,6 +1,6 @@
 # Slovenian translation of Vacantion package
 # Slovenski prevod Vacantion paketa
-# Copyright (C) 2006 Horde Project
+# Copyright 2006-2009 The Horde Project
 # This file is distributed under the same license as the PACKAGE package.
 # Duck <duck at oblanet>, 2006.
 #
diff --git a/po/sv_SE.po b/po/sv_SE.po
index 932559e..0545ee8 100644
--- a/po/sv_SE.po
+++ b/po/sv_SE.po
@@ -1,5 +1,5 @@
 # Horde Vacation module Swedish translation
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright 2002 Free Software Foundation, Inc.
 # This file is distributed under the same license as the PACKAGE package.
 # Jonatan Bagge <Jonatan.Bagge at material.uu.se>, 2002.
 #
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100644
index 0000000..3f03be0
--- /dev/null
+++ b/po/tr_TR.po
@@ -0,0 +1,274 @@
+# Turkish translations for Vacation package
+# Tatil paketi için Türkçe çeviriler.
+# Copyright 2008-2009 The Horde Project
+# This file is distributed under the same license as the Vacation package.
+# horde-tr at metu.edu.tr, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Vacation H3 (3.1-cvs)\n"
+"Report-Msgid-Bugs-To: dev at lists.horde.org\n"
+"POT-Creation-Date: 2008-04-15 12:57+0300\n"
+"PO-Revision-Date: 2008-04-15 12:57+0300\n"
+"Last-Translator: Onur Koþar\n"
+"Language-Team: i18n at lists.horde.org\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-9\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: templates/main/main.inc:42
+msgid ""
+"A vacation notice will automatically reply to any incoming mail you receive "
+"while you are away or unable to attend to your e-mail -- for example while "
+"on vacation or out of town on business."
+msgstr ""
+"Tatil notu size gelecek bütün iletilere otomatik cevap olarak iletilecektir."
+
+#: templates/main/main.inc:79
+msgid "Alias addresses for this account (optional):"
+msgstr "Bu hesap için öteki adresler (isteðe baðlý): "
+
+#: lib/Driver.php:340
+msgid "Can't parse your email address"
+msgstr "Eposta adresiniz ayrýþtýrýlamýyor"
+
+#: lib/Driver/plesk.php:223
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
+msgstr "%s eposta kullanýcýnýn tatil notu kaldýrýlamýyor."
+
+#: lib/Driver/plesk.php:219
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
+msgstr "%s eposta kullanýcýsýnýn tatil notu kaldýrýlamýyor: %s"
+
+#: lib/Driver/plesk.php:100
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
+msgstr "%s alanýnýn alan kimliði(ID) çekilemiyor."
+
+#: lib/Driver/plesk.php:98
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
+msgstr "%s alanýnýn alan kimliði(ID) çekilemiyor: %s"
+
+#: lib/Driver/plesk.php:308
+#, php-format
+msgid "Cannot retrieve information about mail user %s."
+msgstr "%s isimli eposta kullanýcýsý hakkýnda bir bilgi bulunamýyor."
+
+#: lib/Driver/plesk.php:304
+#, php-format
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr "%s isimli eposta kullanýcýsý hakkýnda bir bilgi bulunamýyor: %s"
+
+#: lib/Driver/plesk.php:176
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr "%s eposta kullanýcýsý için tatil notu koyulamýyor."
+
+#: lib/Driver/plesk.php:172
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr "%s eposta kullanýcýsý için tatil notu koyulamýyor: %s"
+
+#: main.php:139 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr "Tatil Uyarýlarýný Deðiþtir"
+
+#: lib/Driver/ldap.php:212
+msgid "Check your password"
+msgstr "Þifreniz kontrol ediniz"
+
+#: lib/Driver/forwards.php:311 lib/Driver/qmail.php:284
+msgid "Check your username and password"
+msgstr "Kullanýcý isminiz ve þifreniz kontrol ediliyor"
+
+#: lib/Driver/ldap.php:100 lib/Driver/ldap.php:299 lib/Driver/ldap.php:389
+msgid "Could not bind to ldap server"
+msgstr "Ldap sunucusuna baðlanýlamýyor"
+
+#: lib/Driver/ldap.php:84
+msgid "Could not connect to ldap server"
+msgstr "Ldap sunucusuna baðlanýlamýyor"
+
+#: lib/Block/summary.php:37
+msgid "Failed to create a vacation driver"
+msgstr "Tatil sürücüsü yaratýlamýyor"
+
+#: main.php:85
+#, php-format
+msgid "Failure in modifying vacation notice: %s"
+msgstr "Tatil notunun düzenlenmesi baþarýsýz: %s"
+
+#: main.php:95
+#, php-format
+msgid "Failure in removing vacation notice: %s"
+msgstr "Tatil notunun kaldýrýlmasýnda hata: %s"
+
+#: templates/main/main.inc:88
+msgid ""
+"For your protection and safety, you must identify yourself with your login "
+"password to verify this change."
+msgstr "Güvenliðiniz için þifrenizle bu deðiþikliði onaylamanýz gerekiyor."
+
+#: templates/main/main.inc:65
+msgid "From:"
+msgstr "Kimden:"
+
+#: lib/base.php:51
+msgid "I'm on vacation and will not be reading my mail for a while."
+msgstr "Tatildeyim, bir süreliðine iletilerimi okuyamayacaðým."
+
+#: lib/Driver/ldap.php:300 lib/Driver/ldap.php:390
+msgid "Incorrect Password"
+msgstr "Hatalý Þifre"
+
+#: templates/main/main.inc:43
+msgid ""
+"It could be used as a courtesy to let others know why you are not answering "
+"their e-mail to you."
+msgstr "Size gelen mesajlarý neden cevaplamadýðýnýzý bildirmek inceliktir."
+
+#: lib/Driver/forwards.php:176
+msgid "Maybe you didn't have a vacation notice installed?"
+msgstr "Tatil notunuz yok mu?"
+
+#: templates/main/main.inc:72
+msgid "Message:"
+msgstr "Ýleti:"
+
+#: lib/AliasDriver.php:43
+msgid "Not implemented."
+msgstr "Bitirilemedi."
+
+#: lib/base.php:50
+msgid "On vacation message"
+msgstr "Tatil mesajýnda"
+
+#: templates/main/main.inc:49
+msgid "Set/install vacation notice"
+msgstr "Tatil notunun oluþtur"
+
+#: templates/main/main.inc:57
+msgid "Subject:"
+msgstr "Konu:"
+
+#: templates/main/main.inc:100
+msgid "Submit"
+msgstr "Gönder"
+
+#: lib/Driver/plesk.php:73
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+"Plesk sürücüsünün Horde 3.2 ve sonrasýnda bulunan Horde_DOM paketine "
+"ihtiyacý var. http://pear.horde.org/index.php?package=Horde_DOM adresine "
+"bakýnýz"
+
+#: lib/Driver/qmail.php:52 lib/Driver/ldap.php:135
+msgid "The module is not properly configured!"
+msgstr "Modül düzgün olarak konfigüre edilemedi!"
+
+#: lib/Driver/forwards.php:53 lib/Driver/sql.php:54 lib/Driver/plesk.php:108
+msgid "The vacation application is not properly configured."
+msgstr "Tatil uygulamasý baþarý ile konfigüre edilemedi."
+
+#: templates/main/main.inc:89
+msgid "Then submit the form so that your vacation notice can be updated."
+msgstr "Tatil uyarýsýný güncellemek için form'u gönderiniz."
+
+#: templates/main/main.inc:44
+msgid ""
+"This form lets you install or remove a vacation notice for your e-mail "
+"account. You should edit the default message to meet your needs."
+msgstr ""
+"Bu form, e-posta hesabýnýnza tatil uyarýsý yaptýrma ya da kaldýrmaya yarar. "
+"Öntanýnmlý mesaj metnini kendi isteðinize göre deðiþtirmelisiniz."
+
+#: lib/Driver/sql.php:265
+msgid "Unable to connect to SQL server."
+msgstr "SQL sunucuya baðlantý kurulamadý."
+
+#: templates/main/main.inc:52
+msgid "Unset/remove vacation notice"
+msgstr "Tatil uyarýsýný ayarla/kaldýr"
+
+#: lib/Driver/ldap.php:170
+msgid "User not found."
+msgstr "Kullanýcý bulunamadý."
+
+#: lib/Block/summary.php:3
+msgid "Vacation Summary"
+msgstr "Tatil Özeti"
+
+#: lib/Block/summary.php:42
+msgid "Vacation is active."
+msgstr "Tatil aktif."
+
+#: lib/Block/summary.php:41
+msgid "Vacation is not active."
+msgstr "Tatil aktif deðil."
+
+#: lib/Driver/qmail.php:89
+msgid "Vacation notice already exists."
+msgstr "Tatil uyarýsý zaten mevcut."
+
+#: lib/Driver/qmail.php:184
+msgid "Vacation notice not found."
+msgstr "Tatil uyarýsý bulunamadý."
+
+#: main.php:83
+msgid "Vacation notice successfully enabled."
+msgstr "Tatil uyarýsý baþarý ile aktif hale getirildi."
+
+#: main.php:93
+msgid "Vacation notice successfully removed."
+msgstr "Tatil uyarýsý baþarý ile kaldýrýldý."
+
+#: main.php:46
+#, php-format
+msgid "You can't change the vacation notice for %s."
+msgstr "%s için tatil uyarýsýný deðiþtiremezsiniz."
+
+#: lib/Driver.php:106 lib/Driver/plesk.php:138
+msgid "You must give a vacation message."
+msgstr "Bir tatil mesajý girmelisiniz."
+
+#: main.php:53
+msgid "You must give your password"
+msgstr "Þifrenizi girmelisiniz"
+
+#: templates/main/main.inc:14
+msgid "You must provide some message text to set a vacation notice"
+msgstr "Bir tatil uyarýsý oluþturmak için mesaj metni girmelisiniz"
+
+#: templates/main/main.inc:8
+msgid "You must provide your password"
+msgstr "Þifrenizi girmelisiniz"
+
+#: main.php:40
+msgid "You must specify the mode (set or remove)"
+msgstr "Ayarlama ya da kaldýrma tipi belirtilmelidir"
+
+#: lib/base.php:52
+msgid "Your mail will be dealt with when I return."
+msgstr "E-postanýz döndüðüm zaman cevaplanacak."
+
+#: templates/main/main.inc:93
+msgid "Your password:"
+msgstr "Þifreniz:"
+
+#: lib/Driver.php:112 lib/Driver/plesk.php:144
+msgid "Your vacation message is not in the proper format."
+msgstr "Tatil mesajýnýz düzgün bir formatta deðil."
+
+#: main.php:126
+msgid "Your vacation notice is currently disabled."
+msgstr "Tatil uyarýnýz þu anda kaldýrýldý."
+
+#: main.php:120
+msgid "Your vacation notice is currently enabled."
+msgstr "Tatil mesajýnýz þu anda aktif hale getirilidi."
diff --git a/po/vacation.pot b/po/vacation.pot
index 1d9a8cd..7992cd2 100644
--- a/po/vacation.pot
+++ b/po/vacation.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2006-11-03 23:12+0100\n"
+"POT-Creation-Date: 2009-03-19 10:37+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
 "Language-Team: LANGUAGE <LL at li.org>\n"
@@ -27,44 +27,74 @@ msgstr ""
 msgid "Alias addresses for this account (optional):"
 msgstr ""
 
-#: lib/Driver.php:197
-msgid "Can't parse your email address"
+#: lib/Driver/sql.php:133
+msgid "An unknown error occured while disabling the vacation notice."
 msgstr ""
 
-#: main.php:178 templates/main/main.inc:34
-msgid "Change Vacation Notices"
+#: lib/Driver/customsql.php:92 lib/Driver/customsql.php:136
+#: lib/Driver/sql.php:92
+msgid "An unknown error occured while enabling the vacation notice."
 msgstr ""
 
-#: lib/Driver/ldap.php:212
-msgid "Check your password"
+#: lib/Driver.php:393
+msgid "Cannot parse your email address"
 msgstr ""
 
-#: lib/Driver/forwards.php:96 lib/Driver/forwards.php:192
-#: lib/Driver/forwards.php:248 lib/Driver/qmail.php:96
-#: lib/Driver/qmail.php:198 lib/Driver/qmail.php:268
-msgid "Check your username and password."
+#: lib/Driver/plesk.php:148
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s."
 msgstr ""
 
-#: lib/Driver/ldap.php:100 lib/Driver/ldap.php:299 lib/Driver/ldap.php:389
-msgid "Could not bind to ldap server"
+#: lib/Driver/plesk.php:143
+#, php-format
+msgid "Cannot remove vacation notice for mail user %s: %s"
 msgstr ""
 
-#: lib/Driver/ldap.php:84
-msgid "Could not connect to ldap server"
+#: lib/Driver/plesk.php:252
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s."
 msgstr ""
 
-#: lib/Block/summary.php:37
-msgid "Failed to create a vacation driver"
+#: lib/Driver/plesk.php:250
+#, php-format
+msgid "Cannot retrieve domain ID of domain %s: %s"
 msgstr ""
 
-#: main.php:105
+#: lib/Driver/plesk.php:198
 #, php-format
-msgid "Failure in modifying vacation notice: %s"
+msgid "Cannot retrieve information about mail user %s."
 msgstr ""
 
-#: main.php:115
+#: lib/Driver/plesk.php:194
 #, php-format
-msgid "Failure in removing vacation notice: %s"
+msgid "Cannot retrieve information about mail user %s: %s"
+msgstr ""
+
+#: lib/Driver/plesk.php:106
+#, php-format
+msgid "Cannot set vacation notice for mail user %s."
+msgstr ""
+
+#: lib/Driver/plesk.php:101
+#, php-format
+msgid "Cannot set vacation notice for mail user %s: %s"
+msgstr ""
+
+#: main.php:156 templates/main/main.inc:34
+msgid "Change Vacation Notices"
+msgstr ""
+
+#: lib/Driver/ldap.php:68 lib/Driver/ldap.php:142 lib/Driver/ldap.php:205
+#: lib/Driver/ldap.php:358
+msgid "Could not bind to ldap server"
+msgstr ""
+
+#: lib/Driver/ldap.php:341
+msgid "Could not connect to ldap server"
+msgstr ""
+
+#: lib/Block/summary.php:30
+msgid "Failed to create a vacation driver"
 msgstr ""
 
 #: templates/main/main.inc:88
@@ -77,11 +107,13 @@ msgstr ""
 msgid "From:"
 msgstr ""
 
-#: lib/base.php:51
-msgid "I'm on vacation and will not be reading my mail for a while."
+#: config/conf.xml
+msgid ""
+"I'm on vacation and will not be reading my mail for a while.\n"
+"Your mail will be dealt with when I return."
 msgstr ""
 
-#: lib/Driver/ldap.php:300 lib/Driver/ldap.php:390
+#: lib/Driver/ldap.php:69 lib/Driver/ldap.php:143 lib/Driver/ldap.php:206
 msgid "Incorrect Password"
 msgstr ""
 
@@ -91,7 +123,7 @@ msgid ""
 "their e-mail to you."
 msgstr ""
 
-#: lib/Driver/forwards.php:199
+#: lib/Driver/forwards.php:192
 msgid "Maybe you didn't have a vacation notice installed?"
 msgstr ""
 
@@ -99,11 +131,11 @@ msgstr ""
 msgid "Message:"
 msgstr ""
 
-#: lib/AliasDriver.php:43
+#: lib/AliasDriver.php:52
 msgid "Not implemented."
 msgstr ""
 
-#: lib/base.php:50
+#: config/conf.xml
 msgid "On vacation message"
 msgstr ""
 
@@ -119,14 +151,26 @@ msgstr ""
 msgid "Submit"
 msgstr ""
 
-#: lib/Driver/ldap.php:135 lib/Driver/qmail.php:52
+#: lib/Driver/plesk.php:226
+msgid ""
+"The Plesk driver requires the Horde_DOM package from Horde 3.2 or later. See "
+"http://pear.horde.org/index.php?package=Horde_DOM"
+msgstr ""
+
+#: lib/Driver/ldap.php:284
 msgid "The module is not properly configured!"
 msgstr ""
 
-#: lib/Driver/forwards.php:52 lib/Driver/sql.php:54
+#: lib/Driver/forwards.php:264 lib/Driver/customsql.php:255
+#: lib/Driver/sql.php:248 lib/Driver/plesk.php:260
 msgid "The vacation application is not properly configured."
 msgstr ""
 
+#: lib/Driver/customsql.php:89 lib/Driver/customsql.php:133
+#: lib/Driver/sql.php:89 lib/Driver/sql.php:130
+msgid "The vacation notice cannot be set. Check the password."
+msgstr ""
+
 #: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr ""
@@ -137,15 +181,11 @@ msgid ""
 "account. You should edit the default message to meet your needs."
 msgstr ""
 
-#: lib/Driver/sql.php:265
-msgid "Unable to connect to SQL server."
-msgstr ""
-
 #: templates/main/main.inc:52
 msgid "Unset/remove vacation notice"
 msgstr ""
 
-#: lib/Driver/ldap.php:170
+#: lib/Driver/ldap.php:317
 msgid "User not found."
 msgstr ""
 
@@ -153,40 +193,36 @@ msgstr ""
 msgid "Vacation Summary"
 msgstr ""
 
-#: lib/Block/summary.php:42
+#: lib/Block/summary.php:35
 msgid "Vacation is active."
 msgstr ""
 
-#: lib/Block/summary.php:41
+#: lib/Block/summary.php:34
 msgid "Vacation is not active."
 msgstr ""
 
-#: lib/Driver/qmail.php:102
+#: lib/Driver/qmail.php:30
 msgid "Vacation notice already exists."
 msgstr ""
 
-#: lib/Driver/qmail.php:209
-msgid "Vacation notice not found."
-msgstr ""
-
-#: main.php:103
+#: main.php:83
 msgid "Vacation notice successfully enabled."
 msgstr ""
 
-#: main.php:113
+#: main.php:93
 msgid "Vacation notice successfully removed."
 msgstr ""
 
-#: main.php:43
+#: main.php:35
 #, php-format
 msgid "You can't change the vacation notice for %s."
 msgstr ""
 
-#: main.php:86
+#: main.php:65
 msgid "You must give a vacation message."
 msgstr ""
 
-#: main.php:50
+#: main.php:44
 msgid "You must give your password"
 msgstr ""
 
@@ -198,26 +234,22 @@ msgstr ""
 msgid "You must provide your password"
 msgstr ""
 
-#: main.php:37
+#: main.php:29
 msgid "You must specify the mode (set or remove)"
 msgstr ""
 
-#: lib/base.php:52
-msgid "Your mail will be dealt with when I return."
-msgstr ""
-
 #: templates/main/main.inc:93
 msgid "Your password:"
 msgstr ""
 
-#: main.php:91
+#: main.php:72
 msgid "Your vacation message is not in the proper format."
 msgstr ""
 
-#: main.php:137
+#: main.php:133
 msgid "Your vacation notice is currently disabled."
 msgstr ""
 
-#: main.php:130
+#: main.php:126
 msgid "Your vacation notice is currently enabled."
 msgstr ""
diff --git a/po/zh_TW.po b/po/zh_TW.po
index fc1ece7..88e32a6 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -1,12 +1,12 @@
 # Vacation module translations
-# Copyright (C) 2002 David Chang. ±i¨}¤å,¥xÆW
+# Copyright 2002 David Chang. ±i¨}¤å,¥xÆW
 # David Chang <david at tmv.gov.tw>, 2002.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: vacation H3 (3.0)\n"
+"Project-Id-Version: vacation H3 (3.0-cvs)\n"
 "Report-Msgid-Bugs-To: dev at lists.horde.org\n"
-"POT-Creation-Date: 2007-01-25 14:25+0200\n"
+"POT-Creation-Date: 2007-01-25 15:10+0800\n"
 "PO-Revision-Date: 2003-01-08 10:53+0100\n"
 "Last-Translator: David Chang <david at tmv.gov.tw>\n"
 "Language-Team: Traditional Chinese <i18n at lists.horde.org>\n"
@@ -14,7 +14,7 @@ msgstr ""
 "Content-Type: text/plain; charset=Big5\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: templates/main/main.inc:40
+#: templates/main/main.inc:42
 msgid ""
 "A vacation notice will automatically reply to any incoming mail you receive "
 "while you are away or unable to attend to your e-mail -- for example while "
@@ -23,7 +23,7 @@ msgstr ""
 "°²´Á³qª¾ªA°È,±N¦Û°Ê¦^ÂЫH¥óµ¹¨C¤@¦ì,·í§A¤£¦b¦ì¸m¤W©Î¼È®ÉµLªk±µ¦¬¹q¤l¶l¥ó®É,±H"
 "«Hµ¹§AªºªB¤Í -- ¨Ò¦p:·í§A­n¥h´ç°²©Î¥X®t."
 
-#: templates/main/main.inc:73
+#: templates/main/main.inc:79
 msgid "Alias addresses for this account (optional):"
 msgstr "¦¹±b¸¹ªº¶l¥ó§O¦W («D¥²¶·):"
 
@@ -31,11 +31,11 @@ msgstr "
 msgid "Can't parse your email address"
 msgstr "µLªk¸ÑªR§Aªº¹q¤l¶l¥ó¦a§}"
 
-#: main.php:158 templates/main/main.inc:36
+#: main.php:180 templates/main/main.inc:34
 msgid "Change Vacation Notices"
 msgstr "Åܧ󰲴Á³qª¾ªA°È"
 
-#: lib/Driver/ldap.php:204
+#: lib/Driver/ldap.php:212
 msgid "Check your password"
 msgstr "Àˬd§Aªº±K½X"
 
@@ -45,7 +45,7 @@ msgstr "
 msgid "Check your username and password."
 msgstr "½ÐÀˬd§Aªº¨Ï¥ÎªÌ¦WºÙ¤Î±K½X"
 
-#: lib/Driver/ldap.php:98 lib/Driver/ldap.php:291 lib/Driver/ldap.php:371
+#: lib/Driver/ldap.php:100 lib/Driver/ldap.php:299 lib/Driver/ldap.php:389
 msgid "Could not bind to ldap server"
 msgstr "µLªkôµ² ldap ¦øªA¾¹"
 
@@ -57,27 +57,35 @@ msgstr "
 msgid "Failed to create a vacation driver"
 msgstr "µLªk«Ø¥ß¤@­Ó°²´Á³qª¾ªºÅX°Êµ{¦¡"
 
-#: main.php:101
+#: main.php:107
 #, php-format
 msgid "Failure in modifying vacation notice: %s"
 msgstr "Åܧ󰲴Á³qª¾ªA°È: %s ¥¢±Ñ"
 
-#: main.php:111
+#: main.php:117
 #, php-format
 msgid "Failure in removing vacation notice: %s"
 msgstr "²¾°£°²´Á³qª¾ªA°È: %s ¥¢±Ñ"
 
-#: templates/main/main.inc:89
+#: templates/main/main.inc:88
 msgid ""
 "For your protection and safety, you must identify yourself with your login "
 "password to verify this change."
 msgstr "¬°¤F«OÅ@§Aªº¦w¥þ,§A¥²¶·¦A¦¸¿é¤J§Aµn¤J®Éªº±K½X,¥HÃÒ©ú¬O§A¥»¤H."
 
-#: lib/Driver/ldap.php:292 lib/Driver/ldap.php:372
+#: templates/main/main.inc:65
+msgid "From:"
+msgstr "±H¥ó¤H:"
+
+#: lib/base.php:51
+msgid "I'm on vacation and will not be reading my mail for a while."
+msgstr "§Ú²{¦b¥¿­È¥ð°²´Á¶¡¡A¦]¦¹±N¦³¤@¬q®É¶¡µLªk¾\Ū§A©Ò±H¨Óªº«H¥ó."
+
+#: lib/Driver/ldap.php:300 lib/Driver/ldap.php:390
 msgid "Incorrect Password"
 msgstr "¤£¥¿½Tªº±K½X"
 
-#: templates/main/main.inc:41
+#: templates/main/main.inc:43
 msgid ""
 "It could be used as a courtesy to let others know why you are not answering "
 "their e-mail to you."
@@ -87,7 +95,7 @@ msgstr "
 msgid "Maybe you didn't have a vacation notice installed?"
 msgstr "©Î³\§A©|¥¼¦w¸Ë°²´Á³qª¾ªA°È ?"
 
-#: templates/main/main.inc:65
+#: templates/main/main.inc:72
 msgid "Message:"
 msgstr "°T®§:"
 
@@ -95,6 +103,10 @@ msgstr "
 msgid "Not implemented."
 msgstr "µ{¦¡©|¥¼§¹¦¨."
 
+#: lib/base.php:50
+msgid "On vacation message"
+msgstr "°²´Á¯d¨¥"
+
 #: templates/main/main.inc:49
 msgid "Set/install vacation notice"
 msgstr "³]©w°²´Á³qª¾ªA°È"
@@ -103,11 +115,11 @@ msgstr "
 msgid "Subject:"
 msgstr "¥D¦®:"
 
-#: templates/main/main.inc:96
+#: templates/main/main.inc:100
 msgid "Submit"
 msgstr "°e¥X"
 
-#: lib/Driver/ldap.php:133 lib/Driver/qmail.php:52
+#: lib/Driver/ldap.php:135 lib/Driver/qmail.php:52
 msgid "The module is not properly configured!"
 msgstr "¦¹¼Ò²Õ¨Ã¥¼§¹¾ã³]©w."
 
@@ -115,11 +127,11 @@ msgstr "
 msgid "The vacation application is not properly configured."
 msgstr "°²´Á³qª¾¨Ã¥¼³]©w§¹¾ã."
 
-#: templates/main/main.inc:90
+#: templates/main/main.inc:89
 msgid "Then submit the form so that your vacation notice can be updated."
 msgstr "³Ì«á«ö¤U¶Ç°e«ö¶s¥HÅܧó§Aªº°²´Á³qª¾ªA°È¥\¯à."
 
-#: templates/main/main.inc:42
+#: templates/main/main.inc:44
 msgid ""
 "This form lets you install or remove a vacation notice for your e-mail "
 "account. You should edit the default message to meet your needs."
@@ -135,7 +147,7 @@ msgstr "
 msgid "Unset/remove vacation notice"
 msgstr "¨ú®ø°²´Á³qª¾ªA°È"
 
-#: lib/Driver/ldap.php:163
+#: lib/Driver/ldap.php:170
 msgid "User not found."
 msgstr "§ä¤£¨ì¨Ï¥ÎªÌ."
 
@@ -159,24 +171,24 @@ msgstr "
 msgid "Vacation notice not found."
 msgstr "§ä¤£¨ì°²´Á³qª¾ª`·N¨Æ¶µ."
 
-#: main.php:99
+#: main.php:105
 msgid "Vacation notice successfully enabled."
 msgstr "°²´Á³qª¾ªA°È¤w§¹¦¨±Ò¥Î."
 
-#: main.php:109
+#: main.php:115
 msgid "Vacation notice successfully removed."
 msgstr "°²´Á³qª¾ªA°È¤w²¾°£."
 
-#: main.php:43
+#: main.php:45
 #, php-format
 msgid "You can't change the vacation notice for %s."
 msgstr "§A¤£¯àÅܧó %s ªº°²´Á³qª¾ªA°È"
 
-#: main.php:82
+#: main.php:88
 msgid "You must give a vacation message."
 msgstr "§A¥²¶·¿é¤J°²´Á¯d¨¥."
 
-#: main.php:50
+#: main.php:52
 msgid "You must give your password"
 msgstr "§A¥²¶·¿é¤J§Aªº±K½X"
 
@@ -188,22 +200,26 @@ msgstr "
 msgid "You must provide your password"
 msgstr "§A¥²¶·¿é¤J§Aªº±K½X"
 
-#: main.php:37
+#: main.php:39
 msgid "You must specify the mode (set or remove)"
 msgstr "§A¥²¶·«ü©w¼Ò¦¡ (³]©w©Î¨ú®ø)"
 
+#: lib/base.php:52
+msgid "Your mail will be dealt with when I return."
+msgstr "«Ý§Ú¦^¨Ó«á§Ú·|¾¨§Ö³B²z."
+
 #: templates/main/main.inc:93
 msgid "Your password:"
 msgstr "§Aªº±K½X:"
 
-#: main.php:87
+#: main.php:93
 msgid "Your vacation message is not in the proper format."
 msgstr "§Aªº°²´Á³qª¾°T®§¨Ã«D¾A¦Xªº®æ¦¡."
 
-#: main.php:130
+#: main.php:139
 msgid "Your vacation notice is currently disabled."
 msgstr "§Aªº°²´Á³qª¾ªA°È¥Ø«e¤w°±¥Î."
 
-#: main.php:126
+#: main.php:132
 msgid "Your vacation notice is currently enabled."
 msgstr "§A¤w¸g±Ò¥Î¤F°²´Á³qª¾ªA°È."
diff --git a/scripts/create-db-files.pl b/scripts/create-db-files.pl
old mode 100644
new mode 100755
index 550b56e..4eb855e
--- a/scripts/create-db-files.pl
+++ b/scripts/create-db-files.pl
@@ -1,19 +1,22 @@
-# $Horde: vacation/scripts/create-db-files.pl,v 1.3 2003/04/27 00:28:12 chuck Exp $
+#!/usr/bin/perl
 #
-#
-# Copyright 2001-2002 Eric Rostetter <eric.rostetter at physics.utexas.edu>
-#
-# See the enclosed file LICENSE for license information (BSD). If you
-# did not receive this file, see http://www.horde.org/licenses/bsdl.php.
-#
-# This script generates some empty database files to be used by the
-# vacation program.  Currently it tries to generate:
+# This script generates some empty database files to be used by the vacation
+# program.  Currently it tries to generate:
 #
 # empty.hash.bin    Berkeley DB 2.x hash, little endian
 # empty.btree.bin   Berkeley DB 2.x btree, little endian
 # empty.gdbm.bin    GNU dbm (gdbm) database, little endian
 # empty.empty.bin   Empty file
 #
+# $Horde: vacation/scripts/create-db-files.pl,v 1.3.2.3 2009/01/06 15:28:11 jan Exp $
+#
+# Copyright 2001-2009 The Horde Project (http://www.horde.org/)
+#
+# See the enclosed file LICENSE for license information (BSD). If you
+# did not receive this file, see http://www.horde.org/licenses/bsdl.php.
+#
+# @author  Eric Rostetter <eric.rostetter at physics.utexas.edu>
+# @package Passwd
 
 use strict;
 use DB_File;
diff --git a/templates/common-header.inc b/templates/common-header.inc
index ca5c071..20edd61 100644
--- a/templates/common-header.inc
+++ b/templates/common-header.inc
@@ -6,7 +6,7 @@ if (isset($language)) {
 }
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<!-- Vacation: Copyright 2000-2007, The Horde Project. Vacation is under a Horde license. -->
+<!-- Vacation: Copyright 2000-2009 The Horde Project.  Vacation is under a Horde license. -->
 <!--   Horde Project: http://www.horde.org/ | Vacation: http://www.horde.org/vacation/    -->
 <!--                  Horde Licenses: http://www.horde.org/licenses/                      -->
 <?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
diff --git a/templates/main/main.inc b/templates/main/main.inc
index 338f210..54d6a32 100644
--- a/templates/main/main.inc
+++ b/templates/main/main.inc
@@ -24,7 +24,7 @@ function submit_form()
 <div id="menu"><div class="leftFloat">
 <?php
 require_once 'Horde/Menu.php';
-$menu = &new Menu(HORDE_MENU_MASK_ALL & ~HORDE_MENU_MASK_PREFS);
+$menu = new Menu(HORDE_MENU_MASK_ALL & ~HORDE_MENU_MASK_PREFS);
 echo $menu->render();
 ?>
 </div></div>
@@ -85,7 +85,7 @@ echo $menu->render();
 
 <?php if (empty($hordeauth)): ?>
 <p>
-<?php echo _("For your protection and safety, you must identify yourself with your login password to verify this change.") ?>
+<?php echo _("For your protection and safety, you must identify yourself with your login password to verify this change.") . ' ' ?>
 <?php echo _("Then submit the form so that your vacation notice can be updated.") ?>
 </p>
 
diff --git a/themes/graphics/vacation.png b/themes/graphics/vacation.png
index 12e2fe9..c7d8085 100644
Binary files a/themes/graphics/vacation.png and b/themes/graphics/vacation.png differ
diff --git a/themes/screen.css b/themes/screen.css
index b251ae0..13c98ac 100644
--- a/themes/screen.css
+++ b/themes/screen.css
@@ -1,5 +1,5 @@
 /**
- * $Horde: vacation/themes/screen.css,v 1.2.2.2 2006/07/25 17:09:43 jan Exp $
+ * $Horde: vacation/themes/screen.css,v 1.2.2.3 2008/10/09 17:37:36 jan Exp $
  */
 
 .vacationArea {

-- 
Debian Horde Packages repository: sork-vacation-h3 package



More information about the pkg-horde-hackers mailing list