If you do your standard LIST "" * command when you have recursive symbolic links (which is actually common since gnome likes to have the link ".gnome-desktop/Home directory/" which points back to the home directory, which of course has a .gnome-desktop in it...) imap continues iterating deeper and deeper on a never ending quest to list ALL the directories. I noticed this when I was trying to setup Outlook 2000 to use IMAP (although this should occur in other versions as well, just never used them for IMAP before) and requested a list of folders.
On my system imapd iterates over the recursive symlinks and outputs them all until each dir listed reaches a size of PATH_MAX. It certainly does not hang. It is unclear to me if IMAP should really handle this case - I would recommend asking the maintainers about a feature like this.