* eMailAdmin/eMail: backport of emailadmin from epl 11.1 to community 1.8 to allow for mandriva MailAccount and suseMailRecipient LDAP Schema to be used in emailadmin; support of storing email attributes in sql database (that way, eGroupware may be used as AccountStorage for your MailServer); LDAP requires php5.3 now! You must visit setup to upgrade emailadmin tables, if you are using a svn checkout

This commit is contained in:
Klaus Leithoff 2013-06-13 14:13:01 +00:00
parent a196bf1032
commit 96b744df72
77 changed files with 9557 additions and 3552 deletions

View File

@ -0,0 +1,271 @@
#
# qmail-ldap (20030901) ldapv3 directory schema
#
# The offical qmail-ldap OID assigned by IANA is 7914
#
# Created by: David E. Storey <dave@tamos.net>
# Modified and included into qmail-ldap by Andre Oppermann <opi@nrg4u.com>
# Schema fixes by Mike Jackson <mjj@pp.fi>
# Schema fixes by Christian Zoffoli (XMerlin) <czoffoli@xmerlin.org>
#
#
# This schema depends on:
# - core.schema
# - cosine.schema
# - nis.schema
#
# Attribute Type Definitions
attributetype ( 1.3.6.1.4.1.7914.1.2.1.1 NAME 'qmailUID'
DESC 'UID of the user on the mailsystem'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.2 NAME 'qmailGID'
DESC 'GID of the user on the mailsystem'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.3 NAME 'mailMessageStore'
DESC 'Path to the maildir/mbox on the mail system'
EQUALITY caseExactIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.4 NAME 'mailAlternateAddress'
DESC 'Secondary (alias) mailaddresses for the same user'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
#
# mailQuota format is no longer supported from qmail-ldap 20030901 on,
# user mailQuotaSize and mailQuotaCount instead.
#
#attributetype ( 1.3.6.1.4.1.7914.1.2.1.5 NAME 'mailQuota'
# DESC 'The amount of space the user can use until all further messages get bounced.'
# SYNTAX 1.3.6.1.4.1.1466.115.121.1.44 SINGLE-VALUE )
#
attributetype ( 1.3.6.1.4.1.7914.1.2.1.6 NAME 'mailHost'
DESC 'On which qmail server the messagestore of this user is located.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE)
attributetype ( 1.3.6.1.4.1.7914.1.2.1.7 NAME 'mailForwardingAddress'
DESC 'Address(es) to forward all incoming messages to.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.8 NAME 'deliveryProgramPath'
DESC 'Program to execute for all incoming mails.'
EQUALITY caseExactIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.9 NAME 'qmailDotMode'
DESC 'Interpretation of .qmail files: both, dotonly, ldaponly, ldapwithprog'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.10 NAME 'deliveryMode'
DESC 'multi field entries of: nolocal, noforward, noprogram, reply'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{32} )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.11 NAME 'mailReplyText'
DESC 'A reply text for every incoming message'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.12 NAME 'accountStatus'
DESC 'The status of a user account: active, noaccess, disabled, deleted'
EQUALITY caseIgnoreIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.14 NAME 'qmailAccountPurge'
DESC 'The earliest date when a mailMessageStore will be purged'
EQUALITY numericStringMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.36 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.15 NAME 'mailQuotaSize'
DESC 'The size of space the user can have until further messages get bounced.'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.16 NAME 'mailQuotaCount'
DESC 'The number of messages the user can have until further messages get bounced.'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.2.1.17 NAME 'mailSizeMax'
DESC 'The maximum size of a single messages the user accepts.'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
#
# qmailGroup attributes
#
attributetype ( 1.3.6.1.4.1.7914.1.3.1.1 NAME 'dnmember'
DESC 'Group member specified as distinguished name.'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.2 NAME 'rfc822member'
DESC 'Group member specified as normal rf822 email address.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.3 NAME 'filtermember'
DESC 'Group member specified as ldap search filter.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.4 NAME 'senderconfirm'
DESC 'Sender to Group has to answer confirmation email.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.5 NAME 'membersonly'
DESC 'Sender to Group must be group member itself.'
EQUALITY booleanMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.6 NAME 'confirmtext'
DESC 'Text that will be sent with sender confirmation email.'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.7 NAME 'dnmoderator'
DESC 'Group moderator specified as Distinguished name.'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.8 NAME 'rfc822moderator'
DESC 'Group moderator specified as normal rfc822 email address.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.9 NAME 'moderatortext'
DESC 'Text that will be sent with request for moderation email.'
EQUALITY caseIgnoreMatch
SUBSTR caseIgnoreSubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{4096} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.10 NAME 'dnsender'
DESC 'Allowed sender specified as distinguished name.'
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.11 NAME 'rfc822sender'
DESC 'Allowed sender specified as normal rf822 email address.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.3.1.12 NAME 'filtersender'
DESC 'Allowed sender specified as ldap search filter.'
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{512} )
#
# qldapAdmin Attributes
#
attributetype ( 1.3.6.1.4.1.7914.1.4.1.1 NAME 'qladnmanager'
DESC ''
EQUALITY distinguishedNameMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.2 NAME 'qlaDomainList'
DESC ''
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.3 NAME 'qlaUidPrefix'
DESC ''
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.4 NAME 'qlaQmailUid'
DESC ''
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.5 NAME 'qlaQmailGid'
DESC ''
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.6 NAME 'qlaMailMStorePrefix'
DESC ''
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.7 NAME 'qlaMailQuotaSize'
DESC ''
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.8 NAME 'qlaMailQuotaCount'
DESC ''
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.9 NAME 'qlaMailSizeMax'
DESC ''
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.7914.1.4.1.10 NAME 'qlaMailHostList'
DESC ''
EQUALITY caseIgnoreIA5Match
SUBSTR caseIgnoreIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} )
# Object Class Definitions
objectclass ( 1.3.6.1.4.1.7914.1.2.2.1 NAME 'qmailUser'
DESC 'QMail-LDAP User'
SUP top
AUXILIARY
MUST ( mail )
MAY ( uid $ mailMessageStore $ homeDirectory $ userPassword $
mailAlternateAddress $ qmailUID $ qmailGID $
mailHost $ mailForwardingAddress $ deliveryProgramPath $
qmailDotMode $ deliveryMode $ mailReplyText $
accountStatus $ qmailAccountPurge $
mailQuotaSize $ mailQuotaCount $ mailSizeMax ) )
objectclass ( 1.3.6.1.4.1.7914.1.3.2.1 NAME 'qmailGroup'
DESC 'QMail-LDAP Group'
SUP top
AUXILIARY
MUST ( mail $ mailAlternateAddress $ mailMessageStore )
MAY ( dnmember $ rfc822member $ filtermember $ senderconfirm $
membersonly $ confirmtext $ dnmoderator $ rfc822moderator $
moderatortext $ dnsender $ rfc822sender $ filtersender) )
objectclass ( 1.3.6.1.4.1.7914.1.4.2.1 NAME 'qldapAdmin'
DESC 'QMail-LDAP Subtree Admin'
SUP top
AUXILIARY
MUST ( qlaDnManager $ qlaDomainList $ qlaMailMStorePrefix $
qlaMailHostList )
MAY ( qlaUidPrefix $ qlaQmailUid $ qlaQmailGid $ qlaMailQuotaSize $
qlaMailQuotaCount $ qlaMailSizeMax ) )

View File

@ -0,0 +1,46 @@
<?php
/***************************************************************************\
* eGroupWare - EmailAdmin *
* http://www.linux-at-work.de *
* http://www.egroupware.org *
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License version 2 as published *
* by the Free Software Foundation. *
\***************************************************************************/
/* $Id$ */
class ajaxemailadmin
{
function ajaxemailadmin()
{
$this->bo = new emailadmin_bo();
}
function addACL($_accountName, $_aclData)
{
if(!empty($_accountName))
{
$acl = implode('',(array)$_aclData['acl']);
$data = $this->bofelamimail->addACL($this->sessionDataAjax['folderName'], $_accountName, $acl);
#$response = new xajaxResponse();
#$response->addScript("window.close();");
#$response->addAssign("accountName", "value", $this->sessionDataAjax['folderName'].'-'.$_accountName.'-'.$acl);
#return $response->getXML();
}
}
function updateACLView()
{
$folderACL = $this->bofelamimail->getIMAPACL($this->sessionDataAjax['folderName']);
$response = new xajaxResponse();
$response->addAssign("aclTable", "innerHTML", $this->createACLTable($folderACL));
return $response->getXML();
}
}
?>

View File

@ -0,0 +1,220 @@
<?php
/**
* EGroupware EMailAdmin: Support for Cyrus IMAP
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <rb@stylite.de>
* @author Klaus Leithoff <kl@stylite.de>
* @author Lars Kneschke
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultimap.inc.php");
/**
* Manages connection to Cyrus IMAP server
*/
class cyrusimap extends defaultimap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'Cyrus';
/**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail
*/
const CAPABILITIES = 'default|sieve|timedsieve|admin|logintypeemail';
/**
* prefix for groupnames, when using groups in ACL Management
*/
const ACL_GROUP_PREFIX = 'group:';
// mailbox delimiter
var $mailboxDelimiter = '.';
// mailbox prefix
var $mailboxPrefix = '';
var $enableCyrusAdmin = false;
var $cyrusAdminUsername;
var $cyrusAdminPassword;
/**
* Updates an account
*
* @param array $_hookValues only value for key 'account_lid' and 'new_passwd' is used
*/
function addAccount($_hookValues)
{
return $this->updateAccount($_hookValues);
}
/**
* Delete an account
*
* @param array $_hookValues only value for key 'account_lid' is used
*/
function deleteAccount($_hookValues)
{
// some precausion to really delete just _one_ account
if (strpos($_hookValues['account_lid'],'%') !== false ||
strpos($_hookValues['account_lid'],'*') !== false)
{
return false;
}
return !!$this->deleteUsers($_hookValues['account_lid']);
}
/**
* Delete multiple (user-)mailboxes via a wildcard, eg. '%' for whole domain
*
* Domain is the configured domain and it uses the Cyrus admin user
*
* @return string $username='%' username containing wildcards, default '%' for all users of a domain
* @return int|boolean number of deleted mailboxes on success or false on error
*/
function deleteUsers($username='%')
{
if(!$this->enableCyrusAdmin || empty($username)) {
return false;
}
// we need a admin connection
if($this->_connected === true && !$this->isAdminConnection) {
$this->disconnect();
if(!$this->openConnection(true)) {
return false;
}
}
$mailboxName = $this->getUserMailboxString($username);
list($reference,$restriction) = explode($username,$mailboxName,2);
$mboxes = $this->getMailboxes($reference,$username.$restriction);
//error_log(__METHOD__."('$username') getMailboxes('$reference','$username$restriction') = ".array2string($mboxes));
foreach($mboxes as $mbox) {
// give the admin account the rights to delete this mailbox
if(PEAR::isError($this->setACL($mbox, $this->adminUsername, 'lrswipcda'))) {
$this->disconnect();
return false;
}
if(PEAR::isError($this->deleteMailbox($mbox))) {
$this->disconnect();
return false;
}
}
$this->disconnect();
return count($mboxes);
}
/**
* returns information about a user
* currently only supported information is the current quota
*
* @param string $_username
* @return array userdata
*/
function getUserData($_username)
{
if($this->_connected === true) {
//error_log(__METHOD__."try to disconnect");
$this->disconnect();
}
$this->openConnection(true);
$userData = array();
if($quota = $this->getQuotaByUser($_username,'ALL')) {
$userData['quotaLimit'] = (int)($quota['QMAX'] / 1024);
$userData['quotaUsed'] = (int)($quota['USED'] / 1024);
}
$this->disconnect();
return $userData;
}
/**
* Set information about a user
* currently only supported information is the current quota
*
* @param string $_username
* @param int $_quota
*/
function setUserData($_username, $_quota)
{
if(!$this->enableCyrusAdmin) {
return false;
}
if($this->_connected === true) {
$this->disconnect();
}
// create a admin connection
if(!$this->openConnection(true)) {
return false;
}
$mailboxName = $this->getUserMailboxString($_username);
if((int)$_quota > 0) {
// enable quota
$quota_value = $this->setStorageQuota($mailboxName, (int)$_quota*1024);
} else {
// disable quota
$quota_value = $this->setStorageQuota($mailboxName, -1);
}
$this->disconnect();
return true;
}
/**
* Updates an account
*
* @param array $_hookValues only value for key 'account_lid' and 'new_passwd' is used
*/
function updateAccount($_hookValues)
{
if(!$this->enableCyrusAdmin) {
return false;
}
#_debug_array($_hookValues);
$username = $_hookValues['account_lid'];
if(isset($_hookValues['new_passwd'])) {
$userPassword = $_hookValues['new_passwd'];
}
if($this->_connected === true) {
$this->disconnect();
}
// we need a admin connection
if(!$this->openConnection(true)) {
return false;
}
// create the mailbox, with the account_lid, as it is passed from the hook values (gets transformed there if needed)
$mailboxName = $this->getUserMailboxString($username, $mailboxName);
// make sure we use the correct username here.
$username = $this->getMailBoxUserName($username);
$folderInfo = $this->getMailboxes('', $mailboxName, true);
if(empty($folderInfo)) {
if(!PEAR::isError($this->createMailbox($mailboxName))) {
if(PEAR::isError($this->setACL($mailboxName, $username, "lrswipcda"))) {
# log error message
}
}
}
$this->disconnect();
}
}

View File

@ -0,0 +1,187 @@
<?php
/**
* EGroupware EMailAdmin: Support for DBMail IMAP with dbmailUser LDAP schema
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <rb@stylite.de>
* @author Klaus Leithoff <kl@stylite.de>
* @author Lars Kneschke
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.dbmaildbmailuser.inc.php 42612 2013-05-30 16:46:13Z ralfbecker $
*/
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultimap.inc.php");
/**
* Support for DBMail IMAP with qmailUser LDAP schema
*
* @todo base this class on dbmailqmailuser or the other way around
*/
class dbmaildbmailuser extends defaultimap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'dbmail (dbmailUser Schema)';
/**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail
*/
const CAPABILITIES = 'default|sieve';
function addAccount($_hookValues) {
return $this->updateAccount($_hookValues);
}
#function deleteAccount($_hookValues) {
#}
function getUserData($_username) {
$userData = array();
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uid='. $_username .')(dbmailGID='. sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id'])) .'))';
$justthese = array('dn', 'objectclass', 'mailQuota');
if($sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese)) {
if($info = ldap_get_entries($ds, $sri)) {
if(isset($info[0]['mailquota'][0])) {
$userData['quotaLimit'] = $info[0]['mailquota'][0] / 1048576;
}
}
}
return $userData;
}
function updateAccount($_hookValues) {
if(!$uidnumber = (int)$_hookValues['account_id']) {
return false;
}
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uidnumber='. $uidnumber .'))';
$justthese = array('dn', 'objectclass', 'dbmailUID', 'dbmailGID', 'mail');
$sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese);
if($info = ldap_get_entries($ds, $sri)) {
if((!in_array('dbmailuser',$info[0]['objectclass']) && !in_array('dbmailUser',$info[0]['objectclass'])) && $info[0]['mail']) {
$newData['objectclass'] = $info[0]['objectclass'];
unset($newData['objectclass']['count']);
$newData['objectclass'][] = 'dbmailuser';
sort($newData['objectclass']);
$newData['dbmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
$newData['dbmailUID'] = (!empty($this->domainName)) ? $_hookValues['account_lid'] .'@'. $this->domainName : $_hookValues['account_lid'];
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
}
return true;
} else {
$newData = array();
$newData['dbmailUID'] = (!empty($this->domainName)) ? $_hookValues['account_lid'] .'@'. $this->domainName : $_hookValues['account_lid'];
$newData['dbmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
print ldap_error($ds);
_debug_array($newData);
exit;
#return false;
}
}
}
return false;
}
function setUserData($_username, $_quota) {
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uid='. $_username .'))';
$justthese = array('dn', 'objectclass', 'dbmailGID', 'dbmailUID', 'mail');
$sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese);
if($info = ldap_get_entries($ds, $sri)) {
$validLDAPConfig = false;
if(in_array('dbmailuser',$info[0]['objectclass']) || in_array('dbmailUser',$info[0]['objectclass'])) {
$validLDAPConfig = true;
}
if(!in_array('dbmailuser',$info[0]['objectclass']) && !in_array('dbmailUser',$info[0]['objectclass']) && $info[0]['mail']) {
$newData['objectclass'] = $info[0]['objectclass'];
unset($newData['objectclass']['count']);
$newData['objectclass'][] = 'dbmailUser';
sort($newData['objectclass']);
$newData['dbmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
$newData['dbmailUID'] = (!empty($this->domainName)) ? $_username .'@'. $this->domainName : $_username;
if(ldap_modify($ds, $info[0]['dn'], $newData)) {
$validLDAPConfig = true;
}
} else {
if ((in_array('dbmailuser',$info[0]['objectclass']) || in_array('dbmailUser',$info[0]['objectclass'])) && !$info[0]['dbmailuid']) {
$newData = array();
$newData['dbmailUID'] = (!empty($this->domainName)) ? $_username .'@'. $this->domainName : $_username;
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
#return false;
}
}
if ((in_array('dbmailuser',$info[0]['objectclass']) || in_array('dbmailUser',$info[0]['objectclass'])) && !$info[0]['dbmailgid']) {
$newData = array();
$newData['dbmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
#return false;
}
}
}
if($validLDAPConfig) {
$newData = array();
if((int)$_quota >= 0) {
$newData['mailQuota'] = (int)$_quota * 1048576;
} else {
$newData['mailQuota'] = array();
}
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
return false;
}
}
return true;
}
return false;
}
}

View File

@ -0,0 +1,166 @@
<?php
/**
* EGroupware EMailAdmin: Support for DBMail IMAP with qmailUser LDAP schema
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <rb@stylite.de>
* @author Klaus Leithoff <kl@stylite.de>
* @author Lars Kneschke
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.dbmailqmailuser.inc.php 42612 2013-05-30 16:46:13Z ralfbecker $
*/
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultimap.inc.php");
/**
* Support for DBMail IMAP with qmailUser LDAP schema
*
* @todo base this class on dbmaildbmailuser or the other way around
*/
class dbmailqmailuser extends defaultimap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'dbmail (qmailUser Schema)';
/**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail
*/
const CAPABILITIES = 'default|sieve';
function addAccount($_hookValues) {
return $this->updateAccount($_hookValues);
}
#function deleteAccount($_hookValues) {
#}
function getUserData($_username) {
$userData = array();
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uid='. $_username .')(qmailGID='. sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id'])) .'))';
$justthese = array('dn', 'objectclass', 'mailQuota');
if($sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese)) {
if($info = ldap_get_entries($ds, $sri)) {
if(isset($info[0]['mailquota'][0])) {
$userData['quotaLimit'] = $info[0]['mailquota'][0] / 1048576;
}
}
}
return $userData;
}
function updateAccount($_hookValues) {
if(!$uidnumber = (int)$_hookValues['account_id']) {
return false;
}
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uidnumber='. $uidnumber .'))';
$justthese = array('dn', 'objectclass', 'qmailUID', 'qmailGID', 'mail');
$sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese);
if($info = ldap_get_entries($ds, $sri)) {
if(!in_array('qmailuser',$info[0]['objectclass']) && $info[0]['email']) {
$newData['objectclass'] = $info[0]['objectclass'];
unset($newData['objectclass']['count']);
$newData['objectclass'][] = 'qmailuser';
sort($newData['objectclass']);
$newData['qmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
#$newData['qmailUID'] = (!empty($this->domainName)) ? $_username .'@'. $this->domainName : $_username;
ldap_modify($ds, $info[0]['dn'], $newData);
return true;
} else {
$newData = array();
$newData['qmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
#$newData['qmailUID'] = (!empty($this->domainName)) ? $_username .'@'. $this->domainName : $_username;
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
#return false;
}
}
}
return false;
}
function setUserData($_username, $_quota) {
$ds = $GLOBALS['egw']->ldap->ldapConnect(
$GLOBALS['egw_info']['server']['ldap_host'],
$GLOBALS['egw_info']['server']['ldap_root_dn'],
$GLOBALS['egw_info']['server']['ldap_root_pw']
);
if(!is_resource($ds)) {
return false;
}
$filter = '(&(objectclass=posixaccount)(uid='. $_username .'))';
$justthese = array('dn', 'objectclass', 'qmailGID', 'mail');
$sri = ldap_search($ds, $GLOBALS['egw_info']['server']['ldap_context'], $filter, $justthese);
if($info = ldap_get_entries($ds, $sri)) {
#_debug_array($info);
if(!in_array('qmailuser',$info[0]['objectclass']) && $info[0]['email']) {
$newData['objectclass'] = $info[0]['objectclass'];
unset($newData['objectclass']['count']);
$newData['objectclass'][] = 'qmailuser';
sort($newData['objectclass']);
$newData['qmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
ldap_modify($ds, $info[0]['dn'], $newData);
} else {
if (in_array('qmailuser',$info[0]['objectclass']) && !$info[0]['qmailgid']) {
$newData = array();
$newData['qmailGID'] = sprintf("%u", crc32($GLOBALS['egw_info']['server']['install_id']));
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
#return false;
}
}
}
$newData = array();
if((int)$_quota >= 0) {
$newData['mailQuota'] = (int)$_quota * 1048576;
} else {
$newData['mailQuota'] = array();
}
if(!ldap_modify($ds, $info[0]['dn'], $newData)) {
#print ldap_error($ds);
return false;
}
return true;
}
return false;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,20 @@
<?php
/**
* EGroupware EMailAdmin: generic base class for SMTP
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Lars Kneschke <lkneschke@linux-at-work.de>
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License Version 2+
* @version $Id$
*/
/**
* EMailAdmin generic base class for SMTP
*
* @deprecated use emailadmin_smtp
*/
class defaultsmtp extends emailadmin_smtp
{
}

View File

@ -14,139 +14,158 @@
{
// users identities
var $identities = array();
// users incoming server(imap/pop3)
// users incoming server(imap)
var $ic_server = array();
// users outgoing server(smtp)
var $og_server = array();
// users preferences
var $preferences = array();
// enable userdefined accounts
var $userDefinedAccounts = false;
// enable userdefined signatures
var $ea_user_defined_signatures = false;
function getIdentity($_id = -1)
function getIdentity($_id = false, $_byProfileID=false)
{
if($_id != -1)
if($_id !== false)
{
if ($_byProfileID===true)
{
foreach ((array)$this->identities as $id => $ident) if ($ident->id==$_id) return $ident;
}
return $this->identities[$_id];
}
else
{
//error_log(__METHOD__.__LINE__.' called with $_id=-1 ->'.function_backtrace());
return $this->identities;
}
}
function getIncomingServer($_id = -1)
function getIncomingServer($_id = false)
{
if($_id != -1)
if($_id !== false)
{
//error_log(__METHOD__.__LINE__.' called with $_id='.$_id.' ->'.function_backtrace());
return $this->ic_server[$_id];
}
else
{
//error_log(__METHOD__.__LINE__.' called with $_id=false ->'.function_backtrace());
return $this->ic_server;
}
}
function getOutgoingServer($_id = -1)
function getOutgoingServer($_id = false)
{
if($_id != -1)
if($_id !== false )
{
return $this->og_server[$_id];
}
else
{
//error_log(__METHOD__.__LINE__.' called with $_id=false ->'.function_backtrace());
return $this->og_server;
}
}
function getPreferences() {
return $this->preferences;
}
function getUserEMailAddresses() {
$identities = $this->getIdentity();
if(count($identities) == 0) {
return false;
}
$userEMailAdresses = array();
foreach($identities as $identity) {
$userEMailAdresses[$identity->emailAddress] = $identity->realName;
}
return $userEMailAdresses;
}
function setIdentity($_identityObject, $_id = -1)
function setIdentity($_identityObject, $_id = false)
{
//error_log(__METHOD__.__LINE__.' called with ID '.$_id.' ->'.array2string($_identityObject).function_backtrace());
if(($_identityObject instanceof ea_identity))
{
if($_id != -1)
if($_id !== false)
{
$this->identities[$_id] = $_identityObject;
}
else
{
$this->identities[] = $_identityObject;
//error_log(__METHOD__.__LINE__.' called with $_id=false ->'.function_backtrace());
if ($_identityObject->id)
{
$this->identities[$_identityObject->id] = $_identityObject;
}
else
{
$this->identities[] = $_identityObject;
}
}
return true;
}
return false;
}
function setIncomingServer($_serverObject, $_id = -1)
function setIncomingServer($_serverObject, $_id = false)
{
if(($_serverObject instanceof defaultimap))
{
if($_id != -1)
if($_id !== false)
{
$this->ic_server[$_id] = $_serverObject;
}
else
{
//error_log(__METHOD__.__LINE__.' called with $_id=false ->'.function_backtrace());
$this->ic_server[] = $_serverObject;
}
return true;
}
return false;
}
function setOutgoingServer($_serverObject, $_id = -1)
function setOutgoingServer($_serverObject, $_id = false)
{
if(($_serverObject instanceof defaultsmtp))
if(($_serverObject instanceof emailadmin_smtp))
{
if($_id != -1)
if($_id !== false)
{
$this->og_server[$_id] = $_serverObject;
}
else
{
//error_log(__METHOD__.__LINE__.' called with $_id=false ->'.function_backtrace());
$this->og_server[] = $_serverObject;
}
return true;
}
return false;
}
function setPreferences($_preferences)
{
$this->preferences = $_preferences;
return true;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,258 @@
<?php
/**
* EGroupware EMailAdmin: Support for Dovecot IMAP
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <rb@stylite.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultimap.inc.php");
/**
* Manages connection to Dovecot IMAP server
*
* Basic differences to cyrusimap:
* - no real admin user, but master user, whos password can be used to connect instead of real user
* - mailboxes have to be deleted in filesystem (no IMAP command for that)
* --> require by webserver writable user_home to be configured, otherwise deleting get ignored like with defaultimap
* - quota can be read, but not set
*/
class emailadmin_dovecot extends defaultimap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'Dovecot';
/**
* Capabilities of this class (pipe-separated): default, sieve, admin, logintypeemail
*/
const CAPABILITIES = 'default|sieve|timedsieve|admin|logintypeemail';
/**
* prefix for groupnames, when using groups in ACL Management
*/
const ACL_GROUP_PREFIX = '$';
// mailbox delimiter
var $mailboxDelimiter = '.';
// mailbox prefix
var $mailboxPrefix = '';
var $enableCyrusAdmin = false;
var $cyrusAdminUsername;
var $cyrusAdminPassword;
/**
* To enable deleting of a mailbox user_home has to be set and be writable by webserver
*
* Supported placeholders are:
* - %d domain
* - %u username part of email
* - %s email address
*
* @var string
*/
var $user_home; // = '/var/dovecot/imap/%d/%u';
/**
* Opens a connection to a imap server
*
* Reimplemented to prefix adminUsername with real username (separated by an asterisk)
*
* @param bool $_adminConnection create admin connection if true
* @return resource the imap connection
*/
function openConnection($_adminConnection=false, $_timeout=20)
{
if ($_adminConnection)
{
if (($pos = strpos($this->adminUsername, '*')) !== false) // remove evtl. set username
{
$this->adminUsername = substr($this->adminUsername, $pos+1);
}
$this->adminUsername = $this->loginName.'*'.$this->adminUsername;
}
return parent::openConnection($_adminConnection, $_timeout);
}
/**
* Updates an account
*
* @param array $_hookValues only value for key 'account_lid' and 'new_passwd' is used
*/
function addAccount($_hookValues)
{
return $this->updateAccount($_hookValues);
}
/**
* Delete an account
*
* @param array $_hookValues only value for key 'account_lid' is used
*/
function deleteAccount($_hookValues)
{
// some precausion to really delete just _one_ account
if (strpos($_hookValues['account_lid'],'%') !== false ||
strpos($_hookValues['account_lid'],'*') !== false)
{
return false;
}
return !!$this->deleteUsers($_hookValues['account_lid']);
}
/**
* Delete multiple (user-)mailboxes via a wildcard, eg. '%' for whole domain
*
* Domain is the configured domain and it uses the Cyrus admin user
*
* @return string $username='%' username containing wildcards, default '%' for all users of a domain
* @return int|boolean number of deleted mailboxes on success or false on error
*/
function deleteUsers($username='%')
{
if(!$this->enableCyrusAdmin || empty($username))
{
return false;
}
// dovecot can not delete mailbox, they need to be physically deleted in filesystem (webserver needs write-rights to do so!)
if (empty($this->user_home))
{
return false;
}
$replace = array('%d' => $this->domainName, '%u' => $username, '%s' => $username.'@'.$this->domainName);
if ($username == '%')
{
if (($pos = strpos($this->user_home, '%d')) === false)
{
throw new egw_exception_assertion_failed("user_home='$this->user_home' contains no domain-part '%d'!");
}
$home = strtr(substr($this->user_home, 0, $pos+2), $replace);
$ret = count(scandir($home))-2;
}
else
{
$home = strtr($this->user_home, $replace);
$ret = 1;
}
if (!is_writable(dirname($home)) || !self::_rm_recursive($home))
{
error_log(__METHOD__."('$username') Failed to delete $home!");
return false;
}
return $ret;
}
/**
* Recursively delete a directory (or file)
*
* @param string $path
* @return boolean true on success, false on failure
*/
private function _rm_recursive($path)
{
if (is_dir($path))
{
foreach(scandir($path) as $file)
{
if ($file == '.' || $file == '..') continue;
if (is_dir($path))
{
self::_rm_recursive($path.'/'.$file);
}
elseif (!unlink($path.'/'.$file))
{
return false;
}
}
if (!rmdir($path))
{
return false;
}
}
elseif(!unlink($path))
{
return false;
}
return true;
}
/**
* returns information about a user
* currently only supported information is the current quota
*
* @param string $_username
* @return array userdata
*/
function getUserData($_username)
{
// we need a connection to fetch the namespace to get the users mailbox string
if($this->_connected === false) $this->openConnection();
$bufferUsername = $this->username;
$bufferLoginName = $this->loginName;
$this->username = $_username;
$nameSpaces = $this->getNameSpaces();
$mailBoxName = $this->getUserMailboxString($this->username);
$this->loginName = str_replace((is_array($nameSpaces)?$nameSpaces['others'][0]['name']:'user/'),'',$mailBoxName); // we need to strip the namespacepart
// now disconnect to be able to reestablish the connection with the targetUser while we go on
if($this->_connected === true)
{
//error_log(__METHOD__."try to disconnect");
$this->disconnect();
}
$userData = array();
// we are authenticated with master but for current user
if($this->openConnection(true) === true && ($quota = $this->getStorageQuotaRoot('INBOX')) && !PEAR::isError($quota))
{
$userData['quotaLimit'] = (int) ($quota['QMAX'] / 1024);
$userData['quotaUsed'] = (int) ($quota['USED'] / 1024);
}
$this->username = $bufferUsername;
$this->loginName = $bufferLoginName;
$this->disconnect();
return $userData;
}
/**
* Set information about a user
* currently only supported information is the current quota
*
* Dovecot get's quota from it's user-db, but cant set it --> ignored
*
* @param string $_username
* @param int $_quota
* @return boolean
*/
function setUserData($_username, $_quota)
{
return true;
}
/**
* Updates an account
*
* @param array $_hookValues only value for key 'account_lid' and 'new_passwd' is used
*/
function updateAccount($_hookValues)
{
if(!$this->enableCyrusAdmin)
{
return false;
}
// mailbox get's automatic created with full rights for user
return true;
}
}

View File

@ -0,0 +1,165 @@
<?php
/**
* eGroupWare - eMailAdmin hooks
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Klaus Leithoff <leithoff-AT-stylite.de>
* @copyright (c) 2008-8 by leithoff-At-stylite.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* diverse static emailadmin hooks
*/
class emailadmin_hooks
{
// hook to plug in into admin (managable) applications list
static function admin()
{
// Only Modify the $file and $title variables.....
$title = $appname = 'emailadmin';
$file = Array(
'Site Configuration' => $GLOBALS['egw']->link('/index.php','menuaction=emailadmin.emailadmin_ui.index')
);
//Do not modify below this line
display_section($appname,$title,$file);
}
/**
* Hook called if account emailadim settings has to be modified
*
* @param array $data
* @param int $data['account_id'] numerical id
*/
static function edit_user($data)
{
//echo "called hook and function<br>".function_backtrace()."<br>";
//_debug_array($data);
if ($data['account_id'] && // can't set it on add
$GLOBALS['egw_info']['user']['apps']['emailadmin'])
{
$GLOBALS['menuData'][] = array(
'description' => 'eMailAdmin: User assigned Profile',
'url' => '/index.php',
'extradata' => 'menuaction=emailadmin.emailadmin_ui.index'
);
}
}
/**
* Hook called after group emailadim settings has to be modified
*
* @param array $data
* @param int $data['account_id'] numerical id
*/
static function edit_group($data)
{
#echo "called hook and function<br>";
#_debug_array($data);
# somehow the $data var seems to be quite sparsely populated, so we dont check any further
if (#!empty($data['account_id']) && $data['account_id'] < 0 && // can't set it on add
$GLOBALS['egw_info']['user']['apps']['emailadmin'])
{
$GLOBALS['menuData'][] = array(
'description' => 'eMailAdmin: Group assigned Profile',
'url' => '/index.php',
'extradata' => 'menuaction=emailadmin.emailadmin_ui.index'
);
}
}
/**
* Hook called before an account get deleted
*
* @param array $data
* @param int $data['account_id'] numerical id
* @param string $data['account_lid'] account-name
* @param int $data['new_owner'] account-id of new owner, or false if data should get deleted
*/
static function deleteaccount(array $data)
{
if((int)$data['account_id'] > 0 &&
$GLOBALS['egw_info']['user']['apps']['emailadmin'])
{
$boemailadmin = new emailadmin_bo();
$profileList = $boemailadmin->getProfileList($profileID,$appName,$groupID,(int) $data['account_id']);
if (is_array($profileList)) {
foreach ($profileList as $key => $value) {
$boemailadmin->delete($value['profileID']);
}
}
}
}
/**
* Hook called before a group get deleted
*
* @param array $data
* @param int $data['account_id'] numerical id
* @param string $data['account_name'] account-name
*/
static function deletegroup(array $data)
{
if ((int)$data['account_id'] < 0 &&
$GLOBALS['egw_info']['user']['apps']['emailadmin'])
{
$boemailadmin = new emailadmin_bo();
$profileList = $boemailadmin->getProfileList($profileID,$appName,(int) $data['account_id'],$accountID);
if (is_array($profileList)) {
foreach ($profileList as $key => $value) {
$boemailadmin->soemailadmin->deleteProfile($value['profileID']);
}
}
}
}
/**
* Detect imap and smtp server plugins from EMailAdmin's inc directory
*
* @param string|array $data location string or array with key 'location' and other params
* @return array
*/
public static function server_types($data)
{
$location = is_array($data) ? $data['location'] : $data;
$extended = is_array($data) ? $data['extended'] : false;
$types = array();
foreach(scandir($dir=EGW_INCLUDE_ROOT.'/emailadmin/inc') as $file)
{
if (!preg_match('/^class\.([^.]*(smtp|imap|postfix|dovecot|dbmail)[^.*]*)\.inc\.php$/', $file, $matches)) continue;
$class_name = $matches[1];
include_once($dir.'/'.$file);
if (!class_exists($class_name)) continue;
$is_imap = $class_name == 'defaultimap' || is_subclass_of($class_name, 'defaultimap');
$is_smtp = $class_name == 'emailadmin_smtp' || is_subclass_of($class_name, 'emailadmin_smtp') && $class_name != 'defaultsmtp';
if ($is_smtp && $location == 'smtp_server_types' || $is_imap && $location == 'imap_server_types')
{
$type = array(
'classname' => $class_name,
'description' => is_callable($function=$class_name.'::description') ? call_user_func($function) : $class_name,
);
if ($is_imap) $type['protocol'] = 'imap';
$types[$class_name] = $type;
}
}
if (!$extended)
{
foreach($types as $class_name => &$type)
{
$type = $type['description'];
}
}
//error_log(__METHOD__."(".array2string($data).") returning ".array2string($types));
return $types;
}
}

View File

@ -0,0 +1,551 @@
<?php
/**
* EGroupware EMailAdmin: Support for Sieve scripts
*
* See the inclosed smartsieve-NOTICE file for conditions of use and distribution.
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Stephen Grier <stephengrier@users.sourceforge.net>
* @copyright 2002 by Stephen Grier <stephengrier@users.sourceforge.net>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Support for Sieve scripts
*/
class emailadmin_script {
var $name; /* filename of script. */
var $script; /* full ascii text of script from server. */
var $size; /* size of script in bytes. */
var $so; /* boolean: is it safe to overwrite script?
* only safe if we recognise encoding. */
var $mode; /* basic or advanced. Smartsieve can only read/write basic. */
var $rules; /* array of sieve rules. */
var $vacation; /* vacation settings. */
var $emailNotification; /* email notification settings. */
var $pcount; /* highest priority value in ruleset. */
var $errstr; /* error text. */
/**
* Switch on some error_log debug messages
*
* @var boolean
*/
var $debug=false;
// class constructor
function __construct ($scriptname) {
$this->name = $scriptname;
$this->script = '';
$this->size = 0;
$this->so = true;
$this->mode = '';
$this->rules = array();
$this->vacation = array();
$this->emailNotification = array(); // Added email notifications
$this->pcount = 0;
$this->errstr = '';
}
// get sieve script rules for this user
/**
* Retrieve the rules
*
* @param bosieve $connection
* @return boolean true, if script written successfull
*/
function retrieveRules ($connection) {
#global $_SESSION;
$continuebit = 1;
$sizebit = 2;
$anyofbit = 4;
$keepbit = 8;
$regexbit = 128;
if (!isset($this->name)){
$this->errstr = 'retrieveRules: no script name specified';
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": no script name specified");
return false;
}
if (!is_object($connection)) {
$this->errstr = "retrieveRules: no sieve session open";
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": no sieve session open");
return false;
}
// if script doesn't yet exist, nothing to retrieve.
// safe to write to this script file.
#LK if (!AppSession::scriptExists($this->name)) {
#LK $this->so = true;
#LK return true;
#LK }
#print "<br><br><br><br>get Script ". $this->name ."<bR>";
if(PEAR::isError($script = $connection->getScript($this->name))) {
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": error retrieving script: ".$script->getMessage());
return $script;
}
#print "<br>AAA: Script is ". htmlentities($script) ."<br>";
$lines = array();
$lines = preg_split("/\n/",$script); //,PREG_SPLIT_NO_EMPTY);
$rules = array();
$vacation = array();
$emailNotification = array(); // Added email notifications
$regexps = array('^ *##PSEUDO','^ *#rule','^ *#vacation','^ *#mode');
$regexps[] = '^ *#notify'; // Added email notifications
/* first line should be the script size. eg: {123}. */
#$line = array_shift($lines);
#if (!preg_match("/^\{(\d+)\}$/", $line, $bits)){
# print 'retrieveRules: unexpected value: ' . $line .'<br>';
# $this->errstr = 'retrieveRules: unexpected value: ' . $line;
# return false;
#}
#LK $this->size = $bits[1];
/* next line should be the recognised encoded head. if not, the script
* is of an unrecognised format, and we should not overwrite it. */
$line = array_shift($lines);
if (!preg_match("/^# ?Mail(.*)rules for/", $line)){
$this->errstr = 'retrieveRules: encoding not recognised';
$this->so = false;
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": encoding not recognised");
return false;
}
$this->so = true;
$line = array_shift($lines);
while (isset($line)){
foreach ($regexps as $regexp){
if (preg_match("/$regexp/i",$line)){
$line = rtrim($line);
if (preg_match("/^ *#rule&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)$/i",$line,$bits)){
$rule = array();
$rule['priority'] = $bits[1];
$rule['status'] = $bits[2];
$rule['from'] = stripslashes($bits[3]);
$rule['to'] = stripslashes($bits[4]);
$rule['subject'] = stripslashes($bits[5]);
$rule['action'] = $bits[6];
$rule['action_arg'] = $bits[7];
// <crnl>s will be encoded as \\n. undo this.
$rule['action_arg'] = preg_replace("/\\\\n/","\r\n",$rule['action_arg']);
$rule['action_arg'] = stripslashes($rule['action_arg']);
$rule['flg'] = $bits[8]; // bitwise flag
$rule['field'] = stripslashes($bits[9]);
$rule['field_val'] = stripslashes($bits[10]);
$rule['size'] = $bits[11];
$rule['continue'] = ($bits[8] & $continuebit);
$rule['gthan'] = ($bits[8] & $sizebit); // use 'greater than'
$rule['anyof'] = ($bits[8] & $anyofbit);
$rule['keep'] = ($bits[8] & $keepbit);
$rule['regexp'] = ($bits[8] & $regexbit);
$rule['unconditional'] = 0;
if (!$rule['from'] && !$rule['to'] && !$rule['subject'] &&
!$rule['field'] && !$rule['size'] && $rule['action']) {
$rule['unconditional'] = 1;
}
array_push($rules,$rule);
if ($rule['priority'] > $this->pcount) {
$this->pcount = $rule['priority'];
}
}
if (preg_match("/^ *#vacation&&(.*)&&(.*)&&(.*)&&(.*)&&(.*)/i",$line,$bits) ||
preg_match("/^ *#vacation&&(.*)&&(.*)&&(.*)&&(.*)/i",$line,$bits)) {
$vacation['days'] = $bits[1];
$vaddresslist = $bits[2];
$vaddresslist = preg_replace("/\"|\s/","",$vaddresslist);
$vaddresses = array();
$vaddresses = preg_split("/,/",$vaddresslist);
$vacation['text'] = $bits[3];
// <crnl>s will be encoded as \\n. undo this.
$vacation['text'] = preg_replace("/\\\\n/","\r\n",$vacation['text']);
if (strpos($bits[4],'-')!== false)
{
$vacation['status'] = 'by_date';
list($vacation['start_date'],$vacation['end_date']) = explode('-',$bits[4]);
}
else
{
$vacation['status'] = $bits[4];
}
$vacation['addresses'] = &$vaddresses;
$vacation['forwards'] = $bits[5];
}
if (preg_match("/^ *#notify&&(.*)&&(.*)&&(.*)/i",$line,$bits)) {
$emailNotification['status'] = $bits[1];
$emailNotification['externalEmail'] = $bits[2];
$emailNotification['displaySubject'] = $bits[3];
}
if (preg_match("/^ *#mode&&(.*)/i",$line,$bits)){
if ($bits[1] == 'basic')
$this->mode = 'basic';
elseif ($bits[1] == 'advanced')
$this->mode = 'advanced';
else
$this->mode = 'unknown';
}
}
}
$line = array_shift($lines);
}
$this->script = $script;
$this->rules = $rules;
$this->vacation = $vacation;
$this->emailNotification = $emailNotification; // Added email notifications
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": Script succesful retrieved: ".print_r($vacation,true));
return true;
}
// update and save sieve script
function updateScript ($connection)
{
#global $_SESSION,$default,$sieve;
global $default,$sieve;
$activerules = 0;
$regexused = 0;
$rejectused = 0;
$vacation_active = false;
$username = $GLOBALS['egw_info']['user']['account_lid'];
$version = $GLOBALS['egw_info']['apps']['felamimail']['version'];
//include "$default->lib_dir/version.php";
if (!is_object($connection))
{
$this->errstr = "updateScript: no sieve session open";
return false;
}
// don't overwrite a file if not created by SmartSieve,
// unless configured to do so.
#LK if (!$this->so && !$default->allow_write_unrecognised_scripts) {
#LK $this->errstr = 'updateScript: encoding not recognised: not safe to overwrite ' . $this->name;
#LK return false;
#LK }
// lets generate the main body of the script from our rules
$newscriptbody = "";
$continue = 1;
foreach ($this->rules as $rule) {
$newruletext = "";
// don't print this rule if disabled.
if ($rule['status'] != 'ENABLED') {
} else {
$activerules = 1;
// conditions
$anyall = "allof";
if ($rule['anyof']) $anyall = "anyof";
if ($rule['regexp']) {
$regexused = 1;
}
$started = 0;
if (!$rule['unconditional']) {
if (!$continue) $newruletext .= "els";
$newruletext .= "if " . $anyall . " (";
if ($rule['from']) {
if (preg_match("/^\s*!/", $rule['from'])){
$newruletext .= 'not ';
$rule['from'] = preg_replace("/^\s*!/","",$rule['from']);
}
$match = ':contains';
if (preg_match("/\*|\?/", $rule['from'])) $match = ':matches';
if ($rule['regexp']) $match = ':regex';
$newruletext .= "address " . $match . " [\"From\"]";
$newruletext .= " \"" . addslashes($rule['from']) . "\"";
$started = 1;
}
if ($rule['to']) {
if ($started) $newruletext .= ", ";
if (preg_match("/^\s*!/", $rule['to'])){
$newruletext .= 'not ';
$rule['to'] = preg_replace("/^\s*!/","",$rule['to']);
}
$match = ':contains';
if (preg_match("/\*|\?/", $rule['to'])) $match = ':matches';
if ($rule['regexp']) $match = ':regex';
$newruletext .= "address " . $match . " [\"To\",\"TO\",\"Cc\",\"CC\"]";
$newruletext .= " \"" . addslashes($rule['to']) . "\"";
$started = 1;
}
if ($rule['subject']) {
if ($started) $newruletext .= ", ";
if (preg_match("/^\s*!/", $rule['subject'])){
$newruletext .= 'not ';
$rule['subject'] = preg_replace("/^\s*!/","",$rule['subject']);
}
$match = ':contains';
if (preg_match("/\*|\?/", $rule['subject'])) $match = ':matches';
if ($rule['regexp']) $match = ':regex';
$newruletext .= "header " . $match . " \"subject\"";
$newruletext .= " \"" . addslashes($rule['subject']) . "\"";
$started = 1;
}
if ($rule['field'] && $rule['field_val']) {
if ($started) $newruletext .= ", ";
if (preg_match("/^\s*!/", $rule['field_val'])){
$newruletext .= 'not ';
$rule['field_val'] = preg_replace("/^\s*!/","",$rule['field_val']);
}
$match = ':contains';
if (preg_match("/\*|\?/", $rule['field_val'])) $match = ':matches';
if ($rule['regexp']) $match = ':regex';
$newruletext .= "header " . $match . " \"" . addslashes($rule['field']) . "\"";
$newruletext .= " \"" . addslashes($rule['field_val']) . "\"";
$started = 1;
}
if ($rule['size']) {
$xthan = " :under ";
if ($rule['gthan']) $xthan = " :over ";
if ($started) $newruletext .= ", ";
$newruletext .= "size " . $xthan . $rule['size'] . "K";
$started = 1;
}
}
// actions
if (!$rule['unconditional']) $newruletext .= ") {\n\t";
if (preg_match("/folder/i",$rule['action'])) {
$newruletext .= "fileinto \"" . $rule['action_arg'] . "\";";
}
if (preg_match("/reject/i",$rule['action'])) {
$newruletext .= "reject text: \n" . $rule['action_arg'] . "\n.\n;";
$rejectused = 1;
}
if (preg_match("/address/i",$rule['action'])) {
$newruletext .= "redirect \"" . $rule['action_arg'] . "\";";
}
if (preg_match("/discard/i",$rule['action'])) {
$newruletext .= "discard;";
}
if ($rule['keep']) $newruletext .= "\n\tkeep;";
if (!$rule['unconditional']) $newruletext .= "\n}";
$continue = 0;
if ($rule['continue']) $continue = 1;
if ($rule['unconditional']) $continue = 1;
$newscriptbody .= $newruletext . "\n\n";
} // end 'if ! ENABLED'
}
// vacation rule
if ($this->vacation) {
$vacation = $this->vacation;
if (!$vacation['days']) $vacation['days'] = ($default->vacation_days ? $default->vacation_days:'');
if (!$vacation['text']) $vacation['text'] = ($default->vacation_text ? $default->vacation_text:'');
if (!$vacation['status']) $vacation['status'] = 'on';
// filter out invalid addresses.
$ok_vaddrs = array();
foreach($vacation['addresses'] as $addr){
if ($addr != '' && preg_match("/\@/",$addr))
array_push($ok_vaddrs,$addr);
}
$vacation['addresses'] = $ok_vaddrs;
if (!$vacation['addresses'][0]){
$defaultaddr = $sieve->user . '@' . $sieve->maildomain;
array_push($vacation['addresses'],$defaultaddr);
}
if ($vacation['status'] == 'on' || $vacation['status'] == 'by_date' &&
$vacation['start_date'] <= time() && time() < $vacation['end_date']+24*3600) // +24*3600 to include the end_date day
{
if (trim($vacation['forwards'])) {
$if = array();
foreach($vacation['addresses'] as $addr) {
$if[] = 'address :contains ["To","TO","Cc","CC"] "'.trim($addr).'"';
}
$newscriptbody .= 'if anyof ('.implode(', ',$if).") {\n";
foreach(preg_split('/, ?/',$vacation['forwards']) as $addr) {
$newscriptbody .= "\tredirect \"".trim($addr)."\";\n";
}
$newscriptbody .= "\tkeep;\n}\n";
}
$vacation_active = true;
$newscriptbody .= "vacation :days " . $vacation['days'] . " :addresses [";
$first = 1;
foreach ($vacation['addresses'] as $vaddress) {
if (!$first) $newscriptbody .= ", ";
$newscriptbody .= "\"" . trim($vaddress) . "\"";
$first = 0;
}
$message = $vacation['text'];
if ($vacation['start_date'] || $vacation['end_date'])
{
$format_date = 'd M Y'; // see to it, that there is always a format, because if it is missing - no date will be output
if (!empty($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'])) $format_date = $GLOBALS['egw_info']['user']['preferences']['common']['dateformat'];
$message = str_replace(array('$$start$$','$$end$$'),array(
date($format_date,$vacation['start_date']),
date($format_date,$vacation['end_date']),
),$message);
}
$newscriptbody .= "] text:\n" . $message . "\n.\n;\n\n";
}
// update with any changes.
$this->vacation = $vacation;
}
$enotify = $variables = false;
if (in_array('enotify',$connection->_capability['extensions'])) $enotify = true;
if (in_array('variables',$connection->_capability['extensions'])) $variables = true;
if ($this->emailNotification && $this->emailNotification['status'] == 'on') {
// format notification email header components
$notification_email = $this->emailNotification['externalEmail'];
// format notification body
$egw_site_title = $GLOBALS['egw_info']['server']['site_title'];
if ($enotify==true)
{
$notification_body = lang("You have received a new message on the")." {$egw_site_title}";
if ($variables)
{
$notification_body .= ", ";
$notification_body .= 'From: ${from}';
if ($this->emailNotification['displaySubject']) {
$notification_body .= ', Subject: ${subject}';
}
//$notification_body .= 'Size: $size$'."\n";
$newscriptbody .= 'if header :matches "subject" "*" {'."\n\t".'set "subject" "${1}";'."\n".'}'."\n\n";
$newscriptbody .= 'if header :matches "from" "*" {'."\n\t".'set "from" "${1}";'."\n".'}'."\n\n";
}
else
{
$notification_body ="[SIEVE] ".$notification_body;
}
$newscriptbody .= 'notify :message "'.$notification_body.'"'."\n\t".'"mailto:'.$notification_email.'";'."\n";
//$newscriptbody .= 'notify :message "'.$notification_body.'" :method "mailto" :options "'.$notification_email.'?subject='.$notification_subject.'";'."\n";
}
else
{
$notification_body = lang("You have received a new message on the")." {$egw_site_title}"."\n";
$notification_body .= "\n";
$notification_body .= 'From: $from$'."\n";
if ($this->emailNotification['displaySubject']) {
$notification_body .= 'Subject: $subject$'."\n";
}
//$notification_body .= 'Size: $size$'."\n";
$newscriptbody .= 'notify :message "'.$notification_body.'" :method "mailto" :options "'.$notification_email.'";'."\n";
//$newscriptbody .= 'notify :message "'.$notification_body.'" :method "mailto" :options "'.$notification_email.'?subject='.$notification_subject.'";'."\n";
}
$newscriptbody .= 'keep;'."\n\n";
}
// generate the script head
$newscripthead = "";
$newscripthead .= "#Mail filter rules for " . $username . "\n";
$newscripthead .= '#Generated by ' . $username . ' using FeLaMiMail ' . $version . ' ' . date($default->script_date_format);
$newscripthead .= "\n";
if ($activerules) {
$newscripthead .= "require [\"fileinto\"";
if ($regexused) $newscripthead .= ",\"regex\"";
if ($rejectused) $newscripthead .= ",\"reject\"";
if ($this->vacation && $vacation_active) {
$newscripthead .= ",\"vacation\"";
}
if ($this->emailNotification && $this->emailNotification['status'] == 'on') $newscripthead .= ',"'.($enotify?'e':'').'notify"'.($variables?',"variables"':''); // Added email notifications
$newscripthead .= "];\n\n";
} else {
// no active rules, but might still have an active vacation rule
if ($this->vacation && $vacation_active)
$newscripthead .= "require [\"vacation\"];\n\n";
if ($this->emailNotification && $this->emailNotification['status'] == 'on') $newscripthead .= "require [\"".($enotify?'e':'')."notify\"".($variables?',"variables"':'')."];\n\n"; // Added email notifications
}
// generate the encoded script foot
$newscriptfoot = "";
$pcount = 1;
$newscriptfoot .= "##PSEUDO script start\n";
foreach ($this->rules as $rule) {
// only add rule to foot if status != deleted. this is how we delete a rule.
if ($rule['status'] != 'DELETED') {
$rule['action_arg'] = addslashes($rule['action_arg']);
// we need to handle \r\n here.
$rule['action_arg'] = preg_replace("/\r?\n/","\\n",$rule['action_arg']);
/* reset priority value. note: we only do this
* for compatibility with Websieve. */
$rule['priority'] = $pcount;
$newscriptfoot .= "#rule&&" . $rule['priority'] . "&&" . $rule['status'] . "&&" .
addslashes($rule['from']) . "&&" . addslashes($rule['to']) . "&&" . addslashes($rule['subject']) . "&&" . $rule['action'] . "&&" .
addslashes($rule['action_arg']) . "&&" . $rule['flg'] . "&&" . addslashes($rule['field']) . "&&" . addslashes($rule['field_val']) . "&&" . $rule['size'] . "\n";
$pcount = $pcount+2;
}
}
if ($this->vacation)
{
$vacation = $this->vacation;
$newscriptfoot .= "#vacation&&" . $vacation['days'] . "&&";
$first = 1;
foreach ($vacation['addresses'] as $address) {
if (!$first) $newscriptfoot .= ", ";
$newscriptfoot .= "\"" . trim($address) . "\"";
$first = 0;
}
$vacation['text'] = preg_replace("/\r?\n/","\\n",$vacation['text']);
$newscriptfoot .= "&&" . $vacation['text'] . "&&" .
($vacation['status']=='by_date' ? $vacation['start_date'].'-'.$vacation['end_date'] : $vacation['status']);
if ($vacation['forwards']) $newscriptfoot .= '&&' . $vacation['forwards'];
$newscriptfoot .= "\n";
}
if ($this->emailNotification) {
$emailNotification = $this->emailNotification;
$newscriptfoot .= "#notify&&" . $emailNotification['status'] . "&&" . $emailNotification['externalEmail'] . "&&" . $emailNotification['displaySubject'] . "\n";
}
$newscriptfoot .= "#mode&&basic\n";
$newscript = $newscripthead . $newscriptbody . $newscriptfoot;
$this->script = $newscript;
//error_log(__METHOD__.__LINE__.array2string($newscript));
//print "<pre>$newscript</pre>"; exit;
$scriptfile = $this->name;
//print "<hr><pre>".htmlentities($newscript)."</pre><hr>";
$ret = $connection->installScript($this->name, $newscript, true);
if (!$ret || PEAR::isError($ret)) {
$this->errstr = 'updateScript: putscript failed: ' . (PEAR::isError($ret)?$ret->message:$connection->errstr);
error_log(__METHOD__.__LINE__.' # Error: ->'.$this->errstr);
error_log(__METHOD__.__LINE__.' # ScriptName:'.$this->name.' Script:'.$newscript);
error_log(__METHOD__.__LINE__.' # Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid']);
return false;
}
return true;
}
}

View File

@ -0,0 +1,229 @@
<?php
/**
* EGroupware EMailAdmin: Support for Sieve scripts
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Ralf Becker <rb@stylite.de>
* @author Klaus Leithoff <kl@stylite.de>
* @author Lars Kneschke
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
include_once('Net/Sieve.php');
/**
* Support for Sieve scripts
*/
class emailadmin_sieve extends Net_Sieve
{
/**
* @var object $icServer object containing the information about the imapserver
*/
var $icServer;
/**
* @var object $icServer object containing the information about the imapserver
*/
var $scriptName;
/**
* @var object $error the last PEAR error object
*/
var $error;
/**
* Switch on some error_log debug messages
*
* @var boolean
*/
var $debug = false;
/**
* Constructor
*
* @param defaultimap $_icServer
*/
function __construct(defaultimap $_icServer=null)
{
parent::Net_Sieve();
$this->scriptName = !empty($GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName']) ? $GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName'] : 'felamimail';
$this->displayCharset = $GLOBALS['egw']->translation->charset();
if (!is_null($_icServer) && $this->_connect($_icServer) === 'die') {
die('Sieve not activated');
}
}
/**
* Open connection to the sieve server
*
* @param defaultimap $_icServer
* @param string $euser='' effictive user, if given the Cyrus admin account is used to login on behalf of $euser
* @return mixed 'die' = sieve not enabled, false=connect or login failure, true=success
*/
function _connect($_icServer,$euser='')
{
static $isConError;
static $sieveAuthMethods;
$_icServerID = $_icServer->ImapServerId;
if (is_null($isConError)) $isConError =& egw_cache::getCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$callback=null,$callback_params=array(),$expiration=60*15);
if ( isset($isConError[$_icServerID]) )
{
error_log(__METHOD__.__LINE__.' failed for Reason:'.$isConError[$_icServerID]);
//$this->errorMessage = $isConError[$_icServerID];
return false;
}
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.array2string($euser));
if(($_icServer instanceof defaultimap) && $_icServer->enableSieve) {
if (!empty($_icServer->sieveHost))
{
$sieveHost = $_icServer->sieveHost;
}
else
{
$sieveHost = $_icServer->host;
}
//error_log(__METHOD__.__LINE__.'->'.$sieveHost);
$sievePort = $_icServer->sievePort;
$useTLS = $_icServer->encryption > 0;
if ($euser) {
$username = $_icServer->adminUsername;
$password = $_icServer->adminPassword;
} else {
$username = $_icServer->loginName;
$password = $_icServer->password;
}
$this->icServer = $_icServer;
} else {
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$isConError,$expiration=60*15);
return 'die';
}
$this->_timeout = 10; // socket::connect sets the/this timeout on connection
$timeout = emailadmin_bo::getTimeOut('SIEVE');
if ($timeout>$this->_timeout) $this->_timeout = $timeout;
$options = $_icServer->_getTransportOptions(($sievePort==5190?3:1));
$sieveHost = $_icServer->_getTransportString($sieveHost,($sievePort==5190?3:1));
if(PEAR::isError($this->error = $this->connect($sieveHost , $sievePort, $options, $useTLS) ) ){
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": error in connect($sieveHost,$sievePort, ".array2string($options).", $useTLS): ".$this->error->getMessage());
$isConError[$_icServerID] = "SIEVE: error in connect($sieveHost,$sievePort, ".array2string($options).", $useTLS): ".$this->error->getMessage();
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$isConError,$expiration=60*15);
return false;
}
// we cache the supported AuthMethods during session, to be able to speed up login.
if (is_null($sieveAuthMethods)) $sieveAuthMethods =& egw_cache::getSession('email','sieve_supportedAuthMethods');
if (isset($sieveAuthMethods[$_icServerID])) $this->supportedAuthMethods = $sieveAuthMethods[$_icServerID];
if(PEAR::isError($this->error = $this->login($username, $password, null, $euser) ) ){
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.array2string($this->icServer));
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": error in login($username,$password,null,$euser): ".$this->error->getMessage());
$isConError[$_icServerID] = "SIEVE: error in login($username,$password,null,$euser): ".$this->error->getMessage();
egw_cache::setCache(egw_cache::INSTANCE,'email','icServerSIEVE_connectionError'.trim($GLOBALS['egw_info']['user']['account_id']),$isConError,$expiration=60*15);
return false;
}
return true;
}
function getRules($_scriptName) {
return $this->rules;
}
function getVacation($_scriptName) {
return $this->vacation;
}
function getEmailNotification($_scriptName) {
return $this->emailNotification;
}
function setRules($_scriptName, $_rules)
{
if (!$_scriptName) $_scriptName = $this->scriptName;
$script = new emailadmin_script($_scriptName);
$script->debug = $this->debug;
if($script->retrieveRules($this)) {
$script->rules = $_rules;
$ret = $script->updateScript($this);
$this->error = $script->errstr;
return $ret;
}
return false;
}
function setVacation($_scriptName, $_vacation)
{
if (!$_scriptName) $_scriptName = $this->scriptName;
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__."($_scriptName,".print_r($_vacation,true).')');
$script = new emailadmin_script($_scriptName);
$script->debug = $this->debug;
if($script->retrieveRules($this)) {
$script->vacation = $_vacation;
$ret = $script->updateScript($this);
$this->error = $script->errstr;
return $ret;
}
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__."($_scriptName,".print_r($_vacation,true).') could not retrieve rules!');
return false;
}
/**
* Set vacation with admin right for an other user, used to async enable/disable vacation
*
* @param string $_euser
* @param string $_scriptName
* @param string $_vaction
* @return boolean true on success false otherwise
*/
function setVacationUser($_euser, $_scriptName, $_vacation)
{
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.' User:'.array2string($_euser).' Scriptname:'.array2string($_scriptName).' VacationMessage:'.array2string($_vacation));
if (!$_scriptName) $_scriptName = $this->scriptName;
if ($this->_connect($this->icServer,$_euser) === true) {
$ret = $this->setVacation($_scriptName,$_vacation);
// we need to logout, so further vacation's get processed
$error = $this->_cmdLogout();
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.' logout '.(PEAR::isError($error) ? 'failed: '.$ret->getMessage() : 'successful'));
return $ret;
}
return false;
}
function setEmailNotification($_scriptName, $_emailNotification) {
if (!$_scriptName) $_scriptName = $this->scriptName;
if ($_emailNotification['externalEmail'] == '' || !preg_match("/\@/",$_emailNotification['externalEmail'])) {
$_emailNotification['status'] = 'off';
$_emailNotification['externalEmail'] = '';
}
$script = new emailadmin_script($_scriptName);
if ($script->retrieveRules($this)) {
$script->emailNotification = $_emailNotification;
$ret = $script->updateScript($this);
$this->error = $script->errstr;
return $ret;
}
return false;
}
function retrieveRules($_scriptName) {
if (!$_scriptName) $_scriptName = $this->scriptName;
$script = new emailadmin_script($_scriptName);
if($script->retrieveRules($this)) {
$this->rules = $script->rules;
$this->vacation = $script->vacation;
$this->emailNotification = $script->emailNotification; // Added email notifications
return true;
}
return false;
}
}

View File

@ -0,0 +1,250 @@
<?php
/**
* EGroupware EMailAdmin: generic base class for SMTP
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Lars Kneschke <lkneschke@linux-at-work.de>
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License Version 2+
* @version $Id$
*/
/**
* EMailAdmin generic base class for SMTP
*/
class emailadmin_smtp
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'standard SMTP-Server';
/**
* Capabilities of this class (pipe-separated): default, forward
*/
const CAPABILITIES = 'default';
/**
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
*
* Logical values uses inside EGroupware, different classes might store different values internally
*/
const MAIL_ENABLED = 'active';
/**
* Attribute value to only forward mail
*
* Logical values uses inside EGroupware, different classes might store different values internally
*/
const FORWARD_ONLY = 'forwardOnly';
/**
* Reference to global account object
*
* @var accounts
*/
protected $accounts;
/**
* SmtpServerId
*
* @var int
*/
var $SmtpServerId;
var $smtpAuth = false;
var $editForwardingAddress = false;
var $host;
var $port;
var $username;
var $password;
var $defaultDomain;
/**
* Constructor
*
* @param string $defaultDomain=null
*/
function __construct($defaultDomain=null)
{
$this->defaultDomain = $defaultDomain ? $defaultDomain : $GLOBALS['egw_info']['server']['mail_suffix'];
$this->accounts = $GLOBALS['egw']->accounts;
}
/**
* Return description for EMailAdmin
*
* @return string
*/
public static function description()
{
return static::DESCRIPTION;
}
/**
* Hook called on account creation
*
* @param array $_hookValues values for keys 'account_email', 'account_firstname', 'account_lastname', 'account_lid'
* @return boolean true on success, false on error writing to ldap
*/
function addAccount($_hookValues)
{
$mailLocalAddress = $_hookValues['account_email'] ? $_hookValues['account_email'] :
common::email_address($_hookValues['account_firstname'],
$_hookValues['account_lastname'],$_hookValues['account_lid'],$this->defaultDomain);
$account_id = !empty($_hookValues['account_id']) ? $_hookValues['account_id'] :
$this->accounts->name2id($_hookValues['account_lid'], 'account_lid', 'u');
if ($this->accounts->exists($account_id) != 1)
{
throw new egw_exception_assertion_failed("Account #$account_id ({$_hookValues['account_lid']}) does NOT exist!");
}
return $this->setUserData($account_id, array(), array(), null, self::MAIL_ENABLED, $mailLocalAddress, null);
}
/**
* Hook called on account deletion
*
* @param array $_hookValues values for keys 'account_lid', 'account_id'
* @return boolean true on success, false on error writing to ldap
*/
function deleteAccount($_hookValues)
{
return true;
}
/**
* Get all email addresses of an account
*
* @param string $_accountName
* @return array
*/
function getAccountEmailAddress($_accountName)
{
$emailAddresses = array();
if (($account_id = $this->accounts->name2id($_accountName, 'account_lid', 'u')))
{
$realName = trim($GLOBALS['egw_info']['user']['account_firstname'] . (!empty($GLOBALS['egw_info']['user']['account_firstname']) ? ' ' : '') . $GLOBALS['egw_info']['user']['account_lastname']);
$emailAddresses[] = array (
'name' => $realName,
'address' => $this->accounts->id2name($account_id, 'account_email'),
'type' => 'default',
);
}
return $emailAddresses;
}
/**
* Get the data of a given user
*
* @param int|string $user numerical account-id, account-name or email address
* @param boolean $match_uid_at_domain=true true: uid@domain matches, false only an email or alias address matches
* @return array with values for keys 'mailLocalAddress', 'mailAlternateAddress' (array), 'mailForwardingAddress' (array),
* 'accountStatus' ("active"), 'quotaLimit' and 'deliveryMode' ("forwardOnly")
*/
function getUserData($user, $match_uid_at_domain=false)
{
$userData = array();
return $userData;
}
/**
* Saves the forwarding information
*
* @param int $_accountID
* @param string|array $_forwardingAddress
* @param string $_keepLocalCopy 'yes'
* @return boolean true on success, false on error writing
*/
function saveSMTPForwarding($_accountID, $_forwardingAddress, $_keepLocalCopy)
{
return $this->setUserData($_accountID, array(),
$_forwardingAddress ? (array)$_forwardingAddress : array(),
$_keepLocalCopy != 'yes' ? self::FORWARD_ONLY : null, null, null, null, true);
}
/**
* Set the data of a given user
*
* @param int $_uidnumber numerical user-id
* @param array $_mailAlternateAddress
* @param array $_mailForwardingAddress
* @param string $_deliveryMode
* @param string $_accountStatus
* @param string $_mailLocalAddress
* @param int $_quota in MB
* @param boolean $_forwarding_only=false true: store only forwarding info, used internally by saveSMTPForwarding
* @param string $_setMailbox=null used only for account migration
* @return boolean true on success, false on error writing to ldap
*/
function setUserData($_uidnumber, array $_mailAlternateAddress, array $_mailForwardingAddress, $_deliveryMode,
$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only=false, $_setMailbox=null)
{
return true;
}
/**
* Hook called on account update
*
* @param array $_hookValues values for keys 'account_email', 'account_firstname', 'account_lastname', 'account_lid', 'account_id'
* @return boolean true on success, false on error writing to ldap
*/
function updateAccount($_hookValues)
{
return true;
}
/**
* Build mailbox address for given account and mail_addr_type
*
* If $account is an array (with values for keys account_(id|lid|email), it does NOT call accounts class
*
* @param int|array $account account_id or whole account array with values for keys
* @param string $domain=null domain, default use $this->defaultDomain
* @param string $mail_login_type=null standard(uid), vmailmgr(uid@domain), email or uidNumber,
* default use $GLOBALS['egw_info']['server']['mail_login_type']
* @return string
*/
/*static*/ public function mailbox_addr($account,$domain=null,$mail_login_type=null)
{
if (is_null($domain)) $domain = $this->defaultDomain;
if (is_null($mail_login_type)) $mail_login_type = $GLOBALS['egw_info']['server']['mail_login_type'];
switch($mail_login_type)
{
case 'email':
$mbox = is_array($account) ? $account['account_email'] : $GLOBALS['egw']->accounts->id2name($account,'account_email');
break;
case 'uidNumber':
if (is_array($account)) $account = $account['account_id'];
$mbox = 'u'.$account.'@'.$domain;
break;
case 'standard':
$mbox = is_array($account) ? $account['account_lid'] : $GLOBALS['egw']->accounts->id2name($account);
break;
case 'vmailmgr':
default:
$mbox = is_array($account) ? $account['account_lid'] : $GLOBALS['egw']->accounts->id2name($account);
$mbox .= '@'.$domain;
break;
}
//error_log(__METHOD__."(".array2string($account).",'$domain','$mail_login_type') = '$mbox'");
return $mbox;
}
}

View File

@ -0,0 +1,166 @@
<?php
/**
* EGroupware EMailAdmin: Postfix using Active Directorys Exchange attributes
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2013 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Postfix using Active Directorys proxyAddresses attribute
* (available without installing Exchange schemas).
*
* This plugin is NOT meant to administrate an Exchange Server using AD!
*
* Aliases, forwards, forward only and quota is stored in
* multivalued attribute proxyAddresses with different prefixes.
*
* Primary mail address is additionally stored in proxyAddresses.
* Disabling mail removes proxyAddresses completly.
*
* @link http://msdn.microsoft.com/en-us/library/ms679424(v=vs.85).aspx
* @link http://www.dovecot.org/list/dovecot/2010-February/046763.html
*/
class emailadmin_smtp_ads extends emailadmin_smtp_ldap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'Active Directory';
/**
* Capabilities of this class (pipe-separated): default, forward
*/
const CAPABILITIES = 'default|forward';
/**
* Name of schema, has to be in the right case!
*/
const SCHEMA = 'top';
/**
* Filter for users
*
* objectCategory is indexed, while objectclass is not!
*/
const USER_FILTER = '(objectCategory=person)';
/**
* Name of schema for groups, has to be in the right case!
*/
const GROUP_SCHEMA = 'group';
/**
* 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 for aliases OR false to use mail
*/
const ALIAS_ATTR = 'proxyaddresses';
/**
* Caseinsensitive prefix for aliases (eg. "smtp:"), aliases get added with it and only aliases with it are reported
*/
const ALIAS_PREFIX = 'smtp:';
/**
* 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 = 'proxyaddresses';
/**
* Caseinsensitive prefix for forwards (eg. "forward:"), forwards get added with it and only forwards with it are reported
*/
const FORWARD_PREFIX = 'forward:';
/**
* Attribute to only forward mail, OR false if not available
*/
const FORWARD_ONLY_ATTR = 'proxyaddresses';
/**
* Value of forward-only attribute, if not set any value will switch forward only on (checked with =*)
*/
const FORWARD_ONLY_VALUE = 'forwardOnly';
/**
* Attribute for mailbox, to which mail gets delivered OR false if not supported
*/
const MAILBOX_ATTR = false;
/**
* Attribute for quota limit of user in MB
*/
const QUOTA_ATTR = 'proxyaddresses';
/**
* Caseinsensitive prefix for quota (eg. "quota:"), quota get added with it and only quota with it are reported
*/
const QUOTA_PREFIX = 'quota:';
/**
* Internal quota in MB is multiplicated with this factor before stored in LDAP
*/
const QUOTA_FACTOR = 1048576;
/**
* Attribute for user name
*/
const USER_ATTR = 'samaccountname';
/**
* Attribute for numeric user id (optional)
*
* No single uidNumber attribute, as we use RID (last part of objectSid attribute) for it.
*/
const USERID_ATTR = false;
/**
* Return LDAP connection
*/
protected function getLdapConnection()
{
static $ldap;
if (is_null($ldap))
{
if (!is_a($GLOBALS['egw']->accounts->backend, 'accounts_ads'))
{
throw new egw_exception_wrong_userinput('Postfix with Active Directory requires accounts stored in ADS!');
}
$ldap = $GLOBALS['egw']->accounts->backend->ldap_connection();
}
return $ldap;
}
/**
* Constructor
*
* @param string $defaultDomain=null
*/
function __construct($defaultDomain=null)
{
parent::__construct($defaultDomain);
$this->setBase($GLOBALS['egw']->accounts->backend->ads_context());
}
/**
* Return description for EMailAdmin
*
* @return string
*/
public static function description()
{
return static::DESCRIPTION;
}
}

View File

@ -0,0 +1,779 @@
<?php
/**
* EGroupware EMailAdmin: generic base class for SMTP configuration via LDAP
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2010-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Generic base class for SMTP configuration via LDAP
*
* This class uses just inetOrgPerson schema to store primary mail address and aliases
*
* Aliases are stored as aditional mail Attributes. The primary mail address is the first one.
* This schema does NOT support forwarding or disabling of an account for mail.
*
* Aliases, forwards, forward-only and quota attribute can be stored in same multivalued attribute
* with different prefixes.
*
* Please do NOT copy this class! Extend it and set the constants different.
*
* Please note: schema names muse use correct case (eg. "inetOrgPerson"),
* while attribute name muse use lowercase, as LDAP returns them as keys in lowercase!
*/
class emailadmin_smtp_ldap extends emailadmin_smtp
{
/**
* Name of schema, has to be in the right case!
*/
const SCHEMA = 'inetOrgPerson';
/**
* Filter for users
*/
const USER_FILTER = '(objectClass=posixAccount)';
/**
* Name of schema for groups, has to be in the right case!
*/
const GROUP_SCHEMA = 'posixGroup';
/**
* 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 for aliases OR false to use mail
*/
const ALIAS_ATTR = false;
/**
* Caseinsensitive prefix for aliases (eg. "smtp:"), aliases get added with it and only aliases with it are reported
*/
const ALIAS_PREFIX = '';
/**
* 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 = false;
/**
* Caseinsensitive prefix for forwards (eg. "forward:"), forwards get added with it and only forwards with it are reported
*/
const FORWARD_PREFIX = '';
/**
* Attribute to only forward mail, OR false if not available
*/
const FORWARD_ONLY_ATTR = false;
/**
* Value of forward-only attribute, if empty any value will switch forward only on (checked with =*)
*/
const FORWARD_ONLY = 'forwardOnly';
/**
* Attribute for mailbox, to which mail gets delivered OR false if not supported
*/
const MAILBOX_ATTR = false;
/**
* Attribute for quota limit of user in MB
*/
const QUOTA_ATTR = false;
/**
* Caseinsensitive prefix for quota (eg. "quota:"), quota get added with it and only quota with it are reported
*/
const QUOTA_PREFIX = '';
/**
* Internal quota in MB is multiplicated with this factor before stored in LDAP
*/
const QUOTA_FACTOR = 1048576;
/**
* Attribute for user name
*/
const USER_ATTR = 'uid';
/**
* Attribute for numeric user id (optional)
*/
const USERID_ATTR = 'uidnumber';
/**
* Base for all searches, defaults to $GLOBALS['egw_info']['server']['ldap_context'] and can be set via setBase($base)
*
* @var string
*/
protected $search_base;
/**
* Special search filter for getUserData only
*
* @var string
*/
protected $search_filter;
/**
* Log all LDAP writes / actions to error_log
*/
var $debug = false;
/**
* from here on implementation, please do NOT copy but extend it!
*/
/**
* Constructor
*
* @param string $defaultDomain=null
*/
function __construct($defaultDomain=null)
{
parent::__construct($defaultDomain);
if (empty($this->search_base))
{
$this->setBase($GLOBALS['egw_info']['server']['ldap_context']);
}
}
/**
* Return description for EMailAdmin
*
* @return string
*/
public static function description()
{
return 'LDAP ('.static::SCHEMA.')';
}
/**
* Set ldap search filter for aliases and forwards (getUserData)
*
* @param string $filter
*/
function setFilter($filter)
{
$this->search_filter = $filter;
}
/**
* Set ldap search base, default $GLOBALS['egw_info']['server']['ldap_context']
*
* @param string $base
*/
function setBase($base)
{
$this->search_base = $base;
}
/**
* Hook called on account creation
*
* @param array $_hookValues values for keys 'account_email', 'account_firstname', 'account_lastname', 'account_lid'
* @return boolean true on success, false on error writing to ldap
*/
function addAccount($_hookValues)
{
$mailLocalAddress = $_hookValues['account_email'] ? $_hookValues['account_email'] :
common::email_address($_hookValues['account_firstname'],
$_hookValues['account_lastname'],$_hookValues['account_lid'],$this->defaultDomain);
$ds = $this->getLdapConnection();
$filter = static::USER_ATTR."=".ldap::quote($_hookValues['account_lid']);
if (!($sri = @ldap_search($ds, $this->search_base, $filter)))
{
return false;
}
$allValues = ldap_get_entries($ds, $sri);
$accountDN = $allValues[0]['dn'];
$objectClasses = $allValues[0]['objectclass'];
unset($objectClasses['count']);
// add our mail schema, if not already set
if(!in_array(static::SCHEMA,$objectClasses) && !in_array(strtolower(static::SCHEMA),$objectClasses))
{
$objectClasses[] = static::SCHEMA;
}
// the new code for postfix+cyrus+ldap
$newData = array(
'mail' => $mailLocalAddress,
'objectclass' => $objectClasses
);
// does schema have explicit alias attribute AND require mail added as alias too
if (static::ALIAS_ATTR && static::REQUIRE_MAIL_AS_ALIAS)
{
$newData[static::ALIAS_ATTR] = static::ALIAS_PREFIX.$mailLocalAddress;
}
// does schema support enabling/disabling mail via attribute
if (static::MAIL_ENABLE_ATTR)
{
$newData[static::MAIL_ENABLE_ATTR] = static::MAIL_ENABLED;
}
// does schema support an explicit mailbox name --> set it
if (static::MAILBOX_ATTR)
{
$newData[static::MAILBOX_ATTR] = self::mailbox_addr($_hookValues);
}
if (!($ret = ldap_mod_replace($ds, $accountDN, $newData)) || $this->debug)
{
error_log(__METHOD__.'('.array2string(func_get_args()).") --> ldap_mod_replace(,'$accountDN',".
array2string($newData).') returning '.array2string($ret).
(!$ret?' ('.ldap_error($ds).')':''));
}
return $ret;
}
/**
* Get all email addresses of an account
*
* @param string $_accountName
* @return array
*/
function getAccountEmailAddress($_accountName)
{
$emailAddresses = array();
$ds = $this->getLdapConnection();
$filter = '(&'.static::USER_FILTER.'('.static::USER_ATTR.'='.ldap::quote($_accountName).'))';
$attributes = array('dn', 'mail', static::ALIAS_ATTR);
$sri = @ldap_search($ds, $this->search_base, $filter, $attributes);
if ($sri)
{
$realName = trim($GLOBALS['egw_info']['user']['account_firstname'] . (!empty($GLOBALS['egw_info']['user']['account_firstname']) ? ' ' : '') . $GLOBALS['egw_info']['user']['account_lastname']);
$allValues = ldap_get_entries($ds, $sri);
if(isset($allValues[0]['mail']))
{
foreach($allValues[0]['mail'] as $key => $value)
{
if ($key === 'count') continue;
$emailAddresses[] = array (
'name' => $realName,
'address' => $value,
'type' => !$key ? 'default' : 'alternate',
);
}
}
if (static::ALIAS_ATTR && isset($allValues[0][static::ALIAS_ATTR]))
{
foreach(self::getAttributePrefix($allValues[0][static::ALIAS_ATTR], static::ALIAS_PREFIX) as $value)
{
$emailAddresses[] = array(
'name' => $realName,
'address' => $value,
'type' => 'alternate'
);
}
}
}
if ($this->debug) error_log(__METHOD__."('$_acountName') returning ".array2string($emailAddresses));
return $emailAddresses;
}
/**
* Get the data of a given user
*
* Multiple accounts may match, if an email address is specified.
* In that case only mail routing fields "uid", "mailbox" and "forward" contain values
* from all accounts!
*
* @param int|string $user numerical account-id, account-name or email address
* @param boolean $match_uid_at_domain=true true: uid@domain matches, false only an email or alias address matches
* @return array with values for keys 'mailLocalAddress', 'mailAlternateAddress' (array), 'mailForwardingAddress' (array),
* 'accountStatus' ("active"), 'quotaLimit' and 'deliveryMode' ("forwardOnly")
*/
function getUserData($user, $match_uid_at_domain=false)
{
$userData = array(
'mailbox' => array(),
'forward' => array(),
);
$ldap = $this->getLdapConnection();
if (is_numeric($user) && static::USERID_ATTR)
{
$filter = '('.static::USERID_ATTR.'='.(int)$user.')';
}
elseif (strpos($user, '@') === false)
{
if (is_numeric($user)) $user = $GLOBALS['egw']->accounts->id2name($user);
$filter = '(&'.static::USER_FILTER.'('.static::USER_ATTR.'='.ldap::quote($user).'))';
}
else // email address --> build filter by attributes defined in config
{
list($namepart, $domain) = explode('@', $user);
if (!empty($this->search_filter))
{
$filter = strtr($this->search_filter, array(
'%s' => ldap::quote($user),
'%u' => ldap::quote($namepart),
'%d' => ldap::quote($domain),
));
}
else
{
$filter = array('(mail='.ldap::quote($user).')');
if ($match_uid_at_domain) $filter[] = '('.static::USER_ATTR.'='.ldap::quote($namepart).')';
if (static::ALIAS_ATTR)
{
$filter[] = '('.static::ALIAS_ATTR.'='.static::ALIAS_PREFIX.ldap::quote($user).')';
}
$filter = count($filter) > 1 ? '(|'.explode('', $filter).')' : $filter[0];
// if an enable attribute is set, only return enabled accounts
if (static::MAIL_ENABLE_ATTR)
{
$filter = '(&('.static::MAIL_ENABLE_ATTR.'='.
(static::MAIL_ENABLED ? static::MAIL_ENABLED : '*').")$filter)";
}
}
}
$attributes = array_values(array_diff(array(
'mail', 'objectclass', static::USER_ATTR, static::MAIL_ENABLE_ATTR, static::ALIAS_ATTR,
static::MAILBOX_ATTR, static::FORWARD_ATTR, static::FORWARD_ONLY_ATTR, static::QUOTA_ATTR,
), array(false, '')));
$sri = ldap_search($ldap, $this->search_base, $filter, $attributes);
if ($sri)
{
$allValues = ldap_get_entries($ldap, $sri);
if ($this->debug) error_log(__METHOD__."('$user') --> ldap_search(, '$this->search_base', '$filter') --> ldap_get_entries=".array2string($allValues[0]));
foreach($allValues as $key => $values)
{
if ($key === 'count') continue;
// groups are always active (if they have an email) and allways forwardOnly
if (in_array(static::GROUP_SCHEMA, $values['objectclass']))
{
$accountStatus = emailadmin_smtp::MAIL_ENABLED;
$deliveryMode = emailadmin_smtp::FORWARD_ONLY;
}
else // for users we have to check the attributes
{
if (static::MAIL_ENABLE_ATTR)
{
$accountStatus = isset($values[static::MAIL_ENABLE_ATTR]) &&
(static::MAIL_ENABLED && !strcasecmp($values[static::MAIL_ENABLE_ATTR][0], static::MAIL_ENABLED) ||
!static::MAIL_ENABLED && $values[static::ALIAS_ATTR]['count'] > 0) ? emailadmin_smtp::MAIL_ENABLED : '';
}
else
{
$accountStatus = $values[static::ALIAS_ATTR]['count'] > 0 ? emailadmin_smtp::MAIL_ENABLED : '';
}
if (static::FORWARD_ONLY_ATTR)
{
if (static::FORWARD_ONLY) // check caseinsensitiv for existence of that value
{
$deliveryMode = self::getAttributePrefix($values[static::FORWARD_ONLY_ATTR], static::FORWARD_ONLY) ?
emailadmin_smtp::FORWARD_ONLY : '';
}
else // check for existence of any value
{
$deliveryMode = $values[static::FORWARD_ONLY_ATTR]['count'] > 0 ?
emailadmin_smtp::FORWARD_ONLY : '';
}
}
else
{
$deliveryMode = '';
}
}
// collect mail routing data (can be from multiple (active) accounts and groups!)
if ($accountStatus)
{
// groups never have a mailbox, accounts can have a deliveryMode of "forwardOnly"
if ($deliveryMode != emailadmin_smtp::FORWARD_ONLY)
{
$userData[static::USER_ATTR][] = $values[static::USER_ATTR][0];
if (static::MAILBOX_ATTR && isset($values[static::MAILBOX_ATTR]))
{
$userData['mailbox'][] = $values[static::MAILBOX_ATTR][0];
}
}
if (static::FORWARD_ATTR && $values[static::FORWARD_ATTR])
{
$userData['forward'] = array_merge($userData['forward'],
self::getAttributePrefix($values[static::FORWARD_ATTR], static::FORWARD_PREFIX, false));
}
}
// regular user-data can only be from users, NOT groups
if (in_array(static::GROUP_SCHEMA, $values['objectclass'])) continue;
$userData['mailLocalAddress'] = $values['mail'][0];
$userData['accountStatus'] = $accountStatus;
if (static::ALIAS_ATTR)
{
$userData['mailAlternateAddress'] = self::getAttributePrefix($values[static::ALIAS_ATTR], static::ALIAS_PREFIX);
}
else
{
$userData['mailAlternateAddress'] = (array)$values['mail'];
unset($userData['mailAlternateAddress']['count']);
unset($userData['mailAlternateAddress'][0]);
$userData['mailAlternateAddress'] = array_values($userData['mailAlternateAddress']);
}
if (static::FORWARD_ATTR)
{
$userData['mailForwardingAddress'] = self::getAttributePrefix($values[static::FORWARD_ATTR], static::FORWARD_PREFIX);
}
if (static::MAILBOX_ATTR) $userData['mailMessageStore'] = $values[static::MAILBOX_ATTR][0];
$userData['deliveryMode'] = $deliveryMode;
// eg. suse stores all email addresses as aliases
if (static::REQUIRE_MAIL_AS_ALIAS &&
($k = array_search($userData['mailLocalAddress'],$userData['mailAlternateAddress'])) !== false)
{
unset($userData['mailAlternateAddress'][$k]);
}
if (static::QUOTA_ATTR && isset($values[static::QUOTA_ATTR]))
{
$userData['quotaLimit'] = self::getAttributePrefix($values[static::QUOTA_ATTR], static::QUOTA_PREFIX);
$userData['quotaLimit'] = array_shift($userData['quotaLimit']);
$userData['quotaLimit'] = $userData['quotaLimit'] ? $userData['quotaLimit'] / static::QUOTA_FACTOR : null;
}
}
}
if ($this->debug) error_log(__METHOD__."('$user') returning ".array2string($userData));
return $userData;
}
/**
* Set the data of a given user
*
* @param int $_uidnumber numerical user-id
* @param array $_mailAlternateAddress
* @param array $_mailForwardingAddress
* @param string $_deliveryMode
* @param string $_accountStatus
* @param string $_mailLocalAddress
* @param int $_quota in MB
* @param boolean $_forwarding_only=false not used as we have our own addAccount method
* @param string $_setMailbox=null used only for account migration
* @return boolean true on success, false on error writing to ldap
*/
function setUserData($_uidnumber, array $_mailAlternateAddress, array $_mailForwardingAddress, $_deliveryMode,
$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only=false, $_setMailbox=null)
{
if (static::USERID_ATTR)
{
$filter = static::USERID_ATTR.'='.(int)$_uidnumber;
}
else
{
$uid = $GLOBALS['egw']->accounts->id2name($_uidnumber);
$filter = static::USER_ATTR.'='.ldap::quote($uid);
}
$ldap = $this->getLdapConnection();
if (!($sri = @ldap_search($ldap, $this->search_base, $filter)))
{
return false;
}
$allValues = ldap_get_entries($ldap, $sri);
$accountDN = $allValues[0]['dn'];
$uid = $allValues[0][static::USER_ATTR][0];
$objectClasses = $allValues[0]['objectclass'];
unset($objectClasses['count']);
if(!in_array(static::SCHEMA,$objectClasses) && !in_array(strtolower(static::SCHEMA),$objectClasses))
{
$objectClasses[] = static::SCHEMA;
$newData['objectclass'] = $objectClasses;
}
sort($_mailAlternateAddress);
sort($_mailForwardingAddress);
$newData['mail'] = $_mailLocalAddress;
// does schema have explicit alias attribute
if (static::ALIAS_ATTR)
{
self::setAttributePrefix($newData[static::ALIAS_ATTR], $_mailAlternateAddress, static::ALIAS_PREFIX);
// all email must be stored as alias for suse
if (static::REQUIRE_MAIL_AS_ALIAS && !in_array($_mailLocalAddress,(array)$_mailAlternateAddress))
{
self::setAttributePrefix($newData[static::ALIAS_ATTR], $_mailLocalAddress, static::ALIAS_PREFIX);
}
}
// or de we add them - if existing - to mail attr
elseif ($_mailAlternateAddress)
{
self::setAttributePrefix($newData['mail'], $_mailAlternateAddress, static::ALIAS_PREFIX);
}
// does schema support to store forwards
if (static::FORWARD_ATTR)
{
self::setAttributePrefix($newData[static::FORWARD_ATTR], $_mailForwardingAddress, static::FORWARD_PREFIX);
}
// does schema support only forwarding incomming mail
if (static::FORWARD_ONLY_ATTR)
{
self::setAttributePrefix($newData[static::FORWARD_ONLY_ATTR],
$_deliveryMode ? (static::FORWARD_ONLY ? static::FORWARD_ONLY : 'forwardOnly') : array());
}
// does schema support an explicit mailbox name --> set it with $uid@$domain
if (static::MAILBOX_ATTR && empty($allValues[0][static::MAILBOX_ATTR][0]))
{
$newData[static::MAILBOX_ATTR] = $this->mailbox_addr(array(
'account_id' => $_uidnumber,
'account_lid' => $uid,
'account_email' => $_mailLocalAddress,
));
}
if (static::QUOTA_ATTR)
{
self::setAttributePrefix($newData[static::QUOTA_ATTR],
(int)$_quota > 0 ? (int)$_quota*static::QUOTA_FACTOR : array(), static::QUOTA_PREFIX);
}
// does schema support enabling/disabling mail via attribute
if (static::MAIL_ENABLE_ATTR)
{
$newData[static::MAIL_ENABLE_ATTR] = $_accountStatus ? static::MAIL_ENABLED : array();
}
// if we have no mail-enabled attribute, but require primary mail in aliases-attr
// we do NOT write aliases, if mail is not enabled
if (!$_accountStatus && !static::MAIL_ENABLE_ATTR && static::REQUIRE_MAIL_AS_ALIAS)
{
$newData[static::ALIAS_ATTR] = array();
}
// does schema support an explicit mailbox name --> set it, $_setMailbox is given
if (static::MAILBOX_ATTR && $_setMailbox)
{
$newData[static::MAILBOX_ATTR] = $_setMailbox;
}
if ($this->debug) error_log(__METHOD__.'('.array2string(func_get_args()).") --> ldap_mod_replace(,'$accountDN',".array2string($newData).')');
return ldap_mod_replace($ldap, $accountDN, $newData);
}
/**
* Saves the forwarding information
*
* @param int $_accountID
* @param string $_forwardingAddress
* @param string $_keepLocalCopy 'yes'
* @return boolean true on success, false on error writing to ldap
*/
function saveSMTPForwarding($_accountID, $_forwardingAddress, $_keepLocalCopy)
{
$ds = $this->getLdapConnection();
if (static::USERID_ATTR)
{
$filter = '(&'.static::USER_FILTER.'('.static::USERID_ATTR.'='.(int)$_accountID.'))';
}
else
{
$uid = $GLOBALS['egw']->accounts->id2name($_accountID);
$filter = '(&'.static::USER_FILTER.'('.static::USER_ATTR.'='.ldap::quote($uid).'))';
}
$attributes = array('dn', static::FORWARD_ATTR, 'objectclass');
if (static::FORWARD_ONLY_ATTR)
{
$attributes[] = static::FORWARD_ONLY_ATTR;
}
$sri = ldap_search($ds, $this->search_base, $filter, $attributes);
if ($sri)
{
$newData = array();
$allValues = ldap_get_entries($ds, $sri);
$objectClasses = $allValues[0]['objectclass'];
$newData['objectclass'] = $allValues[0]['objectclass'];
unset($newData['objectclass']['count']);
if(!in_array(static::SCHEMA,$objectClasses))
{
$newData['objectclass'][] = static::SCHEMA;
}
if (static::FORWARD_ATTR)
{
// copy all non-forward data (different prefix) to newData, all existing forwards to $forwards
$newData[static::FORWARD_ATTR] = $allValues[0][static::FORWARD_ATTR];
$forwards = self::getAttributePrefix($newData[static::FORWARD_ATTR], static::FORWARD_PREFIX);
if(!empty($_forwardingAddress))
{
if($forwards)
{
if (!is_array($_forwardingAddress))
{
// replace the first forwarding address (old behavior)
$forwards[0] = $_forwardingAddress;
}
else
{
// replace all forwarding Addresses
$forwards = $_forwardingAddress;
}
}
else
{
$forwards = (array)$_forwardingAddress;
}
if (static::FORWARD_ONLY_ATTR)
{
self::getAttributePrefix($newData[static::FORWARD_ONLY_ATTR], static::FORWARD_ONLY);
self::setAttributePrefix($newData[static::FORWARD_ONLY_ATTR],
$_keepLocalCopy == 'yes' ? array() : static::FORWARD_ONLY);
}
}
else
{
$forwards = array();
}
// merge in again all new set forwards incl. opt. prefix
self::getAttributePrefix($newData[static::FORWARD_ATTR], $forwards, static::FORWARD_PREFIX);
}
if ($this->debug) error_log(__METHOD__.'('.array2string(func_get_args()).") --> ldap_mod_replace(,'$accountDN',".array2string($newData).')');
return ldap_modify ($ds, $allValues[0]['dn'], $newData);
}
}
/**
* Get configured mailboxes of a domain
*
* @param boolean $return_inactive return mailboxes NOT marked as accountStatus=active too
* @return array uid => name-part of mailMessageStore
*/
function getMailboxes($return_inactive)
{
$ds = $this->getLdapConnection();
$filter = array("(mail=*)");
$attrs = array(static::USER_ATTR, 'mail');
if (static::MAILBOX_ATTR)
{
$filter[] = '('.static::MAILBOX_ATTR.'=*)';
$attrs[] = static::MAILBOX_ATTR;
}
if (!$return_inactive && static::MAIL_ENABLE_ATTR)
{
$filter[] = '('.static::MAIL_ENABLE_ATTR.'='.static::MAIL_ENABLED.')';
}
if (count($filter) > 1)
{
$filter = '(&'.implode('', $filter).')';
}
else
{
$filter = $filter[0];
}
if (!($sr = @ldap_search($ds, $this->search_base, $filter, $attrs)))
{
//error_log("Error ldap_search(\$ds, '$base', '$filter')!");
return array();
}
$entries = ldap_get_entries($ds, $sr);
unset($entries['count']);
$mailboxes = array();
foreach($entries as $entry)
{
if ($entry[static::USER_ATTR][0] == 'anonymous') continue; // anonymous is never a mail-user!
list($mailbox) = explode('@', $entry[static::MAILBOX_ATTR ? static::MAILBOX_ATTR : 'mail'][0]);
$mailboxes[$entry[static::USER_ATTR][0]] = $mailbox;
}
return $mailboxes;
}
/**
* Set values in a given LDAP attribute using an optional prefix
*
* @param array &$attribute on return array with values set and existing values preseved
* @param string|array $values value(s) to set
* @param string $prefix='' prefix to use or ''
*/
protected static function setAttributePrefix(&$attribute, $values, $prefix='')
{
$attribute_in = $attribute;
if (!isset($attribute)) $attribute = array();
if (!is_array($attribute)) $attribute = array($attribute);
foreach((array)$values as $value)
{
$attribute[] = $prefix.$value;
}
//error_log(__METHOD__."(".array2string($attribute_in).", ".array2string($values).", '$prefix') attribute=".array2string($attribute));
}
/**
* Get values having an optional prefix from a given LDAP attribute
*
* @param array &$attribute only "count" and prefixed values get removed, get's reindexed, if values have been removed
* @param string $prefix='' prefix to use or ''
* @param boolean $remove=true remove returned values from $attribute
* @return array with values (prefix removed) or array() if nothing found
*/
protected static function getAttributePrefix(&$attribute, $prefix='', $remove=true)
{
$attribute_in = $attribute;
$values = array();
if (isset($attribute))
{
unset($attribute['count']);
foreach($attribute as $key => $value)
{
if (!$prefix || stripos($value, $prefix) === 0)
{
if ($remove) unset($attribute[$key]);
$values[] = substr($value, strlen($prefix));
}
}
// reindex $attribute, if neccessary
if ($values && $attribute) $attribute = array_values($attribute);
}
//error_log(__METHOD__."(".array2string($attribute_in).", '$prefix', $remove) attribute=".array2string($attribute).' returning '.array2string($values));
return $values;
}
/**
* Return LDAP connection
*/
protected function getLdapConnection()
{
static $ldap;
if (is_null($ldap)) $ldap = $GLOBALS['egw']->ldap->ldapConnect();
return $ldap;
}
}

View 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.')';
}
}

View File

@ -0,0 +1,76 @@
<?php
/**
* EGroupware EMailAdmin: Postfix with new qmailUser schema
*
* @link http://www.egroupware.org
* @package emailadmin
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2013 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Postfix with new qmailUser schema (mailQuotaSize instead of mailQuota)
*/
class emailadmin_smtp_qmail 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 = 'qmailUser';
/**
* Attribute to enable mail for an account, OR false if existence of ALIAS_ATTR is enough for mail delivery
*/
const MAIL_ENABLE_ATTR = 'accountstatus';
/**
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
*/
const MAIL_ENABLED = 'active';
/**
* Attribute for aliases OR false to use mail
*/
const ALIAS_ATTR = 'mailalternateaddress';
/**
* 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 = 'mailforwardingaddress';
/**
* Attribute to only forward mail, OR false if not available
*/
const FORWARD_ONLY_ATTR = 'deliverymode';
/**
* Attribute for mailbox, to which mail gets delivered OR false if not supported
*/
const MAILBOX_ATTR = 'mailmessagestore';
/**
* Attribute for quota limit of user in MB
*/
const QUOTA_ATTR = 'mailquotasize';
/**
* Return description for EMailAdmin
*
* @return string
*/
public static function description()
{
return 'LDAP (new '.static::SCHEMA.')';
}
}

View File

@ -0,0 +1,338 @@
<?php
/**
* EGroupware EMailAdmin: SMTP configuration / mail accounts via SQL
*
* @link http://www.stylite.de
* @package emailadmin
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2012-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* SMTP configuration / mail accounts via SQL
*/
class emailadmin_smtp_sql extends emailadmin_smtp
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'SQL';
/**
* Capabilities of this class (pipe-separated): default, forward
*/
const CAPABILITIES = 'default|forward';
/**
* Reference to global db object
*
* @var egw_db
*/
protected $db;
/**
* Name of table
*/
const TABLE = 'egw_mailaccounts';
/**
* Name of app our table belongs to
*/
const APP = 'emailadmin';
/**
* Values for mail_type column
*
* enabled and delivery must have smaller values then alias, forward or mailbox (getUserData depend on it)!
*/
const TYPE_ENABLED = 0;
const TYPE_DELIVERY = 1;
const TYPE_QUOTA = 2;
const TYPE_ALIAS = 3;
const TYPE_FORWARD = 4;
const TYPE_MAILBOX = 5;
/**
* Constructor
*
* @param string $defaultDomain=null
*/
function __construct($defaultDomain=null)
{
parent::__construct($defaultDomain);
$this->db = $GLOBALS['egw']->db;
}
/**
* Get all email addresses of an account
*
* @param string $_accountName
* @return array
*/
function getAccountEmailAddress($_accountName)
{
$emailAddresses = parent::getAccountEmailAddress($_accountName);
if (($account_id = $this->accounts->name2id($_accountName, 'account_lid', 'u')))
{
foreach($this->db->select(self::TABLE, 'mail_value', array(
'account_id' => $account_id,
'mail_type' => self::TYPE_ALIAS,
), __LINE__, __FILE__, false, 'ORDER BY mail_value', self::APP) as $row)
{
$emailAddresses[] = array (
'name' => $emailAddresses[0]['name'],
'address' => $row['mail_value'],
'type' => 'alternate',
);
}
}
if ($this->debug) error_log(__METHOD__."('$_acountName') returning ".array2string($emailAddresses));
return $emailAddresses;
}
/**
* Get the data of a given user
*
* Multiple accounts may match, if an email address is specified.
* In that case only mail routing fields "uid", "mailbox" and "forward" contain values
* from all accounts!
*
* @param int|string $user numerical account-id, account-name or email address
* @param boolean $match_uid_at_domain=true true: uid@domain matches, false only an email or alias address matches
* @return array with values for keys 'mailLocalAddress', 'mailAlternateAddress' (array), 'mailForwardingAddress' (array),
* 'accountStatus' ("active"), 'quotaLimit' and 'deliveryMode' ("forwardOnly")
*/
function getUserData($user, $match_uid_at_domain=false)
{
$userData = array();
if (is_numeric($user) && $this->accounts->exists($user))
{
$account_id = $user;
}
elseif (strpos($user, '@') === false)
{
$account_id = $this->accounts->name2id($user, 'account_lid', 'u');
}
else // email address
{
// check with primary email address
if (($account_id = $this->accounts->name2id($user, 'account_email')))
{
$account_id = array($account_id);
}
else
{
$account_id = array();
}
// always allow username@domain
list($account_lid) = explode('@', $user);
if ($match_uid_at_domain && ($id = $this->accounts->name2id($account_lid, 'account_lid')) && !in_array($id, $account_id))
{
$account_id[] = $id;
}
foreach($this->db->select(self::TABLE, 'account_id', array(
'mail_type' => self::TYPE_ALIAS,
'mail_value' => $user,
), __LINE__, __FILE__, false, '', self::APP) as $row)
{
if (!in_array($row['account_id'], $account_id)) $account_id[] = $row['account_id'];
}
//error_log(__METHOD__."('$user') account_id=".array2string($account_id));
}
if ($account_id)
{
if (!is_array($account_id))
{
$userData['mailLocalAddress'] = $this->accounts->id2name($account_id, 'account_email');
}
$enabled = $forwardOnly = array();
foreach($this->db->select(self::TABLE, '*', array(
'account_id' => $account_id,
), __LINE__, __FILE__, false, 'ORDER BY mail_type,mail_value', self::APP) as $row)
{
switch($row['mail_type'])
{
case self::TYPE_ENABLED:
$userData['accountStatus'] = $row['mail_value'];
$enabled[$row['account_id']] = $row['mail_value'] == self::MAIL_ENABLED;
break;
case self::TYPE_DELIVERY:
$userData['deliveryMode'] = !strcasecmp($row['mail_value'], self::FORWARD_ONLY) ? emailadmin_smtp::FORWARD_ONLY : '';
$forwardOnly[$row['account_id']] = !strcasecmp($row['mail_value'], self::FORWARD_ONLY);
break;
case self::TYPE_QUOTA:
$userData['quotaLimit'] = $row['mail_value'];
break;
case self::TYPE_ALIAS:
$userData['mailAlternateAddress'][] = $row['mail_value'];
break;
case self::TYPE_FORWARD:
$userData['mailForwardingAddress'][] = $row['mail_value'];
if ($row['account_id'] < 0 || $enabled[$row['account_id']])
{
$userData['forward'][] = $row['mail_value'];
}
break;
case self::TYPE_MAILBOX:
$userData['mailMessageStore'] = $row['mail_value'];
//error_log(__METHOD__."('$user') row=".array2string($row).', enabled[$row[account_id]]='.array2string($enabled[$row['account_id']]).', forwardOnly[$row[account_id]]='.array2string($forwardOnly[$row['account_id']]));
if ($row['account_id'] > 0 && $enabled[$row['account_id']] && !$forwardOnly[$row['account_id']])
{
$userData['uid'][] = $this->accounts->id2name($row['account_id'], 'account_lid');
$userData['mailbox'][] = $row['mail_value'];
}
break;
}
}
// if query by email-address (not a regular call from fmail)
if (is_array($account_id))
{
// add group-members for groups as forward (that way we dont need to store&update them)
foreach($account_id as $id)
{
if ($id < 0 && ($members = $this->accounts->members($id, true)))
{
foreach($members as $member)
{
if (($email = $this->accounts->id2name($member, 'account_email')) && !in_array($email, $userData['forward']))
{
$userData['forward'][] = $email;
}
}
}
}
}
}
if ($this->debug) error_log(__METHOD__."('$user') returning ".array2string($userData));
return $userData;
}
/**
* Set the data of a given user
*
* @param int $_uidnumber numerical user-id
* @param array $_mailAlternateAddress
* @param array $_mailForwardingAddress
* @param string $_deliveryMode
* @param string $_accountStatus
* @param string $_mailLocalAddress
* @param int $_quota in MB
* @param boolean $_forwarding_only=false true: store only forwarding info, used internally by saveSMTPForwarding
* @param string $_setMailbox=null used only for account migration
* @return boolean true on success, false on error writing to ldap
*/
function setUserData($_uidnumber, array $_mailAlternateAddress, array $_mailForwardingAddress, $_deliveryMode,
$_accountStatus, $_mailLocalAddress, $_quota, $_forwarding_only=false, $_setMailbox=null)
{
if ($this->debug) error_log(__METHOD__."($_uidnumber, ".array2string($_mailAlternateAddress).', '.array2string($_mailForwardingAddress).", '$_deliveryMode', '$_accountStatus', '$_mailLocalAddress', $_quota, forwarding_only=".array2string($_forwarding_only).') '.function_backtrace());
if (!$_forwarding_only && $this->accounts->id2name($_uidnumber, 'account_email') !== $_mailLocalAddress)
{
$account = $this->accounts->read($_uidnumber);
$account['account_email'] = $_mailLocalAddress;
$this->accounts->save($account);
}
$flags = array(
self::TYPE_DELIVERY => $_deliveryMode,
self::TYPE_ENABLED => $_accountStatus,
self::TYPE_QUOTA => $_quota,
);
$where = array('account_id' => $_uidnumber);
if ($_forwarding_only) $where['mail_type'] = array(self::TYPE_FORWARD, self::TYPE_DELIVERY);
// find all invalid values: either delete or update them
$delete_ids = array();
foreach($this->db->select(self::TABLE, '*', $where, __LINE__, __FILE__, false, '', self::APP) as $row)
{
switch($row['mail_type'])
{
case self::TYPE_ALIAS:
$new_addresses =& $_mailAlternateAddress;
// fall-throught
case self::TYPE_FORWARD:
if ($row['mail_type'] == self::TYPE_FORWARD) $new_addresses =& $_mailForwardingAddress;
if (($key = array_search($row['mail_value'], $new_addresses)) === false)
{
$delete_ids[] = $row['mail_id'];
}
else
{
unset($new_addresses[$key]); // no need to store
}
break;
case self::TYPE_MAILBOX:
$mailbox = $row['mail_value'];
break;
case self::TYPE_QUOTA:
case self::TYPE_DELIVERY:
case self::TYPE_ENABLED:
//error_log(__METHOD__.": ".__LINE__." row=".array2string($row).", flags['$row[mail_type]']=".array2string($flags[$row['mail_type']]));
if ($row['mail_value'] != $flags[$row['mail_type']])
{
if ($flags[$row['mail_type']])
{
$this->db->update(self::TABLE, array(
'mail_value' => $flags[$row['mail_type']],
), array(
'mail_id' => $row['mail_id'],
), __LINE__, __FILE__, self::APP);
}
else
{
$delete_ids[] = $row['mail_id'];
}
}
unset($flags[$row['mail_type']]);
break;
}
}
if ($delete_ids)
{
$this->db->delete(self::TABLE, array('mail_id' => $delete_ids), __LINE__, __FILE__, self::APP);
}
// set mailbox address, if explicitly requested by $_setMailbox parameter
if ($_setMailbox)
{
$flags[self::TYPE_MAILBOX] = $_setMailbox;
}
// set mailbox address, if not yet set
elseif (!$_forwarding_only && empty($mailbox))
{
$flags[self::TYPE_MAILBOX] = $this->mailbox_addr(array(
'account_id' => $_uidnumber,
'account_lid' => $this->accounts->id2name($_uidnumber, 'account_lid'),
'account_email' => $_mailLocalAddress,
));
}
// store all new values
foreach($flags+array(
self::TYPE_ALIAS => $_mailAlternateAddress,
self::TYPE_FORWARD => $_mailForwardingAddress,
) as $type => $values)
{
if ($values && (!$_forwarding_only || in_array($type, array(self::TYPE_FORWARD, self::TYPE_DELIVERY))))
{
foreach((array)$values as $value)
{
$this->db->insert(self::TABLE, array(
'account_id' => $_uidnumber,
'mail_type' => $type,
'mail_value' => $value,
), false, __LINE__, __FILE__, self::APP);
}
}
}
return true;
}
}

View 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;
}

View File

@ -46,7 +46,6 @@
'ea_organisation_name' => 'organisationName',
'ea_user_defined_identities' => 'userDefinedIdentities',
'ea_user_defined_accounts' => 'userDefinedAccounts',
'ea_imapoldcclient' => 'imapoldcclient',
'ea_order' => 'ea_order',
'ea_active' => 'ea_active',
'ea_group' => 'ea_group',
@ -103,6 +102,10 @@
{
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;
}
return $vals;
@ -176,7 +179,9 @@
$globalDefaults = $this->getProfile($data['ea_profile_id'], $this->db_cols);
$anyValues++;
} else {
error_log("emailadmin::emailadmin_so->getUserProfile, no Default configured");
error_log(__METHOD__.__LINE__.", no Default configured");
error_log('# Instance='.$GLOBALS['egw_info']['user']['domain'].', User='.$GLOBALS['egw_info']['user']['account_lid'].', URL='.
($_SERVER['HTTPS']?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$globalDefaults = array();
}
// retrieve application settings if set
@ -229,7 +234,7 @@
} else {
if (array_key_exists($key, $toMerge) && !empty($toMerge[$key]))
{
#error_log($key.'->'.$toMerge[$key]);
//error_log($key.'->'.$toMerge[$key]);
switch ($key) {
case 'imapLoginType':
// if the logintype is admin, it will be added to the default value
@ -248,7 +253,10 @@
case 'imapEnableCyrusAdmin':
case 'imapAdminUsername':
case 'imapAdminPW':
if (strlen($toMerge['imapServer'])>0) $mergeInTo[$key]=$toMerge[$key];
if (strlen($toMerge['imapServer'])>0 && $toMerge[$key]!='no')
{
$mergeInTo[$key]=$toMerge[$key];
}
break;
case 'smtpPort':
case 'smtpType':
@ -269,7 +277,9 @@
if (strlen($testVal)>10 || $testVal != '<br>' || $testVal != '<br />') $mergeInTo[$key]=$toMerge[$key];
break;
default:
$mergeInTo[$key]=$toMerge[$key];
//you may allow stuff, but you should not be able to remove an already granted right
//error_log($key.'->'.$toMerge[$key].' '.function_backtrace());
if ($toMerge[$key]!='no') $mergeInTo[$key]=$toMerge[$key];
}
}
}
@ -303,6 +313,7 @@
{
$where['ea_user'] = (int) $_accountID;
}
//error_log(__METHOD__.__LINE__.' Where Condition:'.array2string($where).' Backtrace:'.function_backtrace());
$this->db->select($this->table,'*',$where, __LINE__,__FILE__,false,(int) $_profileID ? '' : 'ORDER BY ea_order');
$serverList = false;
@ -458,17 +469,5 @@
}
return true;
}
function setOrder($_order)
{
foreach($_order as $order => $profileID)
{
$this->db->update($this->table,array(
'ea_order' => $order,
),array(
'ea_profile_id' => $profileID,
),__LINE__, __FILE__);
}
}
}
?>

View File

@ -0,0 +1,281 @@
<?php
/**
* EMailAdmin - history
*
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package addressbook
* @copyright (c) 2007 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* EMailAdmin - tracking object
*/
class emailadmin_tracking extends bo_tracking
{
/**
* Application we are tracking (required!)
*
* @var string
*/
var $app = 'emailadmin';
/**
* Name of the id-field, used as id in the history log (required!)
*
* @var string
*/
var $id_field = 'ea_profile_id';
/**
* Name of the field with the creator id, if the creator of an entry should be notified
*
* @var string
*/
//var $creator_field = '';
/**
* Name of the field with the id(s) of assinged users, if they should be notified
*
* @var string
*/
//var $assigned_field = '';
/**
* Translate field-name to 2-char history status
*
* @var array
*/
var $field2history = array(
'ea_smtp_server' => 'ea_smtp_server',
'ea_smtp_type' => 'ea_smtp_type',
'ea_smtp_port' => 'ea_smtp_port',
'ea_smtp_auth' => 'ea_smtp_auth',
'ea_editforwardingaddress' => 'ea_editforwardingaddress',
'ea_smtp_ldap_server' => 'ea_smtp_ldap_server',
'ea_smtp_ldap_basedn' => 'ea_smtp_ldap_basedn',
'ea_smtp_ldap_admindn' => 'ea_smtp_ldap_admindn',
'ea_smtp_ldap_adminpw' => 'ea_smtp_ldap_adminpw',
'ea_smtp_ldap_use_default' => 'ea_smtp_ldap_use_default',
'ea_imap_server' => 'ea_imap_server',
'ea_imap_type' => 'ea_imap_type',
'ea_imap_port' => 'ea_imap_port',
'ea_imap_login_type' => 'ea_imap_login_type',
'ea_imap_tsl_auth' => 'ea_imap_tsl_auth',
'ea_imap_tsl_encryption' => 'ea_imap_tsl_encryption',
'ea_imap_enable_cyrus' => 'ea_imap_enable_cyrus',
'ea_imap_admin_user' => 'ea_imap_admin_user',
'ea_imap_admin_pw' => 'ea_imap_admin_pw',
'ea_imap_enable_sieve' => 'ea_imap_enable_sieve',
'ea_imap_sieve_server' => 'ea_imap_sieve_server',
'ea_imap_sieve_port' => 'ea_imap_sieve_port',
'ea_description' => 'ea_description',
'ea_default_domain' => 'ea_default_domain',
'ea_organisation_name' => 'ea_organisation_name',
'ea_user_defined_identities' => 'ea_user_defined_identities',
'ea_user_defined_accounts' => 'ea_user_defined_accounts',
'ea_order' => 'ea_order',
'ea_appname' => 'ea_appname',
'ea_group' => 'ea_group',
'ea_user' => 'ea_user',
'ea_active' => 'ea_active',
'ea_smtp_auth_username' => 'ea_smtp_auth_username',
'ea_smtp_auth_password' => 'ea_smtp_auth_password',
'ea_user_defined_signatures' => 'ea_user_defined_signatures',
'ea_default_signature' => 'ea_default_signature',
'ea_imap_auth_username' => 'ea_imap_auth_username',
'ea_imap_auth_password' => 'ea_imap_auth_password',
'ea_stationery_active_templates' => 'ea_stationery_active_templates'
);
/**
* Translate field name to label
*/
public $field2label = array(
'ea_smtp_server' => 'SMTP server',
'ea_smtp_type' => 'SMTP type',
'ea_smtp_port' => 'SMTP port',
'ea_smtp_auth' => 'SMTP authentification',
'ea_editforwardingaddress' => 'edit forwarding address',
'ea_smtp_ldap_server' => 'SMTP Ldap Server',
'ea_smtp_ldap_basedn' => '',
'ea_smtp_ldap_admindn' => '',
'ea_smtp_ldap_adminpw' => 'SMTP Ldap admin password',
'ea_smtp_ldap_use_default' => 'SMTP Ldap use default',
'ea_imap_server' => 'IMAP server',
'ea_imap_type' => 'IMAP type',
'ea_imap_port' => 'IMAP port',
'ea_imap_login_type' => 'IMAP login type',
'ea_imap_tsl_auth' => 'IMAP Tsl authentification',
'ea_imap_tsl_encryption' => 'IMAP Tsl encryption',
'ea_imap_enable_cyrus' => 'IMAP enable Cyrus',
'ea_imap_admin_user' => 'IMAP admin user',
'ea_imap_admin_pw' => 'IMAP admin password',
'ea_imap_enable_sieve' => 'IMAP enable Sieve',
'ea_imap_sieve_server' => 'IMAP Sieve server',
'ea_imap_sieve_port' => 'IMAP Sieve port',
'ea_description' => 'Description',
'ea_default_domain' => 'Default domain',
'ea_organisation_name' => 'Organisation',
'ea_user_defined_identities' => 'User defined identities',
'ea_user_defined_accounts' => 'User defined accounts',
'ea_order' => 'Order',
'ea_appname' => 'Application',
'ea_group' => 'Group',
'ea_user' => 'User',
'ea_active' => 'Active',
'ea_smtp_auth_username' => 'SMTP authentification user',
'ea_smtp_auth_password' => 'SMTP authentification password',
'ea_user_defined_signatures' => 'User defined signatures',
'ea_default_signature' => 'Default signature',
'ea_imap_auth_username' => 'IMAP authentification user',
'ea_imap_auth_password' => 'IMAP authentification password',
'ea_stationery_active_templates' => ''
);
/**
* Fields that contain passwords
*/
static $passwordFields = array(
'ea_smtp_auth_password',
'ea_imap_auth_password',
'ea_smtp_ldap_adminpw',
'ea_imap_admin_pw',
);
/**
* Should the user (passed to the track method or current user if not passed) be used as sender or get_config('sender')
*
* @var boolean
*/
var $prefer_user_as_sender = false;
/**
* Instance of the emailadmin_bo class calling us
*
* @access private
* @var emailadmin_bo
*/
var $emailadmin_bo;
/**
* Constructor
*
* @param emailadmin_bo &$emailadmin_bo
* @return tracker_tracking
*/
function __construct(&$emailadmin_bo)
{
parent::__construct(); // calling the constructor of the extended class
$this->emailadmin_bo =& $emailadmin_bo;
}
/**
* Tracks the changes in one entry $data, by comparing it with the last version in $old
*
* @param array $data current entry
* @param array $old=null old/last state of the entry or null for a new entry
* @param int $user=null user who made the changes, default to current user
* @param boolean $deleted=null can be set to true to let the tracking know the item got deleted or undeleted
* @param array $changed_fields=null changed fields from ealier call to $this->changed_fields($data,$old), to not compute it again
* @param boolean $skip_notification=false do NOT send any notification
* @return int|boolean false on error, integer number of changes logged or true for new entries ($old == null)
*/
public function track(array $data,array $old=null,$user=null,$deleted=null,array $changed_fields=null,$skip_notification=false)
{
foreach (self::$passwordFields as $k => $v)
{
if (is_array($data))
{
foreach($data as $key => &$dd)
{
if ($key == $v && !empty($dd))
{
$dd = $this->maskstring($dd);
}
}
}
if (is_array($old))
{
foreach($old as $ko => &$do)
{
//error_log(__METHOD__.__LINE__.$ko);
if ($ko == $v && !empty($do))
{
$do = $this->maskstring($do);
}
}
}
}
//error_log(__METHOD__.__LINE__.array2string($data));
//error_log(__METHOD__.__LINE__.array2string($old));
return parent::track($data,$old,$user,$deleted,$changed_fields,$skip_notifications);
}
private function maskstring($data)
{
$length =strlen($data);
$first = substr($data,0,1);
$last = substr($data,-1);
if ($length<3)
{
$data = str_repeat('*',$length);
}
else
{
$data = $first.str_repeat('*',($length-2>0?$length-2:1)).$last;
}
return $data;
}
/**
* Get a notification-config value
*
* @param string $what
* - 'copy' array of email addresses notifications should be copied too, can depend on $data
* - 'lang' string lang code for copy mail
* - 'sender' string send email address
* @param array $data current entry
* @param array $old=null old/last state of the entry or null for a new entry
* @return mixed
*/
function get_config($name,$data,$old=null)
{
return null;
}
/**
* Get the modified / new message (1. line of mail body) for a given entry, can be reimplemented
*
* @param array $data
* @param array $old
* @return string
*/
function get_message($data,$old)
{
return null;
}
/**
* Get the subject of the notification
*
* @param array $data
* @param array $old
* @return string
*/
function get_subject($data,$old)
{
return null;
}
/**
* Get the details of an entry
*
* @param array $data
*
* @return array of details as array with values for keys 'label','value','type'
*/
function get_details($data)
{
return null;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,463 @@
<?php
/***************************************************************************\
* EGroupWare - EMailAdmin IMAP via Plesk *
* http://www.egroupware.org *
* Written and (c) 2006 by RalfBecker-AT-outdoor-training.de *
* ------------------------------------------------------------------------- *
* emailadmin plugin for plesk: *
* - tested with Plesk7.5 under Linux, but should work with other plesk *
* versions and Windows too as it uses plesks cli (command line interface) *
* - this plugin ONLY works if you have root access to the webserver !!! *
* - you need to have mail activated for the domain in plesk first *
* - you need to configure the path to plesk's mail.sh or mail.exe cli by *
* editing this file (search for psa_mail_script) for now *
* - to allow the webserver to use the mail cli under Linux you need to *
* install the sudo package and add the following line to your sudoers *
* file using the visudo command as root: *
* wwwrun ALL = NOPASSWD: /usr/local/psa/bin/mail.sh *
* Replace wwwrun with the user the webserver is running as and, if *
* necessary adapt the path to mail.sh. *
* PLEASE NOTE: This allows all webserver users to run the mail.sh script *
* and to change the mail configuration of ALL domains !!! *
* => as with the "LDAP, Postfix & Cyrus" plugin the plesk one creates mail *
* users and manages passwords, aliases, forwards and quota from within *
* eGroupWare - no need to additionally visit the plesk interface anymore *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; version 2 of the License. *
\***************************************************************************/
/* $Id$ */
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultimap.inc.php");
class pleskimap extends defaultimap
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'Plesk (Courier)';
/**
* @var string $psa_mail_script full path to Plesk's mail.sh (Linux including sudo!) or mail.exe (Windows) interface
*/
var $psa_mail_script = '/usr/bin/sudo /usr/local/psa/bin/mail.sh'; // 'C:/psa/bin/mail.exe'
/**
* @var boolean $allways_create_mailbox true = allways create a mailbox on user creation,
* false = only if a local email (no forward) is given. To use felamimail you need a mailbox!
*/
var $allways_create_mailbox = true;
/**
* @var array $create_folders=array('Send','Trash') folders to automatic create and subscribe on account creation
*/
var $create_folders = array('Sent','Trash');
/**
* @var string/boolean $error string with last error-message or false
*/
var $error = false;
/**
* Create a full mailbox or just forward, depending on the given email address
* If email matches the default domain, we create a full mailbox, otherwise we create a forward
*
* @param array $hookValues
* @param string $action='create'
* @return boolean true on success, false otherwise
*/
function addAccount($hookValues,$action='create')
{
//echo "<p>pleskimap::addAccount(".print_r($hookValues,true).")</p>\n";
$defaultDomain = $this->profileData['defaultDomain'] ? $this->profileData['defaultDomain'] :
$GLOBALS['egw_info']['server']['mail_suffix'];
$localEmail = $hookValues['account_lid'].'@'.$defaultDomain;
$aliases = $forwards = array();
// is the given email a local address from our default domain?
if (substr($hookValues['account_email'],-1-strlen($defaultDomain)) != '@'.$defaultDomain)
{
$forwards[] = $hookValues['account_email'];
}
elseif ($hookValues['account_email'] != $localEmail)
{
$aliases[] = $hookValues['account_email'];
}
// add a default alias with Firstname.Lastname
if (!in_array($alias=$hookValues['account_firstname'].'.'.$hookValues['account_lastname'],$aliases) &&
$this->is_email($alias))
{
$aliases[] = $alias;
}
$info = $this->plesk_mail($action,$hookValues['account_lid'],$hookValues['account_passwd'],
$action != 'create' && !$aliases ? null : $aliases,$forwards,$this->allways_create_mailbox);
if (!$info['SUCCESS']) return false;
if ($forwards && !$this->allways_create_mailbox) return true; // no mailbox created, only a forward
// create Sent & Trash mailboxes and subscribe them
if(($mbox = @imap_open ($this->getMailboxString(),$localEmail,$hookValues['account_passwd'])))
{
$list = imap_getmailboxes($mbox, $this->getMailboxString(),'INBOX');
$delimiter = isset($list[0]->delimiter) ? $list[0]->delimiter : '.';
imap_subscribe($mbox,$this->getMailboxString('INBOX'));
foreach($this->create_folders as $folder)
{
$mailBoxName = 'INBOX'.$delimiter.$folder;
if(imap_createmailbox($mbox,imap_utf7_encode('{'.$this->profileData['imapServer'].'}'.$mailBoxName)))
{
imap_subscribe($mbox,$this->getMailboxString($mailBoxName));
}
}
imap_close($mbox);
}
return true;
}
function deleteAccount($hookValues)
{
//echo "<p>pleskimap::deleteAccount(".print_r($hookValues,true).")</p>\n";
return $this->plesk_mail('remove',$hookValues['account_lid']);
}
function updateAccount($hookValues)
{
//echo "<p>pleskimap::updateAccount(".print_r($hookValues,true).")</p>\n";
if($hookValues['account_lid'] != $hookValues['old_loginid'])
{
$this->error = lang("Plesk can't rename users --> request ignored");
return false;
}
return $this->addAccount($hookValues,'update');
}
/**
* Read data from the mail account
*
* @param string/int $accountID
* @return array/boolean with keys mailLocalAddress, mailAlternateAddress, accountStatus, mailRoutingAddress, ... or false if not found
*/
function getUserData($accountID)
{
//echo "<p>pleskimap::getUserData('$accountID')</p>\n";
if (!($info = $this->plesk_mail('info',$accountID))) return false;
//_debug_array($info);
$data = array(
'mailLocalAddress' => $info['Mailname'].'@'.$info['Domain'],
'mailAlternateAddress' => $info['Alias(es)'] ? explode(' ',$info['Alias(es)']) : array(),
'accountStatus' => $info['Mailbox'] == 'true' || $info['Redirect'] == 'true' ? 'active' : 'disabled',
'mailRoutingAddress' => $info['Redirect address'] ? explode(' ',$info['Redirect address']) : false,
'deliveryMode' => $info['Redirect'] == 'true' && $info['Mailbox'] == 'false' ? 'forwardOnly' : '',
// 'qmailDotMode' => false,
// 'deliveryProgramPath' => false,
'quotaLimit' => $info['Mbox quota'] == 'Unlimited' ? '' : $info['Mbox quota']/1024.0,
);
//_debug_array($data);
return $data;
}
/**
* Save mail account data
*
* @param string/int $accountID
* @param array $accountData with keys mailLocalAddress, mailAlternateAddress, accountStatus, mailRoutingAddress, ...
* @return boolean true on success, false otherwise
*/
function saveUserData($accountID, $accountData)
{
//echo "<p>pleskimap::saveUserData('$accountID',".print_r($accountData,true).")</p>\n";
// not used: $accountData['accountStatus']=='active', $accountData['qmailDotMode'], $accountData['deliveryProgramPath']
$info = $this->plesk_mail('update',$accountID,null,
$accountData['mailAlternateAddress'] ? $accountData['mailAlternateAddress'] : array(),
$accountData['mailRoutingAddress'] ? $accountData['mailRoutingAddress'] : array(),
empty($accountData['deliveryMode']),
1024*(float)$accountData['quotaLimit'],$accountData['accountStatus']=='active');
if (!$info['SUCCSESS'])
{
if ($info) $this->error = implode(', ',$info);
return false;
}
return true;
}
/**
* call plesk's mail command line interface
*
* Usage: mail.sh command <mail_name> [options]
*
* Available commands:
* --create or -c <mail>@<domain> creates mail account
* --update or -u <mail>@<domain> updates mail account parameters
* --remove or -r <mail>@<domain> removes mail account
* --info or -i <mail>@<domain> retrieves mail account information
* --on <domain> enables mail service for domain
* --off <domain> disables mail service for domain
* --help or -h displays this help page
*
* Available options:
* -cp_access <true|false> enables control panel access (default:
* true)
* -mailbox <true|false> creates/removes mailbox
* -passwd <passwd> sets mailbox password [see the note
* below for details]
* -boxpass <passwd> obsolete alias for option "passwd"
* (this option may be removed from
* future releases)
* -passwd_type <plain|crypt> specifies the type of mailbox
* password, ignored if no password
* specified [see the note below for
* details]
* -mbox_quota <KB> limits the mailbox quota to the
* desired amount
* -boxquota <KB> obsolete alias for option "mbox_quota"
* (this option may be removed from
* future releases)
* -aliases <add|del>:<name1[,name2]> adds or deletes mail
* alias(es) to/from mailname
* -mgroups <add|del>:<list1[,list2]> adds or removes mail name
* to/from mail group
* -redirect <true|false> switches mail redirect on/off
* -rediraddr <addr> sets redirect to address (required if
* redirect is enabled)
* -group <true|false> switches mail group on/off
* -groupmem <add|del>:<addr1[,addr2]> adds/removes address(-es)
* to/from mail group
* -repo <add|del>:<file1[,file2]> adds/removes file to/from
* attachments repository
* [deprecated, use
* autoresponder.sh]
* -autorsp <true|false> switches all autoresponders on/off
* [deprecated, use autoresponder.sh]
* -autoname <name> autoresponder name (required for all
* autoresponder options) [deprecated,
* use autoresponder.sh]
* -autostatus <true|false> switches on/off autoresponder with
* specified name (true) [deprecated,
* use autoresponder.sh]
* -autoreq <subj|body>:<string> or <always> defines the condition
* for the autoresponder
* to be activated
* whether the
* specified pattern is
* encountered in the
* subject or body, or
* to respond always
* [deprecated, use
* autoresponder.sh]
* -autosubj <original|string> the subject line to be set up into
* autoresponder ("Re: <incoming
* subject>") or a custom string
* [deprecated, use autoresponder.sh]
* -auto_replyto <string> return address that will be set up
* into the autoresponder's messages
* [deprecated, use autoresponder.sh]
* -autotext <string> autoresponder message text
* [deprecated, use autoresponder.sh]
* -autoatch <add|del>:<file1[,file2]> adds/removes autoresponder
* attachment files
* [deprecated, use
* autoresponder.sh]
* -autofrq <number> defines the maximum number of
* responses to a unique e-mail address
* per day [deprecated, use
* autoresponder.sh]
* -autostor <number> defines the number of unique addresses
* to be stored for autoresponder
* [deprecated, use autoresponder.sh]
* -autored <addr> defines the e-mail address to forward
* all incoming mail to [deprecated, use
* autoresponder.sh]
* -multiple-sessions <true|false> allow multiple sessions
*
* Note:
* For security reasons, you can transfer not encrypted passwords via environment
* variable PSA_PASSWORD, by specifying the empty value in the command line for
* the passwd arguments (like " -passwd ''") and setting the password value in
* the PSA_PASSWORD variable.
* Similarly, you can transfer the crypted password via the environment variable
* PSA_CRYPTED_PASSWORD, by specifying the empty value in the command line for
* the passwd arguments (like " -passwd ''") and by setting the password value in
* the PSA_CRYPTED_PASSWORD variable.
*
* Version: psa v7.5.0_build75041208.07 os_SuSE 9.1
*
* mail.sh --info account@domain.com
* Mailname: account
* Domain: domain.com
* Alias(es): Firstname.Lastname
* CP Access: true
* Mailbox: true
* Password: geheim
* Password type: plain
* Mbox quota: Unlimited
* Redirect: false
* Mailgroup: false
* File repository: Empty
* Autoresponder: false
* Antivirus mail
* checking: Disabled
*
* SUCCESS: Gathering information for 'account@domain.com' complete
*
* mail.sh --info bogus@domain.com
* An error occured during getting mailname information: Mailname 'bogus@domain.com' doesn't exists
*
* @param string $action 'info', 'create', 'update' or 'remove'
* @param string/int $account account_lid or numerical account_id
* @param string $password=null string with password or null to not change
* @param array $aliases=null array with aliases or null to not change the aliases
* @param array $forwards=null array of email address to forward or null to not change
* @param boolean $keepLocalCopy=null if forwarding keep a local copy or not, null = dont change
* @param int $quota_kb=null mailbox quota in kb
* @return boolean/array array with returned values or false otherwise, error-message in $this->error
*/
function plesk_mail($action,$account,$password=null,$aliases=null,$forwards=null,$keepLocalCopy=null,$quota_kb=null)
{
//echo "<p>smtpplesk::plesk_mail('$action','$account','$password',".print_r($aliases,true).",".print_r($forwards,true).",".(is_null($keepLocalCopy)?'':(int)$keepLocalCopy).",$quota_kb)</p>\n";
$this->error = false;
if (is_numeric($account))
{
$account_lid = $GLOBALS['egw']->accounts->id2name($account);
}
elseif ($GLOBALS['egw']->accounts->name2id($account))
{
$account_lid = $account;
}
if (!$account_lid)
{
$this->error = lang("Account '%1' not found !!!",$account);
return false;
}
if (!in_array($action,array('info','create','update','remove')))
{
$this->error = lang("Unsupported action '%1' !!!",$action);
return false;
}
$defaultDomain = $this->profileData['defaultDomain'] ? $this->profileData['defaultDomain'] :
$GLOBALS['egw_info']['server']['mail_suffix'];
if ($action == 'update' && !($info = $this->plesk_mail('info',$account)))
{
$action = 'create'; // mail-account does not yet exist --> create it
}
$localEmail = $account_lid.'@'.$defaultDomain;
$script = $this->psa_mail_script . ' --'.$action . ' ' . $localEmail;
if ($action != 'info')
{
// invalidate our cache
$GLOBALS['egw']->session->appsession('plesk-email-'.$account_lid,'emailadmin',false);
// we dont set passwords shorten then 5 chars, as it only give an error in plesk
if (!is_null($password) && $password)
{
if (strlen($password) < 5 || strpos($password,$account_lid) !== false)
{
$this->error = lang('Plesk requires passwords to have at least 5 characters and not contain the account-name --> password NOT set!!!');
}
else
{
$script .= ' -passwd \''.str_replace('\'','\\\'',$password).'\' -passwd_type plain';
}
}
if ($action == 'create' || !is_null($forwards) || !is_null($keepLocalCopy))
{
$script .= ' -mailbox '.(!$forwards || $keepLocalCopy ? 'true' : 'false');
}
// plesk allows only one forwarding address, we ignore everything but the first
if (!is_null($forwards) && (!$forwards || $this->is_email($forwards[0])))
{
$script .= ' -redirect '.(!$forwards ? 'false' : 'true -rediraddr '.$forwards[0]);
}
if ($action == 'update')
{
if (!is_null($aliases))
{
$existing_aliases = explode(' ',$info['Alias(es)']); // without domain!
$delete_aliases = array();
foreach($existing_aliases as $alias)
{
if ($alias && !in_array($alias,$aliases) && !in_array($alias.'@'.$defaultDomain,$aliases))
{
$delete_aliases[] = $alias;
}
}
if ($delete_aliases)
{
$script .= ' -aliases del:'.implode(',',$delete_aliases);
}
foreach($aliases as $n => $alias)
{
if (in_array($alias,$existing_aliases) || in_array(str_replace('@'.$defaultDomain,'',$alias),$existing_aliases))
{
unset($aliases[$n]); // no change
}
}
}
}
if (!is_null($aliases) && count($aliases))
{
foreach($aliases as $alias)
{
if (!$this->is_email($alias)) return false; // security precausion
}
$script .= ' -aliases add:'.str_replace('@'.$defaultDomain,'',implode(',',$aliases));
}
if (!is_null($quota_kb) && (int)$quota_kb)
{
$script .= ' -mbox_quota '.(int)$quota_kb;
}
}
//echo "<p>$script</p>\n";
if (!($fp = popen($script.' 2>&1','r')))
{
$this->error = lang("Plesk mail script '%1' not found !!!",$this->psa_mail_script);
return false;
}
$values = array();
while(!feof($fp))
{
$line = trim(fgets($fp));
list($name,$value) = preg_split('/: */',$line,2);
if (!is_null($value) && strpos($name,'An error occured') === false && $name)
{
$values[$name] = $value;
}
elseif ($line)
{
$values[] = $line;
}
}
pclose($fp);
if (!$values['SUCCESS'])
{
$this->error = implode(', ',$values);
return false;
}
return $values;
}
/**
* checks for valid email addresse (local mail address dont need a domain!)
*
* Important as we run shell scripts with the address and one could try to run arbitrary commands this way!!!
* We only allow letters a-z, numbers and the following other chars: _ . - @
*
* @return boolean
*/
function is_email($email)
{
return preg_match('/^[@a-z0-9_.-]+$/i',$email);
}
}

View File

@ -0,0 +1,64 @@
<?php
/**
* EGroupware EMailAdmin: Postfix with dbmailUser 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>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.postfixdbmailuser.inc.php 42612 2013-05-30 16:46:13Z ralfbecker $
*/
/**
* Postfix with dbmailUser schema
*/
class postfixdbmailuser extends emailadmin_smtp_ldap
//class emailadmin_smtp_dbmailuser extends emailadmin_smtp_ldap
{
/**
* Capabilities of this class (pipe-separated): default, forward
*/
const CAPABILITIES = 'default|forward';
/**
* Name of schema, has to be the correct case!
*/
const SCHEMA = 'dbmailUser';
/**
* Attribute to enable mail for an account, OR false if existence of ALIAS_ATTR is enough for mail delivery
*/
const MAIL_ENABLE_ATTR = 'accountstatus';
/**
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
*/
const MAIL_ENABLED = 'active';
/**
* Attribute for aliases OR false to use mail
*/
const ALIAS_ATTR = 'mailalternateaddress';
/**
* 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 = 'mailforwardingaddress';
/**
* Attribute to only forward mail, OR false if not available
*/
const FORWARD_ONLY_ATTR = 'deliverymode';
/**
* Attribute for mailbox, to which mail gets delivered OR false if not supported
*/
//const MAILBOX_ATTR = 'deliveryprogrampath';
//const MAILBOX_ATTR = 'dbmailuid';
const MAILBOX_ATTR = false;
}

View File

@ -0,0 +1,16 @@
<?php
/**
* eGroupWare EmailAdmin - old Postfix with inetOrgPerson schema
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package emailadmin
* @link http://www.egroupware.org
* @version $Id: class.postfixinetorgperson.inc.php 29583 2010-03-21 16:58:11Z ralfbecker $
*/
/**
* @deprecated use emailadmin_smtp_ldap class
*/
class postfixinetorgperson extends emailadmin_smtp_ldap
{
}

View File

@ -0,0 +1,67 @@
<?php
/**
* EGroupware EMailAdmin: Postfix with old qmailUser 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>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Postfix with old qmailUser schema
*/
class postfixldap extends emailadmin_smtp_ldap
//class emailadmin_smtp_qmailuser 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 = 'qmailUser';
/**
* Attribute to enable mail for an account, OR false if existence of ALIAS_ATTR is enough for mail delivery
*/
const MAIL_ENABLE_ATTR = 'accountstatus';
/**
* Attribute value to enable mail for an account, OR false if existense of attribute is enough to enable account
*/
const MAIL_ENABLED = 'active';
/**
* Attribute for aliases OR false to use mail
*/
const ALIAS_ATTR = 'mailalternateaddress';
/**
* 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 = 'mailforwardingaddress';
/**
* Attribute to only forward mail, OR false if not available
*/
const FORWARD_ONLY_ATTR = 'deliverymode';
/**
* Attribute for mailbox, to which mail gets delivered OR false if not supported
*/
const MAILBOX_ATTR = 'mailmessagestore';
/**
* Attribute for quota limit of user in MB
*/
const QUOTA_ATTR = 'mailquota';
}

View File

@ -0,0 +1,103 @@
<?php
/***************************************************************************\
* EGroupWare - EMailAdmin SMTP via Plesk *
* http://www.egroupware.org *
* Written and (c) 2006 by RalfBecker-AT-outdoor-training.de *
* ------------------------------------------------------------------------- *
* emailadmin plugin for plesk: *
* - tested with Plesk7.5 under Linux, but should work with other plesk *
* versions and Windows too as it uses plesks cli (command line interface) *
* - this plugin ONLY works if you have root access to the webserver !!! *
* - configuration instructions are in the class.pleskimap.inc.php *
* => as with the "LDAP, Postfix & Cyrus" plugin the plesk one creates mail *
* users and manages passwords, aliases, forwards and quota from within *
* eGroupWare - no need to additionally visit the plesk interface anymore *
* ------------------------------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\***************************************************************************/
/* $Id$ */
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.defaultsmtp.inc.php");
include_once(EGW_SERVER_ROOT."/emailadmin/inc/class.pleskimap.inc.php");
class smtpplesk extends defaultsmtp
{
/**
* Label shown in EMailAdmin
*/
const DESCRIPTION = 'Plesk (Qmail)';
/**
* Capabilities of this class (pipe-separated): default, forward
*/
const CAPABILITIES = 'default|forward';
/**
* @var string/boolean $error string with last error-message or false
*/
var $error = false;
/**
* call plesk's mail command line interface
*
* The actual code is in the pleskimap class, to not double it.
*
* @param string $action 'info', 'create', 'update' or 'remove'
* @param string/int $account account_lid or numerical account_id
* @param string $password=null string with password or null to not change
* @param array $aliases=null array with aliases or null to not change the aliases
* @param string/boolean $forward=null email address to forward, false to not forward or null to not change
* @param boolean $keepLocalCopy=null if forwarding keep a local copy or not, null = dont change
* @param int $quota_kb=null mailbox quota in kb
* @return boolean/array array with returned values or false otherwise, error-message in $this->error
*/
function plesk_mail($action,$account,$password=null,$aliases=null,$forward=null,$keepLocalCopy=null,$quota_kb=null)
{
static $plesk;
if (!is_object($plesk))
{
$plesk = new pleskimap(null);
$this->error =& $plesk->error;
}
return $plesk->plesk_mail($action,$account,$password,$aliases,$forward,$keepLocalCopy,$quota_kb);
}
function addAccount($hookValues)
{
// account is added via pleskimap::addAccount();
}
/**
* Returns the email address of the current user
*
* @param string/int $accountName account-id or -lis (name)
* @return array of arrays with keys name, address and type={default|alternate}
*/
function getAccountEmailAddress()
{
//echo "<p>smtpplesk::getAccountEmailAddress()</p>\n";
return array(array(
'name' => $GLOBALS['egw_info']['user']['fullname'],
'address' => $GLOBALS['egw_info']['user']['email'],
'type' => 'default'
));
}
/**
* Save SMTP forwarding address
*
* @param int $accountID user-id
* @param string $forwardingAddress email to forward to
* @param string $keepLocalCopy 'yes' or something else
*/
function saveSMTPForwarding($accountID, $forwardingAddress, $keepLocalCopy)
{
//echo "<p>smtpplesk::saveSMTPForwarding('$accountID','$forwardingAddress','$keepLocalCopy')</p>\n";
return $this->plesk_mail('update',$accountID,null,null,array($forwardingAddress),$keepLocalCopy == 'yes');
}
}

View File

@ -0,0 +1,219 @@
<?php
/**
* EGroupware EMailAdmin: Edit user account
*
* @link http://www.stylite.de
* @package emailadmin
* @author Klaus Leithoff <kl@stylite.de>
* @author Lars Kneschke
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
/**
* Edit user account
*/
class uiuserdata
{
var $public_functions = array
(
'editUserData' => True,
'saveUserData' => True
);
/**
* @var Template
*/
var $t;
/**
* @var emailadmin_bo
*/
var $boemailadmin;
/**
* Constructor
*/
function __construct()
{
$this->t = new Template(EGW_APP_TPL);
$this->boemailadmin = new emailadmin_bo();
}
function display_app_header()
{
$GLOBALS['egw']->js->validate_file('.','app','emailadmin');
$GLOBALS['egw_info']['flags']['include_xajax'] = True;
$GLOBALS['egw']->common->egw_header();
echo parse_navbar();
}
function editUserData($_useCache='0')
{
$accountID = $_GET['account_id'];
$GLOBALS['account_id'] = $accountID;
$this->display_app_header();
$this->translate();
$this->t->set_file(array("editUserData" => "edituserdata.tpl"));
$this->t->set_block('editUserData','form','form');
$this->t->set_block('editUserData','link_row','link_row');
$this->t->set_var("th_bg",$GLOBALS['egw_info']["theme"]["th_bg"]);
$this->t->set_var("tr_color1",$GLOBALS['egw_info']["theme"]["row_on"]);
$this->t->set_var("tr_color2",$GLOBALS['egw_info']["theme"]["row_off"]);
$this->t->set_var("lang_email_config",lang("edit email settings"));
$this->t->set_var("lang_emailAddress",lang("email address"));
$this->t->set_var("lang_emailaccount_active",lang("email account active"));
$this->t->set_var("lang_mailAlternateAddress",lang("alternate email address"));
$this->t->set_var("lang_mailRoutingAddress",lang("forward email's to"));
$this->t->set_var("lang_forward_also_to",lang("forward also to"));
$this->t->set_var("lang_button",lang("save"));
$this->t->set_var("lang_deliver_extern",lang("deliver extern"));
$this->t->set_var("lang_deliver_extern",lang("deliver extern"));
$this->t->set_var("lang_edit_email_settings",lang("edit email settings"));
$this->t->set_var("lang_ready",lang("Done"));
$this->t->set_var("link_back",$GLOBALS['egw']->link('/admin/accounts.php'));
$linkData = array
(
'menuaction' => 'emailadmin.uiuserdata.saveUserData',
'account_id' => $accountID
);
$this->t->set_var("form_action", $GLOBALS['egw']->link('/index.php',$linkData));
$this->t->set_var('url_image_add',$GLOBALS['egw']->common->image('phpgwapi','new'));
$this->t->set_var('url_image_edit',$GLOBALS['egw']->common->image('phpgwapi','edit'));
$this->t->set_var('url_image_delete',$GLOBALS['egw']->common->image('phpgwapi','delete'));
// only when we show a existing user
if($userData = $this->boemailadmin->getUserData($accountID)) {
$addresses = array();
foreach((array)$userData['mailAlternateAddress'] as $data) {
$addresses[$data] = $data;
}
$this->t->set_var('selectbox_mailAlternateAddress', html::select(
'mailAlternateAddress',
'',
$addresses,
true,
"style='width: 100%;' id='mailAlternateAddress'",
5)
);
$addresses = array();
foreach((array)$userData['mailForwardingAddress'] as $data) {
$addresses[$data] = $data;
}
$this->t->set_var('selectbox_mailRoutingAddress', html::select(
'mailForwardingAddress',
'',
$addresses,
true,
"style='width: 100%;' id='mailRoutingAddress'",
5)
);
if (isset($userData["quotaUsed"]) && $userData["quotaUsed"]>0) $this->t->set_var('lang_quotainmbyte',lang('Quota size in MByte').'<br><b><i>('.(int)$userData["quotaUsed"].' '.lang('MB used').')</i></b>');
$this->t->set_var("quotaLimit",$userData["quotaLimit"]);
$this->t->set_var("mailLocalAddress",$userData["mailLocalAddress"]);
$this->t->set_var("mailAlternateAddress",'');
$this->t->set_var("mailRoutingAddress",'');
$this->t->set_var("selected_".$userData["qmailDotMode"],'selected');
$this->t->set_var("deliveryProgramPath",$userData["deliveryProgramPath"]);
$this->t->set_var("uid",rawurlencode($_accountData["dn"]));
if ($userData["accountStatus"] == emailadmin_smtp::MAIL_ENABLED)
$this->t->set_var("account_checked","checked");
if ($userData["deliveryMode"] == emailadmin_smtp::FORWARD_ONLY)
$this->t->set_var("forwardOnly_checked","checked");
if ($_accountData["deliverExtern"] == emailadmin_smtp::MAIL_ENABLED)
$this->t->set_var("deliver_checked","checked");
} else {
$this->t->set_var("mailLocalAddress",'');
$this->t->set_var("mailAlternateAddress",'');
$this->t->set_var("mailRoutingAddress",'');
$this->t->set_var("options_mailAlternateAddress",lang('no alternate email address'));
$this->t->set_var("options_mailRoutingAddress",lang('no forwarding email address'));
$this->t->set_var("account_checked",'');
$this->t->set_var("forwardOnly_checked",'');
$this->t->set_var('selectbox_mailAlternateAddress', html::select(
'mailAlternateAddress',
'',
array(),
true,
"style='width: 100%;' id='mailAlternateAddress'",
5)
);
$this->t->set_var('selectbox_mailRoutingAddress', html::select(
'mailForwardingAddress',
'',
array(),
true,
"style='width: 100%;' id='mailRoutingAddress'",
5)
);
$this->t->set_var('quotaLimit','');
}
// create the menu on the left, if needed
$menuClass =& CreateObject('admin.uimenuclass');
$this->t->set_var('rows',$menuClass->createHTMLCode('edit_user'));
$this->t->pparse("out","form");
}
function saveUserData()
{
if($_POST["accountStatus"] == "on") {
$accountStatus = emailadmin_smtp::MAIL_ENABLED;
}
if($_POST["forwardOnly"] == "on") {
$deliveryMode = emailadmin_smtp::FORWARD_ONLY;
}
$formData = array (
'mailLocalAddress' => $_POST["mailLocalAddress"],
'mailAlternateAddress' => $_POST["mailAlternateAddress"],
'mailForwardingAddress' => $_POST["mailForwardingAddress"],
'quotaLimit' => $_POST["quotaLimit"],
'qmailDotMode' => $_POST["qmailDotMode"],
'deliveryProgramPath' => $_POST["deliveryProgramPath"],
'accountStatus' => $accountStatus,
'deliveryMode' => $deliveryMode
);
$this->boemailadmin->saveUserData($_GET['account_id'], $formData);
// read date fresh from ldap storage
$this->editUserData();
}
function translate()
{
$this->t->set_var('th_bg',$GLOBALS['egw_info']['theme']['th_bg']);
$this->t->set_var('lang_add',lang('add'));
$this->t->set_var('lang_done',lang('Done'));
$this->t->set_var('lang_remove',lang('remove'));
$this->t->set_var('lang_remove',lang('remove'));
$this->t->set_var('lang_advanced_options',lang('advanced options'));
$this->t->set_var('lang_qmaildotmode',lang('qmaildotmode'));
$this->t->set_var('lang_default',lang('default'));
$this->t->set_var('lang_quota_settings',lang('quota settings'));
$this->t->set_var('lang_quotainmbyte',lang('Quota size in MByte'));
$this->t->set_var('lang_inmbyte',lang('in MByte'));
$this->t->set_var('lang_0forunlimited',lang('leave empty for no quota'));
$this->t->set_var('lang_forward_only',lang('forward only'));
$this->t->set_var('lang_enter_new_address',lang('Add new email address:'));
$this->t->set_var('lang_update_current_address',lang('Update current email address:'));
}
}

83
emailadmin/js/app.js Normal file
View File

@ -0,0 +1,83 @@
/**
* EGroupware emailadmin static javascript code
*
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @package emailadmin
* @link http://www.egroupware.org
* @author Klaus Leithoff <kl@stylite.de>
* @version $Id$
*/
function disableGroupSelector()
{
//alert('Group'+document.getElementById('exec[ea_group]').value+' User'+document.getElementById('eT_accountsel_exec_ea_user').value);
if (document.getElementById('eT_accountsel_exec_ea_user').value != '')
{
if (document.getElementById('exec[ea_group]').value != '') document.getElementById('exec[ea_group]').value = '';
document.getElementById('exec[ea_group]').disabled = true;
}
else
{
document.getElementById('exec[ea_group]').disabled = false;
}
}
function addRow(_selectBoxName, _prompt) {
result = prompt(_prompt, '');
if((result == '') || (result == null)) {
return false;
}
var newOption = new Option(result, result);
selectBox = document.getElementById(_selectBoxName);
var length = selectBox.length;
selectBox.options[length] = newOption;
selectBox.selectedIndex = length;
}
function editRow(_selectBoxName, _prompt) {
selectBox = document.getElementById(_selectBoxName);
selectedItem = selectBox.selectedIndex;
if(selectedItem != null && selectedItem != -1) {
value = selectBox.options[selectedItem].text;
result = prompt(_prompt, value);
if((result == '') || (result == null)) {
return false;
}
var newOption = new Option(result, result);
selectBox.options[selectedItem] = newOption;
selectBox.selectedIndex = selectedItem;
}
}
function removeRow(_selectBoxName) {
selectBox = document.getElementById(_selectBoxName);
selectedItem = selectBox.selectedIndex;
if(selectedItem != null) {
selectBox.options[selectedItem] = null;
}
selectedItem--;
if(selectedItem >= 0) {
selectBox.selectedIndex = selectedItem;
} else if (selectBox.length > 0) {
selectBox.selectedIndex = 0;
}
}
function selectAllOptions(_selectBoxName) {
selectBox = document.getElementById(_selectBoxName);
for(var i=0;i<selectBox.length;i++) {
selectBox[i].selected=true;
}
}

View File

@ -11,8 +11,10 @@ default emailadmin bg по подразбиране
do not validate certificate emailadmin bg не проверявай сертификати
email address emailadmin bg E-Mail адрес
encrypted connection emailadmin bg криптирана връзка
entry saved emailadmin bg Записът е запазен
error connecting to imap server. %s : %s. emailadmin bg Грешка при връзка с IMAP сървъра. %s : %s.
error connecting to imap server: [%s] %s. emailadmin bg Грешка при връзка с IMAP сървъра: [%s] %s.
error saving the entry!!! emailadmin bg Грешка при запис!!!
if using ssl or tls, you must have the php openssl extension loaded. emailadmin bg Ако използвате SSL или TLS, трябва да заредите OpenSSL разширението на PHP.
imap server closed the connection. emailadmin bg IMAP сървъра прекрати връзката.
imap server closed the connection. server responded: %s emailadmin bg IMAP сървъра прекрати връзката с отговор: %s
@ -34,3 +36,4 @@ unexpected response from server to login command. emailadmin bg Неочаква
unknown imap response from the server. server responded: %s emailadmin bg Неизвестен отговор от IMAP сървъра: %s
use smtp auth emailadmin bg използвай SMTP оторизация
users can define their own emailaccounts emailadmin bg Потребителите могат да дефинират собствени E-Mail акаунти
you have received a new message on the emailadmin bg Получено е ново съобщение на

View File

@ -16,6 +16,7 @@ email address emailadmin ca Adreça de correu electrònic
enable cyrus imap server administration emailadmin ca activar administració del servidor Cyrus IMAP
enable sieve emailadmin ca Activar Sieve
enter your default mail domain (from: user@domain) emailadmin ca Entreu el domini predeterminat (de usuari@domini)
entry saved emailadmin ca Entrada guardada
forward also to emailadmin ca Reenviar també a
forward email's to emailadmin ca Reenviar correus a
forward only emailadmin ca Només reenviar
@ -47,8 +48,8 @@ postfix with ldap emailadmin ca Postfix amb LDAP
profile list emailadmin ca Llista de perfils
profile name emailadmin ca Nom del perfil
qmaildotmode emailadmin ca Modus de punt de qmail
qouta size in mbyte emailadmin ca Mida de la quota en MBytes
quota settings emailadmin ca Configuració de les quotas
quota size in mbyte emailadmin ca mida de la cita en MByte
remove emailadmin ca Esborrar
select type of imap/pop3 server emailadmin ca Seleccioneu el tipus de servidor IMAP/POP3
select type of smtp server emailadmin ca Seleccioneu el tipus de servidor SMTP

View File

@ -42,8 +42,10 @@ enable sieve emailadmin cs Povolit Sieve
encrypted connection emailadmin cs Šifrované připojení
encryption settings emailadmin cs Nastavení šifrování
enter your default mail domain (from: user@domain) emailadmin cs Zadejte Vaši výchozí poštovní doménu (z: uživatel@doména)
entry saved emailadmin cs Záznam uložen
error connecting to imap server. %s : %s. emailadmin cs Chyba spojení na IMAP server. %s : %s.
error connecting to imap server: [%s] %s. emailadmin cs Chyba spojení na IMAP server: [%s] %s.
error saving the entry!!! emailadmin cs Chyba při ukládání záznamu!!!
filtered by account emailadmin cs filtrováno podle účtu
filtered by group emailadmin cs filtrováno podle skupiny
forward also to emailadmin cs Přeposlat také na
@ -94,8 +96,8 @@ profile is active emailadmin cs Profil je aktivní
profile list emailadmin cs Seznam profilů
profile name emailadmin cs Název profilu
qmaildotmode emailadmin cs Tečkový režim Qmail
qouta size in mbyte emailadmin cs Velikost kvóty v MBytech
quota settings emailadmin cs Nastavení kvóty
quota size in mbyte emailadmin cs velikost kvóty v MBytech
remove emailadmin cs Odstranit
reset filter emailadmin cs vyresetovat filtr
select type of imap server emailadmin cs Vyberte typ IMAP serveru
@ -139,5 +141,5 @@ users can define their own emailaccounts emailadmin cs Uživatelé smí definova
users can define their own identities emailadmin cs Uživatelé smí definovat své vlastní identity
users can define their own signatures emailadmin cs Uživatelé smí definovat své vlastní podpisy
users can utilize these stationery templates emailadmin cs Uživatelé mohou využívat tyto šablony dopisů
vaction messages with start- and end-date require an admin account to be set! emailadmin cs Automatické odpovědi v nepřítomnosti, které mají určeno počáteční a koncové datum, vyžadují nastavení administrátorského účtu.
virtual mail manager emailadmin cs Virtuální správce pošty
you have received a new message on the emailadmin cs Přišla Vám nová zpráva na

View File

@ -47,7 +47,6 @@ postfix with ldap emailadmin da Postfix med LDAP
profile list emailadmin da Profil liste
profile name emailadmin da Profil navn
qmaildotmode emailadmin da qmaildotmode
qouta size in mbyte emailadmin da quota størrelse i Megabytes
quota settings emailadmin da quota indstillinger
remove emailadmin da fjern
select type of imap/pop3 server emailadmin da Vælg type IMAP/POP3 server

View File

@ -1,3 +1,5 @@
%1 entries deleted. emailadmin de %1 Einträge gelöscht
(imapclass must support this feature by querying the corresponding config value and pass it as defaultquota to the imapserver) emailadmin de (Die IMAP Klasse muss dieses Verfahren unterstützen indem es den entsprechenden Konfig Wert der Instanz ausliest und als Default Quota an den IMAP Server meldet.)
account '%1' not found !!! emailadmin de Benutzerkonto '%1' nicht gefunden !!!
active templates emailadmin de Aktive Vorlagen
add new email address: emailadmin de Neue E-Mailadresse hinzufügen
@ -42,8 +44,11 @@ enable sieve emailadmin de Sieve aktivieren
encrypted connection emailadmin de verschlüsselte Verbindung
encryption settings emailadmin de Verschlüsselungseinstellungen
enter your default mail domain (from: user@domain) emailadmin de Standard E-Mail-Domain (Von: benutzer@domain)
entry saved emailadmin de Eintrag gespeichert
error connecting to imap server. %s : %s. emailadmin de Fehler beim Verbinden mit dem IMAP Server. %s : %s.
error connecting to imap server: [%s] %s. emailadmin de Fehler beim Verbinden mit dem IMAP Server. [%s] %s.
error deleting entry! emailadmin de Fehler beim Löschen des Eintrags
error saving the entry!!! emailadmin de Fehler beim Speichern !!!
filtered by account emailadmin de Suche nach Benutzerprofilen
filtered by group emailadmin de Suche nach Gruppenprofilen
forward also to emailadmin de zusätzlich weiterleiten
@ -51,6 +56,7 @@ forward email's to emailadmin de E-Mails weiterleiten an
forward only emailadmin de nur weiterleiten
global options emailadmin de Globale Optionen
if using ssl or tls, you must have the php openssl extension loaded. emailadmin de Wenn Sie SSL oder TLS benutzen, müssen Sie die openssl PHP Erweiterung geladen haben.
if you specify port 5190 as sieve server port, you enforce ssl for sieve (server must support that) emailadmin de Wenn Sie als SIEVE Server Port 5190 eintragen, wird für die Kommunikation mit dem SIEVE-Server eine SSL-Verbindung verwendet (der Server muss das natürlich unterstützen)
imap admin password admin de IMAP Administrator Passwort
imap admin user admin de IMAP Administrator Benutzer
imap c-client version < 2001 emailadmin de IMAP C-Client Version < 2001
@ -73,6 +79,7 @@ ldap settings emailadmin de LDAP-Einstellungen
leave empty for no quota emailadmin de leer lassen um Quota zu deaktivieren
mail settings admin de E-Mail-Einstellungen
manage stationery templates emailadmin de Briefpapiervorlagen verwalten
mb used emailadmin de MB belegt
name of organisation emailadmin de Name der Organisation
no alternate email address emailadmin de keine zusätzlichen E-Mail-Adressen
no encryption emailadmin de keine Verschlüsselung
@ -94,8 +101,8 @@ profile is active emailadmin de Profil ist aktiv
profile list emailadmin de Profilliste
profile name emailadmin de Profilname
qmaildotmode emailadmin de qmaildotmode
qouta size in mbyte emailadmin de Quota Größe in MByte
quota settings emailadmin de Quota Einstellungen
quota size in mbyte emailadmin de Quota Größe in MByte
remove emailadmin de Entfernen
reset filter emailadmin de Filter zurücksetzen
select type of imap server emailadmin de IMAP-Server Typ auswählen
@ -116,6 +123,7 @@ standard emailadmin de Vorgabe
standard imap server emailadmin de Standard IMAP-Server
standard pop3 server emailadmin de Standard POP3-Server
standard smtp-server emailadmin de Standard SMTP-Server
starts with emailadmin de startet mit
stationery emailadmin de Briefpapier
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin de Der IMAP Server scheint die eingestellte Authentifizierungsmethode nicht zu unterstützen. Bitte fragen Sie Ihren Systemadministrator.
this php has no imap support compiled in!! emailadmin de Dieses PHP hat keine IMAP Unterstützung!!!
@ -131,7 +139,9 @@ use predefined username and password defined below emailadmin de Verwende den un
use smtp auth emailadmin de SMTP Authentifizierung benutzen
use tls authentication emailadmin de TLS Authentifizierung benutzen
use tls encryption emailadmin de TLS Verschlüsselung benutzen
use users email-address (as seen in useraccount) emailadmin de Benutzt E-Mail Adresse des Benutzers (Die unter seinem Benutzerkonto angezeigt wird)
user can edit forwarding address emailadmin de Anwender können ihre Weiterleitungsadresse bearbeiten
userid@domain eg. u1234@domain emailadmin de UserId@domain z.B. u1234@domain
username (standard) emailadmin de Benutzername (Standard)
username/password defined by admin emailadmin de Benutzername / Passwort vordefiniert
username@domainname (virtual mail manager) emailadmin de Benutzername@Domänenname (Virtual MAIL ManaGeR)
@ -139,5 +149,8 @@ users can define their own emailaccounts emailadmin de Anwender können ihre eig
users can define their own identities emailadmin de Anwender können ihre eigenen Identitäten definieren
users can define their own signatures emailadmin de Anwender können ihre eigenen Signaturen definieren
users can utilize these stationery templates emailadmin de Benutzer können diese Briefpapiervorlagen verwenden
vaction messages with start- and end-date require an admin account to be set! emailadmin de Abwesenheitsnotizen mit Start- und Enddatum benötigen einen gesetzten Administrator Benutzer!
vacation messages with start- and end-date require an admin account to be set emailadmin de Abwesenheitsnotizen mit Start- und Enddatum benötigen einen gesetzten Administrator Benutzer!
virtual mail manager emailadmin de Virtual MAIL ManaGeR
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin de Ja, die Daten darunter nur für Alarme und Benachrichtigungen verwenden, ansonsten die Daten des aktiven Benutzers.
yes, use credentials of current user or if given credentials below emailadmin de Ja, benutze Daten des aktuellen Benutzers oder wenn angegeben die Daten darunter
you have received a new message on the emailadmin de Sie haben eine neue Nachricht erhalten.

View File

@ -30,6 +30,7 @@ no supported imap authentication method could be found. emailadmin el Δεν β
order emailadmin el Ταξινόμηση
organisation emailadmin el οργανισμός
quota settings emailadmin el ρυθμίσεις ποσοστών
quota size in mbyte emailadmin el μέγεθος ποσοστών σε MByte
remove emailadmin el αφαίρεση
sieve settings emailadmin el Ρυθμίσεις Sieve
smtp settings emailadmin el Ρυθμίσεις SMTP

156
emailadmin/lang/egw_en.lang Executable file
View File

@ -0,0 +1,156 @@
%1 entries deleted. emailadmin en %1 entries deleted.
(imapclass must support this feature by querying the corresponding config value and pass it as defaultquota to the imapserver) emailadmin en (imapclass must support this feature by querying the corresponding config value and pass it as defaultquota to the imapserver)
account '%1' not found !!! emailadmin en Account '%1' not found!
active templates emailadmin en Active templates
add new email address: emailadmin en Add new email address:
add profile emailadmin en Add profile
admin dn emailadmin en Admin dn
admin password emailadmin en Admin password
admin username emailadmin en Admin user name
advanced options emailadmin en Advanced options
alternate email address emailadmin en Alternate email address
any application emailadmin en Any application
any group emailadmin en Any group
any user emailadmin en Any user
back to admin/grouplist emailadmin en Back to Admin / Group list
back to admin/userlist emailadmin en Back to Admin / User list
bad login name or password. emailadmin en Bad login name or password.
bad or malformed request. server responded: %s emailadmin en Bad or malformed request. %s
bad request: %s emailadmin en Bad request: %s
can be used by application emailadmin en Can be used by application
can be used by group emailadmin en Can be used by group
can be used by user emailadmin en Can be used by user
connection dropped by imap server. emailadmin en Connection dropped by IMAP server.
could not complete request. reason given: %s emailadmin en Could not complete request. %s
could not open secure connection to the imap server. %s : %s. emailadmin en Could not open secure connection to the IMAP server. %s : %s.
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin en CRAM-MD5 or DIGEST-MD5 requires the Auth_SASL package to be installed.
cyrus imap server emailadmin en Cyrus IMAP server
cyrus imap server administration emailadmin en Cyrus IMAP server administration
default emailadmin en Default
deliver extern emailadmin en Deliver extern
do not validate certificate emailadmin en Do not validate certificate
do you really want to delete this profile emailadmin en Do you really want to delete this profile?
do you really want to reset the filter for the profile listing emailadmin en Do you really want to reset the filter for the profile listing?
domainname emailadmin en Domain name
edit email settings emailadmin en Edit email settings
email account active emailadmin en Email account active
email address emailadmin en Email address
email settings common en Email settings
emailadmin emailadmin en eMailAdmin
emailadmin: group assigned profile common en eMailAdmin: Group assigned profile
emailadmin: user assigned profile common en eMailAdmin: User assigned profile
enable cyrus imap server administration emailadmin en Enable Cyrus IMAP server administration
enable sieve emailadmin en Enable Sieve
encrypted connection emailadmin en Encrypted connection
encryption settings emailadmin en Encryption settings
enter your default mail domain (from: user@domain) emailadmin en Enter your default mail domain from: user@domain
entry saved emailadmin en Entry saved
error connecting to imap server. %s : %s. emailadmin en Error connecting to IMAP server. %s : %s.
error connecting to imap server: [%s] %s. emailadmin en Error connecting to IMAP server: [%s] %s.
error deleting entry! emailadmin en Error deleting entry!
error saving the entry!!! emailadmin en Error saving the entry!
filtered by account emailadmin en Filtered by account
filtered by group emailadmin en Filtered by group
forward also to emailadmin en Forward also to
forward email's to emailadmin en Forward email's to
forward only emailadmin en Forward only
global options emailadmin en Global options
if using ssl or tls, you must have the php openssl extension loaded. emailadmin en If using SSL or TLS, you must have the PHP openssl extension loaded.
if you specify port 5190 as sieve server port, you enforce ssl for sieve (server must support that) emailadmin en if you specify port 5190 as sieve server port, you enforce ssl for sieve (server must support that)
imap admin password admin en IMAP admin password
imap admin user admin en IMAP admin user
imap c-client version < 2001 emailadmin en IMAP C-Client Version < 2001
imap server closed the connection. emailadmin en IMAP server closed the connection.
imap server closed the connection. server responded: %s emailadmin en IMAP Server closed the connection. Server Responded: %s
imap server hostname or ip address emailadmin en IMAP server hostname or ip address
imap server logintyp emailadmin en IMAP server login type
imap server name emailadmin en IMAP server name
imap server port emailadmin en IMAP server port
imap/pop3 server name emailadmin en IMAP/POP3 server name
in mbyte emailadmin en in MByte
inactive emailadmin en Inactive
ldap basedn emailadmin en LDAP basedn
ldap server emailadmin en LDAP server
ldap server accounts dn emailadmin en LDAP server accounts DN
ldap server admin dn emailadmin en LDAP server admin DN
ldap server admin password emailadmin en LDAP server admin password
ldap server hostname or ip address emailadmin en LDAP server host name or IP address
ldap settings emailadmin en LDAP settings
leave empty for no quota emailadmin en Leave empty for no quota
mail settings admin en Mail settings
manage stationery templates emailadmin en Manage stationery templates
mb used emailadmin en MB used
name of organisation emailadmin en Name of organization
no alternate email address emailadmin en No alternate email address
no encryption emailadmin en No encryption
no forwarding email address emailadmin en No forwarding email address
no message returned. emailadmin en No message returned
no supported imap authentication method could be found. emailadmin en No supported IMAP authentication method could be found.
order emailadmin en Order
organisation emailadmin en Organisation
plesk can't rename users --> request ignored emailadmin en Plesk can't rename users --> request ignored
plesk imap server (courier) emailadmin en Plesk IMAP Server (Courier)
plesk mail script '%1' not found !!! emailadmin en Plesk mail script '%1' not found!
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin en Plesk requires passwords to have at least 5 characters and not contain the account name --> password NOT set!
plesk smtp-server (qmail) emailadmin en Plesk SMTP-Server (Qmail)
pop3 server hostname or ip address emailadmin en POP3 server hostname or IP address
pop3 server port emailadmin en POP3 server port
postfix with ldap emailadmin en Postfix with LDAP
profile access rights emailadmin en Profile access rights
profile is active emailadmin en Profile is active
profile list emailadmin en Profile list
profile name emailadmin en Profile name
qmaildotmode emailadmin en qmaildotmode
quota settings emailadmin en Quota settings
quota size in mbyte emailadmin en Quota size in MByte
remove emailadmin en Remove
reset filter emailadmin en Reset filter
select type of imap server emailadmin en Select type of IMAP server
select type of imap/pop3 server emailadmin en Select type of IMAP/POP3 server
select type of smtp server emailadmin en Select type of SMTP server
send using this email-address emailadmin en Send using this email address
server settings emailadmin en Server settings
sieve server hostname or ip address emailadmin en Sieve server hostname or IP address
sieve server port emailadmin en Sieve server port
sieve settings emailadmin en Sieve settings
smtp authentication emailadmin en SMTP authentication
smtp options emailadmin en SMTP options
smtp server name emailadmin en SMTP server name
smtp settings emailadmin en SMTP settings
smtp-server hostname or ip address emailadmin en SMTP server hostname or IP address
smtp-server port emailadmin en SMTP server port
standard emailadmin en Standard
standard imap server emailadmin en Standard IMAP server
standard pop3 server emailadmin en Standard POP3 server
standard smtp-server emailadmin en Standard SMTP server
starts with emailadmin en Starts with
stationery emailadmin en Stationery
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin en The IMAP server does not appear to support the authentication method selected. Contact your system administrator.
this php has no imap support compiled in!! emailadmin en This PHP has no IMAP support compiled in!!
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin en To use a TLS connection, you must be running a version of PHP 5.1.0 or higher.
unexpected response from server to authenticate command. emailadmin en Unexpected response from server to AUTHENTICATE command.
unexpected response from server to digest-md5 response. emailadmin en Unexpected response from server to Digest-MD5 response.
unexpected response from server to login command. emailadmin en Unexpected response from server to LOGIN command.
unknown imap response from the server. server responded: %s emailadmin en Unknown IMAP response from the server. %s
unsupported action '%1' !!! emailadmin en Unsupported action '%1' !
update current email address: emailadmin en Update current email address:
use ldap defaults emailadmin en Use LDAP defaults
use predefined username and password defined below emailadmin en Use predefined username and password defined below
use smtp auth emailadmin en Use SMTP authentication
use tls authentication emailadmin en Use TLS authentication
use tls encryption emailadmin en Use TLS encryption
use users email-address (as seen in useraccount) emailadmin en Use users email address, as set in user account
user can edit forwarding address emailadmin en User can edit forwarding address
userid@domain eg. u1234@domain emailadmin en UserId@domain eg. u1234@domain
username (standard) emailadmin en Username (standard)
username/password defined by admin emailadmin en Username / Password defined by admin
username@domainname (virtual mail manager) emailadmin en username@domainname (Virtual MAIL ManaGeR)
users can define their own emailaccounts emailadmin en Users can define their own email accounts
users can define their own identities emailadmin en Users can define their own identities
users can define their own signatures emailadmin en Users can define their own signatures
users can utilize these stationery templates emailadmin en Users can utilize these stationery templates
vacation messages with start- and end-date require an admin account to be set emailadmin en Vacation messages with start and end date require an admin account to be set!
virtual mail manager emailadmin en Virtual MAIL ManaGeR
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin en Yes, use credentials below only for alarms and notifications, otherwise use credentials of current user
yes, use credentials of current user or if given credentials below emailadmin en Yes, use credentials of current user or if given credentials below
you have received a new message on the emailadmin en You have received a new message on the

View File

@ -0,0 +1,145 @@
account '%1' not found !!! emailadmin es-es ¡No se encontró la cuenta '%1'!
active templates emailadmin es-es Plantillas activas
add new email address: emailadmin es-es Añadir nueva dirección de correo
add profile emailadmin es-es Añadir perfil
admin dn emailadmin es-es dn del administrador
admin password emailadmin es-es contraseña del administrador
admin username emailadmin es-es usuario del administrador
advanced options emailadmin es-es opciones avanzadas
alternate email address emailadmin es-es dirección de correo alternativa
any application emailadmin es-es cualquier aplicación
any group emailadmin es-es cualquier grupo
any user emailadmin es-es cualquier usuario
back to admin/grouplist emailadmin es-es Volver a Administración/Lista de grupos
back to admin/userlist emailadmin es-es Volver a Administración/Lista de usuarios
bad login name or password. emailadmin es-es Nombre de usuario o contraseña incorrectos
bad or malformed request. server responded: %s emailadmin es-es Petición errónea o mal formado. El servidor respondió: %s
bad request: %s emailadmin es-es Petición errónea: %s
can be used by application emailadmin es-es puede usarse por la aplicación
can be used by group emailadmin es-es puede usarse por el grupo
can be used by user emailadmin es-es puede usarse por el usuario
connection dropped by imap server. emailadmin es-es El servidor IMAP ha interrumpido la conexión
could not complete request. reason given: %s emailadmin es-es No se pudo completar la solicitud. Motivo: %s
could not open secure connection to the imap server. %s : %s. emailadmin es-es No se pudo abrir una conexión segura con el servidor IMAP. %s: %s.
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin es-es CRAM-MD5 o DIGEST-MD5 necesitan el paquete Auth_SASL para estar instalado.
cyrus imap server emailadmin es-es Servidor IMAP Cyrus
cyrus imap server administration emailadmin es-es Administración del servidor IMAP Cyrus
default emailadmin es-es predeterminada
deliver extern emailadmin es-es entrega externa
do not validate certificate emailadmin es-es No validar el certificado
do you really want to delete this profile emailadmin es-es ¿Realmente desea borrar este perfil?
do you really want to reset the filter for the profile listing emailadmin es-es Realmente desea restablecer el filtro para la lista de perfiles
domainname emailadmin es-es nombre del dominio
edit email settings emailadmin es-es editar configuración de la cuenta
email account active emailadmin es-es cuenta de correo electrónico activa
email address emailadmin es-es dirección de correo electrónico
email settings common es-es Configuración del correo electrónico
emailadmin emailadmin es-es Administración del correo electrónico
emailadmin: group assigned profile common es-es eMailAdmin: perfil asignado al grupo
emailadmin: user assigned profile common es-es eMailAdmin: perfil asignado al usuario
enable cyrus imap server administration emailadmin es-es activar administración del servidor Cyrus IMAP
enable sieve emailadmin es-es activar Sieve
encrypted connection emailadmin es-es conexión cifrada
encryption settings emailadmin es-es configuración del cifrado
enter your default mail domain (from: user@domain) emailadmin es-es introduzca el dominio predeterminado (de usuario@dominio)
entry saved emailadmin es-es La entrada ha sido guardada
error connecting to imap server. %s : %s. emailadmin es-es Error al conectar con el servidor IMAP. %s: %s.
error connecting to imap server: [%s] %s. emailadmin es-es Error al conectar con el servidor IMAP: [%s] %s.
error saving the entry!!! emailadmin es-es Error guardando el elemento!!!
filtered by account emailadmin es-es filtrado por cuenta
filtered by group emailadmin es-es filtrado por grupo
forward also to emailadmin es-es reenviar también a
forward email's to emailadmin es-es reenviar correos a
forward only emailadmin es-es sólo reenviar
global options emailadmin es-es opciones globales
if using ssl or tls, you must have the php openssl extension loaded. emailadmin es-es Si usa SSL o TLS, debe tener cargada la extensión openssl de PHP.
imap admin password admin es-es contraseña del administrador IMAP
imap admin user admin es-es usuario administrador IMAP
imap c-client version < 2001 emailadmin es-es Versión C-Cliente IMAP < 2001
imap server closed the connection. emailadmin es-es El servidor IMAP cerró la conexión.
imap server closed the connection. server responded: %s emailadmin es-es El servidor IMAP cerró la conexión. El servidor respondió: %s
imap server hostname or ip address emailadmin es-es Servidor IMAP o dirección IP
imap server logintyp emailadmin es-es Tipo de sesión del servidor IMAP
imap server name emailadmin es-es Nombre del servidor IMAP
imap server port emailadmin es-es Puerto del servidor IMAP
imap/pop3 server name emailadmin es-es Nombre del servidor POP/IMAP
in mbyte emailadmin es-es en MBytes
inactive emailadmin es-es inactivo
ldap basedn emailadmin es-es basedn para LDAP
ldap server emailadmin es-es servidor LDAP
ldap server accounts dn emailadmin es-es DN para cuentas del servidor LDAP
ldap server admin dn emailadmin es-es DN del administrador del servidor LDAP
ldap server admin password emailadmin es-es contraseña del administrador del servidor LDAP
ldap server hostname or ip address emailadmin es-es Nombre del servidor LDAP o dirección IP
ldap settings emailadmin es-es Configuración LDAP
leave empty for no quota emailadmin es-es Dejar en blanco para no poner cuota
mail settings admin es-es Configuración del correo.
manage stationery templates emailadmin es-es Gestionar plantillas preimpresas
name of organisation emailadmin es-es Nombre de la organización
no alternate email address emailadmin es-es Sin dirección de correo alternativa
no encryption emailadmin es-es Sin cifrar
no forwarding email address emailadmin es-es Sin dirección de correo para reenviar
no message returned. emailadmin es-es No se devolvió ningún mensaje.
no supported imap authentication method could be found. emailadmin es-es No se pudo encontrar ningún método soportado de identificación IMAP.
order emailadmin es-es orden
organisation emailadmin es-es organización
plesk can't rename users --> request ignored emailadmin es-es Plesk no puede renombrar usuarios --> Se ignora la solicitud
plesk imap server (courier) emailadmin es-es Servidor IMAP Plesk (Courier)
plesk mail script '%1' not found !!! emailadmin es-es ¡No se encontró el script de correo de Plesk '%1'!
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin es-es Plesk requiere que las contraseñas tengan al menos 5 caracteres y no contengan el nombre de la cuenta --> NO se establece la contraseña
plesk smtp-server (qmail) emailadmin es-es Servidor SMTP de Plesk (Qmail)
pop3 server hostname or ip address emailadmin es-es Nombre del servidor POP3 o dirección IP
pop3 server port emailadmin es-es Puerto del servidor POP3
postfix with ldap emailadmin es-es Postfix con LDAP
profile access rights emailadmin es-es Derechos de acceso del perfil
profile is active emailadmin es-es el perfil está activo
profile list emailadmin es-es Lista de perfiles
profile name emailadmin es-es Nombre del perfil
qmaildotmode emailadmin es-es Modo de punto de qmail
quota settings emailadmin es-es Configuración de las cuotas
quota size in mbyte emailadmin es-es tamaño de la cuota en MBytes
remove emailadmin es-es borrar
reset filter emailadmin es-es restablecer filtro
select type of imap server emailadmin es-es Seleccione el tipo de servidor IMAP
select type of imap/pop3 server emailadmin es-es Seleccione el tipo de servidor IMAP/POP3
select type of smtp server emailadmin es-es Seleccione el tipo de servidor SMTP
send using this email-address emailadmin es-es enviar usando esta dirección de correo electrónico
server settings emailadmin es-es configuración del servidor
sieve server hostname or ip address emailadmin es-es Nombre del servidor Sieve o dirección IP
sieve server port emailadmin es-es Puerto del servidor Sieve
sieve settings emailadmin es-es Configuración de Sieve
smtp authentication emailadmin es-es identificación SMTP
smtp options emailadmin es-es opciones SMTP
smtp server name emailadmin es-es Nombre del servidor SMTP
smtp settings emailadmin es-es configuración SMTP
smtp-server hostname or ip address emailadmin es-es Nombre del servidor SMTP o dirección IP
smtp-server port emailadmin es-es Puerto del servidor SMTP
standard emailadmin es-es Estándar
standard imap server emailadmin es-es Servidor IMAP estándar
standard pop3 server emailadmin es-es Servidor POP3 estándar
standard smtp-server emailadmin es-es Servidor SMTP estándar
stationery emailadmin es-es material preimpreso
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin es-es El servidor IMAP no parece soportar el método de identificación seleccionado. Por favor, póngase en contacto el administrador de su sistema.
this php has no imap support compiled in!! emailadmin es-es ¡¡Esta instalación de PHP no tiene soporte IMAP!!
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin es-es Para usar una conexión TLS, debe ejecutar una versión de PHP 5.1.0 o superior.
unexpected response from server to authenticate command. emailadmin es-es Respuesta inesperada del servidor al comando AUTHENTICATE.
unexpected response from server to digest-md5 response. emailadmin es-es Respuesta inesperada del servidor a la respuesta Digest-MD5.
unexpected response from server to login command. emailadmin es-es Respuesta inesperada del servidor al comando LOGIN.
unknown imap response from the server. server responded: %s emailadmin es-es Respuesta IMAP desconocida del servidor. El servidor respondió: %s
unsupported action '%1' !!! emailadmin es-es ¡La acción '%1' no está soportada!
update current email address: emailadmin es-es Actualizar la dirección de correo actual:
use ldap defaults emailadmin es-es usar las opciones predeterminadas para LDAP
use predefined username and password defined below emailadmin es-es Usar el usuario predefinido y las contraseñas definidas debajo
use smtp auth emailadmin es-es Usar identificación SMTP
use tls authentication emailadmin es-es Usar identificación TLS
use tls encryption emailadmin es-es Usar cifrado TLS
user can edit forwarding address emailadmin es-es El usuario puede editar la dirección de reenvío
username (standard) emailadmin es-es usuario (estándar)
username/password defined by admin emailadmin es-es Usuario/contraseña definida por el administrador
username@domainname (virtual mail manager) emailadmin es-es usuario@dominio (Gestor de correo virtual)
users can define their own emailaccounts emailadmin es-es Los usuarios pueden definir sus propias cuentas de correo
users can define their own identities emailadmin es-es Los usuarios pueden definir sus propias identidades
users can define their own signatures emailadmin es-es Los usuarios pueden definir sus propias firmas
users can utilize these stationery templates emailadmin es-es Los usuarios pueden utilizar estas plantillas preimpresas
virtual mail manager emailadmin es-es Gestor de correo virtual
you have received a new message on the emailadmin es-es Ha recibido un mensaje nuevo en la

47
emailadmin/lang/egw_et.lang Executable file
View File

@ -0,0 +1,47 @@
account '%1' not found !!! emailadmin et Kontot '%1' ei leitud !!!
add new email address: emailadmin et Lisa uus email aadress
add profile emailadmin et Lisa Profiil
admin password emailadmin et admin parool
admin username emailadmin et admin kasutajanimi
alternate email address emailadmin et Alternatiivne email aadress
bad login name or password. emailadmin et Vale kasutajanimi või parool
cyrus imap server emailadmin et Cyrus IMAP Server
cyrus imap server administration emailadmin et Cyrus IMAP server administreerimine
default emailadmin et vaikimisi
do not validate certificate emailadmin et ära valideeri sertifikaati
do you really want to delete this profile emailadmin et Tahad tõesti kustutada seda Profiili
domainname emailadmin et Doomeninimi
edit email settings emailadmin et muuda emaili setinguid
email account active emailadmin et email konto aktiivne
email address emailadmin et email aadress
email settings common et Email setingud
encrypted connection emailadmin et krüpteeritud ühendus
encryption settings emailadmin et Krüpteerimise setingud
enter your default mail domain (from: user@domain) emailadmin et Sisesta oma vaikimisi mail doomen (kasutaja@doomen)
entry saved emailadmin et Kirje salvestatud
error saving the entry!!! emailadmin et Viga kirje salvestamisel !!!
global options emailadmin et Globaalsed omadused
imap admin password admin et IMAP admin parool
imap admin user admin et IMAP admin kasutaja
imap c-client version < 2001 emailadmin et IMAP C-Client Versioon < 2001
imap server closed the connection. emailadmin et IMAP server sulges ühenduse.
imap server closed the connection. server responded: %s emailadmin et IMAP Server sulges ühenduse. Server Vastas: %s
imap server name emailadmin et imap serveri nimi
imap server port emailadmin et IMAP serveri port
imap/pop3 server name emailadmin et IMAP/POP3 server nimi
ldap settings emailadmin et LDAP setingud
mail settings admin et Mail setingud
no alternate email address emailadmin et pole alternatiivset email aadressi
no encryption emailadmin et ilna krüpteeringutta
organisation emailadmin et Organisatsioon
pop3 server port emailadmin et POP3 serveri port
remove emailadmin et eemalda
select type of imap server emailadmin et vali IMAP serveri tüüp
select type of imap/pop3 server emailadmin et vali IMAP/POP3 serveri tüüp
select type of smtp server emailadmin et Vali SMTP serveri tüüp
server settings emailadmin et Serveri setingud
sieve server port emailadmin et Sieve serveri port
sieve settings emailadmin et Sieve setingud
smtp server name emailadmin et SMTP serveri nimi
smtp settings emailadmin et SMTP setingud
smtp-server port emailadmin et SMTP serveri port

View File

@ -4,6 +4,8 @@ bad login name or password. emailadmin eu Izen edo pasahitz okerra
default emailadmin eu Lehenetsia
email address emailadmin eu Helbide elektronikoa
encrypted connection emailadmin eu konexioa enkriptatua
entry saved emailadmin eu Sarrera gordeta
error saving the entry!!! emailadmin eu Errorea sarrera gordetzerakoan
imap server closed the connection. emailadmin eu IMAP zerbitzariak konexioa itxi du
in mbyte emailadmin eu MByte-sen
leave empty for no quota emailadmin eu zurian utzi kuotarik ez badago
@ -14,6 +16,7 @@ order emailadmin eu Ordena
organisation emailadmin eu antolaketa
postfix with ldap emailadmin eu Postfix-ak LDAP-arekin
quota settings emailadmin eu kuotaren konfigurazioa
quota size in mbyte emailadmin eu kuotaren tamaina MBytes-etan
remove emailadmin eu ezabatu
sieve settings emailadmin eu SIEVE ren lehentasunak
smtp settings emailadmin eu SMTP lehentasunak

View File

@ -19,6 +19,8 @@ emailadmin emailadmin fa مدیر رایانامه
enable sieve emailadmin fa فعالسازی Sieve
encryption settings emailadmin fa تنظیمات رمز نگاری
enter your default mail domain (from: user@domain) emailadmin fa حوزه پیش فرض خود را وارد کنید:(مثلا: fgpars.net)
entry saved emailadmin fa ورودی ذخیره شد
error saving the entry!!! emailadmin fa خطای ذخیره ورودی!!!
forward also to emailadmin fa همچنین ارسال به
forward email's to emailadmin fa ارسال نامه ها به
forward only emailadmin fa فقط ارسال به
@ -42,8 +44,8 @@ pop3 server port emailadmin fa درگاه کارگزار POP3
profile access rights emailadmin fa حقوق دسترسی مجموعه تنظیمات
profile list emailadmin fa لیست مجموعه تنظیمات
profile name emailadmin fa نام مجموعه تنظیمات
qouta size in mbyte emailadmin fa اندازه سهمیه به مگابایت
quota settings emailadmin fa تنظیمات سهمیه
quota size in mbyte emailadmin fa سهمیه به مگابایت
remove emailadmin fa حذف
select type of imap/pop3 server emailadmin fa نوع کارگزار IMAP/POP3 را انتخاب کنید
select type of smtp server emailadmin fa نوع کارگزار SMTP را انتخاب کنید

View File

@ -1,3 +1,4 @@
%1 entries deleted. emailadmin fi %1 tapahtumaa poistettu
account '%1' not found !!! emailadmin fi Tiliä '%1' ei löytynyt!
active templates emailadmin fi Aktiiviset mallipohjat
add new email address: emailadmin fi Lisää uusi sähköpostiosoite
@ -42,8 +43,11 @@ enable sieve emailadmin fi Ota Sieve käyttöön
encrypted connection emailadmin fi Yhteyden suojaus
encryption settings emailadmin fi Yhteyden suojausasetukset
enter your default mail domain (from: user@domain) emailadmin fi Anna oletusverkkotunnus (käyttäjä@verkkotunnus)
entry saved emailadmin fi Tallennettu
error connecting to imap server. %s : %s. emailadmin fi Virhe yhdistettäessä IMAP palvelimeen. %s : %s.
error connecting to imap server: [%s] %s. emailadmin fi Virhe yhdistettäessä IMAP palvelimeen. [%s] %s.
error deleting entry! emailadmin fi Virhe poistettaessa!
error saving the entry!!! emailadmin fi Virhe tallennettaessa!
filtered by account emailadmin fi Käyttäjätilien mukaan
filtered by group emailadmin fi Ryhmän mukaan
forward also to emailadmin fi Välitä osoitteeseen
@ -73,6 +77,7 @@ ldap settings emailadmin fi LDAP -asetukset
leave empty for no quota emailadmin fi Jätä tyhjäksi, jos ei rajoiteta
mail settings admin fi Sähköpostin asetukset
manage stationery templates emailadmin fi Hallitse sähköpostin taustakuvamallipohjia
mb used emailadmin fi MB käytetty
name of organisation emailadmin fi Organisaation nimi
no alternate email address emailadmin fi Ei vaihtoehtoista osoitetta
no encryption emailadmin fi Ei suojausta
@ -94,8 +99,8 @@ profile is active emailadmin fi Profiili on aktiivinen
profile list emailadmin fi Profiileiluettelo
profile name emailadmin fi Profiilin nimi
qmaildotmode emailadmin fi qmaildotmode
qouta size in mbyte emailadmin fi Tallennuskiintiö Mt
quota settings emailadmin fi Tallennuskiintiön asetukset
quota size in mbyte emailadmin fi Rajoituksen koko Mb:nä
remove emailadmin fi Poista
reset filter emailadmin fi Poista suodatin
select type of imap server emailadmin fi Valitse IMAP -palvelimen tyyppi
@ -116,6 +121,7 @@ standard emailadmin fi Vakio
standard imap server emailadmin fi Vakio IMAP -palvelin
standard pop3 server emailadmin fi Vakio POP3 -palvelin
standard smtp-server emailadmin fi Vakio SMTP -palvelin
starts with emailadmin fi Alkaa:
stationery emailadmin fi Sähköpostin taustakuvamallipohjat
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin fi IMAP palvelimelta ei löydy tukea valitulle tunnistusmuodolle, ota yhteyttä järjestelmän pääkäyttäjään.
this php has no imap support compiled in!! emailadmin fi Tämä PHP ei sisällä IMAP tukea!!
@ -131,7 +137,9 @@ use predefined username and password defined below emailadmin fi Käytä esimä
use smtp auth emailadmin fi Käytä SMTP -käyttäjätunnistusta
use tls authentication emailadmin fi Käytä TLS -käyttäjätunnistusta
use tls encryption emailadmin fi Käytä TLS -salausta
use users email-address (as seen in useraccount) emailadmin fi Käytä käyttäjän sähköpostiosoitetta
user can edit forwarding address emailadmin fi Käyttäjä voi muokata välitys osoitetta
userid@domain eg. u1234@domain emailadmin fi käyttäjätunnus@verkkotunnus
username (standard) emailadmin fi Käyttäjätunnus (standardi)
username/password defined by admin emailadmin fi Ylläpidon määrittelemä käyttäjätunnus/salasana
username@domainname (virtual mail manager) emailadmin fi käyttäjätunnus@verkkotunnus (Virtual MAIL ManaGeR)
@ -139,5 +147,7 @@ users can define their own emailaccounts emailadmin fi Käyttäjät voivat mää
users can define their own identities emailadmin fi Käyttäjät voivat määritellä omia identiteettejä
users can define their own signatures emailadmin fi Käyttäjät voivat määritellä omia allekirjoituksia
users can utilize these stationery templates emailadmin fi Käyttäjät voivat määritellä omia sähköpostin taustakuvamallipohjia
vaction messages with start- and end-date require an admin account to be set! emailadmin fi Lomavastaajaviestit alkamis- ja loppumispäiväyksellä vaativat ylläpitotilin asetuksen.
virtual mail manager emailadmin fi Virtual MAIL ManaGeR
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin fi Kyllä, Käytä annettua salasanaa vain hälytyksiin ja huomautusviesteihin, muulloin käyttäjän tunnuksia
yes, use credentials of current user or if given credentials below emailadmin fi Kyllä, käyttäjän tunnukset, tai mahdolliset allaolevat tunnukset
you have received a new message on the emailadmin fi Sinulle on uusi viesti

View File

@ -34,8 +34,10 @@ enable sieve emailadmin fr Activer Sieve
encrypted connection emailadmin fr connexion chiffrée
encryption settings emailadmin fr Paramètres de chiffrement
enter your default mail domain (from: user@domain) emailadmin fr Introduisez votre domaine par défaut (utilisateur@domaine.com)
entry saved emailadmin fr Entrée enregistrée
error connecting to imap server. %s : %s. emailadmin fr Erreur de connexion avec le serveur IMAP. %s: %s.
error connecting to imap server: [%s] %s. emailadmin fr Erreur de connexion avec le serveur IMAP. [%s] %s.
error saving the entry!!! emailadmin fr Erreur lors de l'enregistrement de l'entrée !!!
forward also to emailadmin fr Transférer aussi à
forward email's to emailadmin fr Transférer les emails à
forward only emailadmin fr Seulement transférer
@ -81,8 +83,8 @@ profile access rights emailadmin fr droits d'accès du profil
profile list emailadmin fr Liste des profils
profile name emailadmin fr Nom de profil
qmaildotmode emailadmin fr qmaildotmode
qouta size in mbyte emailadmin fr Taille du quota en Mo
quota settings emailadmin fr Paramètres de quota
quota size in mbyte emailadmin fr Taille des quota en Mo
remove emailadmin fr Supprimer
select type of imap server emailadmin fr Sélectionner le type de serveur IMAP
select type of imap/pop3 server emailadmin fr Sélectionner le type de serveur IMAP/POP3
@ -121,3 +123,4 @@ username@domainname (virtual mail manager) emailadmin fr utilisateur@domaine (Vi
users can define their own emailaccounts emailadmin fr Les utilisateurs peuvent définir leurs propres comptes de messagerie
users can define their own signatures emailadmin fr les utilisateurs peuvent définir leurs propres signatures
virtual mail manager emailadmin fr Virtual MAIL ManaGeR
you have received a new message on the emailadmin fr Vous avez reçu un nouveau message sur le

View File

@ -16,6 +16,7 @@ email address emailadmin hr email address
enable cyrus imap server administration emailadmin hr enable Cyrus IMAP server administration
enable sieve emailadmin hr enable Sieve
enter your default mail domain (from: user@domain) emailadmin hr Enter your default mail domain (from: user@domain)
entry saved emailadmin hr Entry saved
forward also to emailadmin hr forward also to
forward email's to emailadmin hr forward email's to
forward only emailadmin hr forward only
@ -46,7 +47,6 @@ postfix with ldap emailadmin hr Postfix with LDAP
profile list emailadmin hr Profile List
profile name emailadmin hr Profile Name
qmaildotmode emailadmin hr qmaildotmode
qouta size in mbyte emailadmin hr qouta size in MByte
quota settings emailadmin hr quota settings
remove emailadmin hr remove
select type of imap/pop3 server emailadmin hr Select type of IMAP/POP3 server

145
emailadmin/lang/egw_hu.lang Normal file
View File

@ -0,0 +1,145 @@
account '%1' not found !!! emailadmin hu '%1' felhasználói azonosító nem található!
active templates emailadmin hu Aktív vázlatok
add new email address: emailadmin hu Új email cím hozzáadása:
add profile emailadmin hu Profil hozzáadása
admin dn emailadmin hu Admin dn
admin password emailadmin hu adminisztrátor jelszava
admin username emailadmin hu adminisztrátor neve
advanced options emailadmin hu haladó beállítások
alternate email address emailadmin hu alternatív emailcím
any application emailadmin hu Bármelyik modul
any group emailadmin hu Bármelyik csoport
any user emailadmin hu bármely felhasználó
back to admin/grouplist emailadmin hu Vissza az csoportok adminisztráláshoz
back to admin/userlist emailadmin hu Vissza a felhasználók adminisztráláshoz
bad login name or password. emailadmin hu Hibás belépési név vagy jelszó.
bad or malformed request. server responded: %s emailadmin hu Hibás kérés. Szerver válasza: %s
bad request: %s emailadmin hu Hibás kérés: %s
can be used by application emailadmin hu Ez a modul használhatja
can be used by group emailadmin hu Ez a csoport használhatja
can be used by user emailadmin hu a felhasználó alkalmazhatja
connection dropped by imap server. emailadmin hu A kapcsolatot az IMAP szerver eldobta.
could not complete request. reason given: %s emailadmin hu Kérést nem lehet teljesíteni. Az ok: %s
could not open secure connection to the imap server. %s : %s. emailadmin hu Nem létesíthető titkos csatorna az IMAP szerverhez. %s : %s
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin hu CRAM-MD5 vagy DIGEST-MD5 használatához az Auth_SASL csomagot telepíteni kell.
cyrus imap server emailadmin hu Cyrus IMAP-kiszolgáló
cyrus imap server administration emailadmin hu Cyrus IMAP-kiszolgáló adminisztrációja
default emailadmin hu Alapértelmezett
deliver extern emailadmin hu külső kézbesítés
do not validate certificate emailadmin hu ne ellenőrizze a tanúsítványt
do you really want to delete this profile emailadmin hu Valóban törölni kívánja ezt a profilt
do you really want to reset the filter for the profile listing emailadmin hu Valóban törölni szeretnéd a profillista szűrőt?
domainname emailadmin hu tartománynév
edit email settings emailadmin hu email beállítások szerkesztése
email account active emailadmin hu email azonosító aktív
email address emailadmin hu email cím
email settings common hu Email beállítások
emailadmin emailadmin hu EmailAdmin
emailadmin: group assigned profile common hu eMailAdmin: csoport a profilhoz hozzárendelve
emailadmin: user assigned profile common hu eMailAdmin: felhasználó a profilhoz hozzárendelve
enable cyrus imap server administration emailadmin hu Cyrus IMAP-kiszolgáló adminisztrációjának engedélyezése
enable sieve emailadmin hu Sieve engedélyezése
encrypted connection emailadmin hu titkosított kapcsolat
encryption settings emailadmin hu Titkosítás beállításai
enter your default mail domain (from: user@domain) emailadmin hu Adja meg az alapértelmezett levelezési tartományt (a felhasználó@tartomány-ból)
entry saved emailadmin hu Bejegyzés elmentve
error connecting to imap server. %s : %s. emailadmin hu Hiba történt az IMAP szerverhez csatlakozás közben. %s : %s
error connecting to imap server: [%s] %s. emailadmin hu Hiba történt az IMAP szerverhez csatlakozás közben. [%s ]: %s
error saving the entry!!! emailadmin hu Bejegyzés mentése közben hiba történt!!!
filtered by account emailadmin hu Fiók szerint szűrve
filtered by group emailadmin hu Csoport szerint szűrve
forward also to emailadmin hu továbbítsd ide is
forward email's to emailadmin hu email továbbítása ide
forward only emailadmin hu továbbítás csak ide
global options emailadmin hu Globális opciók
if using ssl or tls, you must have the php openssl extension loaded. emailadmin hu SSL vagy TLS használatához a PHP openssl kiterjesztését telepíteni kell.
imap admin password admin hu IMAP adminisztrátor jelszava
imap admin user admin hu IMAP adminisztrátor felhasználóneve
imap c-client version < 2001 emailadmin hu IMAP C-Client verzió < 2001
imap server closed the connection. emailadmin hu Az IMAP szerver lezárta a kapcsolatot.
imap server closed the connection. server responded: %s emailadmin hu Az IMAP szerver lezárta a kapcsolatot: %s
imap server hostname or ip address emailadmin hu IMAP szerver hosztneve vagy IP címe
imap server logintyp emailadmin hu IMAP szerver bejelentkezési típusa
imap server name emailadmin hu IMAP szerver neve
imap server port emailadmin hu IMAP szerver portja
imap/pop3 server name emailadmin hu IMAP/POP3 szerver neve
in mbyte emailadmin hu MBájtban
inactive emailadmin hu inaktív
ldap basedn emailadmin hu LDAP basedn
ldap server emailadmin hu LDAP szerver
ldap server accounts dn emailadmin hu LDAP szerver accounts DN
ldap server admin dn emailadmin hu LDAP szerver admin DN
ldap server admin password emailadmin hu LDAP szerver adminisztrátorának jelszava
ldap server hostname or ip address emailadmin hu LDAP szerver hosztneve vagy IP címe
ldap settings emailadmin hu LDAP beállítások
leave empty for no quota emailadmin hu hagyja üresen a kvóta figyelmen kívül hagyásához
mail settings admin hu Levelezési beállítások
manage stationery templates emailadmin hu Irodaszer minták kezelése
name of organisation emailadmin hu Szervezet neve
no alternate email address emailadmin hu nincs alternatív email cím
no encryption emailadmin hu titkosítás nélkül
no forwarding email address emailadmin hu nincs továbbküldési email cím
no message returned. emailadmin hu Nincs visszaadott üzenet.
no supported imap authentication method could be found. emailadmin hu Nem található támogatott IMAP hitelesítés.
order emailadmin hu Rendezés
organisation emailadmin hu Szervezet
plesk can't rename users --> request ignored emailadmin hu A Plesk nem tudja átnevezni a felhasználókat -> kérés figyelmen kívül hagyva
plesk imap server (courier) emailadmin hu Plesk IMAP Szerver (Courier)
plesk mail script '%1' not found !!! emailadmin hu Plesk levél szkript '%1' nem található!!!
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin hu Plesk megköveteli, hogy a jelszó legalább 5 karakter legyen és ne tartalmazza a felhasználói nevet --> jelszó beállítása NEM történt meg!!!
plesk smtp-server (qmail) emailadmin hu Plesk SMTP-Szerver (Qmail)
pop3 server hostname or ip address emailadmin hu POP3 szerver hosztneve vagy IP címe
pop3 server port emailadmin hu POP3 szerver portja
postfix with ldap emailadmin hu Postfix LDAP-vel
profile access rights emailadmin hu profil elérési jogosultságok
profile is active emailadmin hu a profil inaktív
profile list emailadmin hu Profil lista
profile name emailadmin hu Profilnév
qmaildotmode emailadmin hu qmaildotmode
quota settings emailadmin hu kvóta beállításai
quota size in mbyte emailadmin hu kvóta Mbájtokban
remove emailadmin hu eltávolítás
reset filter emailadmin hu szűrö törlése
select type of imap server emailadmin hu IMAP szerver típusának kiválasztása
select type of imap/pop3 server emailadmin hu Válassza ki az IMAP/POP3 szerver típusát
select type of smtp server emailadmin hu Válassza ki az SMTP szerver típusát
send using this email-address emailadmin hu Küldés erről az e-mail címről
server settings emailadmin hu Szerver beállítások
sieve server hostname or ip address emailadmin hu Sieve szerver hosztneve vagy IP címe
sieve server port emailadmin hu Sieve szerver port
sieve settings emailadmin hu SIEVE beállítások
smtp authentication emailadmin hu SMTP azonosítás
smtp options emailadmin hu SMTP opciók
smtp server name emailadmin hu SMTP szerver neve
smtp settings emailadmin hu SMTP beállítások
smtp-server hostname or ip address emailadmin hu SMTP szerver hosztneve vagy IP címe
smtp-server port emailadmin hu SMTP szerver portja
standard emailadmin hu Szabványos
standard imap server emailadmin hu Szabványos IMAP-kiszolgáló
standard pop3 server emailadmin hu Szabványos POP3-kiszolgáló
standard smtp-server emailadmin hu Szabványos SMTP-kiszolgáló
stationery emailadmin hu Irodaszer
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin hu Az IMAP szerver úgy tűnik nem támogatja a kiválasztott hitelesítést. Lépjen kapcsolatba az adminisztrátorral.
this php has no imap support compiled in!! emailadmin hu A használt PHP verzió nem tartalmaz IMAP támogatást! (telepíteni kell)
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin hu TLS kapcsolat használatához legalább PHP 5.1.0-val kell rendelkeznie.
unexpected response from server to authenticate command. emailadmin hu Váratlan válasz a szervertől az AUTHENTICATE parancsra.
unexpected response from server to digest-md5 response. emailadmin hu Váratlan válasz a szervertől a Digest-MD5 parancsra.
unexpected response from server to login command. emailadmin hu Váratlan válasz a szervertől a LOGIN parancsra.
unknown imap response from the server. server responded: %s emailadmin hu Váratlan válasz a szervertől: %s
unsupported action '%1' !!! emailadmin hu Nem támogatott művelet '%1' !!!
update current email address: emailadmin hu Jelenlegi email cím frissítése:
use ldap defaults emailadmin hu használja az LDAP alapbeállításokat
use predefined username and password defined below emailadmin hu Használd a lent megadott felhasználónevet és jelszót
use smtp auth emailadmin hu SMTP hitelesítés használata
use tls authentication emailadmin hu TLS hitelesítés használata
use tls encryption emailadmin hu TLS kódolás használata
user can edit forwarding address emailadmin hu Felhasználó szerkesztheti a továbbításkor a címeket
username (standard) emailadmin hu felhasználó név (standard)
username/password defined by admin emailadmin hu Az adminisztrátok által meghatározott felhasználó és jelszó
username@domainname (virtual mail manager) emailadmin hu felhasználónév@tartománynév (Virtual MAIL ManaGeR)
users can define their own emailaccounts emailadmin hu A felhasználók saját maguk állíthatják be az email postafiókjaikat
users can define their own identities emailadmin hu A felhasználók beállíthatják a saját azonosítójukat
users can define their own signatures emailadmin hu A felhasználók beállíthatják a saját aláírásukat
users can utilize these stationery templates emailadmin hu A felhasználók alkalmazhatják az irodaszer mintákat
virtual mail manager emailadmin hu Virtuális MAIL ManaGeR
you have received a new message on the emailadmin hu Új üzenet érkezett a

View File

@ -1,3 +1,4 @@
%1 entries deleted. emailadmin id %1 entri dihapus.
account '%1' not found !!! emailadmin id Akoun '%1' tidak ditemukan !!!
active templates emailadmin id Templat yang aktif
add new email address: emailadmin id Tambah alamat email baru:
@ -31,6 +32,8 @@ enable sieve emailadmin id Bolehkan Sieve
encrypted connection emailadmin id koneksi ter-enkripsi
encryption settings emailadmin id Pengaturan Enkripsi
enter your default mail domain (from: user@domain) emailadmin id Berikan nama domain email anda (dari: pengguna@domain)
entry saved emailadmin id Entri disimpan
error saving the entry!!! emailadmin id Error saving the entry!!!
filtered by account emailadmin id saringan menurut Akoun
filtered by group emailadmin id saringan menurut Kelompok
forward only emailadmin id Hanya Forward
@ -54,8 +57,8 @@ postfix with ldap emailadmin id Postfix with LDAP
profile list emailadmin id Daftar Profil
profile name emailadmin id Nama Profil
qmaildotmode emailadmin id qmaildotmode
qouta size in mbyte emailadmin id Kuota dalam MByte
quota settings emailadmin id Pengaturan Kuota
quota size in mbyte emailadmin id ukuran kuota dalam MByte
remove emailadmin id Buang
reset filter emailadmin id ulangi penyaringan
select type of imap server emailadmin id Pilih tipe Server IMAP
@ -76,6 +79,7 @@ standard emailadmin id Standar
standard imap server emailadmin id Server IMAP Standar
standard pop3 server emailadmin id Server POP3 Standar
standard smtp-server emailadmin id Server SMTP Standar
starts with emailadmin id diawali dengan
stationery emailadmin id Stationery
unexpected response from server to login command. emailadmin id Unexpected response from server to LOGIN command.
update current email address: emailadmin id Memperbarui alamat email saat ini:

View File

@ -1,3 +1,4 @@
%1 entries deleted. emailadmin it %1 inserimenti cancellati
account '%1' not found !!! emailadmin it Account '%1' non trovato !!!
active templates emailadmin it Modelli attivi
add new email address: emailadmin it Aggiungi un nuovo indirizzo di posta elettronica
@ -42,8 +43,11 @@ enable sieve emailadmin it abilita Sieve
encrypted connection emailadmin it Connessione criptata
encryption settings emailadmin it impostazioni cifratura
enter your default mail domain (from: user@domain) emailadmin it Inserisci il tuo dominio di posta predefinito (da: utente@dominio)
entry saved emailadmin it Inserimento salvato
error connecting to imap server. %s : %s. emailadmin it Errore in connessione al server IMAP. %s : %s.
error connecting to imap server: [%s] %s. emailadmin it Errore in connessione al server IMAP: [%s] %s.
error deleting entry! emailadmin it Errore durante l'eliminazione dell'inserimento!
error saving the entry!!! emailadmin it Errore durante il salvataggio dell'inserimento
filtered by account emailadmin it Filtrati per account
filtered by group emailadmin it Filtrati per gruppo
forward also to emailadmin it Inoltra anche a
@ -94,8 +98,8 @@ profile is active emailadmin it Il profilo è attivo
profile list emailadmin it Elenco Profili
profile name emailadmin it Nome Profilo
qmaildotmode emailadmin it qmaildotmode
qouta size in mbyte emailadmin it dimensione quota in MByte
quota settings emailadmin it impostazioni quota
quota size in mbyte emailadmin it dimensione quota in MByte
remove emailadmin it rimuovi
reset filter emailadmin it Reimposta filtro
select type of imap server emailadmin it Seleziona il tipo di server IMAP
@ -116,6 +120,7 @@ standard emailadmin it Standard
standard imap server emailadmin it Server IMAP standard
standard pop3 server emailadmin it Server POP3 standard
standard smtp-server emailadmin it Server SMTP standard
starts with emailadmin it Comincia con
stationery emailadmin it Modeillo
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin it Il server IMAP sembra non supportare il metodo di autenticazione scelto. Contatta il tuo amministratore di sistema.
this php has no imap support compiled in!! emailadmin it PHP non è stato compilato con supporto IMAP!
@ -131,7 +136,9 @@ use predefined username and password defined below emailadmin it Utilizza il nom
use smtp auth emailadmin it usa autenticazione SMTP
use tls authentication emailadmin it usa autenticazione TLS
use tls encryption emailadmin it usa crittografia TLS
use users email-address (as seen in useraccount) emailadmin it Utilizza l'indirizzo email come impostato nell'account utente
user can edit forwarding address emailadmin it l'utente può modificare indirizzo di inoltro
userid@domain eg. u1234@domain emailadmin it UserId@dominio p.es. u1234@dominio
username (standard) emailadmin it Nome utente (standard)
username/password defined by admin emailadmin it Nome utente / password definiti dall'amministratore
username@domainname (virtual mail manager) emailadmin it nomeutente@nome dominio (ManaGeR MAIL Virtuale)
@ -139,5 +146,7 @@ users can define their own emailaccounts emailadmin it Gli utenti possono defini
users can define their own identities emailadmin it Gli utenti possono definire le loro identità personali
users can define their own signatures emailadmin it Gli utenti possono definire le loro firme personali
users can utilize these stationery templates emailadmin it Gli utenti possono utilizzare questi modelli
vaction messages with start- and end-date require an admin account to be set! emailadmin it Il messaggio di "vacanze" con data inizio e data fine può essere impostato da un account amministrativo!
virtual mail manager emailadmin it ManaGeR MAIL Virtuale
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin it Sì, utilizza le credenziali sottostanti solo per allarmi e notifiche, altrimenti usa le credenziali dell'utente attuale
yes, use credentials of current user or if given credentials below emailadmin it Sì, utilizza le credenziali dell'utente attuale oppure, se date, e credenziali qui sotto
you have received a new message on the emailadmin it Hai ricevuto un nuovo messaggio sul

View File

@ -16,6 +16,7 @@ email address emailadmin iw כתובת דואר אלקטרוני
enable cyrus imap server administration emailadmin iw Cyrus IMAP איפשור ניהול שרת
enable sieve emailadmin iw Sieve אישפור
enter your default mail domain (from: user@domain) emailadmin iw (user@domain :ציין את דומיין דואר המחדלי שלך (לדוגמא
entry saved emailadmin iw הרשומה נשמרה
forward also to emailadmin iw להעביר גם אל
forward email's to emailadmin iw להעביר דואר אלקטרוני אל
forward only emailadmin iw העבר בלבד
@ -47,7 +48,6 @@ postfix with ldap emailadmin iw LDAP עם Postfix
profile list emailadmin iw רשימת פרופילים
profile name emailadmin iw שם פרופיל
qmaildotmode emailadmin iw qmaildotmode
qouta size in mbyte emailadmin iw MB-גודל הקצאה ב
quota settings emailadmin iw הגדרות הקצאה
remove emailadmin iw הסר
select type of imap/pop3 server emailadmin iw IMAP/POP3 בחר סוג שרת

View File

@ -16,6 +16,7 @@ order emailadmin lo Order
postfix with ldap emailadmin lo Postfix ດ້ວຍ LDAP
qmaildotmode emailadmin lo qmaildotmode
quota settings emailadmin lo ໂກຕ້າການຕັ້ງຄ່າ
quota size in mbyte emailadmin lo ຂະໜາດໂກຕ້າໃນ ເມກະໄບທ
remove emailadmin lo ລຶບອອກ
standard emailadmin lo ມາດຕະຖານ
standard imap server emailadmin lo ມາດຕະຖານ IMAP ເຊີເວີ້

View File

@ -15,6 +15,7 @@ email address emailadmin lv e-pasta adrese
enable cyrus imap server administration emailadmin lv atļaut Cyrus IMAP servera administrēšanu
enable sieve emailadmin lv atļaut Sieve
enter your default mail domain (from: user@domain) emailadmin lv Ievadi noklusēto pasta domēnu (no: lietotājs@domēns)
entry saved emailadmin lv Ieraksts saglabāts
forward also to emailadmin lv pārsūtīt arī
forward email's to emailadmin lv pārsūtīt e-pasta vēstules
forward only emailadmin lv tikai pārsūtīt

View File

@ -41,8 +41,10 @@ enable sieve emailadmin nl activeer Sieve
encrypted connection emailadmin nl versleutelde verbinding
encryption settings emailadmin nl encryptie instellingen
enter your default mail domain (from: user@domain) emailadmin nl Voer uw standaard emaildomein in (uit: gebruiker@domein)
entry saved emailadmin nl Record opgeslagen
error connecting to imap server. %s : %s. emailadmin nl Fout verbinden met de IMAP server. %s : %s
error connecting to imap server: [%s] %s. emailadmin nl Fout verbinden met de IMAP server: [%s] %s
error saving the entry!!! emailadmin nl Fout bij het bewaren van de invoer!!!
filtered by account emailadmin nl gefilterd op Account
filtered by group emailadmin nl gefilterd op Groep
forward also to emailadmin nl Ook doorsturen naar
@ -92,8 +94,8 @@ profile is active emailadmin nl profiel is actief
profile list emailadmin nl Profiellijst
profile name emailadmin nl Profielnaam
qmaildotmode emailadmin nl qmaildotmode
qouta size in mbyte emailadmin nl quota grootte in MBytes
quota settings emailadmin nl Quota-installingen
quota size in mbyte emailadmin nl quota grootte in MByte
remove emailadmin nl Verwijderen
reset filter emailadmin nl filter opnieuw instellen
select type of imap server emailadmin nl selecteer IMAP servertype
@ -135,5 +137,5 @@ username@domainname (virtual mail manager) emailadmin nl gebruikersnaam@domeinna
users can define their own emailaccounts emailadmin nl Gebruikers kunnen hun eigen emailaccounts definiëren
users can define their own identities emailadmin nl gebruikers kunnen hun eigen identiteit instellen
users can define their own signatures emailadmin nl gebruikers kunnen hun eigen ondertekening instellen
vaction messages with start- and end-date require an admin account to be set! emailadmin nl Afwezigheidsmeldingen met een start- en einddatum vereisen dat een beheerders account is ingesteld!
virtual mail manager emailadmin nl Virtual MAIL ManaGeR
you have received a new message on the emailadmin nl U heeft een nieuw bericht ontvangen op de

View File

@ -16,6 +16,8 @@ email address emailadmin no E-mailadresse
enable cyrus imap server administration emailadmin no Tillat Cyrus IMAP-tjener administrasjon
enable sieve emailadmin no Tillat Sieve
enter your default mail domain (from: user@domain) emailadmin no Registrer ditt standard Emaildomene (fra: bruker@domene)
entry saved emailadmin no Registrering lagret
error saving the entry!!! emailadmin no Feil ved lagring av forekomst!
forward also to emailadmin no videresend også til
forward email's to emailadmin no videresend e-mailer til
forward only emailadmin no bare videresending
@ -47,8 +49,8 @@ postfix with ldap emailadmin no Postfix med LDAP
profile list emailadmin no Profilliste
profile name emailadmin no Profilnavn
qmaildotmode emailadmin no qmaildotmodus
qouta size in mbyte emailadmin no Grense Str. i Mbyte
quota settings emailadmin no Grenseinstillinger
quota size in mbyte emailadmin no Grense Str. i Mbyte
remove emailadmin no fjern
select type of imap/pop3 server emailadmin no Velg type for IMAP/POP3 Tjener
select type of smtp server emailadmin no Velg type SMTP Tjener

View File

@ -42,8 +42,10 @@ enable sieve emailadmin pl aktywuj sito (Sieve)
encrypted connection emailadmin pl połączenie szyfrowane
encryption settings emailadmin pl ustawienia szyfrowania
enter your default mail domain (from: user@domain) emailadmin pl Wprowadź domyślną domenę pocztową (z użytkownik@domena)
entry saved emailadmin pl Wpis zachowany
error connecting to imap server. %s : %s. emailadmin pl Błąd połączenia do serwera IMAP. %s : %s
error connecting to imap server: [%s] %s. emailadmin pl Błąd połączenia do serwera IMAP. [%s] %s
error saving the entry!!! emailadmin pl Błąd przy zachowywaniu wpisu !!!
filtered by account emailadmin pl Filtrowane przez konto
filtered by group emailadmin pl Filtrowane przez grupe
forward also to emailadmin pl Prześlij również do
@ -94,8 +96,8 @@ profile is active emailadmin pl Profil jest aktywny
profile list emailadmin pl Lista profili
profile name emailadmin pl Nazwa Profilu
qmaildotmode emailadmin pl qmaildotmode
qouta size in mbyte emailadmin pl rozmiar quoty w megabajtach
quota settings emailadmin pl ustawnienia quoty
quota size in mbyte emailadmin pl ograniczenie w megabajtach
remove emailadmin pl Usuń
reset filter emailadmin pl Resetuj filtr
select type of imap server emailadmin pl Wybierz rodzaj serwera IMAP
@ -131,6 +133,7 @@ use predefined username and password defined below emailadmin pl Skorzystaj z pr
use smtp auth emailadmin pl Skorzystaj z autentykacji SMTP
use tls authentication emailadmin pl Skorzystaj z autentykacji TLS
use tls encryption emailadmin pl Skorzystaj z szyfrowania TLS
use users email-address (as seen in useraccount) emailadmin pl użyj adresu użytkownika (taki jak widoczny w opcjach konta)
user can edit forwarding address emailadmin pl Użytkownik może zmieniać adres przekazywania
username (standard) emailadmin pl login (standardowo)
username/password defined by admin emailadmin pl Nazwa uzytkownika/Hasło określone przez administratora
@ -139,5 +142,5 @@ users can define their own emailaccounts emailadmin pl Użytkownicy mogą defini
users can define their own identities emailadmin pl Użytkownicy mogą definiować swoje własne tożsamości
users can define their own signatures emailadmin pl Użytkownicy mogą definiować swoje własne podpisy
users can utilize these stationery templates emailadmin pl Użytkownicy mogą użyć tych szablonów stacjonarnych
vaction messages with start- and end-date require an admin account to be set! emailadmin pl Wiadomość urlopowa z datą początkową i końcową wymaga uprawnień administratora!
virtual mail manager emailadmin pl Wirtualny Serwer Pocztowy - zarządca
you have received a new message on the emailadmin pl Otrzymałeś nową wiadomość o

View File

@ -0,0 +1,140 @@
account '%1' not found !!! emailadmin pt-br Conta '%1' não encontrada !!!
add new email address: emailadmin pt-br Adicionar novo e-mail:
add profile emailadmin pt-br Adicionar Perfil
admin dn emailadmin pt-br dn do administrador
admin password emailadmin pt-br senha do administrador
admin username emailadmin pt-br nome de usuário do administrador
advanced options emailadmin pt-br opções avançadas
alternate email address emailadmin pt-br endereço de e-mail alternativo
any application emailadmin pt-br qualquer aplicação
any group emailadmin pt-br qualquer grupo
any user emailadmin pt-br qualquer usuário
back to admin/grouplist emailadmin pt-br Voltar para Administração/Lista de Grupos
back to admin/userlist emailadmin pt-br Voltar para Administração/Lista de Usuários
bad login name or password. emailadmin pt-br Nome de usuário ou senha inválido(s).
bad or malformed request. server responded: %s emailadmin pt-br Solicitação inválida. Resposta do servidor: %s
bad request: %s emailadmin pt-br Solicitação inválida: %s
can be used by application emailadmin pt-br pode ser usado pela aplicação
can be used by group emailadmin pt-br pode ser usado pelo grupo
can be used by user emailadmin pt-br pode ser usado pelo usuário
connection dropped by imap server. emailadmin pt-br Conexão interrompida pelo servidor IMAP.
could not complete request. reason given: %s emailadmin pt-br Não foi possível completar a solicitação. Resposta do servidor: %s
could not open secure connection to the imap server. %s : %s. emailadmin pt-br Não foi possível abrir conexão segura com o servidor IMAP. %s : %s.
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin pt-br CRAM-MD5 ou DIGEST-MD5 necessitam que o pacote Auth_SASL esteja instalado.
cyrus imap server emailadmin pt-br Servidor Cyrus IMAP
cyrus imap server administration emailadmin pt-br Administração do Servidor Cyrus IMAP
default emailadmin pt-br padrão
deliver extern emailadmin pt-br entrega externa
do not validate certificate emailadmin pt-br não validar certificado
do you really want to delete this profile emailadmin pt-br Tem certeza que deseja remover esse perfil?
do you really want to reset the filter for the profile listing emailadmin pt-br Tem certeza que deseja reiniciar o filtro para a listagem do perfil
domainname emailadmin pt-br nome do domínio
edit email settings emailadmin pt-br editar configurações de e-mail
email account active emailadmin pt-br conta de e-mail ativa
email address emailadmin pt-br endrereço de e-mail
email settings common pt-br Configurações do E-mail
emailadmin emailadmin pt-br Administração do E-Mail
emailadmin: group assigned profile common pt-br Administração de eMail: Perfil de Grupo
emailadmin: user assigned profile common pt-br Administração de eMail: Perfil de Usuário
enable cyrus imap server administration emailadmin pt-br habilitar administração do Servidor Cyrus IMAP
enable sieve emailadmin pt-br habilitar Sieve
encrypted connection emailadmin pt-br conexão criptografada
encryption settings emailadmin pt-br configurações de criptografia
enter your default mail domain (from: user@domain) emailadmin pt-br Entre com o domínio de e-mail padrão (de: usuario@dominio)
entry saved emailadmin pt-br Registro salvo
error connecting to imap server. %s : %s. emailadmin pt-br Erro conectando ao servidor IMAP. %s : %s.
error connecting to imap server: [%s] %s. emailadmin pt-br Erro conectando ao servidor IMAP: [%s] %s.
error saving the entry!!! emailadmin pt-br Erro salvando o registro!!
filtered by account emailadmin pt-br filtrado por Conta
filtered by group emailadmin pt-br filtrado por Grupo
forward also to emailadmin pt-br encaminhar também para
forward email's to emailadmin pt-br encaminhar mensagens para
forward only emailadmin pt-br encaminhar somente
global options emailadmin pt-br opções globais
if using ssl or tls, you must have the php openssl extension loaded. emailadmin pt-br Se estiver usando SSL ou TLS, você deverá ter a extensão PHP 'openssl' carretada.
imap admin password admin pt-br Senha do administrador IMAP
imap admin user admin pt-br Usuário administrador do IMAP
imap c-client version < 2001 emailadmin pt-br IMAP C-Cliente Versão < 2001
imap server closed the connection. emailadmin pt-br O servidor IMAP fechou a conexão.
imap server closed the connection. server responded: %s emailadmin pt-br O servidor IMAP fechou a conexão. Resposta do servidor: %s
imap server hostname or ip address emailadmin pt-br Nome ou IP do servidor IMAP
imap server logintyp emailadmin pt-br Tipo de login do servidor IMAP
imap server name emailadmin pt-br nome do servidor imap
imap server port emailadmin pt-br Porta do servidor IMAP
imap/pop3 server name emailadmin pt-br Nome do servidor IMAP/POP3
in mbyte emailadmin pt-br em Mbytes
inactive emailadmin pt-br inativo
ldap basedn emailadmin pt-br DN Base do LDAP
ldap server emailadmin pt-br Servidor LDAP
ldap server accounts dn emailadmin pt-br Contas DN de servidores LDAP
ldap server admin dn emailadmin pt-br Administrador DN de servidor LDAP
ldap server admin password emailadmin pt-br Senha do administrador DN de servidor LDAP
ldap server hostname or ip address emailadmin pt-br Nome ou endereço IP do servidor LDAP
ldap settings emailadmin pt-br Configurações do LDAP
leave empty for no quota emailadmin pt-br deixe em branco para nenhuma quota
mail settings admin pt-br Configurações de E-Mail
name of organisation emailadmin pt-br Nome da organização
no alternate email address emailadmin pt-br sem conta de e-mail alternativa
no encryption emailadmin pt-br sem criptografia
no forwarding email address emailadmin pt-br sem conta de e-mail para encaminhar
no message returned. emailadmin pt-br Nenhuma mensagem retornada.
no supported imap authentication method could be found. emailadmin pt-br Nenhum método de autenticação IMAP suportado pôde ser encontrado.
order emailadmin pt-br ordem
organisation emailadmin pt-br organização
plesk can't rename users --> request ignored emailadmin pt-br Plesk não pode renomear usuários --> solicitação ignorada
plesk imap server (courier) emailadmin pt-br Servidor IMAP Plesk (Courier)
plesk mail script '%1' not found !!! emailadmin pt-br Script de e-mail Plesk '%1' não encontrado !!!
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin pt-br Plesk exige que senhas tenha no mínimo 5 caracteres e não contenham o nome da conta --> senha NÃO configurada!!!
plesk smtp-server (qmail) emailadmin pt-br Servidor SMTP Plesk (Qmail)
pop3 server hostname or ip address emailadmin pt-br Nome ou endereço IP do servidor POP3
pop3 server port emailadmin pt-br Porta do servidor POP3
postfix with ldap emailadmin pt-br Postfix com LDAP
profile access rights emailadmin pt-br direito de acesso aos perfis
profile is active emailadmin pt-br perfil está ativo
profile list emailadmin pt-br Lista de perfis
profile name emailadmin pt-br Nome do perfil
qmaildotmode emailadmin pt-br modo dos arquivos qmail (.qmail)
quota settings emailadmin pt-br configurações de quota
quota size in mbyte emailadmin pt-br tamanho da cota em MByte
remove emailadmin pt-br remover
reset filter emailadmin pt-br reiniciar filtro
select type of imap server emailadmin pt-br selecione o tipo de servidor IMAP
select type of imap/pop3 server emailadmin pt-br Selecione o tipo de servidor IMAP/POP3
select type of smtp server emailadmin pt-br Selecione o tipo de servidor SMTP
server settings emailadmin pt-br configurações do servidor
sieve server hostname or ip address emailadmin pt-br Nome ou endereço IP do servidor Sieve
sieve server port emailadmin pt-br Porta do Servidor Sieve
sieve settings emailadmin pt-br Configurações Sieve
smtp authentication emailadmin pt-br autenticação smtp
smtp options emailadmin pt-br opções smtp
smtp server name emailadmin pt-br Nome do Servidor SMTP
smtp settings emailadmin pt-br configurações SMTP
smtp-server hostname or ip address emailadmin pt-br Nome ou endereço IP do servidor SMTP
smtp-server port emailadmin pt-br Porta do servidor SMTP
standard emailadmin pt-br Padrão
standard imap server emailadmin pt-br Servidor IMAP padrão
standard pop3 server emailadmin pt-br Servidor POP3 padrão
standard smtp-server emailadmin pt-br Servidor SMTP padrão
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin pt-br O servidor IMAP não parece suportar o método de autenticação selecionado. Por favor contacte o administrador do seu sistema.
this php has no imap support compiled in!! emailadmin pt-br Este PHP não tem suporte a IMAP compilado nele!
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin pt-br Para usar uma conexão TLS, você deve estar rodando PHP versão 5.1.0 ou maior.
unexpected response from server to authenticate command. emailadmin pt-br Resposta inesperada do servidor para o comando AUTHENTICATE.
unexpected response from server to digest-md5 response. emailadmin pt-br Resposta inesperada do servidor para a resposta Digest-MD5.
unexpected response from server to login command. emailadmin pt-br Resposta inesperada do servidor para o comando LOGIN.
unknown imap response from the server. server responded: %s emailadmin pt-br Resposta desconhecida do servidor IMAP. Resposta do servidor: %s
unsupported action '%1' !!! emailadmin pt-br Ação não suportada: '%1' !!!
update current email address: emailadmin pt-br Atualizar e-mail atual:
use ldap defaults emailadmin pt-br usar padrões LDAP
use predefined username and password defined below emailadmin pt-br Usar usuário e senha pré-definidos abaixo
use smtp auth emailadmin pt-br usar SMTP Autenticado
use tls authentication emailadmin pt-br Usar autenticação TLS
use tls encryption emailadmin pt-br Usar encriptação TLS
user can edit forwarding address emailadmin pt-br usuário pode editar endereço de encaminhamento
username (standard) emailadmin pt-br nome do usuário (padrão)
username/password defined by admin emailadmin pt-br Nome de usuário/Senha definidos pelo administrador
username@domainname (virtual mail manager) emailadmin pt-br nomedousuario@nomedodominio (Gerenciador Virtual Mail)
users can define their own emailaccounts emailadmin pt-br Os usuários podem definir sua próprias contas de correio
users can define their own identities emailadmin pt-br usuários podem definir suas próprias identidades
users can define their own signatures emailadmin pt-br usuários podem definir suas próprias assinaturas
virtual mail manager emailadmin pt-br Gerenciador Virtual Mail
you have received a new message on the emailadmin pt-br Você recebeu uma nova mensagem na

View File

@ -21,6 +21,8 @@ enable cyrus imap server administration emailadmin pt Activar administração do
enable sieve emailadmin pt Activar Sieve
encryption settings emailadmin pt Definições de cifragem
enter your default mail domain (from: user@domain) emailadmin pt Insira o seu domínio de correio electrónico por omissão (de: utilizador@domínio)
entry saved emailadmin pt Registo guardado
error saving the entry!!! emailadmin pt Erro ao guardar o registo!!!
forward also to emailadmin pt Reencaminhar também para
forward email's to emailadmin pt Reencaminhar mensagens para
forward only emailadmin pt Reencaminhar apenas
@ -54,8 +56,8 @@ profile access rights emailadmin pt Perfil de direitos de acesso
profile list emailadmin pt Lista de perfis
profile name emailadmin pt Nome do perfil
qmaildotmode emailadmin pt Quota do correio electrónico no modo Idot
qouta size in mbyte emailadmin pt Quota em MBytes
quota settings emailadmin pt Configurações da quota
quota size in mbyte emailadmin pt tamanho da quota em MBytes
remove emailadmin pt Remover
select type of imap/pop3 server emailadmin pt Seleccionar tipo de servidor IMAP/POP3
select type of smtp server emailadmin pt Seleccionar tipo de servidor SMTP

View File

@ -1,3 +1,4 @@
%1 entries deleted. emailadmin ru %1 записи удалены.
account '%1' not found !!! emailadmin ru Учетная запись '%1' не найдена !!!
active templates emailadmin ru Активные шаблоны
add new email address: emailadmin ru Добавить новый адрес эл. почты:
@ -42,8 +43,11 @@ enable sieve emailadmin ru Включить Sieve
encrypted connection emailadmin ru зашифрованное соединение
encryption settings emailadmin ru Настройки шифрования
enter your default mail domain (from: user@domain) emailadmin ru Укажите ваш почтовый домен по умолчанию (от: user@domain)
entry saved emailadmin ru Запись сохранена.
error connecting to imap server. %s : %s. emailadmin ru Ошибка соединения с сервером IMAP. %s : %s.
error connecting to imap server: [%s] %s. emailadmin ru Ошибка соединения с сервером IMAP: [%s] %s.
error deleting entry! emailadmin ru Ошибка при удалении записи!
error saving the entry!!! emailadmin ru Ошибка при сохранении записи!
filtered by account emailadmin ru отфильтровано по Учетной записи
filtered by group emailadmin ru отфильтровано по группе
forward also to emailadmin ru Переслать также в
@ -94,8 +98,8 @@ profile is active emailadmin ru профиль активен
profile list emailadmin ru Список профиля
profile name emailadmin ru Название профиля
qmaildotmode emailadmin ru режим qmaildot
qouta size in mbyte emailadmin ru Размер квоты МБайт
quota settings emailadmin ru Настройки квотирования
quota size in mbyte emailadmin ru Размер квоты МБайт
remove emailadmin ru Удалить
reset filter emailadmin ru очистить фильтр
select type of imap server emailadmin ru выбор типа сервера IMAP
@ -116,6 +120,7 @@ standard emailadmin ru Стандартный
standard imap server emailadmin ru Стандартный IMAP сервер
standard pop3 server emailadmin ru Стандартный POP3 сервер
standard smtp-server emailadmin ru Стандартный SMTP сервер
starts with emailadmin ru Начинается с
stationery emailadmin ru Бланк
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin ru Сервер IMAP не сообщил о поддержке выбранного метода авторизации. Пожалуйста свяжитесь со своим системным администратором.
this php has no imap support compiled in!! emailadmin ru Эта версия PHP собрана без поддержки IMAP!!
@ -131,7 +136,9 @@ use predefined username and password defined below emailadmin ru Использ
use smtp auth emailadmin ru Использовать авторизацию SMTP
use tls authentication emailadmin ru Использовать авторизацию TLS
use tls encryption emailadmin ru Использовать шифрование TLS
use users email-address (as seen in useraccount) emailadmin ru Используйте адреса эл.почты пользователя, как указано в настройках аккаунта пользователя.
user can edit forwarding address emailadmin ru Ползователь может редактировать адрес пересылки.
userid@domain eg. u1234@domain emailadmin ru UserId@domain например u1234@domain
username (standard) emailadmin ru имя пользователя (стандартное)
username/password defined by admin emailadmin ru Имя пользователя/Пароль установлены администратором
username@domainname (virtual mail manager) emailadmin ru username@domainname (Менеджер Виртуальной почты)
@ -139,5 +146,8 @@ users can define their own emailaccounts emailadmin ru Пользователь
users can define their own identities emailadmin ru пользователи могут устанавливать свои собственные данные идентификации
users can define their own signatures emailadmin ru пользователи могут устанавливать свои собственные подписи
users can utilize these stationery templates emailadmin ru Пользователи могут использовать эти бланки шаблонов
vaction messages with start- and end-date require an admin account to be set! emailadmin ru Vaction-сообщения (сообщения об отпуске? вакансиях? высвобождении? незанятых периодах? вовсе сообщения от объекта Java VAction? сообщения виртуальных действий?) с датами начала и окончания требуют установленной учетной записи администратора!
vacation messages with start- and end-date require an admin account to be set emailadmin ru Сообщения автоответчика с датами начала и окончания требуют установленной учетной записи администратора!
virtual mail manager emailadmin ru Менеджер Виртуальной почты
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin ru Да, использовать учётные данные, указанные ниже только для предупреждений и напоминаний, в остальных случаях использовать учётные данные текущего пользователя.
yes, use credentials of current user or if given credentials below emailadmin ru Да, использовать учётные данные текущего пользователя, или если указаны учётные данные ниже.
you have received a new message on the emailadmin ru Вы получили сообщения на

View File

@ -1,3 +1,4 @@
%1 entries deleted. emailadmin sk %1 položiek odstránených.
account '%1' not found !!! emailadmin sk Účet '%1' sa nenašiel !!!
active templates emailadmin sk Aktívne šablóny
add new email address: emailadmin sk Pridať novú E-mailovú adresu:
@ -42,8 +43,11 @@ enable sieve emailadmin sk zapnúť Sieve
encrypted connection emailadmin sk šifrované spojenie
encryption settings emailadmin sk nastavenia šifrovania
enter your default mail domain (from: user@domain) emailadmin sk Zadajte vašu predvolenú doménu (z tvaru: user@domain)
entry saved emailadmin sk Položka bola uložená
error connecting to imap server. %s : %s. emailadmin sk Chyba počas pripájania k IMAP serveru. %s : %s.
error connecting to imap server: [%s] %s. emailadmin sk Chyba počas pripájania k IMAP serveru: [%s] %s.
error deleting entry! emailadmin sk Chyba pri odstraňovaní položky!
error saving the entry!!! emailadmin sk Chyba pri ukladaní položky!!!
filtered by account emailadmin sk filtrované podľa Účtu
filtered by group emailadmin sk filtrované podľa Skupiny
forward also to emailadmin sk preposlať taktiež (komu)
@ -93,8 +97,8 @@ profile is active emailadmin sk profil je aktívny
profile list emailadmin sk Zoznam profilov
profile name emailadmin sk Názov profilu
qmaildotmode emailadmin sk qmail bodkový režim
qouta size in mbyte emailadmin sk Neľkosť kvóty v Megabajtoch
quota settings emailadmin sk Nastavenia kvóty
quota size in mbyte emailadmin sk veľkosť kvóty v Megabajtoch
remove emailadmin sk Odstrániť
reset filter emailadmin sk vynulovať filter
select type of imap server emailadmin sk Vyberte typ IMAP servera
@ -115,6 +119,7 @@ standard emailadmin sk Štandard
standard imap server emailadmin sk Štandardný IMAP server
standard pop3 server emailadmin sk Štandardný POP3 server
standard smtp-server emailadmin sk Štandardný SMTP server
starts with emailadmin sk začať s
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin sk Tento IMAP server, zdá sa, nepodporuje zvolenú overovaciu metódu. Prosím kontaktujte správcu systému.
this php has no imap support compiled in!! emailadmin sk Toto PHP nemá zakompilovanú podporu pre IMAP !!
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin sk Ak chcete používať pripojenie TLS, musíte fungovať na verzii PHP 5.1.0 alebo vyššej.
@ -129,6 +134,7 @@ use predefined username and password defined below emailadmin sk Použiť predde
use smtp auth emailadmin sk Použiť SMTP overovanie
use tls authentication emailadmin sk Použiť TLS overovanie
use tls encryption emailadmin sk Použiť TLS šifrovanie
use users email-address (as seen in useraccount) emailadmin sk použiť emailové adresy používateľov (ako vidno v používateľskom účte)
user can edit forwarding address emailadmin sk Používateľ môže upraviť adresu preposielania
username (standard) emailadmin sk používateľské meno (štandardné)
username/password defined by admin emailadmin sk Používateľské meno/heslo definované správcom
@ -136,5 +142,7 @@ username@domainname (virtual mail manager) emailadmin sk používateľ@doména (
users can define their own emailaccounts emailadmin sk Používatelia môžu definovať ich vlastné E-mailové účty
users can define their own identities emailadmin sk Používatelia môžu definovať svoje vlastné identity
users can define their own signatures emailadmin sk Používatelia môžu definovať svoje vlastné podpisy
vaction messages with start- and end-date require an admin account to be set! emailadmin sk Správy v neprítomnosti s počiatočným a koncovým dátumom vyžadujú, aby bol nastavený účet správcu!
virtual mail manager emailadmin sk Virtuálny MAIL ManaGeR
yes, use credentials below only for alarms and notifications, otherwise use credentials of current user emailadmin sk Áno, použiť nižšieuvedené prístupové údaje iba pre upozornenia, ináč použiť prístupové údaje aktuálneho používateľa
yes, use credentials of current user or if given credentials below emailadmin sk Áno, použiť prístupové údaje aktuálneho používateľa, alebo prístupové údaje uvedené nižšie ak sú vyplnené
you have received a new message on the emailadmin sk Obdržali ste novú správu ohľadom

View File

@ -41,8 +41,10 @@ enable sieve emailadmin sl Omogoči Sieve
encrypted connection emailadmin sl Kodirana povezava
encryption settings emailadmin sl Nastavitve šifriranja
enter your default mail domain (from: user@domain) emailadmin sl Vnesite privzeto domeno (oblika: uporabnik@domena)
entry saved emailadmin sl Vnos shranjen
error connecting to imap server. %s : %s. emailadmin sl Napaka pri povezavi s strežnikom IMAP. %s: %s.
error connecting to imap server: [%s] %s. emailadmin sl Napaka pri povezavi s strežnikom IMAP: [%s] %s.
error saving the entry!!! emailadmin sl Napaka pri shranjevanju vnosa!
filtered by account emailadmin sl Filtrirano s strani računa
filtered by group emailadmin sl Filtrirano s strani skupine
forward also to emailadmin sl Posreduj tudi
@ -92,8 +94,8 @@ profile is active emailadmin sl Profil je aktiven
profile list emailadmin sl Seznam profilov
profile name emailadmin sl Ime profila
qmaildotmode emailadmin sl Način za qmaildot
qouta size in mbyte emailadmin sl Kvota v MB
quota settings emailadmin sl Nastavitvev kvote
quota size in mbyte emailadmin sl Velikost kvote v MB
remove emailadmin sl Odstrani
reset filter emailadmin sl Ponastavi filter
select type of imap server emailadmin sl Izberite vrsto strežnika IMAP
@ -135,5 +137,5 @@ username@domainname (virtual mail manager) emailadmin sl uporabnik@domena (Virtu
users can define their own emailaccounts emailadmin sl Uporabniki lahko določajo lastne E-poštne predale
users can define their own identities emailadmin sl Uporabniki lahko določijo lastne identitete
users can define their own signatures emailadmin sl Uporabniki lahko določijo lastne podpise
vaction messages with start- and end-date require an admin account to be set! emailadmin sl Nastavitev sporočila o odsotnosti z začetnim in končnim datumom zahteva nastavljen administratorski račun!
virtual mail manager emailadmin sl Virtualni upravljalec E-pošte
you have received a new message on the emailadmin sl Prejeli ste novo sporočilo na

View File

@ -25,8 +25,10 @@ enable cyrus imap server administration emailadmin sv Aktivera Cyrus IMAP server
enable sieve emailadmin sv Aktivera Sieve
encrypted connection emailadmin sv Krypterad anslutning
enter your default mail domain (from: user@domain) emailadmin sv Standard e-post domän (från: user@domain)
entry saved emailadmin sv Post sparad
error connecting to imap server. %s : %s. emailadmin sv Kunde inte ansluta till IMAP server %s : %s
error connecting to imap server: [%s] %s. emailadmin sv Kunde inte ansluta till IMAP server [%s] %s
error saving the entry!!! emailadmin sv Fel uppstod vid sparandet av posten!
forward also to emailadmin sv Vidarebefodra även till
forward email's to emailadmin sv Vidarebefodra e-post till
forward only emailadmin sv Vidarebefodra endast
@ -64,8 +66,8 @@ postfix with ldap emailadmin sv Postfix med LDAP
profile list emailadmin sv Profil lista
profile name emailadmin sv Profil namn
qmaildotmode emailadmin sv qmaildotmode
qouta size in mbyte emailadmin sv Kvot storlek i Mb
quota settings emailadmin sv Kvot alternativ
quota size in mbyte emailadmin sv Kvotstorlek i Mb
remove emailadmin sv Radera
select type of imap/pop3 server emailadmin sv Välj typ av IMAP/POP3 server
select type of smtp server emailadmin sv Välj typ av SMTP Server

View File

@ -0,0 +1,123 @@
account '%1' not found !!! emailadmin zh-tw 找不到帳號 '%1'
add new email address: emailadmin zh-tw 新增信箱:
add profile emailadmin zh-tw 新增資料
admin dn emailadmin zh-tw 管理 dn
admin password emailadmin zh-tw 管理密碼
admin username emailadmin zh-tw 管理帳號
advanced options emailadmin zh-tw 進階選項
alternate email address emailadmin zh-tw 替代郵件位址
any application emailadmin zh-tw 任何模組
any group emailadmin zh-tw 任何群組
bad login name or password. emailadmin zh-tw 帳號或密碼有誤。
bad or malformed request. server responded: %s emailadmin zh-tw 錯誤的請求,伺服器回應: %s
bad request: %s emailadmin zh-tw 錯誤的請求: %s
can be used by application emailadmin zh-tw 可以取用資料的模組
can be used by group emailadmin zh-tw 可以取用資料的群組
connection dropped by imap server. emailadmin zh-tw 連線被 IMAP 伺服器中斷了
could not complete request. reason given: %s emailadmin zh-tw 無法完成請求,理由: %s
could not open secure connection to the imap server. %s : %s. emailadmin zh-tw 無法開啟安全連線到 IMAP 伺服器。%s : %s.
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin zh-tw CRAM-MD5 或 DIGEST-MD5 需要先安裝 Auth_SASL 才能使用。
cyrus imap server emailadmin zh-tw Cyrus IMAP伺服器
cyrus imap server administration emailadmin zh-tw Cyrus IMAP伺服器管理
default emailadmin zh-tw 預設
deliver extern emailadmin zh-tw 傳送到外部
do not validate certificate emailadmin zh-tw 沒有可用的執照
do you really want to delete this profile emailadmin zh-tw 您確定要刪除這個資料
domainname emailadmin zh-tw 網域名稱
edit email settings emailadmin zh-tw 編輯郵件設定
email account active emailadmin zh-tw 郵件帳號啟用
email address emailadmin zh-tw 郵件位址
email settings common zh-tw 郵件設定
emailadmin emailadmin zh-tw 郵件管理
enable cyrus imap server administration emailadmin zh-tw 啟用Cyrus IMAP伺服器管理
enable sieve emailadmin zh-tw 啟用Sieve
encrypted connection emailadmin zh-tw 加密連線
encryption settings emailadmin zh-tw 加密設定
enter your default mail domain (from: user@domain) emailadmin zh-tw 輸入您的預設郵件網域(小老鼠後面所有字:帳號@網域)
entry saved emailadmin zh-tw 資料儲存了
error connecting to imap server. %s : %s. emailadmin zh-tw 連線到 IMAP 伺服器時發生錯誤。 %s : %s
error connecting to imap server: [%s] %s. emailadmin zh-tw 連線到 IMAP 伺服器時發生錯誤。 [%s] %s
error saving the entry!!! emailadmin zh-tw 儲存資料時發生錯誤!
forward also to emailadmin zh-tw 同時轉寄到
forward email's to emailadmin zh-tw 轉寄信件到
forward only emailadmin zh-tw 轉寄
global options emailadmin zh-tw 全域選項
if using ssl or tls, you must have the php openssl extension loaded. emailadmin zh-tw 如果使用 SSL 或 TLS您必須先載入 PHP openssl 外掛。
imap admin password admin zh-tw IMAP管理者密碼
imap admin user admin zh-tw IMAP管理者帳號
imap c-client version < 2001 emailadmin zh-tw IMAP C-終端的版本小於2001
imap server closed the connection. emailadmin zh-tw IMAP伺服器關閉連線
imap server closed the connection. server responded: %s emailadmin zh-tw IMAP伺服器關閉連線伺服器回應 %s
imap server hostname or ip address emailadmin zh-tw IMAP伺服器的主機名稱或是IP位址
imap server logintyp emailadmin zh-tw IMAP伺服器登入類型
imap server name emailadmin zh-tw IMAP伺服器名稱
imap server port emailadmin zh-tw IMAP伺服器連接埠
imap/pop3 server name emailadmin zh-tw IMAP/POP3伺服器名稱
in mbyte emailadmin zh-tw 以MB顯示
ldap basedn emailadmin zh-tw LDAP basedn
ldap server emailadmin zh-tw LDAP 伺服器
ldap server accounts dn emailadmin zh-tw LDAP 伺服器帳號 DN
ldap server admin dn emailadmin zh-tw LDAP 伺服器管理者 DN
ldap server admin password emailadmin zh-tw LDAP 伺服器管理者密碼
ldap server hostname or ip address emailadmin zh-tw LDAP 伺服器主機名稱或是IP位址
ldap settings emailadmin zh-tw LDAP 設定
leave empty for no quota emailadmin zh-tw 不填入任何資料表示無限制
mail settings admin zh-tw 郵件設定
name of organisation emailadmin zh-tw 組織名稱
no alternate email address emailadmin zh-tw 沒有可替換的郵件位址
no encryption emailadmin zh-tw 沒有加密
no forwarding email address emailadmin zh-tw 沒有轉寄郵件位址
no message returned. emailadmin zh-tw 沒有訊息回應。
no supported imap authentication method could be found. emailadmin zh-tw 找不到可以支援的 IMAP 認證方式。
order emailadmin zh-tw 順序
organisation emailadmin zh-tw 組織
plesk can't rename users --> request ignored emailadmin zh-tw Plesk 無法修改使用者名稱 --> 忽略
plesk imap server (courier) emailadmin zh-tw Plesk IMAP 伺服器(Courier)
plesk mail script '%1' not found !!! emailadmin zh-tw 找不到 Plesk 郵件指令 '%1'
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin zh-tw Plesk 要求密碼至少必須有 5 個字元而且不能包含帳號名稱 --> 密碼沒有設定!
plesk smtp-server (qmail) emailadmin zh-tw Plesk SMTP伺服器 (Qmail)
pop3 server hostname or ip address emailadmin zh-tw POP3伺服器主機名稱或是IP位址
pop3 server port emailadmin zh-tw POP3伺服器連接埠
postfix with ldap emailadmin zh-tw 使用LDAP與 Postfix
profile access rights emailadmin zh-tw 存取資料權限
profile list emailadmin zh-tw 資料清單
profile name emailadmin zh-tw 資料名稱
qmaildotmode emailadmin zh-tw qmaildotmode
quota settings emailadmin zh-tw 配額設定
quota size in mbyte emailadmin zh-tw 配額大小MB
remove emailadmin zh-tw 移除
select type of imap server emailadmin zh-tw 選擇IMAP伺服器類型
select type of imap/pop3 server emailadmin zh-tw 選擇IMAP/POP3伺服器的格式
select type of smtp server emailadmin zh-tw 選擇SMTP伺服器的格式
server settings emailadmin zh-tw 伺服器設定
sieve server hostname or ip address emailadmin zh-tw Sieve伺服器主機名稱或是IP位址
sieve server port emailadmin zh-tw Sieve伺服器連接埠
sieve settings emailadmin zh-tw Sieve設定
smtp authentication emailadmin zh-tw SMTP 認證
smtp options emailadmin zh-tw SMTP 選項
smtp server name emailadmin zh-tw SMTP伺服器名稱
smtp settings emailadmin zh-tw SMTP 設定
smtp-server hostname or ip address emailadmin zh-tw SMTP伺服器主機名稱或是IP位址
smtp-server port emailadmin zh-tw SMTP伺服器連接埠
standard emailadmin zh-tw 標準
standard imap server emailadmin zh-tw 標準IMAP伺服器
standard pop3 server emailadmin zh-tw 標準POP3伺服器
standard smtp-server emailadmin zh-tw 標準SMTP伺服器
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin zh-tw IMAP 伺服器不支援指定的認證方式,請聯絡您的系統管理員。
this php has no imap support compiled in!! emailadmin zh-tw 您的PHP並未編譯為支援IMAP的狀態
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin zh-tw 要使用 TLS 連線,您必須執行在 PHP 5.1.0 或是更新版本。
unexpected response from server to authenticate command. emailadmin zh-tw AUTHENTICATE 指令讓伺服器傳回不如預期的回應。
unexpected response from server to digest-md5 response. emailadmin zh-tw 伺服器傳回不如預期的 Digest-MD5 回應。
unexpected response from server to login command. emailadmin zh-tw 伺服器傳回不如預期的 LOGIN 指令。
unknown imap response from the server. server responded: %s emailadmin zh-tw 不知名的 IMAP 伺服器回應,回應內容: %s
unsupported action '%1' !!! emailadmin zh-tw 不支援 '%1' 這個操作!
update current email address: emailadmin zh-tw 更新目前信箱:
use ldap defaults emailadmin zh-tw 使用LDAP預設值
use smtp auth emailadmin zh-tw 使用SMTP認證
use tls authentication emailadmin zh-tw 使用TLS認證
use tls encryption emailadmin zh-tw 使用TLS加密
user can edit forwarding address emailadmin zh-tw 使用者可以編輯自動轉寄信箱
username (standard) emailadmin zh-tw 帳號(標準)
username@domainname (virtual mail manager) emailadmin zh-tw 帳號@網域(虛擬郵件管理)
users can define their own emailaccounts emailadmin zh-tw 使用者可以自行定義郵件帳號
virtual mail manager emailadmin zh-tw 虛擬郵件管理者

124
emailadmin/lang/egw_zh.lang Normal file
View File

@ -0,0 +1,124 @@
account '%1' not found !!! emailadmin zh 帐户 '%1' 未发现!
add new email address: emailadmin zh 添加新邮箱地址:
add profile emailadmin zh 添加 profile
admin dn emailadmin zh 管理 DN
admin password emailadmin zh 管理密码
admin username emailadmin zh 管理帐户
advanced options emailadmin zh 高级选项
alternate email address emailadmin zh 候选邮箱地址
any application emailadmin zh 任何用用程序
any group emailadmin zh 任何组
bad login name or password. emailadmin zh 错误登录名和密码。
bad or malformed request. server responded: %s emailadmin zh 不正确的请求。服务器或应:%s
bad request: %s emailadmin zh 错误请求:%s
can be used by application emailadmin zh 可用于应用程序
can be used by group emailadmin zh 可用于群组
connection dropped by imap server. emailadmin zh 连接被 IMAP 服务器中断。
could not complete request. reason given: %s emailadmin zh 无法完成请求。原因是:%s
could not open secure connection to the imap server. %s : %s. emailadmin zh 无法打开到 IMAP 服务器的安全连接。%s:%s。
cram-md5 or digest-md5 requires the auth_sasl package to be installed. emailadmin zh CRAM-MD5 或 DIGEST-MD5 需要安装 auth_sasl 包。
cyrus imap server emailadmin zh Cyrus IMAP 服务器
cyrus imap server administration emailadmin zh Cyrus IMAP 服务器管理
default emailadmin zh 默认
deliver extern emailadmin zh 传送外部
do not validate certificate emailadmin zh 不确认证书
do you really want to delete this profile emailadmin zh 您确定要删除这个 profile 文件
domainname emailadmin zh 域名
edit email settings emailadmin zh 编辑邮箱设置
email account active emailadmin zh 邮箱帐户激活
email address emailadmin zh 邮箱地址
email settings common zh 邮箱设置
emailadmin emailadmin zh 邮箱管理
enable cyrus imap server administration emailadmin zh 启用 Cyrus IMAP 服务器管理
enable sieve emailadmin zh 启用过滤
encrypted connection emailadmin zh 加密连接
encryption settings emailadmin zh 加密设置
enter your default mail domain (from: user@domain) emailadmin zh 输入您的默认邮箱域 (比如user@domain取@之后的所有词或字母)
entry saved emailadmin zh 条目已储存
error connecting to imap server. %s : %s. emailadmin zh 连接到 IMAP 服务器错误。%s : %s。
error connecting to imap server: [%s] %s. emailadmin zh 连接到 IMAP 服务器错误:[%s] %s。
error saving the entry!!! emailadmin zh 保存条目时发生错误!
forward also to emailadmin zh 同时转发到
forward email's to emailadmin zh 转发邮件到
forward only emailadmin zh 转发
global options emailadmin zh 全局选项
if using ssl or tls, you must have the php openssl extension loaded. emailadmin zh 如果使用 SSL 或 TLS您必须加载 PHP openssl 扩展。
imap admin password admin zh IMAP 管理者密码
imap admin user admin zh IMAP 管理者帐户
imap c-client version < 2001 emailadmin zh IMAP C-Clien 版本小 < 2001
imap server closed the connection. emailadmin zh IMAP 服务器关闭连接。
imap server closed the connection. server responded: %s emailadmin zh IMAP 服务器关闭连接。服务器回应:%s
imap server hostname or ip address emailadmin zh IMAP 服务器的主机名或 IP 地址
imap server logintyp emailadmin zh IMAP 服务器登录类型
imap server name emailadmin zh IMAP 服务器名
imap server port emailadmin zh IMAP 服务器端口号
imap/pop3 server name emailadmin zh IMAP / POP3 服务器名
in mbyte emailadmin zh 以 MB 表示
ldap basedn emailadmin zh LDAP basedn
ldap server emailadmin zh LDAP 服务器
ldap server accounts dn emailadmin zh LDAP 服务器帐户 DN
ldap server admin dn emailadmin zh LDAP 服务器管理员 DN
ldap server admin password emailadmin zh LDAP 服务器管管理员密码
ldap server hostname or ip address emailadmin zh LDAP 服务器主机名或 IP 地址
ldap settings emailadmin zh LDAP 设置
leave empty for no quota emailadmin zh 留空表示无限额
mail settings admin zh 邮箱设置
name of organisation emailadmin zh 组织名称
no alternate email address emailadmin zh 无备用邮箱地址
no encryption emailadmin zh 未加密
no forwarding email address emailadmin zh 没有转发邮件地址
no message returned. emailadmin zh 无返回消息。
no supported imap authentication method could be found. emailadmin zh 无支持 IMAP 认证的方法可以找到。
order emailadmin zh 排序
organisation emailadmin zh 组织
plesk can't rename users --> request ignored emailadmin zh Plesk 不能重命名用户 --> 请求忽略
plesk imap server (courier) emailadmin zh Plesk IMAP 服务器 (Courier)
plesk mail script '%1' not found !!! emailadmin zh Plesk 邮件脚本 '%1' 未找到!
plesk requires passwords to have at least 5 characters and not contain the account-name --> password not set!!! emailadmin zh Plesk 需要至少5个字符密码并且不包含帐户名 --> 密码未设置!
plesk smtp-server (qmail) emailadmin zh Plesk SMTP-Server (Qmail)
pop3 server hostname or ip address emailadmin zh POP3 服务器主机名或 IP 地址
pop3 server port emailadmin zh POP3 服务器端口号
postfix with ldap emailadmin zh LDAP 用于 Postfix
profile access rights emailadmin zh profile 访问权限
profile list emailadmin zh profile 列表
profile name emailadmin zh profile 名
qmaildotmode emailadmin zh qmaildotmode
quota settings emailadmin zh 配额设置
quota size in mbyte emailadmin zh 配额大小(MB)
remove emailadmin zh 移除
select type of imap server emailadmin zh 选择 IMAP 服务器类型
select type of imap/pop3 server emailadmin zh 选择 IMAP / POP3 服务器类型
select type of smtp server emailadmin zh 选择 SMAP 服务器类型
server settings emailadmin zh 服务器设置
sieve server hostname or ip address emailadmin zh Sieve 服务器主机名或 IP 地址
sieve server port emailadmin zh Sieve 服务器端口号
sieve settings emailadmin zh Sieve 设置
smtp authentication emailadmin zh SMTP 认证
smtp options emailadmin zh SMTP 选项
smtp server name emailadmin zh SMTP 服务器名
smtp settings emailadmin zh SMTP 设置
smtp-server hostname or ip address emailadmin zh SMTP 服务器主机名或 IP 地址
smtp-server port emailadmin zh SMTP 服务器端口号
standard emailadmin zh 标准
standard imap server emailadmin zh 标准 IMAP 服务器
standard pop3 server emailadmin zh 标准 POP3 服务器
standard smtp-server emailadmin zh 标准 SMTP 服务器
the imap server does not appear to support the authentication method selected. please contact your system administrator. emailadmin zh IMAP 服务器似乎不支持所选择的认证方法。请联系系统管理员。
this php has no imap support compiled in!! emailadmin zh PHP 没有 IMAP 支持的编译!
to use a tls connection, you must be running a version of php 5.1.0 or higher. emailadmin zh 未使用一个 TLS 连接,您必须运行 PHP 5.1.0 或更高版本。
unexpected response from server to authenticate command. emailadmin zh 服务器为 AUTHENTICATE 指令返回不当以外回应。
unexpected response from server to digest-md5 response. emailadmin zh 服务器为 Digest-MD5 返回意外的不当的回应。
unexpected response from server to login command. emailadmin zh 服务器为 LOGIN 指令返回意外的不当回应。
unknown imap response from the server. server responded: %s emailadmin zh INAP 服务器返回未知回应。服务器回应:%s
unsupported action '%1' !!! emailadmin zh 不支持 '%1' 的操作!
update current email address: emailadmin zh 更新当前邮件地址:
use ldap defaults emailadmin zh 使用 LDAP 默认值
use smtp auth emailadmin zh 使用 SMTP 认证
use tls authentication emailadmin zh 使用TLS 认证
use tls encryption emailadmin zh 使用TLS 加密
user can edit forwarding address emailadmin zh 用户可以编辑转发地址
username (standard) emailadmin zh 用户名(标准)
username@domainname (virtual mail manager) emailadmin zh 用户名@域 (虚拟邮箱管理)
users can define their own emailaccounts emailadmin zh 用户可以自定义邮箱账户
users can define their own signatures emailadmin zh 用户可以定义他们自己的签名
virtual mail manager emailadmin zh 虚拟邮箱管理

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,6 @@
* eGroupware EMailAdmin - Setup
*
* @link http://www.egroupware.org
* @author Lars Kneschke
* @author Klaus Leithoff <kl@stylite.de>
* @package emailadmin
* @subpackage setup
@ -13,15 +12,15 @@
$setup_info['emailadmin']['name'] = 'emailadmin';
$setup_info['emailadmin']['title'] = 'EMailAdmin';
$setup_info['emailadmin']['version'] = '1.8';
$setup_info['emailadmin']['version'] = '1.9.006';
$setup_info['emailadmin']['app_order'] = 10;
$setup_info['emailadmin']['enable'] = 2;
$setup_info['emailadmin']['index'] = 'emailadmin.emailadmin_ui.listProfiles';
$setup_info['emailadmin']['author'] = 'Lars Kneschke';
$setup_info['emailadmin']['author'] = 'Klaus Leithoff';
$setup_info['emailadmin']['license'] = 'GPL';
$setup_info['emailadmin']['description'] =
'A central Mailserver management application for EGroupWare.';
'A central Mailserver management application for EGroupWare. Completely rewritten by K.Leithoff in 10-2009';
$setup_info['emailadmin']['note'] =
'';
$setup_info['emailadmin']['maintainer'] = array(
@ -30,6 +29,7 @@ $setup_info['emailadmin']['maintainer'] = array(
);
$setup_info['emailadmin']['tables'][] = 'egw_emailadmin';
$setup_info['emailadmin']['tables'][] = 'egw_mailaccounts';
/* The hooks this app includes, needed for hooks registration */
#$setup_info['emailadmin']['hooks'][] = 'preferences';
@ -40,6 +40,12 @@ $setup_info['emailadmin']['hooks']['edit_group'] = 'emailadmin_hooks::edit_group
$setup_info['emailadmin']['hooks']['group_manager'] = 'emailadmin_hooks::edit_group';
$setup_info['emailadmin']['hooks']['deleteaccount'] = 'emailadmin_hooks::deleteaccount';
$setup_info['emailadmin']['hooks']['deletegroup'] = 'emailadmin_hooks::deletegroup';
$setup_info['emailadmin']['hooks']['changepassword'] = 'emailadmin_bo::changepassword';
// SMTP and IMAP support
$setup_info['emailadmin']['hooks']['smtp_server_types'] = 'emailadmin_hooks::server_types';
$setup_info['emailadmin']['hooks']['imap_server_types'] = 'emailadmin_hooks::server_types';
/* Dependencies for this app to work */
$setup_info['emailadmin']['depends'][] = array(
'appname' => 'phpgwapi',
@ -68,3 +74,4 @@ $setup_info['emailadmin']['check_install'] = array(
'from' => 'EMailAdmin',
),
);

View File

@ -0,0 +1,75 @@
<?php
/**
* eGroupware EMailAdmin - DB schema
*
* @link http://www.egroupware.org
* @author Lars Kneschke
* @author Klaus Leithoff <kl@stylite.de>
* @package emailadmin
* @subpackage setup
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
$phpgw_baseline = array(
'egw_emailadmin' => array(
'fd' => array(
'ea_profile_id' => array('type' => 'auto','nullable' => False,'comment'=>'the id of the profile; in programm its used as its negative counterpart'),
'ea_smtp_server' => array('type' => 'varchar','precision' => '80','comment'=>'smtp server name or ip-address'),
'ea_smtp_type' => array('type' => 'varchar','precision' => '56','comment'=>'smtp server type; designed to specify the corresponding php class to be used/loaded'),
'ea_smtp_port' => array('type' => 'int','precision' => '4','comment'=>'port to be used'),
'ea_smtp_auth' => array('type' => 'varchar','precision' => '3','comment'=>'multistate flag to indicate authentication required'),
'ea_editforwardingaddress' => array('type' => 'varchar','precision' => '3','comment'=>'yes/no flag to indicate if a user is allowed to edit its own forwardingaddresses; server side restrictions must be met, and a suitable smtp server type selected'),
'ea_smtp_ldap_server' => array('type' => 'varchar','precision' => '80','comment'=>'unused'),
'ea_smtp_ldap_basedn' => array('type' => 'varchar','precision' => '200','comment'=>'unused'),
'ea_smtp_ldap_admindn' => array('type' => 'varchar','precision' => '200','comment'=>'unused'),
'ea_smtp_ldap_adminpw' => array('type' => 'varchar','precision' => '30','comment'=>'unused'),
'ea_smtp_ldap_use_default' => array('type' => 'varchar','precision' => '3','comment'=>'unused'),
'ea_imap_server' => array('type' => 'varchar','precision' => '80','comment'=>'imap server name or ip address'),
'ea_imap_type' => array('type' => 'varchar','precision' => '56','comment'=>'imap server type, designed to specify the corresponding mail class to be loaded/used'),
'ea_imap_port' => array('type' => 'int','precision' => '4','comment'=>'imap server port'),
'ea_imap_login_type' => array('type' => 'varchar','precision' => '20','comment'=>'logintype to be used for authentication vs. the imap server, for this profile'),
'ea_imap_tsl_auth' => array('type' => 'varchar','precision' => '3','comment'=>'flag to indicate wether to use certificate validation; only affects secure connections'),
'ea_imap_tsl_encryption' => array('type' => 'varchar','precision' => '3','comment'=>'wether to use encryption 0=none, 1=STARTTLS, 2=TLS, 3=SSL'),
'ea_imap_enable_cyrus' => array('type' => 'varchar','precision' => '3','comment'=>'flag to indicate if we have some server/system integration for account/email management'),
'ea_imap_admin_user' => array('type' => 'varchar','precision' => '40','comment'=>'use this username for authentication on administrative purposes; or timed actions (sieve) for a user'),
'ea_imap_admin_pw' => array('type' => 'varchar','precision' => '40','comment'=>'use this password for authentication on administrative purposes; or timed actions (sieve) for a user'),
'ea_imap_enable_sieve' => array('type' => 'varchar','precision' => '3','comment'=>'flag to indicate that sieve support is assumed, and may be allowed to be utilized by the users affected by this profile'),
'ea_imap_sieve_server' => array('type' => 'varchar','precision' => '80','comment'=>'sieve server name or ip-address'),
'ea_imap_sieve_port' => array('type' => 'int','precision' => '4','comment'=>'sieve server port'),
'ea_description' => array('type' => 'varchar','precision' => '200','comment'=>'textual descriptor used for readable distinction of profiles'),
'ea_default_domain' => array('type' => 'varchar','precision' => '100','comment'=>'default domain string, used when vmailmanager is used as auth type for imap (also for smtp if auth is required)'),
'ea_organisation_name' => array('type' => 'varchar','precision' => '100','comment'=>'textual organization string, may be used in mail header'),
'ea_user_defined_identities' => array('type' => 'varchar','precision' => '3','comment'=>'yes/no flag to indicate if this profile is allowing the utiliszation of user defined identities'),
'ea_user_defined_accounts' => array('type' => 'varchar','precision' => '3','comment'=>'yes/no flag to indicate if this profile is allowing the utilization of user defined mail accounts'),
'ea_order' => array('type' => 'int','precision' => '4','comment'=>'helper to define the order of the profiles'),
'ea_appname' => array('type' => 'varchar','precision' => '80','comment'=>'appname the profile is to be used for; of no practical use, as of my knowledge, was designed to allow notification to use a specific profile'),
'ea_group' => array('type' => 'varchar','precision' => '80','comment'=>'the usergroup (primary) the given profile should be applied to','meta'=>'group'),
'ea_user' => array('type' => 'varchar','precision' => '80','comment'=>'the user the given profile should be applied to','meta'=>'user'),
'ea_active' => array('type' => 'int','precision' => '4','comment'=>'flag to indicate that a profile is active'),
'ea_smtp_auth_username' => array('type' => 'varchar','precision' => '128','comment'=>'depending on smtp auth type, use this username for authentication; may hold a semicolon separated emailaddress, to specify the emailaddress to be used on sending e.g.:username;email@address.nfo'),
'ea_smtp_auth_password' => array('type' => 'varchar','precision' => '80','comment'=>'depending on smtp auth type, the password to be used for authentication'),
'ea_user_defined_signatures' => array('type' => 'varchar','precision' => '3','comment'=>'flag to indicate, that this profile allows its users to edit and use own signatures (rights to preferences-app needed)'),
'ea_default_signature' => array('type' => 'text','comment'=>'the default signature (text or html)'),
'ea_imap_auth_username' => array('type' => 'varchar','precision' => '80','comment'=>'depending on the imap auth type use this username for authentication purposes'),
'ea_imap_auth_password' => array('type' => 'varchar','precision' => '80','comment'=>'depending on the imap auth type use this password for authentication purposes'),
'ea_stationery_active_templates' => array('type' => 'text','comment'=>'stationery templates available for the profile')
),
'pk' => array('ea_profile_id'),
'fk' => array(),
'ix' => array('ea_appname','ea_group'),
'uc' => array()
),
'egw_mailaccounts' => array(
'fd' => array(
'mail_id' => array('type' => 'auto','nullable' => False,'comment'=>'the id'),
'account_id' => array('type' => 'int','precision' => '4','nullable' => False,'comment'=>'account id of the owner, can be user AND group','meta'=>'account'),
'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'),
'mail_value' => array('type' => 'varchar','precision' => '128','nullable' => False,'comment'=>'the value (that should be) corresponding to the mail_type')
),
'pk' => array('mail_id'),
'fk' => array(),
'ix' => array('mail_value',array('account_id','mail_type')),
'uc' => array()
)
);

View File

@ -278,32 +278,142 @@ function emailadmin_upgrade1_6_001()
'type' => 'text'
));
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.7.003';
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.8'; // was '1.7.003';
}
function emailadmin_upgrade1_7_003()
{
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.8';
}
/**
* Downgrade from Trunk (modified columns do not matter for using Sitemgr)
*
* @return string
*/
function emailadmin_upgrade1_7_004()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_imap_type',array(
'type' => 'varchar',
'precision' => 56,
));
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_smtp_type',array(
'type' => 'varchar',
'precision' => 56,
));
foreach (array('1'=>'defaultsmtp', '2'=>'postfixldap', '3'=>'postfixinetorgperson', '4'=>'smtpplesk', '5' =>'postfixdbmailuser') as $id => $newtype)
{
$GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_smtp_type=\''.$id.'\' where ea_smtp_type=\''.$newtype.'\'',__LINE__,__FILE__);
$GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_smtp_type=\''.$newtype.'\' where ea_smtp_type=\''.$id.'\'',__LINE__,__FILE__);
}
foreach (array('2'=>'defaultimap', '3'=>'cyrusimap', '4'=>'dbmailqmailuser', '5'=>'pleskimap', '6' =>'dbmaildbmailuser') as $id => $newtype)
{
$GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_imap_type=\''.$id.'\' where ea_imap_type=\''.$newtype.'\'',__LINE__,__FILE__);
$GLOBALS['egw_setup']->oProc->query('update egw_emailadmin set ea_imap_type=\''.$newtype.'\' where ea_imap_type=\''.$id.'\'',__LINE__,__FILE__);
}
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.8';
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.001'; // was '1.7.004';
}
function emailadmin_upgrade1_8()
{
emailadmin_upgrade1_7_003();
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.001';
}
function emailadmin_upgrade1_7_004()
{
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.001';
}
function emailadmin_upgrade1_9_001()
{
return emailadmin_upgrade1_7_004();
$GLOBALS['egw_setup']->oProc->RefreshTable('egw_emailadmin',array(
'fd' => array(
'ea_profile_id' => array('type' => 'auto','nullable' => False),
'ea_smtp_server' => array('type' => 'varchar','precision' => '80'),
'ea_smtp_type' => array('type' => 'varchar','precision' => '56'),
'ea_smtp_port' => array('type' => 'int','precision' => '4'),
'ea_smtp_auth' => array('type' => 'varchar','precision' => '3'),
'ea_editforwardingaddress' => array('type' => 'varchar','precision' => '3'),
'ea_smtp_ldap_server' => array('type' => 'varchar','precision' => '80'),
'ea_smtp_ldap_basedn' => array('type' => 'varchar','precision' => '200'),
'ea_smtp_ldap_admindn' => array('type' => 'varchar','precision' => '200'),
'ea_smtp_ldap_adminpw' => array('type' => 'varchar','precision' => '30'),
'ea_smtp_ldap_use_default' => array('type' => 'varchar','precision' => '3'),
'ea_imap_server' => array('type' => 'varchar','precision' => '80'),
'ea_imap_type' => array('type' => 'varchar','precision' => '56'),
'ea_imap_port' => array('type' => 'int','precision' => '4'),
'ea_imap_login_type' => array('type' => 'varchar','precision' => '20'),
'ea_imap_tsl_auth' => array('type' => 'varchar','precision' => '3'),
'ea_imap_tsl_encryption' => array('type' => 'varchar','precision' => '3'),
'ea_imap_enable_cyrus' => array('type' => 'varchar','precision' => '3'),
'ea_imap_admin_user' => array('type' => 'varchar','precision' => '40'),
'ea_imap_admin_pw' => array('type' => 'varchar','precision' => '40'),
'ea_imap_enable_sieve' => array('type' => 'varchar','precision' => '3'),
'ea_imap_sieve_server' => array('type' => 'varchar','precision' => '80'),
'ea_imap_sieve_port' => array('type' => 'int','precision' => '4'),
'ea_description' => array('type' => 'varchar','precision' => '200'),
'ea_default_domain' => array('type' => 'varchar','precision' => '100'),
'ea_organisation_name' => array('type' => 'varchar','precision' => '100'),
'ea_user_defined_identities' => array('type' => 'varchar','precision' => '3'),
'ea_user_defined_accounts' => array('type' => 'varchar','precision' => '3'),
'ea_order' => array('type' => 'int','precision' => '4'),
'ea_appname' => array('type' => 'varchar','precision' => '80'),
'ea_group' => array('type' => 'varchar','precision' => '80'),
'ea_user' => array('type' => 'varchar','precision' => '80'),
'ea_active' => array('type' => 'int','precision' => '4'),
'ea_smtp_auth_username' => array('type' => 'varchar','precision' => '80'),
'ea_smtp_auth_password' => array('type' => 'varchar','precision' => '80'),
'ea_user_defined_signatures' => array('type' => 'varchar','precision' => '3'),
'ea_default_signature' => array('type' => 'text'),
'ea_imap_auth_username' => array('type' => 'varchar','precision' => '80'),
'ea_imap_auth_password' => array('type' => 'varchar','precision' => '80'),
'ea_stationery_active_templates' => array('type' => 'text')
),
'pk' => array('ea_profile_id'),
'fk' => array(),
'ix' => array('ea_appname','ea_group'),
'uc' => array()
));
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.002';
}
function emailadmin_upgrade1_9_002()
{
// convert serialized stationery templates setting to eTemplate store style
foreach($GLOBALS['egw_setup']->db->query('SELECT ea_profile_id,ea_stationery_active_templates FROM egw_emailadmin
WHERE ea_stationery_active_templates IS NOT NULL',__LINE__,__FILE__) as $row)
{
if(is_array(($templates=unserialize($row['ea_stationery_active_templates']))))
{
$GLOBALS['egw_setup']->db->query('UPDATE egw_emailadmin SET ea_stationery_active_templates="'.implode(',',$templates).'"'
.' WHERE ea_profile_id='.(int)$row['ea_profile_id'],__LINE__,__FILE__);
}
unset($templates);
}
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.003';
}
function emailadmin_upgrade1_9_003()
{
$GLOBALS['egw_setup']->oProc->AlterColumn('egw_emailadmin','ea_smtp_auth_username',array(
'type' => 'varchar',
'precision' => '128',
));
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.004';
}
function emailadmin_upgrade1_9_004()
{
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.005';
}
function emailadmin_upgrade1_9_005()
{
$GLOBALS['egw_setup']->oProc->CreateTable('egw_mailaccounts',array(
'fd' => array(
'mail_id' => array('type' => 'auto','nullable' => False),
'account_id' => array('type' => 'int','precision' => '4','nullable' => False),
'mail_type' => array('type' => 'int','precision' => '1','nullable' => False,'comment' => '0=active, 1=alias, 2=forward, 3=forwardOnly, 4=quota'),
'mail_value' => array('type' => 'varchar','precision' => '128','nullable' => False)
),
'pk' => array('mail_id'),
'fk' => array(),
'ix' => array('mail_value',array('account_id','mail_type')),
'uc' => array()
));
return $GLOBALS['setup_info']['emailadmin']['currentver'] = '1.9.006';
}

View File

@ -0,0 +1 @@
.defaultProfile { color:#000000; font-weight:bold; }

View File

@ -0,0 +1,481 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="emailadmin.edit.global" template="" lang="" group="0" version="1.9.002">
<grid width="100%">
<columns>
<column/>
</columns>
<rows>
<row>
<groupbox>
<caption label="Organisation"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="enter your default mail domain (from: user@domain)"/>
<textbox id="ea_default_domain"/>
</row>
<row>
<description value="name of organisation"/>
<textbox id="ea_organisation_name"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row>
<groupbox>
<caption label="profile access rights"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="can be used by application"/>
<menulist>
<menupopup id="ea_appname" options="any application"/>
</menulist>
</row>
<row disabled="@ea_user">
<description value="can be used by group"/>
<menulist>
<menupopup type="select-account" id="ea_group" options="any group,groups"/>
</menulist>
</row>
<row>
<description value="can be used by user"/>
<menulist>
<menupopup type="select-account" id="ea_user" onchange="disableGroupSelector();" options="any user,accounts"/>
</menulist>
</row>
</rows>
</grid>
</groupbox>
</row>
<row>
<groupbox>
<caption label="global options"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="profile is active"/>
<checkbox id="ea_active"/>
</row>
<row>
<description value="users can define their own identities"/>
<checkbox id="ea_user_defined_identities" options="yes,no"/>
</row>
<row>
<description value="users can define their own emailaccounts"/>
<checkbox id="ea_user_defined_accounts" options="yes,no"/>
</row>
<row>
<description value="order"/>
<int id="ea_order"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit.SMTP" template="" lang="" group="0" version="1.7.004">
<grid width="100%" height="400" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<hbox>
<description value="Select type of SMTP Server"/>
<menulist>
<menupopup align="right" id="ea_smtp_type" onchange="1"/>
</menulist>
</hbox>
</row>
<row>
<groupbox>
<caption label="SMTP settings"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="SMTP-Server hostname or IP address"/>
<textbox id="ea_smtp_server"/>
</row>
<row>
<description value="SMTP-Server Port"/>
<int id="ea_smtp_port"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row>
<groupbox>
<caption label="smtp authentication"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="Use SMTP auth"/>
<menulist>
<menupopup id="ea_smtp_auth"/>
</menulist>
</row>
<row>
<description value="send using this eMail-Address"/>
<textbox id="smtp_senders_email"/>
</row>
<row>
<description value="username"/>
<textbox id="ea_smtp_auth_username"/>
</row>
<row>
<description value="password"/>
<passwd id="ea_smtp_auth_password"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row disabled="!@smtpcapabilities=/forward/">
<groupbox>
<caption label="smtp options"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="user can edit forwarding address"/>
<checkbox id="ea_editforwardingaddress" options="yes,no"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit.IMAP" template="" lang="" group="0" version="1.9.005">
<grid width="100%" height="400" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<hbox>
<description value="select type of IMAP server"/>
<menulist>
<menupopup align="right" id="ea_imap_type" onchange="1"/>
</menulist>
</hbox>
</row>
<row>
<groupbox>
<caption label="server settings"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="IMAP server hostname or ip address"/>
<textbox id="ea_imap_server"/>
</row>
<row>
<description value="IMAP server port"/>
<int id="ea_imap_port"/>
</row>
<row>
<description value="imap server logintyp"/>
<menulist>
<menupopup id="ea_imap_login_type" onchange="1"/>
</menulist>
</row>
</rows>
</grid>
</groupbox>
</row>
<row disabled="!@ea_imap_login_type=admin">
<groupbox>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="Use predefined username and password below" span="2"/>
</row>
<row>
<description value="username"/>
<textbox id="ea_imap_auth_username"/>
</row>
<row>
<description value="password"/>
<passwd id="ea_imap_auth_password"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row>
<groupbox>
<caption label="encryption settings"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="encrypted connection"/>
<hbox>
<radio label="STARTTLS" id="ea_imap_tsl_encryption" options="1"/>
<radio label="TLS" id="ea_imap_tsl_encryption" options="2"/>
<radio label="SSL" id="ea_imap_tsl_encryption" options="3"/>
<radio label="no encryption" id="ea_imap_tsl_encryption" options="0"/>
</hbox>
</row>
<row>
<description value="do not validate certificate"/>
<checkbox id="ea_imap_tsl_auth" options="no,yes"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row disabled="!@imapcapabilities=/sieve/">
<groupbox>
<caption label="sieve settings"/>
<grid>
<columns>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="enable Sieve"/>
<checkbox id="ea_imap_enable_sieve" onchange="1" options="yes,no"/>
<description/>
</row>
<row disabled="!@ea_imap_enable_sieve=yes">
<description value="Sieve server hostname or ip address"/>
<textbox id="ea_imap_sieve_server"/>
<description/>
</row>
<row disabled="!@ea_imap_enable_sieve=yes">
<description value="Sieve server port"/>
<int id="ea_imap_sieve_port"/>
<description value="if you specify port 5190 as sieve server port, you enforce ssl for sieve (server must support that)" readonly="true"/>
</row>
<row>
<description value="Vacation messages with start- and end-date require an admin account to be set" span="3"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row disabled="!@imapcapabilities=/admin/">
<groupbox>
<caption label="Cyrus IMAP server administration"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="enable Cyrus IMAP server administration"/>
<checkbox id="ea_imap_enable_cyrus" onchange="1" options="yes,no"/>
</row>
<row disabled="!@ea_imap_enable_cyrus=yes">
<description value="admin username"/>
<textbox id="ea_imap_admin_user"/>
</row>
<row disabled="!@ea_imap_enable_cyrus=yes">
<description value="admin password"/>
<passwd id="ea_imap_admin_pw"/>
</row>
</rows>
</grid>
</groupbox>
</row>
<row disabled="!@imapcapabilities=/providedefaultquota/">
<groupbox>
<caption label="quota settings"/>
<grid>
<columns>
<column/>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="quota size in mbyte"/>
<int id="defaultQuota"/>
<description value="(imapclass must support this feature by querying the corresponding config value and pass it as defaultquota to the imapserver)"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit.signature" template="" lang="" group="0" version="1.7.004">
<grid width="100%" height="400" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<groupbox>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="users can define their own signatures"/>
<checkbox id="ea_user_defined_signatures" options="yes,no"/>
</row>
<row>
<htmlarea mode="advanced" id="ea_default_signature" span="2" toolbar="180" width="700"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit.stationery" template="" lang="" group="0" version="1.7.003">
<grid width="100%" height="400" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<groupbox>
<caption label="active templates"/>
<grid>
<columns>
<column/>
<column/>
</columns>
<rows>
<row>
<description value="users can utilize these stationery templates"/>
<listbox id="ea_stationery_active_templates" rows="5"/>
</row>
<row>
<html align="right" statustext="manage stationery templates" id="manage_stationery_templates" readonly="true" span="2"/>
</row>
</rows>
</grid>
</groupbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit.history" template="" lang="" group="0" version="1.9.001">
<grid width="100%" height="400" overflow="auto">
<columns>
<column/>
</columns>
<rows>
<row>
<historylog id="history"/>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.edit" template="" lang="" group="0" version="1.7.003">
<grid width="100%">
<columns>
<column width="100%"/>
</columns>
<rows>
<row disabled="!@msg">
<description align="center" id="msg" class="redItalic"/>
</row>
<row>
<grid width="98%">
<columns>
<column/>
<column width="40%"/>
<column width="50%"/>
<column width="5%"/>
</columns>
<rows>
<row>
<textbox label="ID" id="ea_profile_id" readonly="true"/>
<description value="Profile Name"/>
<textbox align="right" id="ea_description"/>
<description align="right"/>
</row>
</rows>
</grid>
</row>
<row>
<tabbox id="emailadmin.edit.global|emailadmin.edit.SMTP|emailadmin.edit.IMAP|emailadmin.edit.signature|emailadmin.edit.stationery|emailadmin.edit.history">
<tabs>
<tab label="Global" statustext=""/>
<tab label="SMTP" statustext=""/>
<tab label="IMAP" statustext=""/>
<tab label="Signature" statustext=""/>
<tab label="Stationery" statustext=""/>
<tab label="History" statustext=""/>
</tabs>
<tabpanels>
<template id="emailadmin.edit.global"/>
<template id="emailadmin.edit.SMTP"/>
<template id="emailadmin.edit.IMAP"/>
<template id="emailadmin.edit.signature"/>
<template id="emailadmin.edit.stationery"/>
<template id="emailadmin.edit.history"/>
</tabpanels>
</tabbox>
</row>
<row>
<hbox>
<hbox>
<button label="Save" id="save"/>
<button label="Apply" id="apply"/>
<button label="Cancel" id="cancel"/>
</hbox>
<button align="right" label="Delete" id="delete" onclick="return confirm('Do you really want to delete this Profile');"/>
</hbox>
</row>
</rows>
</grid>
<styles>
.redItalic { color: red; font-style: italics; }
</styles>
</template>
</overlay>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,111 @@
<!-- BEGIN form -->
<script language="JavaScript1.2">
var langAddAddress="{lang_enter_new_address}";
var langModifyAddress="{lang_update_current_address}";
</script>
<form method="POST" action="{form_action}">
<center>
<table border="0" width="95%">
<tr>
<td valign="top">
{rows}
</td>
<td>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr bgcolor="{th_bg}">
<td colspan="2">
<b>{lang_email_config}</b>
</td>
<td align="right">
{lang_emailaccount_active}
<input type="checkbox" name="accountStatus" {account_checked}>
</td>
</tr>
<tr bgcolor="{tr_color1}">
<td width="200">{lang_emailAddress}</td>
<td colspan="2">
<input name="mailLocalAddress" value="{mailLocalAddress}" style="width:350px;">
</td>
</tr>
<tr bgcolor="{tr_color2}">
<td>{lang_mailAlternateAddress}</td>
<td align="center" style="width:350px;">
{selectbox_mailAlternateAddress}
</td>
<td align="left">
<button type="button" onclick="addRow('mailAlternateAddress', langAddAddress)"><img src="{url_image_add}" alt="{lang_add}" title="{lang_add}"></button><br>
<button type="button" onclick="editRow('mailAlternateAddress', langModifyAddress)"><img src="{url_image_edit}" alt="{lang_edit}" title="{lang_edit}"></button><br>
<button type="button" onclick="removeRow('mailAlternateAddress')"><img src="{url_image_delete}" alt="{lang_remove}" title="{lang_remove}"></button>
</td>
</tr>
<tr bgcolor="{tr_color1}">
<td>{lang_mailRoutingAddress}</td>
<td align="center">
{selectbox_mailRoutingAddress}
</td>
<td align="left">
<button type="button" onclick="addRow('mailRoutingAddress', langAddAddress)"><img src="{url_image_add}" alt="{lang_add}" title="{lang_add}"></button><br>
<button type="button" onclick="editRow('mailRoutingAddress', langModifyAddress)"><img src="{url_image_edit}" alt="{lang_edit}" title="{lang_edit}"></button><br>
<button type="button" onclick="removeRow('mailRoutingAddress')"><img src="{url_image_delete}" alt="{lang_remove}" title="{lang_remove}"></button>
</td>
</tr>
<tr bgcolor="{tr_color2}">
<td>
{lang_forward_only}
</td>
<td colspan="2">
<input type="checkbox" name="forwardOnly" {forwardOnly_checked}>
</td>
</tr>
<tr>
<td colspan="3">
&nbsp;
</td>
</tr>
<tr bgcolor="{th_bg}">
<td colspan="3">
<b>{lang_quota_settings}</b>
</td>
</tr>
<tr bgcolor="{tr_color2}">
<td width="200">{lang_quotainmbyte}</td>
<td colspan="2">
<input name="quotaLimit" value="{quotaLimit}" style="width:350px;"> ({lang_0forunlimited})
</td>
</tr>
<tr>
<td colspan="3">
&nbsp;
</td>
</tr>
</table>
<table border=0 width=100%>
<tr bgcolor="{tr_color1}">
<td align="right" colspan="2">
<input type="submit" name="save" value="{lang_button}" onclick="selectAllOptions('mailAlternateAddress'); selectAllOptions('mailRoutingAddress');">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</form>
<!-- END form -->
<!-- BEGIN link_row -->
<tr bgcolor="{tr_color}">
<td colspan="2">&nbsp;&nbsp;<a href="{row_link}">{row_text}</a></td>
</tr>
<!-- END link_row -->

View File

@ -0,0 +1,116 @@
<?xml version="1.0"?>
<!-- $Id$ -->
<overlay>
<template id="emailadmin.index.rows" template="" lang="" group="0" version="1.7.004">
<grid width="100%">
<columns>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column/>
<column width="1%"/>
</columns>
<rows>
<row class="th">
<nextmatch-sortheader label="ID" id="ea_profile_id"/>
<nextmatch-sortheader label="Description" id="ea_description"/>
<nextmatch-sortheader label="domainname" id="ea_default_domain"/>
<nextmatch-sortheader label="SMTP Server Name" id="ea_smtp_server"/>
<nextmatch-header label="SMTP Server Type" id="ea_smtp_type"/>
<nextmatch-sortheader label="SMTP Server Port" id="ea_smtp_port"/>
<nextmatch-sortheader label="IMAP Server Name" id="ea_imap_server"/>
<nextmatch-header label="IMAP Server Type" id="ea_imap_type"/>
<nextmatch-sortheader label="IMAP Server Port" id="ea_imap_port"/>
<nextmatch-header label="IMAP Server Login Type" id="ea_imap_login_type"/>
<nextmatch-header label="Application" id="ea_appname"/>
<nextmatch-header label="Group" id="ea_group"/>
<nextmatch-header label="User" id="ea_user"/>
<nextmatch-sortheader label="order" id="ea_order"/>
<nextmatch-sortheader label="Active" id="ea_active"/>
<hbox>
<description value="Action"/>
<buttononly label="Select All" onclick="toggle_all(this.form,form::name('selected[]')); return false;" options="check"/>
</hbox>
</row>
<row class="$row_cont[class] row">
<description id="${row}[ea_profile_id]"/>
<description id="${row}[ea_description]"/>
<description id="${row}[ea_default_domain]"/>
<description id="${row}[ea_smtp_server]"/>
<menulist>
<menupopup id="${row}[ea_smtp_type]" readonly="true"/>
</menulist>
<description id="${row}[ea_smtp_port]"/>
<description id="${row}[ea_imap_server]"/>
<menulist>
<menupopup id="${row}[ea_imap_type]" readonly="true"/>
</menulist>
<description id="${row}[ea_imap_port]"/>
<description id="${row}[ea_imap_login_type]"/>
<menulist>
<menupopup id="${row}[ea_appname]" readonly="true"/>
</menulist>
<menulist>
<menupopup type="select-account" id="${row}[ea_group]" readonly="true" options=",groups"/>
</menulist>
<menulist>
<menupopup type="select-account" id="${row}[ea_user]" readonly="true" options=",accounts"/>
</menulist>
<description id="${row}[ea_order]" no_lang="1"/>
<description id="${row}[ea_active]"/>
<hbox>
<button statustext="Edit this Profile" label="Edit" id="edit[$row_cont[ea_profile_id]]" onclick="window.open(egw::link('/index.php','menuaction=emailadmin.emailadmin_ui.edit&amp;profileid=$row_cont[ea_profile_id]'),'ea_profile','dependent=yes,width=850,height=540,scrollbars=yes,status=yes'); return false;" image="edit"/>
<button statustext="Delete this Profile" label="Delete" id="delete[$row_cont[ea_profile_id]]" onclick="return confirm('Do you really want to delete this Profile');" image="delete"/>
<checkbox id="selected[]" options="$row_cont[ea_profile_id]"/>
<description/>
</hbox>
</row>
</rows>
</grid>
</template>
<template id="emailadmin.index" template="" lang="" group="0" version="1.7.003">
<grid width="100%">
<columns>
<column/>
</columns>
<rows>
<row disabled="!@subtitle">
<hbox align="center" readonly="true">
<html align="center" id="subtitle" readonly="true"/>
<html id="addJavaScript" readonly="true"/>
</hbox>
</row>
<row disabled="!@msg">
<description align="center" id="msg" class="redItalic"/>
</row>
<row>
<button align="right" label="Add" id="AddProfile" onclick="window.open(egw::link('/index.php','menuaction=emailadmin.emailadmin_ui.add'),'_blank','dependent=yes,width=850,height=540,scrollbars=yes,status=yes'); return false;"/>
</row>
<row>
<nextmatch id="nm" options="emailadmin.index.rows" span="all"/>
</row>
<row>
<hbox align="right">
<button label="Delete" id="delete" onclick="return confirm('Delete Profiles');" image="delete"/>
<buttononly onclick="toggle_all(this.form,form::name('nm[rows][selected][]')); return false;" options="arrow_ltr" class="selectAllArrow"/>
<description/>
</hbox>
</row>
</rows>
</grid>
<styles>
.redItalic { color: red; font-style: italics; }
</styles>
</template>
</overlay>

View File

@ -116,12 +116,13 @@
//$this->sofelamimail = new sofelamimail;
$this->mailPreferences = $this->bopreferences->getPreferences();
if ($this->mailPreferences) {
$this->icServer = $this->mailPreferences->getIncomingServer(0);
$this->ogServer = $this->mailPreferences->getOutgoingServer(0);
$this->htmlOptions = $this->mailPreferences->preferences['htmlOptions'];
}
#_debug_array($this->mailPreferences->preferences);
//_debug_array($this->mailPreferences->preferences);
$this->imapBaseDir = '';
self::$displayCharset = $_displayCharset;

View File

@ -31,9 +31,9 @@
{
//error_log(__METHOD__." called ".print_r($_restoreSession,true).function_backtrace());
parent::sopreferences();
$this->boemailadmin = new emailadmin_bo(-1,$_restoreSession);
$this->boemailadmin = new emailadmin_bo(false,$_restoreSession);
if ($_restoreSession && !(is_array($this->sessionData) && (count($this->sessionData)>0)) ) $this->restoreSessionData();
if ($_restoreSession===false && (is_array($this->sessionData) && (count($this->sessionData)>0)) )
if ($_restoreSession===false && (is_array($this->sessionData) && (count($this->sessionData)>0)) )
{
//error_log(__METHOD__." Unset Session ".function_backtrace());
//make sure session data will be reset
@ -82,6 +82,7 @@
{
$GLOBALS['egw']->session->appsession('fm_preferences','felamimail',serialize($this->sessionData));
}
// get the first active user defined account
function getAccountData(&$_profileData, $_accountID=NULL)
{
@ -92,9 +93,10 @@
// currently we use only the first profile available
$accountData = array_shift($accountData);
#_debug_array($accountData);
//_debug_array($accountData);
$icServer = CreateObject('emailadmin.defaultimap');
$icServer->ImapServerId = $accountData['id'];
$icServer->encryption = isset($accountData['ic_encryption']) ? $accountData['ic_encryption'] : 1;
$icServer->host = $accountData['ic_hostname'];
$icServer->port = isset($accountData['ic_port']) ? $accountData['ic_port'] : 143;
@ -104,14 +106,15 @@
$icServer->password = $accountData['ic_password'];
$icServer->enableSieve = isset($accountData['ic_enable_sieve']) ? (bool)$accountData['ic_enable_sieve'] : 1;
$icServer->sieveHost = $accountData['ic_sieve_server'];
$icServer->sievePort = isset($accountData['ic_sieve_port']) ? $accountData['ic_sieve_port'] : 2000;
$icServer->sievePort = isset($accountData['ic_sieve_port']) && !empty($accountData['ic_sieve_port']) ? $accountData['ic_sieve_port'] : 4190;
if ($accountData['ic_folderstoshowinhome']) $icServer->folderstoshowinhome = $accountData['ic_folderstoshowinhome'];
if ($accountData['ic_trashfolder']) $icServer->trashfolder = $accountData['ic_trashfolder'];
if ($accountData['ic_sentfolder']) $icServer->sentfolder = $accountData['ic_sentfolder'];
if ($accountData['ic_draftfolder']) $icServer->draftfolder = $accountData['ic_draftfolder'];
if ($accountData['ic_templatefolder']) $icServer->templatefolder = $accountData['ic_templatefolder'];
$ogServer = CreateObject('emailadmin.defaultsmtp');
$ogServer = new emailadmin_smtp();
$ogServer->SmtpServerId = $accountData['id'];
$ogServer->host = $accountData['og_hostname'];
$ogServer->port = isset($accountData['og_port']) ? $accountData['og_port'] : 25;
$ogServer->smtpAuth = (bool)$accountData['og_smtpauth'];
@ -143,6 +146,7 @@
foreach ($AllAccountData as $key => $accountData)
{
$icServer = CreateObject('emailadmin.defaultimap');
$icServer->ImapServerId = $accountData['id'];
$icServer->encryption = isset($accountData['ic_encryption']) ? $accountData['ic_encryption'] : 1;
$icServer->host = $accountData['ic_hostname'];
$icServer->port = isset($accountData['ic_port']) ? $accountData['ic_port'] : 143;
@ -152,14 +156,15 @@
$icServer->password = $accountData['ic_password'];
$icServer->enableSieve = isset($accountData['ic_enable_sieve']) ? (bool)$accountData['ic_enable_sieve'] : 1;
$icServer->sieveHost = $accountData['ic_sieve_server'];
$icServer->sievePort = isset($accountData['ic_sieve_port']) ? $accountData['ic_sieve_port'] : 2000;
$icServer->sievePort = isset($accountData['ic_sieve_port']) && !empty($accountData['ic_sieve_port']) ? $accountData['ic_sieve_port'] : 4190;
if ($accountData['ic_folderstoshowinhome']) $icServer->folderstoshowinhome = $accountData['ic_folderstoshowinhome'];
if ($accountData['ic_trashfolder']) $icServer->trashfolder = $accountData['ic_trashfolder'];
if ($accountData['ic_sentfolder']) $icServer->sentfolder = $accountData['ic_sentfolder'];
if ($accountData['ic_draftfolder']) $icServer->draftfolder = $accountData['ic_draftfolder'];
if ($accountData['ic_templatefolder']) $icServer->templatefolder = $accountData['ic_templatefolder'];
$ogServer = CreateObject('emailadmin.defaultsmtp');
$ogServer = new emailadmin_smtp();
$ogServer->SmtpServerId = $accountData['id'];
$ogServer->host = $accountData['og_hostname'];
$ogServer->port = isset($accountData['og_port']) ? $accountData['og_port'] : 25;
$ogServer->smtpAuth = (bool)$accountData['og_smtpauth'];
@ -177,21 +182,24 @@
$identity->signature = $accountData['signatureid'];
$identity->id = $accountData['id'];
$isActive = (bool)$accountData['active'];
$out[] = array('icServer' => $icServer, 'ogServer' => $ogServer, 'identity' => $identity, 'active' => $isActive);
$out[$accountData['id']] = array('icServer' => $icServer, 'ogServer' => $ogServer, 'identity' => $identity, 'active' => $isActive);
}
return $out;
}
function getUserDefinedIdentities()
{
$profileID = emailadmin_bo::getUserDefaultProfileID();
$profileData = $this->boemailadmin->getUserProfile('felamimail');
if(!($profileData instanceof ea_preferences) || !($profileData->ic_server[0] instanceof defaultimap)) {
if(!($profileData instanceof ea_preferences) || !($profileData->ic_server[$profileID] instanceof defaultimap)) {
return false;
}
if($profileData->userDefinedAccounts || $profileData->userDefinedIdentities) {
if($profileData->userDefinedAccounts || $profileData->userDefinedIdentities)
{
// get user defined accounts
$allAccountData = $this->getAllAccountData($profileData);
if ($allAccountData) {
if ($allAccountData)
{
foreach ($allAccountData as $tmpkey => $accountData)
{
$accountArray[] = $accountData['identity'];
@ -202,103 +210,184 @@
return array();
}
function getPreferences($getUserDefinedProfiles=true)
/**
* getPreferences - fetches the active profile for a user
*
* @param boolean $getUserDefinedProfiles
* @param int $_profileID - use this profile to be set its prefs as active profile (0)
* @param string $_appName - the app the profile is fetched for
* @param int $_singleProfileToFetch - single Profile to fetch no merging of profileData; emailadminprofiles only; for Administrative use only (by now)
* @return object ea_preferences object with the active emailprofile set to ID = 0
*/
function getPreferences($getUserDefinedProfiles=true,$_profileID=0,$_appName='felamimail',$_singleProfileToFetch=0)
{
if (isset($this->sessionData['profileData']) && ($this->sessionData['profileData'] instanceof ea_preferences)) {
if (isset($this->sessionData['profileData']) && ($this->sessionData['profileData'] instanceof ea_preferences))
{
$this->profileData = $this->sessionData['profileData'];
}
if(!($this->profileData instanceof ea_preferences)) {
$imapServerTypes = $this->boemailadmin->getIMAPServerTypes();
$profileData = $this->boemailadmin->getUserProfile('felamimail');
if(!($profileData instanceof ea_preferences) || !($profileData->ic_server[0] instanceof defaultimap)) {
if((!($this->profileData instanceof ea_preferences) && $_singleProfileToFetch==0) || ($_singleProfileToFetch!=0 && !isset($this->profileData->icServer[$_singleProfileToFetch])))
{
$GLOBALS['egw']->preferences->read_repository();
$userPreferences = $GLOBALS['egw_info']['user']['preferences']['felamimail'];
$imapServerTypes = $this->boemailadmin->getIMAPServerTypes();
$profileData = $this->boemailadmin->getUserProfile($_appName,'',($_singleProfileToFetch<0?-$_singleProfileToFetch:'')); // by now we assume only one profile to be returned
$icServerKeys = array_keys((array)$profileData->ic_server);
$icProfileID = array_shift($icServerKeys);
$ogServerKeys = array_keys((array)$profileData->og_server);
$ogProfileID = array_shift($ogServerKeys);
//error_log(__METHOD__.__LINE__.' ServerProfile(s)Fetched->'.array2string(count($profileData->ic_server)).':'.array2string($icProfileID));
//may be needed later on, as it may hold users Identities connected to MailAlternateAdresses
$IdIsDefault = 0;
$rememberIdentities = $profileData->identities;
foreach ($rememberIdentities as $adkey => $ident)
{
if ($ident->default) $IdIsDefault = $ident->id;
$profileData->identities[$adkey]->default = false;
}
if(!($profileData instanceof ea_preferences) || !($profileData->ic_server[$icProfileID] instanceof defaultimap))
{
return false;
}
if($profileData->userDefinedAccounts && $GLOBALS['egw_info']['user']['apps']['felamimail'] && $getUserDefinedProfiles) {
// get user defined accounts
$accountData = $this->getAccountData($profileData);
if($accountData['active']) {
// replace the global defined IMAP Server
// set the emailadminprofile as profile 0; it will be assumed the active one (if no other profiles are active)
$profileData->setIncomingServer($profileData->ic_server[$icProfileID],0);
$profileID = $icProfileID;
$profileData->setOutgoingServer($profileData->og_server[$ogProfileID],0);
$profileData->setIdentity($profileData->identities[$icProfileID],0);
$userPrefs = $this->mergeUserAndProfilePrefs($userPreferences,$profileData,$icProfileID);
$rememberID = array(); // there may be more ids to be rememered
$maxId = $icProfileID>0?$icProfileID:0;
$minId = $icProfileID<0?$icProfileID:0;
//$profileData->setPreferences($userPrefs,0);
if($profileData->userDefinedAccounts && $GLOBALS['egw_info']['user']['apps']['felamimail'] && $getUserDefinedProfiles)
{
// get user defined accounts (only fetch the active one(s), as we call it without second parameter)
// we assume only one account may be active at once
$allAccountData = $this->getAllAccountData($profileData);
foreach ((array)$allAccountData as $k => $accountData)
{
// set defined IMAP server
if(($accountData['icServer'] instanceof defaultimap))
$profileData->setIncomingServer($accountData['icServer'],0);
{
$profileData->setIncomingServer($accountData['icServer'],$k);
$userPrefs = $this->mergeUserAndProfilePrefs($userPreferences,$profileData,$k);
//$profileData->setPreferences($userPrefs,$k);
}
// set defined SMTP Server
if(($accountData['ogServer'] instanceof emailadmin_smtp))
$profileData->setOutgoingServer($accountData['ogServer'],$k);
// replace the global defined SMTP Server
if(($accountData['ogServer'] instanceof defaultsmtp))
$profileData->setOutgoingServer($accountData['ogServer'],0);
if(($accountData['identity'] instanceof ea_identity))
{
$profileData->setIdentity($accountData['identity'],$k);
$rememberID[] = $k; // remember Identity as already added
if ($k>0 && $k>$maxId) $maxId = $k;
if ($k<0 && $k<$minId) $minId = $k;
}
// replace the global defined identity
if(($accountData['identity'] instanceof ea_identity)) {
//_debug_array($profileData);
$rememberIdentities = $profileData->identities;
$profileData->setIdentity($accountData['identity'],0);
$rememberID = $accountData['identity']->id;
if (empty($_profileID))
{
$setAsActive = $accountData['active'];
//if($setAsActive) error_log(__METHOD__.__LINE__." Setting Profile with ID=$k (using Active Info) for ActiveProfile");
}
else
{
$setAsActive = ($_profileID==$k);
//if($setAsActive) error_log(__METHOD__.__LINE__." Setting Profile with ID=$_profileID for ActiveProfile");
}
if($setAsActive)
{
// replace the global defined IMAP Server
if(($accountData['icServer'] instanceof defaultimap))
{
$profileID = $k;
$profileData->setIncomingServer($accountData['icServer'],0);
$userPrefs = $this->mergeUserAndProfilePrefs($userPreferences,$profileData,$k);
//$profileData->setPreferences($userPrefs,0);
}
// replace the global defined SMTP Server
if(($accountData['ogServer'] instanceof emailadmin_smtp))
$profileData->setOutgoingServer($accountData['ogServer'],0);
// replace the global defined identity
if(($accountData['identity'] instanceof ea_identity)) {
//_debug_array($profileData);
$profileData->setIdentity($accountData['identity'],0);
$profileData->identities[0]->default = true;
$rememberID[] = $IdIsDefault = $accountData['identity']->id;
}
}
}
}
if($profileData->userDefinedIdentities && $GLOBALS['egw_info']['user']['apps']['felamimail'])
if($profileData->userDefinedIdentities && $GLOBALS['egw_info']['user']['apps']['felamimail'])
{
$allUserIdentities = $this->getUserDefinedIdentities();
if (is_array($allUserIdentities))
if (is_array($allUserIdentities))
{
$i=count($allUserIdentities);
$y=-1;
$i=$maxId+1;
$y=$minId-1;
foreach ($allUserIdentities as $tmpkey => $id)
{
if ($id->id != $rememberID)
if (!in_array($id->id,$rememberID))
{
$profileData->setIdentity($id,$i);
$i++;
}
else
{
foreach ($rememberIdentities as $adkey => $ident)
{
$profileData->setIdentity($ident,$i);
$profileData->identities[$i]->default = false;
$profileData->identities[$i]->id = $y;
$i++;
$y--;
}
}
}
}
}
$GLOBALS['egw']->preferences->read_repository();
$userPrefs = $GLOBALS['egw_info']['user']['preferences']['felamimail'];
# echo "<p>backtrace: ".function_backtrace()."</p>\n";
if (is_array($profileData->ic_server[0]->folderstoshowinhome) && !empty($profileData->ic_server[0]->folderstoshowinhome[0])) {
$userPrefs['mainscreen_showfolders'] = implode(',',$profileData->ic_server[0]->folderstoshowinhome);
// make sure there is one profile marked as default (either 0 or the one found)
$markedAsDefault = false;
foreach ($profileData->identities as &$id)
{
if ($id->id == $idIsDefault)
{
$id->default = true;
$markedAsDefault = true;
}
}
if (!empty($profileData->ic_server[0]->sentfolder)) $userPrefs['sentFolder'] = $profileData->ic_server[0]->sentfolder;
if (!empty($profileData->ic_server[0]->trashfolder)) $userPrefs['trashFolder'] = $profileData->ic_server[0]->trashfolder;
if (!empty($profileData->ic_server[0]->draftfolder)) $userPrefs['draftFolder'] = $profileData->ic_server[0]->draftfolder;
if (!empty($profileData->ic_server[0]->templatefolder)) $userPrefs['templateFolder'] = $profileData->ic_server[0]->templatefolder;
if(empty($userPrefs['deleteOptions']))
$userPrefs['deleteOptions'] = 'mark_as_deleted';
if ($markedAsDefault == false) $profileData->identities[0]->default = true;
if (!empty($userPrefs['trash_folder']))
$userPrefs['move_to_trash'] = True;
if (!empty($userPrefs['sent_folder']))
$userPrefs['move_to_sent'] = True;
$userPrefs['signature'] = $userPrefs['email_sig'];
unset($userPrefs['email_sig']);
$profileData->setPreferences($userPrefs);
#_debug_array($profileData);#exit;
$userPrefs = $this->mergeUserAndProfilePrefs($userPreferences,$profileData,$profileID);
$profileData->setPreferences($userPrefs);
//_debug_array($profileData);#exit;
$this->sessionData['profileData'] = $this->profileData = $profileData;
$this->saveSessionData();
#_debug_array($this->profileData);
//_debug_array($this->profileData);
}
return $this->profileData;
}
function mergeUserAndProfilePrefs($userPrefs, &$profileData, $profileID)
{
// echo "<p>backtrace: ".function_backtrace()."</p>\n";
if (is_array($profileData->ic_server[$profileID]->folderstoshowinhome) && !empty($profileData->ic_server[$profileID]->folderstoshowinhome[0]))
{
$userPrefs['mainscreen_showfolders'] = implode(',',$profileData->ic_server[$profileID]->folderstoshowinhome);
}
if (!empty($profileData->ic_server[$profileID]->sentfolder)) $userPrefs['sentFolder'] = $profileData->ic_server[$profileID]->sentfolder;
if (!empty($profileData->ic_server[$profileID]->trashfolder)) $userPrefs['trashFolder'] = $profileData->ic_server[$profileID]->trashfolder;
if (!empty($profileData->ic_server[$profileID]->draftfolder)) $userPrefs['draftFolder'] = $profileData->ic_server[$profileID]->draftfolder;
if (!empty($profileData->ic_server[$profileID]->templatefolder)) $userPrefs['templateFolder'] = $profileData->ic_server[$profileID]->templatefolder;
if(empty($userPrefs['deleteOptions']))
$userPrefs['deleteOptions'] = 'mark_as_deleted';
if (!empty($userPrefs['trash_folder']))
$userPrefs['move_to_trash'] = True;
if (!empty($userPrefs['sent_folder']))
{
if (!isset($userPrefs['sendOptions']) || empty($userPrefs['sendOptions'])) $userPrefs['sendOptions'] = 'move_to_sent';
}
/* not used anymore
if (!empty($userPrefs['email_sig'])) $userPrefs['signature'] = $userPrefs['email_sig'];
*/
if (isset($userPrefs['email_sig'])) unset($userPrefs['email_sig']);
return $userPrefs;
}
function ggetSignature($_signatureID, $_unparsed = false)
{
if($_signatureID == -1) {

View File

@ -1,201 +1,50 @@
<?php
/***************************************************************************\
* eGroupWare - FeLaMiMail *
* http://www.linux-at-work.de *
* http://www.phpgw.de *
* http://www.egroupware.org *
* Written by : Lars Kneschke [lkneschke@linux-at-work.de] *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; version 2 of the License. *
\***************************************************************************/
/* $Id: class.uisieve.inc.php,v 1.24 2005/11/30 08:29:45 ralfbecker Exp $ */
/**
* EGroupware EMail - timed vacation
*
* @link http://www.stylite.de
* @package felamimail
* @author Ralf Becker <rb@stylite.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id: class.uisieve.inc.php,v 1.24 2005/11/30 08:29:45 ralfbecker Exp $
*/
#include_once(EGW_SERVER_ROOT. '/felamimail/inc/Sieve.php');
include_once('Net/Sieve.php');
/**
* Class containing callback to set/reset vacation notice in future (timed vacation)
*
* Rest of class is moved to emailadmin_sieve and accessible via incomming server object (IMAP).
*/
class bosieve
{
/**
* Callback for the async job to enable/disable the vacation message
*
* @param array $_vacation
*/
function async_vacation($_vacation)
{
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'('.print_r($_vacation,true).')');
// unset the fm_preferences session object, to force the reload/rebuild
$GLOBALS['egw']->session->appsession('fm_preferences','felamimail',serialize(array()));
$GLOBALS['egw']->session->appsession('session_data','emailadmin',serialize(array()));
class bosieve extends Net_Sieve {
/**
* @var object $icServer object containing the information about the imapserver
*/
var $icServer;
/**
* @var object $icServer object containing the information about the imapserver
*/
var $scriptName;
/**
* @var object $error the last PEAR error object
*/
var $error;
/**
* Switch on some error_log debug messages
*
* @var boolean
*/
var $debug = false;
function bosieve($_icServer=null)
$_restoreSession = false; // as in async, each call may be for a different user
$bopreferences = CreateObject('felamimail.bopreferences',$_restoreSession);
$mailPreferences = $bopreferences->getPreferences();
$icServer = $mailPreferences->getIncomingServer(0);
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'->LoginName:'.$icServer->loginName);
//error_log(__METHOD__.__LINE__.array2string($_vacation));
try
{
parent::Net_Sieve();
$this->scriptName = (!empty($GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName']) ? $GLOBALS['egw_info']['user']['preferences']['felamimail']['sieveScriptName'] : 'felamimail');
$this->displayCharset = $GLOBALS['egw']->translation->charset();
if (!is_null($_icServer) && $this->_connect($_icServer) === 'die') {
die('Sieve not activated');
}
$ret = $icServer->setVacationUser($icServer->loginName,$_vacation['scriptName'],$_vacation);
}
/**
* Open connection to the sieve server
*
* @param defaultimap $_icServer
* @param string $euser='' effictive user, if given the Cyrus admin account is used to login on behalf of $euser
* @return mixed 'die' = sieve not enabled, false=connect or login failure, true=success
*/
function _connect($_icServer,$euser='')
{
if(is_a($_icServer,'defaultimap') && $_icServer->enableSieve) {
$sieveHost = $_icServer->host;
$sievePort = $_icServer->sievePort;
$useTLS = $_icServer->encryption > 0;
if ($euser) {
$username = $_icServer->adminUsername;
$password = $_icServer->adminPassword;
} else {
$username = $_icServer->loginName;
$password = $_icServer->password;
}
$this->icServer = $_icServer;
} else {
return 'die';
}
if(PEAR::isError($this->error = $this->connect($sieveHost , $sievePort, null, $useTLS) ) ){
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": error in connect($sieveHost,$sievePort): ".$this->error->getMessage());
return false;
}
if(PEAR::isError($this->error = $this->login($username, $password, null, $euser) ) ){
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.": error in login($username,$password,null,$euser): ".$this->error->getMessage());
return false;
}
return true;
}
function getRules($_scriptName) {
return $this->rules;
}
function getVacation($_scriptName) {
return $this->vacation;
}
function getEmailNotification($_scriptName) {
return $this->emailNotification;
}
function setRules($_scriptName, $_rules)
{
$script =& CreateObject('felamimail.Script',$_scriptName);
$script->debug = $this->debug;
if($script->retrieveRules($this)) {
$script->rules = $_rules;
$script->updateScript($this);
return true;
}
return false;
}
function setVacation($_scriptName, $_vacation)
{
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__."($_scriptName,".print_r($_vacation,true).')');
$script =& CreateObject('felamimail.Script',$_scriptName);
$script->debug = $this->debug;
if($script->retrieveRules($this)) {
$script->vacation = $_vacation;
if (($ret = $script->updateScript($this)))
{
// setting up an async job to enable/disable the vacation message
include_once(EGW_API_INC.'/class.asyncservice.inc.php');
$async = new asyncservice();
$user = $GLOBALS['egw_info']['user']['account_id'];
$async->delete($async_id ="felamimail-vacation-$user");
$end_date = $_vacation['end_date'] + 24*3600; // end-date is inclusive, so we have to add 24h
if ($_vacation['status'] == 'by_date' && time() < $end_date)
{
$time = time() < $_vacation['start_date'] ? $_vacation['start_date'] : $end_date;
$async->set_timer($time,$async_id,'felamimail.bosieve.async_vacation',$_vacation+array('scriptName'=>$_scriptName),$user);
}
}
$this->error = $script->errstr;
return $ret;
}
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__."($_scriptName,".print_r($_vacation,true).') could not retrieve rules!');
return false;
}
/**
* Callback for the async job to enable/disable the vacation message
*
* @param array $_vacation
*/
function async_vacation($_vacation)
{
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.'('.print_r($_vacation,true).')');
// unset the fm_preferences session object, to force the reload/rebuild
$GLOBALS['egw']->session->appsession('fm_preferences','felamimail',serialize(array()));
$GLOBALS['egw']->session->appsession('session_data','emailadmin',serialize(array()));
$_restoreSession = false; // as in async, each call may be for a different user
$bopreferences = CreateObject('felamimail.bopreferences',$_restoreSession);
$mailPreferences = $bopreferences->getPreferences();
$icServer = $mailPreferences->getIncomingServer(0);
//error_log(__METHOD__.$icServer->loginName);
if ($this->_connect($icServer,$icServer->loginName) === true) {
$ret = $this->setVacation($_vacation['scriptName'],$_vacation);
// we need to logout, so further vacation's get processed
$error = $this->_cmdLogout();
if ($this->debug) error_log(__CLASS__.'::'.__METHOD__.' logout '.(PEAR::isError($error) ? 'failed: '.$ret->getMessage() : 'successful'));
return $ret;
}
return false;
}
function setEmailNotification($_scriptName, $_emailNotification) {
if ($_emailNotification['externalEmail'] == '' || !preg_match("/\@/",$_emailNotification['externalEmail'])) {
$_emailNotification['status'] = 'off';
$_emailNotification['externalEmail'] = '';
}
$script =& CreateObject('felamimail.Script',$_scriptName);
if ($script->retrieveRules($this)) {
$script->emailNotification = $_emailNotification;
return $script->updateScript($this);
}
return false;
}
function retrieveRules($_scriptName) {
$script =& CreateObject('felamimail.Script',$_scriptName);
if($script->retrieveRules($this)) {
$this->rules = $script->rules;
$this->vacation = $script->vacation;
$this->emailNotification = $script->emailNotification; // Added email notifications
return true;
}
return false;
catch (Exception $e) {
error_log(__METHOD__.'::'.__LINE__.' call for '.$icServer->loginName.','.$_vacation['scriptName'].' failed for reason:'.$e->getMessage());
$ret = false;
}
if ($ret) $icServer->setAsyncJob($_vacation);
if ($ret===false) $icServer->setAsyncJob($_vacation,null,true); //reschedule
return $ret;
}
?>
}

View File

@ -29,21 +29,21 @@
'toggleFilter' => True,
'viewMainScreen' => True
);
var $mailbox; // the current folder in use
var $startMessage; // the first message to show
var $sort; // how to sort the messages
var $moveNeeded; // do we need to move some messages?
var $timeCounter;
// the object storing the data about the incoming imap server
var $icServerID=0;
var $connectionStatus = false;
var $bofelamimail;
var $bofilter;
var $bopreferences;
function uifelamimail()
{
//error_log(__METHOD__);
@ -90,25 +90,25 @@
$messageID = $_GET['messageID'];
$partID = $_GET['partID'];
$attachment = $this->bofelamimail->getAttachment($messageID,$partID);
$tmpfname = tempnam ($GLOBALS['egw_info']['server']['temp_dir'], "egw_");
$fp = fopen($tmpfname, "w");
fwrite($fp, $attachment['attachment']);
fclose($fp);
$vcard = CreateObject('phpgwapi.vcard');
$entry = $vcard->in_file($tmpfname);
$entry['owner'] = $GLOBALS['egw_info']['user']['account_id'];
$entry['access'] = 'private';
$entry['tid'] = 'n';
print quoted_printable_decode($entry['fn'])."<br>";
unlink($tmpfname);
$GLOBALS['egw']->common->egw_exit();
}
function changeFilter()
{
error_log(__METHOD__." called from:".function_backtrace());
@ -125,7 +125,7 @@
}
$this->viewMainScreen();
}
function changeFolder()
{
// change folder
@ -135,13 +135,13 @@
$this->bofelamimail->sessionData['activeFilter']= -1;
$this->bofelamimail->saveSessionData();
$this->mailbox = $this->bofelamimail->sessionData['mailbox'];
$this->startMessage = $this->bofelamimail->sessionData['startMessage'];
$this->sort = $this->bofelamimail->sessionData['sort'];
$this->connectionStatus = $this->bofelamimail->openConnection();
$this->viewMainScreen();
}
@ -153,10 +153,10 @@
{
$this->bofelamimail->sessionData['sort'] = $_GET["sort"];
$this->sort = $_GET["sort"];
$this->bofelamimail->saveSessionData();
}
$this->viewMainScreen();
}
@ -219,17 +219,17 @@
function importMessageToFolder($_formData,$_folder='')
{
if ($_formData['size'] != 0 && (is_uploaded_file($_formData['file']) ||
if ($_formData['size'] != 0 && (is_uploaded_file($_formData['file']) ||
realpath(dirname($_formData['file'])) == realpath($GLOBALS['egw_info']['server']['temp_dir'])))
{
// ensure existance of eGW temp dir
// note: this is different from apache temp dir,
// note: this is different from apache temp dir,
// and different from any other temp file location set in php.ini
if (!file_exists($GLOBALS['egw_info']['server']['temp_dir']))
{
@mkdir($GLOBALS['egw_info']['server']['temp_dir'],0700);
}
// if we were NOT able to create this temp directory, then make an ERROR report
if (!file_exists($GLOBALS['egw_info']['server']['temp_dir']))
{
@ -239,7 +239,7 @@
.'Please check your configuration'.'<br>'
.'<br>';
}
// sometimes PHP is very clue-less about MIME types, and gives NO file_type
// rfc default for unknown MIME type is:
$mime_type_default = 'message/rfc';
@ -250,12 +250,12 @@
error_log("Message rejected, no message/rfc. Is:".$_formData['type']);
return false;
}
$tmpFileName = $GLOBALS['egw_info']['server']['temp_dir'].
SEP.
$GLOBALS['egw_info']['user']['account_id'].
basename($_formData['file']);
if (is_uploaded_file($_formData['file']))
{
move_uploaded_file($_formData['file'],$tmpFileName); // requirement for safe_mode!
@ -292,7 +292,7 @@
$message[] = $_GET["message"];
$mailfolder = NULL;
if (!empty($_GET['folder'])) $mailfolder = base64_decode($_GET['folder']);
$this->bofelamimail->deleteMessages($message,$mailfolder);
// set the url to open when refreshing
@ -306,7 +306,7 @@
opener.location.href = '" .$refreshURL. "';
window.close();</script>";
}
function display_app_header()
{
#$GLOBALS['egw']->js->validate_file('foldertree','foldertree');
@ -319,7 +319,7 @@
echo parse_navbar();
}
function handleButtons()
{
error_log(__METHOD__." called from:".function_backtrace());
@ -328,37 +328,37 @@
$this->bofelamimail->moveMessages($_POST["mailbox"],
$_POST["msg"]);
}
elseif(!empty($_POST["mark_deleted"]) &&
is_array($_POST["msg"]))
{
$this->bofelamimail->deleteMessages($_POST["msg"]);
}
elseif(!empty($_POST["mark_unread"]) &&
is_array($_POST["msg"]))
{
$this->bofelamimail->flagMessages("unread",$_POST["msg"]);
}
elseif(!empty($_POST["mark_read"]) &&
is_array($_POST["msg"]))
{
$this->bofelamimail->flagMessages("read",$_POST["msg"]);
}
elseif(!empty($_POST["mark_unflagged"]) &&
is_array($_POST["msg"]))
{
$this->bofelamimail->flagMessages("unflagged",$_POST["msg"]);
}
elseif(!empty($_POST["mark_flagged"]) &&
is_array($_POST["msg"]))
{
$this->bofelamimail->flagMessages("flagged",$_POST["msg"]);
}
$this->viewMainScreen();
}
@ -374,24 +374,24 @@
$GLOBALS['egw']->log->commit();
$GLOBALS['egw']->common->egw_exit();
}
if(!empty($_POST['profileID']) && is_int(intval($_POST['profileID'])))
{
$profileID = intval($_POST['profileID']);
$this->bofelamimail->setEMailProfile($profileID);
}
$boemailadmin = new emailadmin_bo();
$profileList = $boemailadmin->getProfileList();
$profileID = $this->bofelamimail->getEMailProfile();
$this->display_app_header();
$this->t->set_file(array("body" => "selectprofile.tpl"));
$this->t->set_block('body','main');
$this->t->set_block('body','select_option');
$this->t->set_var('lang_select_email_profile',lang('select emailprofile'));
$this->t->set_var('lang_site_configuration',lang('site configuration'));
$this->t->set_var('lang_save',lang('save'));
@ -402,15 +402,15 @@
'menuaction' => 'felamimail.uifelamimail.hookAdmin'
);
$this->t->set_var('action_url',$GLOBALS['egw']->link('/index.php',$linkData));
$linkData = array
(
'menuaction' => 'emailadmin.emailadmin_ui.listProfiles'
);
$this->t->set_var('lang_go_emailadmin', lang('use <a href="%1">EmailAdmin</a> to create profiles', $GLOBALS['egw']->link('/index.php',$linkData)));
$this->t->set_var('back_url',$GLOBALS['egw']->link('/admin/index.php'));
if(isset($profileList) && is_array($profileList))
{
foreach($profileList as $key => $value)
@ -430,10 +430,10 @@
$this->t->parse('select_options','select_option',True);
}
}
$this->t->parse("out","main");
print $this->t->get('out','main');
}
function viewMainScreen()
@ -475,13 +475,13 @@
}
}
if (empty($imapServer->host) && count($identities)==0 && $this->preferences->userDefinedAccounts)
if (empty($imapServer->host) && count($identities)==0 && $this->preferences->userDefinedAccounts)
{
// redirect to new personal account
egw::redirect_link('/index.php',array('menuaction'=>'felamimail.uipreferences.editAccountData',
'accountID'=>"new",
'msg' => lang("There is no IMAP Server configured.")." - ".lang("Please configure access to an existing individual IMAP account."),
));
));
}
$this->display_app_header();
@ -505,7 +505,7 @@
}
if($this->preferences->userDefinedAccounts)
$errormessage .= "<br>".lang('or configure an valid IMAP Server connection using the Manage Accounts/Identities preference in the Sidebox Menu.');
$this->t->set_var('connection_error_message', $errormessage);
$this->t->set_var('message', '&nbsp;');
$this->t->parse('header_rows','error_message',True);
@ -517,7 +517,7 @@
exit;
}
$this->t->set_var('activeFolder',$urlMailbox);
$this->t->set_var('activeFolderB64',base64_encode($this->mailbox));
$this->t->set_var('activeFolderB64',base64_encode($this->mailbox));
$this->t->set_var('oldMailbox',$urlMailbox);
$this->t->set_var('image_path',EGW_IMAGES);
#printf ("this->uifelamimail->viewMainScreen() Line 272: %s<br>",date("H:i:s",mktime()));
@ -529,7 +529,7 @@
$this->t->set_var('reloadView',$refreshURL);
// display a warning if vacation notice is active
if(($imapServer instanceof defaultimap) && $imapServer->enableSieve) {
$this->bosieve = CreateObject('felamimail.bosieve',$imapServer);
$this->bosieve = $imapServer;
$this->bosieve->retrieveRules($this->bosieve->scriptName);
$vacation = $this->bosieve->getVacation($this->bosieve->scriptName);
//_debug_array($vacation);
@ -615,14 +615,14 @@
// other settings
$prefaskformove = intval($userPreferences['prefaskformove']) ? intval($userPreferences['prefaskformove']) : 0;
$this->t->set_var('prefaskformove',$prefaskformove);
$this->t->set_var('prefaskformove',$prefaskformove);
#// set the url to open when refreshing
#$linkData = array
#(
# 'menuaction' => 'felamimail.uifelamimail.viewMainScreen'
#);
#$this->t->set_var('refresh_url',$GLOBALS['egw']->link('/index.php',$linkData));
// define the sort defaults
$dateSort = '0';
$dateCSS = 'text_small';
@ -657,21 +657,21 @@
// sort by date
$this->t->set_var('css_class_date', $dateCSS);
// sort by from
$this->t->set_var('css_class_from', $fromCSS);
// sort by subject
$this->t->set_var('css_class_subject', $subjectCSS);
// sort by size
$this->t->set_var('css_class_size', $sizeCSS);
#_debug_array($this->bofelamimail->sessionData['messageFilter']);
if(!empty($this->bofelamimail->sessionData['messageFilter']['string'])) {
$this->t->set_var('quicksearch', $this->bofelamimail->sessionData['messageFilter']['string']);
}
$defaultSearchType = (isset($this->bofelamimail->sessionData['messageFilter']['type']) ? $this->bofelamimail->sessionData['messageFilter']['type'] : 'quick');
$defaultSelectStatus = (isset($this->bofelamimail->sessionData['messageFilter']['status']) ? $this->bofelamimail->sessionData['messageFilter']['status'] : 'any');
@ -685,7 +685,7 @@
);
$selectSearchType = html::select('searchType', $defaultSearchType, $searchTypes, false, "style='width:100%;' id='searchType' onchange='document.getElementById(\"quickSearch\").focus(); document.getElementById(\"quickSearch\").value=\"\" ;return false;'");
$this->t->set_var('select_search', $selectSearchType);
$statusTypes = array(
'any' => 'any status',
'flagged' => 'flagged',
@ -705,24 +705,24 @@
$headers = $this->bofelamimail->getHeaders($this->mailbox, $this->startMessage, $maxMessages, $this->sort, $this->sortReverse, $this->bofelamimail->sessionData['messageFilter']);
$headerCount = count($headers['header']);
// if there aren't any messages left (eg. after delete or move)
// adjust $this->startMessage
// if there aren't any messages left (eg. after delete or move)
// adjust $this->startMessage
if ($headerCount==0 && $this->startMessage > $maxMessages) {
$this->startMessage = $this->startMessage - $maxMessages;
#$headers = $this->bofelamimail->getHeaders($this->startMessage, $maxMessages, $this->sort);
$headerCount = count($headers['header']);
}
if ($this->bofelamimail->isSentFolder($this->mailbox)
|| $this->bofelamimail->isDraftFolder($this->mailbox)
if ($this->bofelamimail->isSentFolder($this->mailbox)
|| $this->bofelamimail->isDraftFolder($this->mailbox)
|| $this->bofelamimail->isTemplateFolder($this->mailbox)) {
$this->t->set_var('lang_from',lang("to"));
} else {
$this->t->set_var('lang_from',lang("from"));
}
$msg_icon_sm = $GLOBALS['egw']->common->image('felamimail','msg_icon_sm');
// determine how to display the current folder: as sent folder (to address visible) or normal (from address visible)
// determine how to display the current folder: as sent folder (to address visible) or normal (from address visible)
$sentFolderFlag =$this->bofelamimail->isSentFolder($this->mailbox);
$folderType = 0;
if($sentFolderFlag ||
@ -735,7 +735,7 @@
} elseif($this->bofelamimail->isTemplateFolder($this->mailbox)) {
$folderType = 3;
}
$this->t->set_var('header_rows',
$uiwidgets->messageTable(
$headers,
@ -745,19 +745,19 @@
$userPreferences['rowOrderStyle']
)
);
$firstMessage = $headers['info']['first'];
$lastMessage = $headers['info']['last'];
$totalMessage = $headers['info']['total'];
$langTotal = lang("total");
$langTotal = lang("total");
$this->t->set_var('maxMessages',$i);
if($_GET["select_all"] == "select_all") {
$this->t->set_var('checkedCounter',$i);
} else {
$this->t->set_var('checkedCounter','0');
}
// set the select all/nothing link
if($_GET["select_all"] == "select_all") {
// link to unselect all messages
@ -820,7 +820,7 @@
//$this->t->set_var('folder_tree',$folderTree);
$this->t->set_var('options_folder',$options_folder);
$linkData = array
(
'menuaction' => 'felamimail.uicompose.compose'
@ -858,34 +858,34 @@
break;
}
//print __LINE__ . ': ' . (microtime(true) - $this->timeCounter) . '<br>';
$this->t->parse("out","main");
print $this->t->get('out','main');
$GLOBALS['egw']->common->egw_footer();
}
function array_merge_replace( $array, $newValues )
function array_merge_replace( $array, $newValues )
{
foreach ( $newValues as $key => $value )
foreach ( $newValues as $key => $value )
{
if ( is_array( $value ) )
if ( is_array( $value ) )
{
if ( !isset( $array[ $key ] ) )
if ( !isset( $array[ $key ] ) )
{
$array[ $key ] = array();
}
$array[ $key ] = $this->array_merge_replace( $array[ $key ], $value );
}
else
}
else
{
if ( isset( $array[ $key ] ) && is_array( $array[ $key ] ) )
if ( isset( $array[ $key ] ) && is_array( $array[ $key ] ) )
{
$array[ $key ][ 0 ] = $value;
}
else
}
else
{
if ( isset( $array ) && !is_array( $array ) )
if ( isset( $array ) && !is_array( $array ) )
{
$temp = $array;
$array = array();
@ -903,13 +903,13 @@
{
$bytes /= 1024;
$type = 'k';
if ($bytes / 1024 > 1)
{
$bytes /= 1024;
$type = 'M';
}
if ($bytes < 10)
{
$bytes *= 10;
@ -918,10 +918,10 @@
}
else
settype($bytes, 'integer');
return $bytes . '&nbsp;' . $type ;
}
function toggleFilter()
{
error_log(__METHOD__." called from:".function_backtrace());

View File

@ -63,18 +63,23 @@
$this->t =& CreateObject('phpgwapi.Template',EGW_APP_TPL);
$this->botranslation = $GLOBALS['egw']->translation;
$this->bopreferences =& CreateObject('felamimail.bopreferences');
$this->bofelamimail = CreateObject('felamimail.bofelamimail',$this->displayCharset,true);
$this->bopreferences =& $this->bofelamimail->bopreferences;
$this->mailPreferences = $this->bopreferences->getPreferences();
$this->felamimailConfig = config::read('felamimail');
$this->restoreSessionData();
$icServer = $this->mailPreferences->getIncomingServer(0);
$icServer =& $this->bofelamimail->icServer;
if(($icServer instanceof defaultimap) && $icServer->enableSieve) {
$this->bosieve =& CreateObject('felamimail.bosieve',$icServer);
$this->timed_vacation = ($icServer instanceof cyrusimap) && $icServer->enableCyrusAdmin &&
$this->bosieve =& $icServer;
$serverclass = get_class($icServer);
$classsupportstimedsieve = false;
if (!empty($serverclass) && stripos(constant($serverclass.'::CAPABILITIES'),'timedsieve') !== false) $classsupportstimedsieve = true;
$this->timed_vacation = $classsupportstimedsieve && $icServer->enableCyrusAdmin &&
$icServer->adminUsername && $icServer->adminPassword;
} else {
die('Sieve not activated');

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @package setup
* @copyright (c) 2007 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2007-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$
*/
@ -138,28 +138,30 @@ class setup_cmd_config extends setup_cmd
'--webserver-url' => 'webserver_url',
'--mailserver' => array( //server,{IMAP|IMAPS|POP|POPS},[domain],[{standard(default)|vmailmgr = add domain for mailserver login|email = use email of user (Standard Maildomain should be set)}]
'mail_server',
array('name' => 'mail_server_type','allowed' => array('imap','imaps','pop3','pop3s'),'default'=>'imap'),
array('name' => 'mail_server_type','allowed' => array('imap','imaps'),'default'=>'imap'),
'mail_suffix',
array('name' => 'mail_login_type','allowed' => array(
'username (standard)' => 'standard',
'username@domain (virtual mail manager)' => 'vmailmgr',
'Username/Password defined by admin' => 'admin',
'userId@domain eg. u123@domain' => 'uidNumber',
'email (Standard Maildomain should be set)' => 'email',
),'default'=>'standard'),
),
'--cyrus' => array(
'imapAdminUsername',
'imapAdminPW',
array('name' => 'imapType','default' => 3),
array('name' => 'imapType','default' => 'cyrusimap'),
array('name' => 'imapEnableCyrusAdmin','default' => 'yes'),
),
'--sieve' => array(
array('name' => 'imapSieveServer','default' => 'localhost'),
array('name' => 'imapSieveServer'),
array('name' => 'imapSievePort','default' => 2000),
array('name' => 'imapEnableSieve','default' => 'yes'), // null or yes
),
'--postfix' => array(
array('name' => 'editforwardingaddress','allowed' => array('yes',null)),
array('name' => 'smtpType','default' => 2),
array('name' => 'smtpType','default' => 'postfixldap'),
),
'--smtpserver' => array( //smtp server,[smtp port],[smtp user],[smtp password]
'smtp_server',array('name' => 'smtp_port','default' => 25),'smtp_auth_user','smtp_auth_passwd',''
@ -289,7 +291,7 @@ class setup_cmd_config extends setup_cmd
}
$config['smtpAuth'] = $config['smtp_auth_user'] ? 'yes' : null;
$emailadmin = new emailadmin_bo(-1,false); // false=no session stuff
$emailadmin = new emailadmin_bo(false,false); // false=no session stuff
$emailadmin->setDefaultProfile($config);
if ($this->verbose)
@ -413,8 +415,8 @@ class setup_cmd_config extends setup_cmd
$defaults['mail_suffix'] = '$domain';
$defaults['imapAdminUsername'] = 'cyrus@$domain';
$defaults['imapAdminPW'] = self::randomstring();
$defaults['imapType'] = 2; // standard IMAP
$defaults['smtpType'] = 1; // standard SMTP
$defaults['imapType'] = 'defaultimap'; // standard IMAP
$defaults['smtpType'] = 'defaultsmtp'; // standard SMTP
return $defaults;
}
@ -435,7 +437,7 @@ class setup_cmd_config extends setup_cmd
}
if (strpos($this->$name,'$') !== false)
{
$this->$name = str_replace(array(
$this->set_defaults[$name] = $this->$name = str_replace(array(
'$domain',
),array(
$this->domain,

View File

@ -186,7 +186,7 @@ function do_emailadmin()
}
$config['smtpAuth'] = $config['smtp_auth_user'] ? 'yes' : null;
$emailadmin = new emailadmin_bo(-1,false); // false=no session stuff
$emailadmin = new emailadmin_bo(false,false); // false=no session stuff
$emailadmin->setDefaultProfile($config);
echo "\n".lang('EMailAdmin profile updated:')."\n";