View Issue Details

IDProjectCategoryView StatusLast Update
0013424Tine 2.0Felamimailpublic2017-09-28 12:23
ReportermknoellerAssigned Topschuele 
PriorityurgentSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2017.08.3 Community Edition 
Target Version2017.08.6 Community EditionFixed in Version2017.08.6 Community Edition 
Summary0013424: failing smtp authentication after upgrade to tine 2017.08.3 CE
DescriptionSending Emails not possible in cause of smtp authenticaten failure! After upgrade from 2017.02.5 to 2017.08.3 domainname is not appended to loginname during smtp authentication! So the smtp username is incomplete and smtp connection is refused.
Steps To ReproduceAllways reproducable by simple upgrade to 2017.08.3. Even with different Linux Distri, php version and apache version.
Additional Informationimap authentication works as normal, because domainname is appended to loginname and the imap username is correct.

I think here is the same problem:
https://www.tine20.org/forum/viewtopic.php?f=12&t=18546
TagsNo tags attached.
mwticket

Activities

pschuele

pschuele

2017-09-11 09:21

administrator   ~0020660

thanks for the report, we'll have a look.
lab-at-nohl

lab-at-nohl

2017-09-27 00:40

developer   ~0020804

This only happens to non-ldap Backends (especially Standard-SMTP).

As far as I can see, in protected function _getEmailUserName (Tinebase/User/Plugin/Abstract.php, line 160) $this->_config['domain'] is always unset. Only $this->_config['primaryDomain'] is available which btw reflects the functionality of protected function _appendDomain (line 114)...

If I change the like the following primaryDomain from Setup is used:

    protected function _getEmailUserName(Tinebase_Model_FullUser $user, $alternativeLoginName = null)
    {
        $domainConfigKey = ($this instanceof Tinebase_EmailUser_Imap_Interface) ? 'domain' : 'primarydomain';
        if (isset($this->_config['useEmailAsUsername']) && $this->_config['useEmailAsUsername']) {
            $emailUsername = $user->accountEmailAddress;
        } else if (isset($this->_config['instanceName']) && ! empty($this->_config['instanceName'])) {
            $emailUsername = $user->getId() . '@' . $this->_config['instanceName'];
        } else if (isset($this->_config[$domainConfigKey]) && $this->_config[$domainConfigKey] !== null) {
            $emailUsername = $this->_appendDomain($user->accountLoginName);
        } else if ($alternativeLoginName !== null) {
            $emailUsername = $emailAddress;
        } else {
            $emailUsername = $user->accountLoginName;
        }

        return $emailUsername;
    }

Unfortunately I' totally lost within this area of code. I really can't figure out how functionality is meant here. It seems unusal to me that domain from IMAP config is requested...
pschuele

pschuele

2017-09-27 10:49

administrator   ~0020806

thanks @Johannes.

does this work for you @mknoeller ?
koelschejung

koelschejung

2017-09-27 17:15

reporter   ~0020822

On my dev-maschine work this workaround.

After this change, i can sent mails.

Thanks a lot.

uli
pschuele

pschuele

2017-09-28 11:01

administrator   ~0020824

great, thank you both :)

Issue History

Date Modified Username Field Change
2017-09-08 10:53 mknoeller New Issue
2017-09-11 09:20 pschuele Assigned To => pschuele
2017-09-11 09:21 pschuele Note Added: 0020660
2017-09-27 00:40 lab-at-nohl Note Added: 0020804
2017-09-27 10:49 pschuele Note Added: 0020806
2017-09-27 10:49 pschuele Status new => feedback
2017-09-27 17:15 koelschejung Note Added: 0020822
2017-09-28 11:01 pschuele Note Added: 0020824
2017-09-28 11:01 pschuele Target Version => 2017.08.6 Community Edition
2017-09-28 11:02 pschuele Status feedback => resolved
2017-09-28 11:02 pschuele Resolution open => fixed
2017-09-28 11:02 pschuele Fixed in Version => 2017.08.6 Community Edition
2017-09-28 12:23 pschuele Category UNKNOWN => Felamimail