From 126116584c6b841bff91d2c49dbd82f1ce9f1765 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 31 Jan 2017 18:01:08 +0100 Subject: [PATCH] * Mail/Admin: fix setting ACL or vaction notice from Admin app, if IMAP auth uses email address from account --- api/src/Mail/Imap.php | 2 +- api/src/Mail/Sieve.php | 1 + mail/inc/class.mail_acl.inc.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Mail/Imap.php b/api/src/Mail/Imap.php index 33581a9bc7..31d55ba74e 100644 --- a/api/src/Mail/Imap.php +++ b/api/src/Mail/Imap.php @@ -1123,7 +1123,7 @@ class Imap extends Horde_Imap_Client_Socket implements Imap\Iface } $username = $this->getMailBoxUserName($_username); - if($this->loginType == 'vmailmgr' || $this->loginType == 'email' || $this->loginType == 'uidNumber') { + if($this->loginType == 'vmailmgr' || $this->loginType == 'uidNumber') { $username .= '@'. $this->domainName; } diff --git a/api/src/Mail/Sieve.php b/api/src/Mail/Sieve.php index 93ad95db66..80236465a8 100644 --- a/api/src/Mail/Sieve.php +++ b/api/src/Mail/Sieve.php @@ -95,6 +95,7 @@ class Sieve extends Horde\ManageSieve 'user' => $params->isAdminConnection ? $params->acc_imap_admin_username : $params->acc_imap_username, 'password' => $params->isAdminConnection ? $params->acc_imap_admin_password : $params->acc_imap_password, 'euser' => $params->isAdminConnection ? $params->acc_imap_username : null, + //'logger' => new \admin_mail_logger('/tmp/sieve.log'), ); } parent::__construct($params); diff --git a/mail/inc/class.mail_acl.inc.php b/mail/inc/class.mail_acl.inc.php index ce9a0991ee..a2e5423600 100644 --- a/mail/inc/class.mail_acl.inc.php +++ b/mail/inc/class.mail_acl.inc.php @@ -84,7 +84,7 @@ class mail_acl $mailbox = $_GET['mailbox']? base64_decode($_GET['mailbox']): $content['mailbox'][0]; if (empty($mailbox)) { - $mailbox = $this->imap->isAdminConnection ? $this->imap->getUserMailboxString($this->imap->isAdminConnection) : 'INBOX'; + $mailbox = $this->imap->isAdminConnection ? $this->imap->getUserMailboxString($account_id) : 'INBOX'; } if (!$this->imap->isAdminConnection) {