0011508: Felamimail not creating correct SMTP settings
authorCornelius Weiß <c.weiss@metaways.de>
Tue, 16 Feb 2016 22:10:44 +0000 (23:10 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 17 Feb 2016 16:47:29 +0000 (17:47 +0100)
https://forge.tine20.org/view.php?id=11508

Change-Id: I5b64881490ab72421f7c488b17bd682f6f62af7f
Reviewed-on: http://gerrit.tine20.com/customers/2735
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/EmailUser/Imap/Cyrus.php
tine20/Tinebase/EmailUser/Ldap.php

index 5ee4d4c..8179099 100644 (file)
@@ -128,7 +128,10 @@ class Tinebase_EmailUser_Imap_Cyrus extends Tinebase_User_Plugin_Abstract implem
             'emailUsername'  => $this->_appendDomain($_user->accountLoginName),
             'emailUserId'    => $this->_appendDomain($_user->accountLoginName),
             'emailMailQuota' => isset($quota['STORAGE']) ? round($quota['STORAGE']['limit'] / 1024) : null,
-            'emailMailSize'  => isset($quota['STORAGE']) ? round($quota['STORAGE']['usage'] / 1024) : null
+            'emailMailSize'  => isset($quota['STORAGE']) ? round($quota['STORAGE']['usage'] / 1024) : null,
+            'emailHost'     => $this->_config['host'],
+            'emailPort'     => $this->_config['port'],
+            'emailSecure'   => $this->_config['ssl'],
         ));
         
         if (Tinebase_Core::isLogLevel(Zend_Log::TRACE)) Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' ' . print_r($emailUser->toArray(), TRUE));
index 1cef0ef..6e219c4 100644 (file)
@@ -56,7 +56,20 @@ class Tinebase_EmailUser_Ldap extends Tinebase_User_Plugin_LdapAbstract
     {
         #if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' ' . print_r($_ldapEntry, true));
         $accountArray = $this->_defaults;
-        
+
+        if ($this instanceof Tinebase_EmailUser_Smtp_Interface) {
+            $smtpConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::SMTP);
+            $accountArray = array_merge($accountArray, array(
+                'emailHost'        => $smtpConfig['hostname'],
+                'emailPort'        => $smtpConfig['port'],
+                'emailSecure'      => $smtpConfig['ssl'],
+                'emailAuth'        => $smtpConfig['auth'],
+            ));
+        } else {
+            $imapConfig = Tinebase_Config::getInstance()->get(Tinebase_Config::IMAP);
+
+        }
+
         if ($this instanceof Tinebase_EmailUser_Smtp_Interface) {
             $accountArray = array_merge($accountArray, array(
                 'emailForwardOnly' => false,