<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="/h/themes/default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Vacation and forward conflict in SunOne LDAP schema</title> 
  <pubDate>Sat, 25 May 2013 05:44:05 +0000</pubDate> 
  <link>http://bugs.horde.org/ticket/6686</link> 
  <atom:link rel="self" type="application/rss+xml" title="Vacation and forward conflict in SunOne LDAP schema" href="http://bugs.horde.org/ticket/6686/rss" /> 
  <description>Vacation and forward conflict in SunOne LDAP schema</description> 
 
   
   
  <item> 
   <title>I would like to explain a problem that affect all people tha</title> 
   <description>I would like to explain a problem that affect all people that use forward and vacation modules together with LDAP driver.



In SunOne schema vacation and forward mechanism use the same attribute &quot;maildeliveryoption&quot;.



So, if a user set vacation lose forward setting, and vice versa. Because if I set a module I change maildeliveryoption not only on interested value, but rewriting all its values.



Let me explain with an example:



Let be that attribute which contains the vacation status and forward status is the same: maildeliveryoption.

A user set a forward:

ldap driver set maildeliveryoption adding &quot;forward&quot; value.

Then the same user also set vacation:

ldap vacation driver instead to *add* &quot;autoreply&quot; value to maildeliveryoption, *replace* it with &quot;autoreply&quot; value. So user lose the &quot;forward&quot; value previously set.



See also http://bugs.horde.org/ticket/6523



I know that this should be a particular condition of SunOne, but all environments that use same multivalued attribute to set vacation and forward could be affected. It is also true that these LDAP drivers should only modify single value of multivalued attribute, instead of replacing attribute at all, without preserve other values.



What do you think? A fix to this behavior should be very appreciate.

I thank you very much

Best Regards</description> 
   <pubDate>Fri, 09 May 2008 07:12:15 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t45201</link> 
  </item> 
   
  <item> 
   <title>This isn't totally unique to LDAP.  If you use the .forward </title> 
   <description>This isn't totally unique to LDAP.  If you use the .forward setup for vacation and

forwards, they also overwrite eachother since they use the same .forward file

and don't really know about each other (as well as any other uses of the .forward

file).



To fix this, you would need &quot;intellegent&quot; parsing of the contents of the field/file/etc

so as to &quot;update&quot; it intellegently rather than simply replacing or removing the

contents.  Doing such work reliably may be problematic depending on the

contents of the field and how it can be updated by other sources, etc.



Maybe it is better to focus on Ingo for such advanced settings, rather than continuing

such complex work on Sork?



IMHO, in order to implement the requested feature, we would need to know all

possible values of maildeliveryoption and what the syntax of the contents is.

Then build something which understands that syntax and knows the options,

and can manipulate them in a safe way.  Doing that for LDAP is probably

much easier than for a .forward file, but you still never know if some other

software might use the maildeliveryoption in a non-standard way or something.

</description> 
   <pubDate>Fri, 09 May 2008 16:54:13 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t45210</link> 
  </item> 
   
  <item> 
   <title>I would try to explain better about LDAP. I don't think it i</title> 
   <description>I would try to explain better about LDAP. I don't think it is necessary to know all possible values of attribute used by forward/vacation. It's only necessary that driver acts only on values related to working mechanism.



For instance, If vacation module set attribute maildeliveryoption to &quot;autoreply&quot;, when I unset vacation, driver should only delete value &quot;autoreplay&quot; of maildeliveryoption, leaving other values unchanged. &quot;ldap_mod_del&quot; permits deletion of single attribute value, I suppose. At the same, I could add value to attribute leaving its other values unchanged.



I apologize if I don't explain better.

Thank again

Regards

 </description> 
   <pubDate>Tue, 13 May 2008 12:17:21 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t45257</link> 
  </item> 
   
  <item> 
   <title>I have written a little patch to ldap driver which let vacat</title> 
   <description>I have written a little patch to ldap driver which let vacation works without interfering forward module.

But a new driver (named SunOneLDAPMessaging or something analog) should be done. Also,  ldap attribute vacationEndDate, vacationStartDate and mailAutoReplyTimeout could be added.



With minimum changes I done, $conf[server][params][default][disabled] is only the value that must always exists in a mailbox account. Vacation is activated and disabled managing a single value.



Similar changes should be done to forward SunOne module...



To view behavior is sufficient to patch ldap driver as follow:

 

diff ldap.php.orig ldap.php

222d221

&lt;         $newDetails[$this-&gt;_params[$realm]['active']] = explode(&quot;|&quot;, $this-&gt;_params[$realm]['enabled']);

226,227d224

&lt;             $this-&gt;_disconnect();

&lt;             return false;

228a226,237

&gt;    unset($newDetails);        // $message was already replaced

