Closed ysilvela closed 2 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.
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.
Understood. We'll try to reproduce the issue locally, and if it occurs for us here we'll have it investigated.
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.
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:
[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)
Thanks for the logs, we'll have those checked. However, I meant the screenshot of the admin interface.
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?
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:
[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:
[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
Ok thank you, developers will look into this.
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.
The issue has been corrected in the new v8.2.3 release.
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
This are the log I downloaded from the adminpanel (which I can log into without problems)
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?
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!
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.
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.
Hi,
Screenshot of the error:
Also attached a screenshot of the same account logged into Roundcube webmail
Set the value of LogStackTrace to true
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!
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?
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
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).
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.
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.