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 |
State ⇒ Resolved
State ⇒ Assigned
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.
New Attachment: patchVacation.txt
New Attachment: patch_vacation.txt
New Attachment: patch_ldap[1].txt
New Attachment: patch_Driver.txt
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...
State ⇒ Feedback
New Attachment: ldapSunOneMess.php
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;
}
New Attachment: patch_ldap.txt
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
< $newDetails[$this->_params[$realm]['active']] =
$this->_params[$realm]['disabled'];
< $result = ldap_mod_replace($this->_ds, $userdn, $newDetails);
---
$this->_params[$realm]['enabled'];
$result = ldap_mod_del($this->_ds, $userdn, $newDetails);
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
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.
State ⇒ Assigned
Milestone ⇒
State ⇒ Unconfirmed
Patch ⇒ No
Queue ⇒ Vacation
Summary ⇒ Vacation and forward conflict in SunOne LDAP schema
Type ⇒ Bug
Priority ⇒ 1. Low
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