index b43c10ad12cb8984c7db9c5779d241cacd38d6d6..08280c188eae6ba4b0eb8ee4c33632ccbb6f1e2d 100644 (file)
function mailMethodKolab($config)
{
+ /* Check if the mail account identification attribute
+ is overridden in the configuration file
+ */
+ if(isset($config->current['MAIL_ATTRIB']) && !empty($config->current['MAIL_ATTRIB'])){
+ $new_uattrib= strtolower($config->current['MAIL_ATTRIB']);
+ if(in_array($new_uattrib,array("mail","uid"))){
+ $this->uattrib = $new_uattrib;
+ }else{
+ trigger_error(sprintf("Unsupported MAIL_ATTRIB in gosa configuration specified, use 'mail' or 'uid', instead of '%s'.", $new_uattrib));
+ }
+ }
+
$this->config= $config->data['SERVERS']['IMAP'];
}
}
}
- /* Save shared folder target */
- $mailObject->attrs['gosaSharedFolderTarget']= "kolab+shared.".$mailObject->mail;
-
/* Kolab shared folder names are like ' shared.uid@server.de '
So overwrite uid to match these folder names. Else we can't read quota settings etc.
#FIXME is there a better way to detect if it is 'shared.' or 'shared+' or 'kolab+shared.' or what ever ?*/
$mailObject->uid = "shared.".$mailObject->uid."@".preg_replace("/^.*@/","",$mailObject->mail);
+
+ /* Save shared folder target */
+ $mailObject->attrs['gosaSharedFolderTarget']= "kolab+shared.".$mailObject->cn."@".preg_replace("/^.*@/","",$mailObject->mail);
/* Assign new acls */
$mailObject->attrs['acl']= array();