mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:48:55 +01:00
moved support for suseMailRecipient and Mandriva mailAccount LDAP schema to EMAilAdmin
This commit is contained in:
parent
12c65ccec3
commit
8f2cc13eb9
@ -412,15 +412,6 @@ class emailadmin_bo extends so_sql
|
|||||||
static public function getSMTPServerTypes($extended=true)
|
static public function getSMTPServerTypes($extended=true)
|
||||||
{
|
{
|
||||||
$retData = array();
|
$retData = array();
|
||||||
/* foreach(self::$SMTPServerType as $key => $value)
|
|
||||||
{
|
|
||||||
if ($extended)
|
|
||||||
{
|
|
||||||
$retData[$key]['fieldNames'] = isset($value['fieldNames'])?$value['fieldNames']:self::$supportedSMTPFields;
|
|
||||||
$retData[$key]['description'] = isset($value['description'])?$value['description']:$key;
|
|
||||||
$retData[$key]['classname'] = isset($value['classname'])?$value['classname']:$key;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
foreach($GLOBALS['egw']->hooks->process(array(
|
foreach($GLOBALS['egw']->hooks->process(array(
|
||||||
'location' => 'smtp_server_types',
|
'location' => 'smtp_server_types',
|
||||||
'extended' => $extended,
|
'extended' => $extended,
|
||||||
@ -450,20 +441,6 @@ class emailadmin_bo extends so_sql
|
|||||||
static public function getIMAPServerTypes($extended=true)
|
static public function getIMAPServerTypes($extended=true)
|
||||||
{
|
{
|
||||||
$retData = array();
|
$retData = array();
|
||||||
/* foreach(self::$IMAPServerType as $key => $value)
|
|
||||||
{
|
|
||||||
if ($extended)
|
|
||||||
{
|
|
||||||
$retData[$key]['fieldNames'] = isset($value['fieldNames'])?$value['fieldNames']:self::$supportedIMAPFields;
|
|
||||||
$retData[$key]['description'] = isset($value['description'])?$value['description']:$key;
|
|
||||||
$retData[$key]['protocol'] = isset($value['protocol'])?$value['protocol']:'imap';
|
|
||||||
$retData[$key]['classname'] = isset($value['classname'])?$value['classname']:$key;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$retData[$key] = $value['description'];
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
foreach($GLOBALS['egw']->hooks->process(array(
|
foreach($GLOBALS['egw']->hooks->process(array(
|
||||||
'location' => 'imap_server_types',
|
'location' => 'imap_server_types',
|
||||||
'extended' => $extended,
|
'extended' => $extended,
|
||||||
|
84
emailadmin/inc/class.emailadmin_smtp_mandriva.inc.php
Normal file
84
emailadmin/inc/class.emailadmin_smtp_mandriva.inc.php
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* EGroupware: Postfix with Mandriva mailAccount schema
|
||||||
|
*
|
||||||
|
* @link http://www.egroupware.org
|
||||||
|
* @package emailadmin
|
||||||
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @copyright (c) 2010-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Postfix with Mandriva mailAccount schema
|
||||||
|
*/
|
||||||
|
class emailadmin_smtp_mandriva extends emailadmin_smtp_ldap
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Capabilities of this class (pipe-separated): default, forward
|
||||||
|
*/
|
||||||
|
const CAPABILITIES = 'default|forward';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of schema, has to be in the right case!
|
||||||
|
*/
|
||||||
|
const SCHEMA = 'mailAccount';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute to enable mail for an account, OR false if existence of ALIAS_ATTR is enough for mail delivery
|
||||||
|
*/
|
||||||
|
const MAIL_ENABLE_ATTR = 'mailenable';
|
||||||
|
/**
|
||||||
|
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
|
||||||
|
*/
|
||||||
|
const MAIL_ENABLED = 'OK';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for aliases OR false to use mail
|
||||||
|
*/
|
||||||
|
const ALIAS_ATTR = 'mailalias';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primary mail address required as an alias too: true or false
|
||||||
|
*/
|
||||||
|
const REQUIRE_MAIL_AS_ALIAS=false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for forwards OR false if not possible
|
||||||
|
*/
|
||||||
|
const FORWARD_ATTR = 'maildrop';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute to only forward mail, OR false if not available
|
||||||
|
*/
|
||||||
|
const FORWARD_ONLY_ATTR = false;
|
||||||
|
/**
|
||||||
|
* Attribute value to only forward mail
|
||||||
|
*/
|
||||||
|
const FORWARD_ONLY = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for mailbox, to which mail gets delivered OR false if not supported
|
||||||
|
*/
|
||||||
|
const MAILBOX_ATTR = 'mailbox';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for quota limit of user in MB
|
||||||
|
*/
|
||||||
|
const QUOTA_ATTR = 'mailuserquota';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log all LDAP writes / actions to error_log
|
||||||
|
*/
|
||||||
|
var $debug = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return description for EMailAdmin
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public static function description()
|
||||||
|
{
|
||||||
|
return 'LDAP (Mandriva '.static::SCHEMA.')';
|
||||||
|
}
|
||||||
|
}
|
72
emailadmin/inc/class.emailadmin_smtp_suse.inc.php
Normal file
72
emailadmin/inc/class.emailadmin_smtp_suse.inc.php
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* EGroupware: SUSE Mailserver support Postfix MTA
|
||||||
|
*
|
||||||
|
* @link http://www.egroupware.org
|
||||||
|
* @package emailadmin
|
||||||
|
* @subpackage emailadmin
|
||||||
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @copyright (c) 2009-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
|
* @version $Id$
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Support for Postfix with suse-mailserver schemas
|
||||||
|
*
|
||||||
|
* Used in SLES and openSUSE 10+
|
||||||
|
*/
|
||||||
|
class emailadmin_smtp_suse extends emailadmin_smtp_ldap
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Capabilities of this class (pipe-separated): default, forward
|
||||||
|
*/
|
||||||
|
const CAPABILITIES = 'default|forward';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Name of schema, has to be in the right case
|
||||||
|
*/
|
||||||
|
const SCHEMA = 'suseMailRecipient';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute to enable mail for an account, OR false if existence of ALIAS_ATTR is enough for mail delivery
|
||||||
|
*/
|
||||||
|
const MAIL_ENABLE_ATTR = false;
|
||||||
|
/**
|
||||||
|
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
|
||||||
|
*/
|
||||||
|
const MAIL_ENABLED = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for aliases OR false to use mail
|
||||||
|
*/
|
||||||
|
const ALIAS_ATTR = 'susemailacceptaddress';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Primary mail address required as an alias too: true or false
|
||||||
|
*/
|
||||||
|
const REQUIRE_MAIL_AS_ALIAS = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for forwards OR false if not possible
|
||||||
|
*/
|
||||||
|
const FORWARD_ATTR = 'susemailforwardaddress';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute to only forward mail, OR false if not available
|
||||||
|
*/
|
||||||
|
const FORWARD_ONLY_ATTR = false;
|
||||||
|
/**
|
||||||
|
* Attribute value to only forward mail
|
||||||
|
*/
|
||||||
|
const FORWARD_ONLY = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute for mailbox, to which mail gets delivered OR false if not supported
|
||||||
|
*/
|
||||||
|
const MAILBOX_ATTR = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log all LDAP writes / actions to error_log
|
||||||
|
*/
|
||||||
|
var $debug = false;
|
||||||
|
}
|
@ -102,6 +102,10 @@
|
|||||||
{
|
{
|
||||||
if (isset($this->db_cols[$key])) $key = $this->db_cols[$key];
|
if (isset($this->db_cols[$key])) $key = $this->db_cols[$key];
|
||||||
|
|
||||||
|
if ($key == 'smtpType' && substr($val, 8) == 'stylite_') // convert old epl names
|
||||||
|
{
|
||||||
|
$val = $val == 'stylite_postfixsuse' ? 'emailadmin_smtp_suse' : 'emailadmin_smtp_mandriva';
|
||||||
|
}
|
||||||
$vals[$key] = $val;
|
$vals[$key] = $val;
|
||||||
}
|
}
|
||||||
return $vals;
|
return $vals;
|
||||||
|
Loading…
Reference in New Issue
Block a user