afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server
https://afterlogic.org/webmail-lite-8
GNU Affero General Public License v3.0
335 stars 71 forks source link

Domain "*" not using full email address as login #31

Closed riccardomessineo closed 5 years ago

riccardomessineo commented 5 years ago

Hi, I need to handle multiple domain names on the same webmail. To do so, I've configured a mail server with domains "*", as suggested on the little text below, and checking "Use full email address as login"

This config however for new users doesn't work, as it will use only the account name when logging in.

[15:18:45.73][a1cd232d] [POST(4)][ip:95.239.129.7] /?/Api/
[15:18:45.73][a1cd232d] POST > [Module, Method, TenantName, Parameters]
[15:18:45.73][a1cd232d]
[15:18:45.73][a1cd232d] API: StandardLoginFormWebclient::Login
[15:18:45.73][a1cd232d] Execute subscription: AdminAuth::onLogin
[15:18:45.74][a1cd232d] Execute subscription: Mail::onLogin
[15:18:45.81][a1cd232d] IMAP[NOTE]: Start connection to "ssl://mail.hostedemail.com:993"
[15:18:46.33][a1cd232d] IMAP[DATA]: < * OK IMAP4 ready\r\n
[15:18:46.33][a1cd232d] IMAP[DATA]: > TAG1 CAPABILITY\r\n
[15:18:46.45][a1cd232d] IMAP[DATA]: < * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS IDLE AUTH=PLAIN\r\n
[15:18:46.45][a1cd232d] IMAP[DATA]: < TAG1 OK completed\r\n
[15:18:46.46][a1cd232d] IMAP[SECURE]: > TAG2 LOGIN "test" "********"\r\n
[15:18:49.64][a1cd232d] IMAP[DATA]: < TAG2 NO Invalid\r\n
[15:18:49.64][a1cd232d] IMAP[WARNING]: exception 'MailSo\Imap\Exceptions\NegativeResponseException' with message 'TAG2 NO Invalid' in /var/www/vhosts/webmail-8-lite/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php:1761
Stack trace:
#0 /var/www/vhosts/webmail-8-lite/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1839): MailSo\Imap\ImapClient->validateResponse(Array)
#1 /var/www/vhosts/webmail-8-lite/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1710): MailSo\Imap\ImapClient->parseResponseWithValidation(NULL, false)
#2 /var/www/vhosts/webmail-8-lite/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(271): MailSo\Imap\ImapClient->SendRequestWithCheck('LOGIN', Array)
#3 /var/www/vhosts/webmail-8-lite/modules/Mail/Managers/Main/Manager.php(126): MailSo\Imap\ImapClient->Login('test', 'testemail', '')
#4 /var/www/vhosts/webmail-8-lite/modules/Mail/Managers/Main/Manager.php(181): Aurora\Modules\Mail\Managers\Main\Manager->_getImapClient(Object(Aurora\Modules\Mail\Classes\Account))
#5 /var/www/vhosts/webmail-8-lite/modules/Mail/Module.php(5187): Aurora\Modules\Mail\Managers\Main\Manager->validateAccountConnection(Object(Aurora\Modules\Mail\Classes\Account))
#6 [internal function]: Aurora\Modules\Mail\Module->onLogin(Array, false)
#7 /var/www/vhosts/webmail-8-lite/system/Module/Manager.php(364): call_user_func_array(Array, Array)
#8 /var/www/vhosts/webmail-8-lite/system/Module/AbstractModule.php(383): Aurora\System\Module\Manager->broadcastEvent('Core', 'Login', Array, false)
#9 /var/www/vhosts/webmail-8-lite/modules/Core/Module.php(1802): Aurora\System\Module\AbstractModule->broadcastEvent('Login', Array, false)
#10 [internal function]: Aurora\Modules\Core\Module->Login('test@jarrodfath...', 'testemail', '', false)
#11 /var/www/vhosts/webmail-8-lite/system/Module/AbstractModule.php(880): call_user_func_array(Array, Array)
#12 /var/www/vhosts/webmail-8-lite/system/Module/Decorator.php(42): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)
#13 /var/www/vhosts/webmail-8-lite/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->__call('Login', Array)
#14 /var/www/vhosts/webmail-8-lite/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->Login('test@jarrodfath...', 'testemail', '', false)
#15 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('test@jarrodfath...', 'testemail', '', false)
#16 /var/www/vhosts/webmail-8-lite/system/Module/AbstractModule.php(880): call_user_func_array(Array, Array)
#17 /var/www/vhosts/webmail-8-lite/modules/Core/Module.php(536): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)
#18 [internal function]: Aurora\Modules\Core\Module->EntryApi()
#19 /var/www/vhosts/webmail-8-lite/system/Module/AbstractModule.php(621): call_user_func_array(Array, Array)
#20 /var/www/vhosts/webmail-8-lite/system/Module/Manager.php(690): Aurora\System\Module\AbstractModule->RunEntry('api')
#21 /var/www/vhosts/webmail-8-lite/system/Application.php(89): Aurora\System\Module\Manager->RunEntry('api')
#22 /var/www/vhosts/webmail-8-lite/index.php(21): Aurora\System\Application::Start()
#23 {main}

Version 8.2.0-build-a3

afterlogic-support commented 5 years ago

Version 8.2.0-build-a3

There were numerous changes affecting that behavior since 8.2.0, check if the issue persists with the latest 8.2.3 version.

riccardomessineo commented 5 years ago

Hi @afterlogic-support , thank you for your answer. How can I safely update the software to the 8.2.3? Which directories should I preserve?

afterlogic-support commented 5 years ago

It's mostly about the data/ directory. You can find the upgrading instructions at: https://afterlogic.com/docs/webmail-lite-8/installation/upgrading-instructions

riccardomessineo commented 5 years ago

Unfortunately, the upgrade didn't fix the bug. It still uses only the account name as login...

riccardomessineo commented 5 years ago

Maybe it's not recognizing the "*" as a catchall operator?

image

[11:19:06.60][edbe5b43] [POST(4)][ip:95.239.129.7] /?/Api/
[11:19:06.60][edbe5b43] POST > [Module, Method, TenantName, Parameters]
[11:19:06.60][edbe5b43]
[11:19:06.60][edbe5b43] API: StandardLoginFormWebclient::Login
[11:19:06.60][edbe5b43] Execute subscription: AdminAuth::onLogin
[11:19:06.60][edbe5b43] Execute subscription: Mail::onLogin
[11:19:06.69][edbe5b43] IMAP[NOTE]: Start connection to "ssl://mail.hostedemail.com:993"
[11:19:07.22][edbe5b43] IMAP[DATA]: < * OK IMAP4 ready\r\n
[11:19:07.22][edbe5b43] IMAP[DATA]: > TAG1 CAPABILITY\r\n
[11:19:07.35][edbe5b43] IMAP[DATA]: < * CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS IDLE AUTH=PLAIN\r\n
[11:19:07.35][edbe5b43] IMAP[DATA]: < TAG1 OK completed\r\n
[11:19:07.35][edbe5b43] IMAP[SECURE]: > TAG2 LOGIN "info" "********"\r\n
[11:19:10.51][edbe5b43] IMAP[DATA]: < TAG2 NO Invalid\r\n
[11:19:10.51][edbe5b43] IMAP[WARNING]: exception 'MailSo\Imap\Exceptions\NegativeResponseException' with message 'TAG2 NO Invalid' in /var/www/vhosts/webmail-8-lite-8.2.3/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php:1761
Stack trace:
#0 /var/www/vhosts/webmail-8-lite-8.2.3/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1839): MailSo\Imap\ImapClient->validateResponse(Array)
#1 /var/www/vhosts/webmail-8-lite-8.2.3/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1710): MailSo\Imap\ImapClient->parseResponseWithValidation(NULL, false)
#2 /var/www/vhosts/webmail-8-lite-8.2.3/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(271): MailSo\Imap\ImapClient->SendRequestWithCheck('LOGIN', Array)
#3 /var/www/vhosts/webmail-8-lite-8.2.3/modules/Mail/Managers/Main/Manager.php(126): MailSo\Imap\ImapClient->Login('info', 'infoemail', '')
#4 /var/www/vhosts/webmail-8-lite-8.2.3/modules/Mail/Managers/Main/Manager.php(181): Aurora\Modules\Mail\Managers\Main\Manager->_getImapClient(Object(Aurora\Modules\Mail\Classes\Account))
#5 /var/www/vhosts/webmail-8-lite-8.2.3/modules/Mail/Module.php(5243): Aurora\Modules\Mail\Managers\Main\Manager->validateAccountConnection(Object(Aurora\Modules\Mail\Classes\Account))
#6 [internal function]: Aurora\Modules\Mail\Module->onLogin(Array, false, NULL)
#7 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/Manager.php(373): call_user_func_array(Array, Array)
#8 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/AbstractModule.php(383): Aurora\System\Module\Manager->broadcastEvent('Core', 'Login', Array, false)
#9 /var/www/vhosts/webmail-8-lite-8.2.3/modules/Core/Module.php(1791): Aurora\System\Module\AbstractModule->broadcastEvent('Login', Array, false)
#10 [internal function]: Aurora\Modules\Core\Module->Login('info@domain...', 'password', '', false)
#11 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)
#12 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/Decorator.php(42): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)
#13 /var/www/vhosts/webmail-8-lite-8.2.3/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->__call('Login', Array)
#14 /var/www/vhosts/webmail-8-lite-8.2.3/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->Login('info@domain...', 'passsword', '', false)
#15 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('info@jarrodfath...', 'infoemail', '', false)
#16 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)
#17 /var/www/vhosts/webmail-8-lite-8.2.3/modules/Core/Module.php(537): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)
#18 [internal function]: Aurora\Modules\Core\Module->EntryApi()
#19 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/AbstractModule.php(621): call_user_func_array(Array, Array)
#20 /var/www/vhosts/webmail-8-lite-8.2.3/system/Module/Manager.php(704): Aurora\System\Module\AbstractModule->RunEntry('api')
#21 /var/www/vhosts/webmail-8-lite-8.2.3/system/Application.php(89): Aurora\System\Module\Manager->RunEntry('api')
#22 /var/www/vhosts/webmail-8-lite-8.2.3/index.php(21): Aurora\System\Application::Start()
#23 {main}
afterlogic-support commented 5 years ago

Well, I couldn't reproduce the issue. Have installed the latest 8.2.3 package of WebMail Lite, added a mailserver there with "*" supplied for list of domains, and have successfully logged in.

If you try that on a blank install, are you getting the same issue?

riccardomessineo commented 5 years ago

Ok, it works with a fresh install!

Which data should I export->import to the new install?

afterlogic-support commented 5 years ago

Other than upgrading with data/ directory preserved, or performing a fresh install, there's no other suggestions I'm afraid.