4
class mailMethodKolab22 extends mailMethodKolab
7
/* Allow modification of account_ids for existing mail accounts */
8
protected $modifyableMail = FALSE;
10
/* Enforces same value for 'mail' as used for 'cn' */
11
protected $mailEqualsCN = TRUE;
13
/* Enabled mail domain selection. If enabled getMailDomains must the domain parts */
14
protected $enableDomainSelection= TRUE;
15
protected $enableQuota = TRUE;
16
protected $enableSieveManager = TRUE;
17
protected $enableVacationRange = TRUE;
18
protected $enableFolderTypes = TRUE;
20
protected $userObjectClasses = array("kolabInetOrgPerson");
21
protected $shareObjectClasses = array("kolabSharedFolder");
23
protected $acl_map = array(
26
// "lrsip" => "append",
27
// "lrswipkxte" => "write",
28
// "lrxte" => "delete",
29
// "lrswipkxtecda" => "admin",
34
"read/post" => "read/post",
37
"read anon" => "read anon",
38
"read anon/post" => "read anon/post",
39
"read hidden" => "read hidden",
40
"read hidden/post" => "read hidden/post",
43
protected $default_acls = array("__anyone__" => "none", "__member__" => "write");
46
/*! \brief Returns configured acls
48
public function getFolderACLs($ldap_acls)
51
$imap_acls = mailMethodKolab::getFolderACLs(array());
53
foreach($imap_acls as $user => $acl){
54
if(!isset($ldap_acls[$user])){
55
$ldap_acls[$user] = $acl;
57
// Ldap attributes come first in kolab22.
61
/* Merge given ACL with acl mapping
62
This ensures that no ACL will accidentally overwritten by gosa.
64
foreach($ldap_acls as $user => $acl){
65
if(!isset($this->acl_mapping[$acl])){
66
$this->acl_mapping[$acl] = $acl;
74
/*! \brief Returns a list of configured mail domains
75
@return Array A list of mail domains
77
public function getMailDomains()
80
$ldap = $this->config->get_ldap_link();
81
$ldap->cd($this->config->current['BASE']);
82
$ldap->search("(&(objectClass=kolab)(k=kolab)(postfix-mydestination=*))",array("postfix-mydestination"));
84
if($ldap->count() == 1){
85
$attrs = $ldap->fetch();
86
for($i=0; $i <$attrs['postfix-mydestination']['count']; $i ++ ){
87
$domains[] = $attrs['postfix-mydestination'][$i];
89
@DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "<b>Found: ".trim(implode($domains,", "),", ")."</b>",
90
"Revceiving 'Mail domains for kolab22'.");
91
}elseif($ldap->count() == 0){
92
@DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "<b>No domains found. Check k=kolab and postfix-mydestination</b>",
93
"Revceiving 'Mail domains for kolab22'.");
95
@DEBUG (DEBUG_MAIL, __LINE__, __FUNCTION__, __FILE__, "<b>Found more than one kolab configuration object. Giving up.</b>",
96
"Revceiving 'Mail domains for kolab22'.");
104
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: