We made a little testpatch for the opensock() function in
We patched the source because under high load, the imap and pop
daemons (more than one ;-) can simutaniously block the socket to the
authdaemond, so that another imap/pop daemon can not connect to the
socket. This will lead to really ugly tempfails and the user has to
retype the password.
If we can not connect to the UNIX socket, wait (random between 0.9s -
1.1s) and try again. Do this max 10 times and if the socket is still
not available, exit with "authentication failed".
The correct solution is to increase the number of authdaemond processes, in
the authdaemonrc configuration file.