I ran into the problem after updating my IMAP (courier driven) server from Lenny to Squeeze and took me a while to figure out. For some reason dpkg decided upon updating, that libfam was going to be installed next to courier services and obviously in some cases this caused the above error message to apear when people access their mailbox. I deleted the mailbox, recreated it and tried a few other things, but nothing helped, so I finally figure out:
Courier services seem to require gamin to work properly, so I installed it and libfam was removed automagically:
aptitude install gamin
Now restart the courier daemons:
find /etc/init.d/ | grep courier | while read line; do $line restart; done
Problem should be gone now.