afterlogic / webmail-lite-8

Open-source webmail script for existing IMAP server

Home Page:https://afterlogic.org/webmail-lite-8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Just installed - cannot create users, or login - only admin

unalignedcoder opened this issue · comments

  • On VPS with Centos 7, Apache 2.4
  • Webmail-Lite version 9.3.1.build3-build-a3
  • Webmail-Lite has its own subdomain.
  • Installation went fine, db works, permissions (755-644) and ownership are all fine.
  • Can login into admin panel, set mail server, change various options.

Cannot:

  1. Create user within admin panel
    => "Error while create user"
  2. Login first time with a new user (credentials are correct, they work with several different clients)
    => "The username or password you entered is incorrect". ("Allow auto-provisioning of new users" is ON)

Activated debug log.
event-log says:
[Core] > login-failed
log says:

[20:38:43.90][78f9a29f]  ===== API: Core::CreateUser
[20:38:43.91][78f9a29f] Exception: ApiException
[20:38:43.91][78f9a29f] @Time: 0.0045
[20:38:43.91][78f9a29f] @TimeApiInit: 0.0098
[20:38:43.91][78f9a29f] INFO[MEMORY]: Memory peak usage: 4MB
[20:38:43.91][78f9a29f] INFO[TIME]: Time delta: 1645994323.9113

and

[20:40:58.80][8a75e811] Event: 0 > login-failed
[20:40:58.80][8a75e811] Exception: ApiException
[20:40:58.80][8a75e811] @Time: 0.0012
[20:40:58.80][8a75e811] @TimeApiInit: 0.0113
[20:40:58.80][8a75e811] INFO[MEMORY]: Memory peak usage: 4MB
[20:40:58.80][8a75e811] INFO[TIME]: Time delta: 1645994458.8018

To be noted that the time indicated in the logs does not seem to match the time of the server, by several hours (it should say around 11 in the morning).

Also, in the cPanel error log, it says:
client denied by server configuration: /home/user/public_html/webmailfolder/data/settings/config.json, referer: https://domain.name/adminpanel/

Any help would be kindly appreciated, would like to try this email client. Thanks.

Hello,

The first thing to check is exception stack trace, that's done by setting "LogStackTrace" to true in data/settings/config.json configuration file; see this documentation page for more info.

Also, be sure to double-check that MySQL configuration in PHP meets the requirements as shown here.

As for the logs, UTC timezone is used for timestamps there.

client denied by server configuration: /home/user/public_html/webmailfolder/data/settings/config.json, referer: https://domain.name/adminpanel/

That is perfectly normal, adminpanel rechecks that the configuration file is not accessible over the web, so getting such an error is OK.

Hope this helps.

Thank you for your reply.

The db configuration is fine, according to that page.

The stack trace for the login fail is the following:

[08:44:07.92][e0a0bb8f]  ===== API: StandardLoginFormWebclient::Login
[08:44:07.97][e0a0bb8f] Event: 0 > login-failed
[08:44:07.97][e0a0bb8f] Aurora\System\Exceptions\ApiException: ApiException in /home/user/public_html/webamail/modules/Core/Module.php:2149
Stack trace:
#0 [internal function]: Aurora\Modules\Core\Module->SetAuthDataAndGetAuthToken(false, '', false)
#1 /home/user/public_html/webamail/system/Module/AbstractModule.php(836): call_user_func_array(Array, Array)
#2 /home/user/public_html/webamail/system/Module/Decorator.php(55): Aurora\System\Module\AbstractModule->CallMethod('SetAuthDataAndG...', Array)
#3 /home/user/public_html/webamail/modules/Core/Module.php(2225): Aurora\System\Module\Decorator->__call('SetAuthDataAndG...', Array)
#4 [internal function]: Aurora\Modules\Core\Module->Login('[email address]', '[password]', '', false)
#5 /home/user/public_html/webamail/system/Module/AbstractModule.php(836): call_user_func_array(Array, Array)
#6 /home/user/public_html/webamail/system/Module/Decorator.php(55): Aurora\System\Module\AbstractModule->CallMethod('Login', Array)
#7 /home/user/public_html/webamail/modules/StandardLoginFormWebclient/Module.php(47): Aurora\System\Module\Decorator->__call('Login', Array)
#8 [internal function]: Aurora\Modules\StandardLoginFormWebclient\Module->Login('[email address]', '[password]', '', false)
#9 /home/user/public_html/webamail/system/Module/AbstractModule.php(836): call_user_func_array(Array, Array)
#10 /home/user/public_html/webamail/modules/Core/Module.php(666): Aurora\System\Module\AbstractModule->CallMethod('Login', Array, true)
#11 [internal function]: Aurora\Modules\Core\Module->EntryApi()
#12 /home/user/public_html/webamail/system/Router.php(111): call_user_func_array(Array, Array)
#13 /home/user/public_html/webamail/system/Module/Manager.php(639): Aurora\System\Router->route('api')
#14 /home/user/public_html/webamail/system/Application.php(141): Aurora\System\Module\Manager->RunEntry('api')
#15 /home/user/public_html/webamail/system/Application.php(110): Aurora\System\Application->Route('api')
#16 /home/user/public_html/webamail/index.php(21): Aurora\System\Application::Start()

Anything in there that helps?

I looked into the developer tools - I see nothing unusual when trying to login, but, when trying to create a user in the admin panel, I get a 403 forbidden error for config.json.
Off the top of my head, maybe your .htaccess don't play well with Apache 2.4?

Permission for the file are the same as for all the others:
-rw-r--r-- 1 username username 3190 Mar 1 14:41 config.json

My guess is there's no matching mail server found for that email account. Make sure you have a server added with the domain part of the email address in Domains list, better yet, supply an empty list and see if that helps. If you post a screenshot of your mail server settings in adminpanel, we'd take a look to check if there might be issues with those.

when trying to create a user in the admin panel, I get a 403 forbidden error for config.json.

Again, that is perfectly normal, adminpanel rechecks that the configuration file is not accessible over the web, so getting such an error is OK.

The mail server configuration is fine.... I tried already to mess with that list, to no result. I tried mail.domain.com, domain.com, and an empty list. Result is the same. The other settings are standard and they work, as I said these accounts and these settings work fine on other devices/clients. The list is long: thunderbird, rainloop, roundcube, nextcloud mail, k-9mail etc etc.

Well the logs don't indicate any attempts of connecting to IMAP server so this really looks like an issue with finding a matching mail server entry. The only suggestion I have at the moment is to try removing a mail server and adding a new one, with an empty list of domains, and just in case, ensure there's only one mailserver in the list.

I deleted the database and configuration and started over. This time it seems to work. Managed to log in one new user.

Reinstalling might have been not the point. In the process, I realized that I had changed 127.0.0.1 to localhost in the database configuration. This time I didn't do it and it worked.

Though, there might have been something else, since connection to the db tested successfully either way.