afterlogic / webmail-lite

AfterLogic WebMail Lite PHP. Fast and easy-to-use webmail front-end for your existing IMAP mail server, Plesk or cPanel.
https://afterlogic.org/webmail-lite
GNU Affero General Public License v3.0
443 stars 120 forks source link

Cannot login an account using cPanel #92

Closed ysilvela closed 2 years ago

ysilvela commented 6 years ago

I install afterlogic v.8.2.2 inside WHM/cPanel server and when a customer login using their webmail.domain.tld appears a new login window requesting again user and password. How can i remove that page and login only with cPanel webmail? Especially because that login page doesnt recognize cPanel users.

captura de pantalla 2018-10-16 a las 13 31 40
afterlogic-support commented 6 years ago

Would it be possible to provide us with SSH access to the server so we can investigate that? We'll also need a test email account. You can provide the credentials via HelpDesk. Thank you.

ysilvela commented 6 years ago

No. I can't by security reasons. I use the free software installed using this guide (https://afterlogic.com/docs/webmail-lite-8/installation/install-on-cpanel) The module AuthCpanel is enabled.

afterlogic-support commented 6 years ago

Understood. We'll try to reproduce the issue locally, and if it occurs for us here we'll have it investigated.

afterlogic-support commented 6 years ago

We have a question in this regard: are you able to log in as admin using that login form from the screenshot? By default, login is superadmin, empty password. If you can log in, please post a screenshot of what you get after logging in.

ysilvela commented 6 years ago

Yes. I can login as admin.

I see this trace:

[14:10:34.23][1632c771] [POST(4)][ip:213.164.165.1] /cpsess4854669902/3rdparty/afterlogic/index.php?/Api/ [14:10:34.23][1632c771] POST > [Module, Method, TenantName, Parameters] [14:10:34.23][1632c771] [14:10:34.23][1632c771] API: StandardLoginFormWebclient::Login [14:10:34.23][1632c771] Execute subscription: AdminAuth::onLogin [14:10:34.24][1632c771] Execute subscription: Mail::onLogin [14:10:34.26][1632c771] IMAP[NOTE]: Start connection to "tcp://127.0.0.1:143" [14:10:34.26][1632c771] IMAP[DATA]: < * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE NAMESPACE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.\r\n [14:10:34.26][1632c771] IMAP[ERROR]: exception 'MailSo\Base\Exceptions\InvalidArgumentException' with message 'MailSo-Base-Exceptions-InvalidArgumentException' in /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php:190 Stack trace:

0 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(126): MailSo\Imap\ImapClient->Login('pruebas@clinica...', false, '')

1 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(181): Aurora\Modules\Mail\Managers\Main\Manager->_getImapClient(Object(Aurora\Modules\Mail\Classes\Account))

2 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Module.php(5219): Aurora\Modules\Mail\Managers\Main\Manager->validateAccountConnection(Object(Aurora\Modules\Mail\Classes\Account))

3 [internal function]: Aurora\Modules\Mail\Module->onLogin(Array, false, NULL)

4 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(373): call_user_func_array(Array, Array)

5 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(383): Aurora\System\Module\Manager->broadcastEvent('Core', 'Login', Array, false)

6 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(1801): Aurora\System\Module\AbstractModule->broadcastEvent('Login', Array, false)

7 [internal function]: Aurora\Modules\Core\Module->Login('pruebas@clinica...', '', '', false)

8 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

9 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Decorator.php(42): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)

10 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->__call('Login', Array)

11 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->Login('pruebas@clinica...', '', '', false)

12 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('pruebas@clinica...', '', '', false)

13 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

14 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(536): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)

15 [internal function]: Aurora\Modules\Core\Module->EntryApi()

16 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(621): call_user_func_array(Array, Array)

17 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(704): Aurora\System\Module\AbstractModule->RunEntry('api')

18 /usr/local/cpanel/base/3rdparty/afterlogic/system/Application.php(89): Aurora\System\Module\Manager->RunEntry('api')

19 /usr/local/cpanel/base/3rdparty/afterlogic/index.php(21): Aurora\System\Application::Start()

20 {main}

[14:10:34.26][1632c771] Event: 0 > login-failed: pruebas@clinica....com [14:10:34.26][1632c771] ApiException [14:10:34.26][1632c771] INFO[MEMORY]: Memory peak usage: 26.5MB [14:10:34.26][1632c771] INFO[TIME]: Time delta: 1539699034.2661 [14:10:34.26][1632c771] IMAP[NOTE]: Disconnected from "tcp://127.0.0.1:143" (success)

afterlogic-support commented 6 years ago

Thanks for the logs, we'll have those checked. However, I meant the screenshot of the admin interface.

ysilvela commented 6 years ago
captura de pantalla 2018-10-16 a las 16 25 45
afterlogic-support commented 6 years ago

Got it, thank you. And what happens if you try to log into the interface using login page of WebMail? What happens in the interface and in the logs then?

ysilvela commented 6 years ago

Logs and Screenshot

[14:42:00.06][5ed87966] [GET][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php [14:42:00.06][5ed87966] POST > [] [14:42:00.06][5ed87966] [14:42:00.06][5ed87966] Execute subscription: FacebookAuthWebclient::onGetSettings [14:42:00.06][5ed87966] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:00.06][5ed87966] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:00.06][5ed87966] Execute subscription: GoogleAuthWebclient::onGetSettings [14:42:00.06][5ed87966] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:00.06][5ed87966] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:00.06][5ed87966] Execute subscription: PersonalContacts::onGetStorage [14:42:00.07][5ed87966] INFO[MEMORY]: Memory peak usage: 21.5MB [14:42:00.07][5ed87966] INFO[TIME]: Time delta: 1539700920.0719

[14:42:00.94][07a64db2] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:42:00.94][07a64db2] POST > [Module, Method, TenantName, Parameters] [14:42:00.94][07a64db2] [14:42:00.94][07a64db2] API: OAuthIntegratorWebclient::GetServices [14:42:00.94][07a64db2] Execute subscription: GoogleAuthWebclient::onAfterGetServices [14:42:00.94][07a64db2] Execute subscription: DropboxAuthWebclient::onAfterGetServices [14:42:00.94][07a64db2] Execute subscription: FacebookAuthWebclient::onAfterGetServices

[14:42:35.68][1850ff84] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:42:35.68][1850ff84] POST > [Module, Method, TenantName, Parameters] [14:42:35.68][1850ff84] [14:42:35.68][1850ff84] API: StandardLoginFormWebclient::Login [14:42:35.68][1850ff84] Execute subscription: AdminAuth::onLogin [14:42:35.69][1850ff84] Execute subscription: Mail::onLogin [14:42:35.70][1850ff84] IMAP[NOTE]: Start connection to "tcp://127.0.0.1:143" [14:42:35.70][1850ff84] IMAP[DATA]: < * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE NAMESPACE STARTTLS AUTH=PLAIN AUTH=LOGIN] Dovecot ready.\r\n [14:42:35.70][1850ff84] IMAP[SECURE]: > TAG1 LOGIN "pruebas@clinica....com/cpses_pr7y994e4t" "****"\r\n [14:42:37.21][1850ff84] IMAP[DATA]: < TAG1 NO [AUTHENTICATIONFAILED] Authentication failed.\r\n [14:42:37.21][1850ff84] IMAP[WARNING]: exception 'MailSo\Imap\Exceptions\NegativeResponseException' with message 'TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.' in /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php:1761 Stack trace:

0 /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1839): MailSo\Imap\ImapClient->validateResponse(Array)

1 /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(1710): MailSo\Imap\ImapClient->parseResponseWithValidation(NULL, false)

2 /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php(271): MailSo\Imap\ImapClient->SendRequestWithCheck('LOGIN', Array)

3 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(126): MailSo\Imap\ImapClient->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '')

4 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(181): Aurora\Modules\Mail\Managers\Main\Manager->_getImapClient(Object(Aurora\Modules\Mail\Classes\Account))

5 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Module.php(5219): 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 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(373): call_user_func_array(Array, Array)

8 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(383): Aurora\System\Module\Manager->broadcastEvent('Core', 'Login', Array, false)

9 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(1801): Aurora\System\Module\AbstractModule->broadcastEvent('Login', Array, false)

10 [internal function]: Aurora\Modules\Core\Module->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

11 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

12 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Decorator.php(42): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)

13 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->__call('Login', Array)

14 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

15 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

16 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

17 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(536): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)

18 [internal function]: Aurora\Modules\Core\Module->EntryApi()

19 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(621): call_user_func_array(Array, Array)

20 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(704): Aurora\System\Module\AbstractModule->RunEntry('api')

21 /usr/local/cpanel/base/3rdparty/afterlogic/system/Application.php(89): Aurora\System\Module\Manager->RunEntry('api')

22 /usr/local/cpanel/base/3rdparty/afterlogic/index.php(21): Aurora\System\Application::Start()

23 {main}

[14:42:37.21][1850ff84] IMAP[NOTICE]: exception 'MailSo\Imap\Exceptions\LoginBadCredentialsException' with message 'TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.' in /usr/local/cpanel/base/3rdparty/afterlogic/vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php:288 Stack trace:

0 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(126): MailSo\Imap\ImapClient->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '')

1 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Managers/Main/Manager.php(181): Aurora\Modules\Mail\Managers\Main\Manager->_getImapClient(Object(Aurora\Modules\Mail\Classes\Account))

