Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite

 AfterLogic Forum : AfterLogic WebMail Lite
Subject Topic: Synology\webmail - Authorisation failure Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
simonselak
Newbie
Newbie


Joined: 11 December 2020
Location: Slovenia
Online Status: Offline
Posts: 3
Posted: 11 December 2020 at 5:05am | IP Logged Quote simonselak

Hi.

I'm using synology mail server. It is working like it should.

I got lot of requests for web access to emails, so i want to setup Afterlogic webmail lite (PHP) on my NAS.

I installed MariaDB10 and myphpadmin. I can connect and manage DB.

I have web station enabled and php 7.4 installed. It is working.

Unpacked Webmail lite files to web folder. Front page opens.

Succesfully conected webmail to MariaDB (and autocreate all the tables) and input mail server settings.



Now when i try to login with my username@mydomain.com and pass (on webmail front page) it always throw Invalid username or password. But i got warning on my DSM log: user [username@mydomain.com] from [gateway ip] failed to log in via [mail server] due to authorization failure. So, requests comes to DSM.

I have tryed everything (turning security on DSM general and mail server) but i still cannot login.

It is doing something for round 4s then throw error.



And this is log from webmail:

===== API: StandardLoginFormWebclient::Login
[12:49:26.92][3560f8f1] IMAP[NOTE]: Start connection to "ssl://imap.mydomain.com:993"
[12:49:26.99][3560f8f1] IMAP[DATA]: < * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN] Dovecot ready.\r\n
[12:49:26.99][3560f8f1] IMAP[SECURE]: > TAG1 LOGIN "test@mydomain.com" "********"\r\n
[12:49:35.24][3560f8f1] IMAP[DATA]: < TAG1 NO [AUTHENTICATIONFAILED] Authentication failed.\r\n
[12:49:35.26][3560f8f1] IMAP[WARNING]: TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.
[12:49:35.26][3560f8f1] IMAP[NOTICE]: TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.
[12:49:35.47][3560f8f1] Event: 0 > login-failed
[12:49:35.47][3560f8f1] ApiException
[12:49:35.47][3560f8f1] @Time: 8.6921
[12:49:35.47][3560f8f1] @TimeApiInit: 0.0077
[12:49:35.47][3560f8f1] INFO[MEMORY]: Memory peak usage: 2MB
[12:49:35.47][3560f8f1] INFO[TIME]: Time delta: 1607690975.4705
[12:49:35.47][3560f8f1] INFO[MEMORY]: Memory peak usage: 2MB
[12:49:35.47][3560f8f1] INFO[TIME]: Time delta: 1607690975.4706
[12:49:35.47][3560f8f1] IMAP[NOTE]: Disconnected from "ssl://imap.mydomain.com:993" (success)     

Please help me.



Regards


Simon
Back to Top View simonselak's Profile Search for other posts by simonselak
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5599
Posted: 11 December 2020 at 6:56am | IP Logged Quote Igor

The things I would recheck are:

- make sure the IMAP server name and port are specified correctly, i.e. that you aren't trying to access a different server;

- check if the correct password is being sent to IMAP server. In the logs, the passwords are hidden by default; to show them for IMAP, edit vendor/afterlogic/mailso/lib/MailSo/Imap/ImapClient.php file, and right after the following code:

