Once you have verified a mail account's username and password are correct and you are still getting the following error:
"Login failed."
You can take the following steps to try and correct the issue:
chmod u+w /home/httpd/vhosts/webmail/horde/imp/config/servers.php
chmod u+w /home/httpd/vhosts/webmail/horde/config/horde.php
Around line 95 of /home/httpd/vhosts/webmail/horde/imp/config/servers.php change:
'server' => 'localhost',
To:
'server' => '<main.server.ip.address>',
Also change line 236 of /home/httpd/vhosts/webmail/horde/config/horde.php from:
$conf['mailer']['params'] = array('host' => 'localhost');
To:
$conf['mailer']['params'] = array('host' => '127.0.0.1');