6.0.0-alpha12
6/5/25

[#6686] Vacation and forward conflict in SunOne LDAP schema
Summary Vacation and forward conflict in SunOne LDAP schema
Queue Vacation
Queue Version 3.0.1
Type Bug
State Resolved
Priority 1. Low
Owners bklang (at) horde (dot) org
Requester falon (at) csi (dot) it
Created 05/09/2008 (6236 days ago)
Due
Updated 11/13/2013 (4222 days ago)
Assigned 05/18/2009 (5862 days ago)
Resolved 11/13/2013 (4222 days ago)
Milestone
Patch No

History
11/13/2013 03:30:45 AM Michael Slusarz Comment #14
State ⇒ Resolved
Reply to this comment
Vacation has been merged into ingo.
08/28/2009 12:28:52 PM Jan Schneider Deleted Original Message
 
08/28/2009 12:28:24 PM Jan Schneider Deleted Original Message
 
08/28/2009 12:28:18 PM Jan Schneider Deleted Original Message
 
05/18/2009 02:45:42 PM Ben Klang Comment #13
State ⇒ Assigned
Reply to this comment
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.
05/15/2009 06:20:58 AM falon (at) csi (dot) it Comment #12
New Attachment: patchVacation.txt Download
Reply to this comment
This is the final right file: patchVacation.txt


05/15/2009 06:18:21 AM falon (at) csi (dot) it Comment #11
New Attachment: patch_vacation.txt
Reply to this comment
I attach a unified patch for the two file modified.
05/14/2009 05:19:26 PM Jan Schneider Comment #10 Reply to this comment
It would be even better if you made it a single unified diff.
05/14/2009 05:18:34 PM Jan Schneider Deleted Original Message
 
05/14/2009 05:18:18 PM Jan Schneider Deleted Original Message
 
05/13/2009 07:22:31 AM falon (at) csi (dot) it Comment #9
New Attachment: patch_ldap[1].txt
Reply to this comment



05/13/2009 07:21:48 AM falon (at) csi (dot) it Comment #8
New Attachment: patch_Driver.txt
Reply to this comment
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...
05/12/2009 02:28:13 PM Jan Schneider Comment #7
State ⇒ Feedback
Reply to this comment
Please provide this as a patch.
05/08/2009 12:03:56 PM falon (at) csi (dot) it Comment #6
New Attachment: ldapSunOneMess.php
Reply to this comment
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->_params[$this->_realm]['enabled']) {

             return 'Y';

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

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

                   $current_details['vacation'] == 
$this->_params[$realm]['disabled']) {

             return 'N';

         } else {

             return false;

         }
09/18/2008 08:27:25 AM falon (at) csi (dot) it Comment #5
New Attachment: patch_ldap.txt
Reply to this comment
this is same patch in a file attachment
09/18/2008 08:24:32 AM falon (at) csi (dot) it Comment #4 Reply to this comment
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

<         $newDetails[$this->_params[$realm]['active']] = explode("|", 
$this->_params[$realm]['enabled']);

226,227d224

<             $this->_disconnect();

<             return false;

228a226,237

[Show Quoted Text - 12 lines]
349a359,364

[Show Quoted Text - 10 lines]
398,399c413,414

<         $newDetails[$this->_params[$realm]['active']] = 
$this->_params[$realm]['disabled'];

<         $result = ldap_mod_replace($this->_ds, $userdn, $newDetails);

---
         $newDetails[$this->_params[$realm]['active']][] = 
$this->_params[$realm]['enabled'];
         $result = ldap_mod_del($this->_ds, $userdn, $newDetails);
05/13/2008 12:17:21 PM falon (at) csi (dot) it Comment #3 Reply to this comment
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 
"autoreply", when I unset vacation, driver should only delete value 
"autoreplay" of maildeliveryoption, leaving other values unchanged. 
"ldap_mod_del" 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


05/09/2008 04:54:13 PM rostetter (at) mail (dot) utexas (dot) edu Comment #2 Reply to this comment
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 "intellegent" parsing of the contents of 
the field/file/etc

so as to "update" 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.


05/09/2008 08:41:26 AM Jan Schneider Assigned to Ben Klang
State ⇒ Assigned
 
05/09/2008 07:12:15 AM falon (at) csi (dot) it Comment #1
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Vacation
Summary ⇒ Vacation and forward conflict in SunOne LDAP schema
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
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 
"maildeliveryoption".



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 "forward" value.

Then the same user also set vacation:

ldap vacation driver instead to *add* "autoreply" value to 
maildeliveryoption, *replace* it with "autoreply" value. So user lose 
the "forward" 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

Saved Queries