When we login to Horde we get IMAP Authentication errors as below
Notice: (null)(): Retrying LOGIN authentication after AUTHENTICATE LOGIN
failed (errflg=1) in Unknown on line 0
Notice: (null)(): Retrying LOGIN authentication after AUTHENTICATE LOGIN
failed (errflg=1) in Unknown on line 0
Notice: (null)(): Can not authenticate to IMAP server: AUTHENTICATE LOGIN
failed (errflg=2) in Unknown on line 0
Fix :
This issue is happening in many servers and after some research we found that the symlinks passwd.domain.com,shadow.domain.com and the uid.domain.com.gid.domain.com files in /etc/vmail are missing.
take a domain having issue and run the following command
cd /etc/vmail
ls -l|grep domain.com
You should see something like this
-rw-r–r– 1 root root 5 Sep 30 22:52 gid.domain.com
lrwxrwxrwx 1 root root 34 Sep 30 22:30 passwd.domain.com -> /home/user/etc/domain.com/passwd
lrwxrwxrwx 1 root root 34 Sep 30 22:30 shadow.domain.com -> /home/user/etc/domain.com/shadow
-rw-r–r– 1 root root 5 Sep 30 22:52 uid.domain.com
-rw-r–r– 1 root root 0 Sep 30 22:30 vhost.domain.com
If you are missing the above files, you can’t login via imap
We fixed the issue using the following method.
touch /etc/passwd ( You can do this command as it will not recreate the file, it will just update the time stamp of the perticular existing file )
/scripts/updateuserdomains