&gt;    $_ = explode(&quot;|&quot;, $this-&gt;_params[$realm]['enabled']);

&gt;    foreach ( $_ as $value )

&gt;               $newDetails[$this-&gt;_params[$realm]['active']][] = $value;

&gt;               $res = ldap_mod_add($this-&gt;_ds, $userdn, $newDetails);

&gt;               if (!$res) {

&gt;               $res = PEAR::raiseError(ldap_error($this-&gt;_ds));

&gt;               $this-&gt;_disconnect();

&gt;               return false;

&gt;         }

&gt;

&gt;

349a359,364

&gt;        if (in_array($this-&gt;_params[$realm]['enabled'],$retAttrs[$vacationAttr]))

&gt;               $retAttrs[$vacationAttr] = array($this-&gt;_params[$realm]['enabled']);

&gt;        else {

&gt;               if (in_array($this-&gt;_params[$realm]['disabled'],$retAttrs[$vacationAttr]))

&gt;                       $retAttrs[$vacationAttr] = array($this-&gt;_params[$realm]['disabled']);

&gt;        }

398,399c413,414

&lt;         $newDetails[$this-&gt;_params[$realm]['active']] = $this-&gt;_params[$realm]['disabled'];

&lt;         $result = ldap_mod_replace($this-&gt;_ds, $userdn, $newDetails);

---

&gt;         $newDetails[$this-&gt;_params[$realm]['active']][] = $this-&gt;_params[$realm]['enabled'];

&gt;         $result = ldap_mod_del($this-&gt;_ds, $userdn, $newDetails);</description> 
   <pubDate>Thu, 18 Sep 2008 08:24:32 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t48989</link> 
  </item> 
   
  <item> 
   <title>this is same patch in a file attachment</title> 
   <description>this is same patch in a file attachment</description> 
   <pubDate>Thu, 18 Sep 2008 08:27:25 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t48990</link> 
  </item> 
   
  <item> 
   <title>I add the same driver patched for Messaging Server based on </title> 
   <description>I add the same driver patched for Messaging Server based on last vacation version (3.1).



Original ldap driver doesn't work for Sun Messaging.



In this last vacation version I had also to modify new Driver.php in function isEnabled:



        // Check vacation flag.

        if ($current_details['vacation'] == 'y' ||

            $current_details['vacation'] == 'Y' ||

            $current_details['vacation'] == $this-&gt;_params[$this-&gt;_realm]['enabled']) {

            return 'Y';

        } elseif ($current_details['vacation'] == 'n' ||

                  $current_details['vacation'] == 'N' ||

                  $current_details['vacation'] == $this-&gt;_params[$realm]['disabled']) {

            return 'N';

        } else {

            return false;

        }</description> 
   <pubDate>Fri, 08 May 2009 12:03:56 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54057</link> 
  </item> 
   
  <item> 
   <title>Please provide this as a patch.</title> 
   <description>Please provide this as a patch.</description> 
   <pubDate>Tue, 12 May 2009 14:28:13 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54094</link> 
  </item> 
   
  <item> 
   <title>&gt; Please provide this as a patch.



I added two file:



pa</title> 
   <description>&gt; Please provide this as a patch.



I added two file:



patch_Driver.txt for vacation/lib/Driver.php

patch_ldap.txt for vacation/lib/Driver/ldap.php



Vacation version is the last (3.1).



I hope this help...</description> 
   <pubDate>Wed, 13 May 2009 07:21:48 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54109</link> 
  </item> 
   
  <item> 
   <title>

</title> 
   <description>

</description> 
   <pubDate>Wed, 13 May 2009 07:22:31 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54110</link> 
  </item> 
   
  <item> 
   <title>It would be even better if you made it a single unified diff</title> 
   <description>It would be even better if you made it a single unified diff.</description> 
   <pubDate>Thu, 14 May 2009 17:19:26 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54140</link> 
  </item> 
   
  <item> 
   <title>I attach a unified patch for the two file modified.</title> 
   <description>I attach a unified patch for the two file modified.</description> 
   <pubDate>Fri, 15 May 2009 06:18:21 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54170</link> 
  </item> 
   
  <item> 
   <title>This is the final right file: patchVacation.txt

</title> 
   <description>This is the final right file: patchVacation.txt

</description> 
   <pubDate>Fri, 15 May 2009 06:20:58 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54171</link> 
  </item> 
   
  <item> 
   <title>Thank you for testing with the SunOne Directory Server.  I w</title> 
   <description>Thank you for testing with the SunOne Directory Server.  I was unable to test since I do not have access to one.  I am reviewing your patch and will update the ticket when I have reviewed it in my test environment.</description> 
   <pubDate>Mon, 18 May 2009 14:45:42 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/6686#t54227</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
