Webmail applications such as Horde and SquirrelMail are commonly used in hosting environments to access email accounts through a browser. Sometimes, users may encounter the following error while trying to log in:
Error: Login failed because your username or password was entered incorrectly. Even when the correct login credentials are used, this issue may still occur due to server configuration problems or incorrect domain settings.
In this blog, we’ll explain the common causes of the Horde/Squirrel Mail login issue and how to fix it easily on a cPanel server.
What is Horde/Squirrel Mail?
Horde Webmail
Horde is a feature-rich webmail application included with cPanel hosting. It provides:
- Email access through a browser
- Contact management
- Calendar support
- Task and note management
Horde is widely used because of its advanced collaboration features.
SquirrelMail
SquirrelMail is a lightweight webmail client written in PHP. It offers:
- Simple user interface
- Fast performance
- Browser-based email access
- IMAP and SMTP support
Although older than Horde, SquirrelMail is still used on some servers because of its simplicity.
Common Cause of the Login Failed Error
The error usually occurs because:
- The server hostname is not configured correctly
- DNS records are missing
/etc/userdomainscontains incorrect entries- Domain mappings are outdated
- The local domain configuration is incomplete
When Horde or SquirrelMail cannot properly verify domain ownership or locate the correct mail domain, authentication may fail.
How to Fix Horde/Squirrel Mail Login Failed Error
Follow the steps below carefully to resolve the issue.
Step 1: Set a Valid FQDN Hostname
Ensure your server has a Fully Qualified Domain Name (FQDN).
Example:
server.abc.com The hostname should:
- Resolve properly
- Have a valid DNS A record
- Point to the server IP address
You can verify the hostname using:
hostname You can also check DNS resolution using:
ping server.abc.com Step 2: Backup the /etc/userdomains File
Before making any changes, create a backup of the existing file.
Run:
cp -p /etc/userdomains /etc/userdomains.backup This allows you to restore the original configuration if needed.
Step 3: Remove the Existing /etc/userdomains File
Delete the current file using:
rm -f /etc/userdomains This removes outdated or corrupted domain mappings.
Step 4: Rebuild User Domain Mappings
Now regenerate the domain configuration using one of the following commands:
/scripts/updateuserdomains or
/usr/local/cpanel/scripts/updateuserdomains --force This rebuilds the user domain database and updates the mappings properly.
Verify the Local Domains Configuration
After rebuilding the configuration, check the contents of:
/etc/localdomains Make sure it includes:
server.abc.com
abc.com If these entries are missing, mail routing problems may continue.
Restart Mail Services
After making the changes, restart the mail-related services to apply the updates.
You can restart Exim and Dovecot using:
service exim restart
service dovecot restart Or on newer systems:
systemctl restart exim
systemctl restart dovecot Additional Troubleshooting Tips
If the issue still persists, check the following:
Verify DNS Records
Ensure:
- The hostname resolves correctly
- MX records are properly configured
- The domain points to the correct server IP
Check Mail Account Credentials
Confirm that:
- The email account exists
- The password is correct
- Disk quota is not exceeded
Review cPanel Logs
Useful log files include:
/var/log/exim_mainlog
/usr/local/cpanel/logs/error_log These logs may reveal authentication or configuration issues.
Why Proper Hostname Configuration Matters
A properly configured hostname is important for:
- Mail authentication
- SSL certificate validation
- Reverse DNS
- Server reputation
- Spam prevention
Improper hostname configuration can affect multiple server services beyond Horde and SquirrelMail.
Conclusion
The Horde/Squirrel Mail login failed error is commonly caused by incorrect hostname settings or outdated domain mappings on the server.
By:
- Setting a proper FQDN hostname
- Rebuilding
/etc/userdomains - Verifying
/etc/localdomains - Restarting mail services
you can quickly resolve the issue and restore webmail access.
Proper DNS and mail server configuration also help improve server stability, email deliverability, and overall hosting performance.
If you require help, contact SupportPRO Server Admin

