How to resolve Roundcube Webmail Login Failed error

The Roundcube login failed error can be triggered by various factors ranging from file permission issues, Blocked ports, incorrect hostname, mail directory issues and many more.

In this context, we shall look into why this error occurs and how to solve it.

What triggers login failed error in Roundcube?

As earlier stated, this error could result from various factors including incorrect mail directory setting, port not set correctly, permission issues, using incorrect hostname and others.

How to solve login failed Roundcube error

To fix this issue, first we have to check that the hostname is correct and resolving to the server IP address. This involves having an FQDN (Fully qualified domain name) hostname which resolves to the Server IP address. Therefore, ensure that the "A" records for this domain is set correctly.

You can follow the following steps below if you are using a WHM Cpanel.

i. Diagnose the hostname

To do this in WHM, Login to the client area and Navigate through Main - Networking Setup - Change Hostname. Next, go to the DNS area for the  domain, you will be asked to add an "A" record entry.
To proceed, use the following commands below;

rm -f /etc/userdomains
/usr/local/cpanel/scripts/updateuserdomains –force

Next, you should restart the cPanel service with the command;

/etc/init.d/cpanel restart

This will solve the login failed issues in Roundcube.

ii. Troubleshoot the ports

Ensure that the port for the mail server is open. Port 25 or 587 is meant for SMTP. IMAP uses Port 143 or 993. POP3 use Port 110. These ports must be opened for the mail service to work effectively.

iii. Checking the Mail directory

The mail directory (Maildir) needs to be assigned properly as per the available mail packages in the system .
For Postfix the mail settings needs to be;

home_mailbox = Mail/

While Dovecot settings should be;

mail_location = maildir:~/Mail

Need support in solving Roundcube Webmail issues? Consult us.


As part of our Server Support Services, we have helped clients to solve Roundcube related bugs.

For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on

Also for Tech related tips, Visit or General Technical tips on