2 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Mail/Module.php(5219): Aurora\Modules\Mail\Managers\Main\Manager->validateAccountConnection(Object(Aurora\Modules\Mail\Classes\Account))

3 [internal function]: Aurora\Modules\Mail\Module->onLogin(Array, false, NULL)

4 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(373): call_user_func_array(Array, Array)

5 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(383): Aurora\System\Module\Manager->broadcastEvent('Core', 'Login', Array, false)

6 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(1801): Aurora\System\Module\AbstractModule->broadcastEvent('Login', Array, false)

7 [internal function]: Aurora\Modules\Core\Module->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

8 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

9 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Decorator.php(42): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)

10 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->__call('Login', Array)

11 /usr/local/cpanel/base/3rdparty/afterlogic/modules/StandardLoginFormWebclient/Module.php(45): Aurora\System\Module\Decorator->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

12 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('pruebas@clinica...', 'hsdlxK8xt6C!', '', false)

13 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(881): call_user_func_array(Array, Array)

14 /usr/local/cpanel/base/3rdparty/afterlogic/modules/Core/Module.php(536): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)

15 [internal function]: Aurora\Modules\Core\Module->EntryApi()

16 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/AbstractModule.php(621): call_user_func_array(Array, Array)

17 /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php(704): Aurora\System\Module\AbstractModule->RunEntry('api')

18 /usr/local/cpanel/base/3rdparty/afterlogic/system/Application.php(89): Aurora\System\Module\Manager->RunEntry('api')

19 /usr/local/cpanel/base/3rdparty/afterlogic/index.php(21): Aurora\System\Application::Start()

20 {main}

[14:42:37.21][1850ff84] TAG1 NO (AUTHENTICATIONFAILED) Authentication failed. [14:42:37.21][1850ff84] INFO[MEMORY]: Memory peak usage: 26MB [14:42:37.21][1850ff84] INFO[TIME]: Time delta: 1539700957.2163 [14:42:37.21][1850ff84] IMAP[NOTE]: Disconnected from "tcp://127.0.0.1:143" (success)

[14:42:56.44][e5c97775] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:42:56.44][e5c97775] POST > [Module, Method, TenantName, Parameters] [14:42:56.44][e5c97775] [14:42:56.44][e5c97775] API: StandardLoginFormWebclient::Login [14:42:56.44][e5c97775] Execute subscription: AdminAuth::onLogin [14:42:56.45][e5c97775] Event: -1 > login-success: superadmin

[14:42:56.64][d4e1a075] [GET][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php [14:42:56.64][d4e1a075] POST > [] [14:42:56.64][d4e1a075] [14:42:56.64][d4e1a075] Execute subscription: Facebook::onGetServicesSettings [14:42:56.64][d4e1a075] Execute subscription: FacebookAuthWebclient::onGetSettings [14:42:56.64][d4e1a075] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:56.64][d4e1a075] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:56.64][d4e1a075] Execute subscription: Google::onGetServicesSettings [14:42:56.64][d4e1a075] Execute subscription: GoogleAuthWebclient::onGetSettings [14:42:56.64][d4e1a075] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:56.64][d4e1a075] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:56.64][d4e1a075] Execute subscription: FacebookAuthWebclient::onGetSettings [14:42:56.64][d4e1a075] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:56.64][d4e1a075] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:56.64][d4e1a075] Execute subscription: GoogleAuthWebclient::onGetSettings [14:42:56.64][d4e1a075] PHP[NOTICE]: /usr/local/cpanel/base/3rdparty/afterlogic/system/Module/Manager.php [line:770, code:2] [14:42:56.64][d4e1a075] PHP[NOTICE]: Error: Invalid argument supplied for foreach() [14:42:56.64][d4e1a075] Execute subscription: PersonalContacts::onGetStorage [14:42:56.64][d4e1a075] INFO[MEMORY]: Memory peak usage: 21.5MB [14:42:56.64][d4e1a075] INFO[TIME]: Time delta: 1539700976.6496

[14:43:00.67][d7647afa] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:43:00.67][d7647afa] POST > [Module, Method, TenantName, Parameters] [14:43:00.67][d7647afa] [14:43:00.67][d7647afa] API: LogsViewerWebclient::GetUsersWithSeparateLog

[14:43:01.79][c505a5eb] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:43:01.79][c505a5eb] POST > [Module, Method, TenantName, Parameters] [14:43:01.79][c505a5eb] [14:43:01.79][c505a5eb] API: Core::DoServerInitializations

[14:43:02.98][0a8903fa] [POST(4)][ip:90.174.2.64] /cpsess7502360004/3rdparty/afterlogic/index.php?/Api/ [14:43:02.98][0a8903fa] POST > [Module, Method, TenantName, Parameters] [14:43:02.98][0a8903fa] [14:43:02.98][0a8903fa] API: LogsViewerWebclient::GetLog

captura de pantalla 2018-10-16 a las 16 42 46
afterlogic-support commented 6 years ago

Ok thank you, developers will look into this.

afterlogic-support commented 6 years ago

Looks like the issue affects accounts which were initially logged into from the domain administrator page of cPanel ("Access Webmail" tool in "Email Accounts" screen). Till the issue is fixed, you can delete those users in admin interface of WebMail, that will let you log into those email accounts with WebMail.

afterlogic-support commented 6 years ago

The issue has been corrected in the new v8.2.3 release.

uniquekaiser commented 3 years ago

Hi! We are having the same issue, since the last two updates, today we deleted the installation and installed a fresh 9.2 version with the same problem :( log-2021-11-23.txt

event-log-2021-11-23.txt

This are the log I downloaded from the adminpanel (which I can log into without problems)

afterlogic-support commented 3 years ago

Can you post a screenshot reflecting your mailserver settings in WebMail? My guess is, domains list is supplied incorrectly, WebMail tries to locate a server based on domain part of email address and fails to find one. If you only have one mailserver added in your WebMail setup, supplying empty value or "*" for Domains can be a good idea.

Also, is my understanding correct that you use cPanel and have the product installed from .ZIP archive there?

uniquekaiser commented 2 years ago

Hi! Attached is a screenshot (we do have "*" in domains); we have used it for almost two years without issues, but it stopped working, we tried several re-installs (fresh installs) and it won't work again :( We are using Cpanel and Softaculous 1-click installs (Namecheap hosting), thanks in advance for any help/pointers you can provide! 2021-11-27 19_14_46-WebMail - DarSalud

afterlogic-support commented 2 years ago

Can you share a screenshot reflecting the actual error you're getting on login? Also, is it possible for you to try logging into email account on some other IMAP server? You'd need to add a new mailserver entry. This would help to understand if the issue is with specific mail server, or with the installation itself. Thanks.

afterlogic-support commented 2 years ago

Also, the logs appear to be incomplete:

[20:46:05.39][ce2e439c] Exception: ApiException

You need to enable recording stack trace, that's done by setting "LogStackTrace" to true in data/settings/config.json configuration file.

uniquekaiser commented 2 years ago

Hi,

Screenshot of the error: 2021-11-30 15_27_27-WebMail - DarSalud

Also attached a screenshot of the same account logged into Roundcube webmail 2021-11-30 15_29_26-Feedback Hub

Set the value of LogStackTrace to true

2021-11-30 15_31_23-Feedback Hub

Cleared the logs, and tried to log in again. Downloaded both logs, also attached them

log-2021-11-30.txt event-log-2021-11-30.txt

Thanks!

afterlogic-support commented 2 years ago

Thank you. It appears that the following line in vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php is where the error is triggered:

parent::Connect($sServerName, $iPort, $iSecurityType, $bVerifySsl);

From the logs, the call looks like this:

MailSo\Net\NetClient->Connect('premium63.web-h...', '993', 1, false)

And it's where the validation fails, as an integer value is expected while a string is sent through. We've doublechecked that database holds integer type there, so we're not sure how this could happen. A suggestion we have is to try editing the following line in vendor/afterlogic/mailso/lib/MailSo/Base/Validator.php file:

return \MailSo\Base\Validator::RangeInt($iPort, 0, 65535);

Modify it as follows:

return \MailSo\Base\Validator::RangeInt(intval($iPort), 0, 65535);

Does it help?

kintaco commented 2 years ago

I have a similar issue to uniquekaiser, I get the same username or password you entered is incorrect message. I did the recommended change to the config.json file as I was also getting Exception: ApiException in the logs. I still got the same error. I also tried the validator.php change and I would login, however it would now get an Error: system not configured message. I am also using Namecheap and installed Webmail Lite in cPanel both by downloading the zip and by using Softaculous.

Log file after only the config.json change log-2022-04-05.txt

Log file after both the config.json and the validator.php change log-2022-04-05 (1).txt

image image image

afterlogic-support commented 2 years ago

After the last post in this thread, we were actually able to find out what exactly is causing the InvalidArgumentException issue. It's outlined at: Troubleshooting database issues.

Long story short, Afterlogic WebMail v9 requires mysqlnd driver, while quite often cPanel doesn't have it enabled. If an outdated database driver is used, there will be various data type mismatch issues, and the fix with \MailSo\Base\Validator only addresses one of them.

The correct solution is to enable mysqlnd driver, for both mysqli and pdo_mysql. In case of cPanel, look for nd_mysql and nd_pdo_mysql PHP extensions (the exact names may differ, the idea stays the same).

kintaco commented 2 years ago

Thank you for your response, enabling the nd_pdo_mysql extension in cPanel allowed me login and I was able to send and receive email.