Code:
private function secureRequestParams($sCommand, $aParams)
{


insert:

Code:
return null;


- verify if you're able to access the same account, using exactly the same connection details, with a different IMAP client, e.g. Mozilla Thunderbird.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
simonselak
Newbie
Newbie


Joined: 11 December 2020
Location: Slovenia
Online Status: Offline
Posts: 3
Posted: 14 December 2020 at 12:58am | IP Logged Quote simonselak

Hi Igor.
Thank you for your effort for this again.

1. i have re-checked everything. I have created test account for this.

un: test (test@kobradoo.si)
password: test001

my server setting are:

Domains: kobradoo.si (or empty)
IMAP: imap.kobradoo.si Port: 143 (no ssl)
SMTP: smtp.kobradoo.si Port: 587 (no ssl)

Use incoming mail's login/password of the user checked

2.I have found and add that code to php file.
If i try to login like this test / test001 i get this in the log:

[08:36:19.77][88e07e27] @Time: 0.0076
[08:36:19.77][88e07e27] @TimeApiInit: 0.0062
[08:36:19.77][88e07e27] INFO[MEMORY]: Memory peak usage: 2MB
[08:36:19.77][88e07e27] INFO[TIME]: Time delta: 1607934979.7795
[08:36:22.29][5b0abaa7]
[08:36:22.29][5b0abaa7] ===== API: StandardLoginFormWebclient::Login
[08:36:22.53][5b0abaa7] Event: -1 > login-failed
[08:36:22.55][5b0abaa7] ApiException
[08:36:22.55][5b0abaa7] @Time: 0.2648
[08:36:22.55][5b0abaa7] @TimeApiInit: 0.0074
[08:36:22.55][5b0abaa7] INFO[MEMORY]: Memory peak usage: 2MB
[08:36:22.55][5b0abaa7] INFO[TIME]: Time delta: 1607934982.5558
[08:36:23.66][938d8caa]
[08:36:23.66][938d8caa] ===== API: LogsViewerWebclient::GetLogFilesData
[08:36:23.66][938d8caa] @Time: 0.0077
[08:36:23.66][938d8caa] @TimeApiInit: 0.0064
[08:36:23.66][938d8caa] INFO[MEMORY]: Memory peak usage: 2MB
[08:36:23.66][938d8caa] INFO[TIME]: Time delta: 1607934983.6664
[08:36:25.87][d658963b]
[08:36:25.87][d658963b] ===== API: LogsViewerWebclient::GetLog

No info about user or aouthentication error (nothing on NAS side eather - no error)

But if i try to login like this test@kobradoo.si / test001
then i got this:

[08:53:37.49][5fc7e4c8] @Time: 0.0091
[08:53:37.49][5fc7e4c8] @TimeApiInit: 0.0074
[08:53:37.49][5fc7e4c8] INFO[MEMORY]: Memory peak usage: 2MB
[08:53:37.49][5fc7e4c8] INFO[TIME]: Time delta: 1607936017.4991
[08:53:39.67][4da7cab8]
[08:53:39.67][4da7cab8] ===== API: LogsViewerWebclient::GetLogFilesData
[08:53:39.67][4da7cab8] @Time: 0.0079
[08:53:39.67][4da7cab8] @TimeApiInit: 0.0064
[08:53:39.67][4da7cab8] INFO[MEMORY]: Memory peak usage: 2MB
[08:53:39.67][4da7cab8] INFO[TIME]: Time delta: 1607936019.6788
[08:53:39.91][c5448beb]
[08:53:39.91][c5448beb] ===== API: StandardLoginFormWebclient::Login
[08:53:40.44][c5448beb] IMAP[NOTE]: Start connection to "tcp://imap.kobradoo.si:143"
[08:53:40.61][c5448beb] IMAP[DATA]: < * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN] Dovecot ready.\r\n
[08:53:40.61][c5448beb] IMAP[DATA]: > TAG1 LOGIN "test@kobradoo.si" "test001"\r\n
[08:53:45.68][7db07247]
[08:53:45.68][7db07247] ===== API: LogsViewerWebclient::GetLogFilesData
[08:53:45.68][7db07247] @Time: 0.0087
[08:53:45.68][7db07247] @TimeApiInit: 0.0074
[08:53:45.68][7db07247] INFO[MEMORY]: Memory peak usage: 2MB
[08:53:45.68][7db07247] INFO[TIME]: Time delta: 1607936025.6847
[08:53:47.14][c5448beb] IMAP[DATA]: < TAG1 NO [AUTHENTICATIONFAILED] Authentication failed.\r\n
[08:53:47.17][c5448beb] IMAP[WARNING]: TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.
[08:53:47.18][c5448beb] IMAP[NOTICE]: TAG1 NO (AUTHENTICATIONFAILED) Authentication failed.
[08:53:47.49][c5448beb] Event: -1 > login-failed
[08:53:47.53][c5448beb] ApiException
[08:53:47.53][c5448beb] @Time: 7.6291
[08:53:47.53][c5448beb] @TimeApiInit: 0.0067
[08:53:47.53][c5448beb] INFO[MEMORY]: Memory peak usage: 2MB
[08:53:47.53][c5448beb] INFO[TIME]: Time delta: 1607936027.5361
[08:53:47.53][c5448beb] INFO[MEMORY]: Memory peak usage: 2MB
[08:53:47.53][c5448beb] INFO[TIME]: Time delta: 1607936027.5362
[08:53:47.53][c5448beb] IMAP[NOTE]: Disconnected from "tcp://imap.kobradoo.si:143" (success)
[08:53:50.27][a0634d6d]
[08:53:50.27][a0634d6d] ===== API: LogsViewerWebclient::GetLog


The password is correct. And login log is much bigger.

3. I have setup this in tunderbird.
it is working normally.
Same IMAP/SMPT settings same port and i put "test" only for username.

if i put test@kobradoo.si as username it does not work.

So apperently nothing goes out of webmail if i put only "test" as username right?

Thanky you again for helping me.

If you want you can try this from your test enviroment. (you have us and pass)

Regards

Simon

Back to Top View simonselak's Profile Search for other posts by simonselak
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5599
Posted: 14 December 2020 at 1:06am | IP Logged Quote Igor

Oh that makes sense, thank you.

In Mail Servers screen of admin interface, edit the server and uncheck "Use full email address as login" setting for it. That way, you should be able to login by supplying full email address, but just the username part will be sent to mail server as login.

Please note that it's required to provide email address on login page, otherwise WebMail won't know which domain to use. But you can use mail login form if you wish, for example, to have a predefined domain used there, or pick it from a dropdown list.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
simonselak
Newbie
Newbie


Joined: 11 December 2020
Location: Slovenia
Online Status: Offline
Posts: 3
Posted: 14 December 2020 at 2:09am | IP Logged Quote simonselak

Igor thank you so much.

It is working like is should now. spended hours, but didnt uncheck that. :(

Wery nice from you to put such a good support even on lite version of webmail.

Maybe we meet somwhere, beer is on me!:)

Regards

Simon
Back to Top View simonselak's Profile Search for other posts by simonselak
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide