Login fails to Roundcube, Horde, Squirrel in Webmail

Do the solution steps as mentioned here for the following error you see in Roundcube, Horde and Squirrel mails after successfully logging in webmail.

====
Login failed because your username or password was entered incorrectly
====


#First check the domain name is there in files /etc/localdomains or /etc/remotedomains depends on its local or remote mail exchanger.

#Check the domain’s name is present in /etc/userdomains, if not run script /scripts/updateuserdomains

#Make sure the server hostname is not same as the name of problematic domain name, which would create unexpected authentication issues.
for eg: if your main domain name is test123.com then the hostname should not be the same main domain name, add a new subdomain entry like server.test123.com or host.test123.com etc

Finally you can make sure the entries in /etc/hosts are correct, especially the localhost associated with loop ip 127.0.0.1

A default hosts will look like as follows.

————

# cat /etc/hosts
# that require network functionality will fail.
# Do not remove the following line, or various programs
127.0.0.1        localhost
192.168.5.5        server.host.com server

————-

((((replace 192.168.5.5 with original server main IP and server.host.com with original server hostname))))

After correcting all the above, you will be able to login into Roundcube, Horde, Squirrel successfully.