View Issue Details

IDProjectCategoryView StatusLast Update
0002163SOGoBackend Mailpublic2013-01-11 14:56
Reporterjobisoft Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.3a 
Target Version2.0.4Fixed in Version2.0.4 
Summary0002163: In multidomain setup with smtp authentication _smtpSendData is using uid@domainID as login
Description

In an multidomain setup the authenticator used in SOGoMailer.m:_smtpSendData returns uid@domainID, which is not useful for smtp authentication.

As written in the Installation guide, the domainID does not need to be a real domain (the example uses acme and coyote)

Since this is a multidomain setup, providing just the uid as in single domain setup is not usefull either. The provided patch changes the login from uid@domainID to uid@mailDomain.

I do not know if the woContext parameter of the authenticator could also be used to tweak this, I did not look after that.

TagsNo tags attached.

Activities

2013-01-08 10:05

 

jobisoft

jobisoft

2013-01-09 11:58

reporter   ~0005093

After thinking about it for a while, it could be better to copy the behaviour of the IMAP logins, which is:

Always use "uid" as SMTP login instead of "uid@domainID" and only if desired use "email" as SMTP login. This would require a SOGoForceSMTPLoginWithEmail option.

This way it is more transparent, what do you think?

ludovic

ludovic

2013-01-09 14:03

administrator   ~0005095

I think it's a better approach, provide an updated patch.

jobisoft

jobisoft

2013-01-10 21:41

reporter   ~0005129

It took a while, I hope this is usable.

I learned, that SOGoUserManager:contactInfoForUserWithUIDorEmail already implements the correct splitting of the uid. So I reused that by adding getSmtpLoginForUID to the UserManager.

However, the extracted domainID was not available outside of contactInfoForUserWithUIDorEmail, so I added a key "domainID" to the returned contactInfos.

Since I copied getImapLoginForUID, it also checks for the key "c_smtplogin" but I guess to fully implement this, there are some code changes needed elsewhere.

2013-01-10 21:42

 

ludovic

ludovic

2013-01-11 14:09

administrator   ~0005134

After thinking about this, I think we should simply refactor the code a bit and use -getImapLoginForUID: inDomain:.

SOGoForceIMAPLoginWithEmail should be renamed to SOGoForceExternalLoginWithEmail and we should use that for both IMAP and SMTP.

I'll rework the current code.

ludovic

ludovic

2013-01-11 14:56

administrator   ~0005136

Proper fix pushed: https://github.com/inverse-inc/sogo/commit/9d4f4c3a9c70ec5af71b9802140d6dd26338cf13

Issue History

Date Modified Username Field Change
2013-01-08 10:05 jobisoft New Issue
2013-01-08 10:05 jobisoft File Added: patch_2.0.3a_alternative_smtp_user_multidomain
2013-01-09 11:58 jobisoft Note Added: 0005093
2013-01-09 14:03 ludovic Note Added: 0005095
2013-01-09 14:04 ludovic Target Version => 2.0.4
2013-01-10 21:41 jobisoft Note Added: 0005129
2013-01-10 21:42 jobisoft File Added: patch_2.0.3a_SOGoForceSMTPLoginWithEmail
2013-01-11 14:09 ludovic Note Added: 0005134
2013-01-11 14:56 ludovic Note Added: 0005136
2013-01-11 14:56 ludovic Status new => closed
2013-01-11 14:56 ludovic Resolution open => fixed
2013-01-11 14:56 ludovic Fixed in Version => 2.0.4