FYI: I had the same error message, leaving the courier-imap package 'unconfigured' after installation.
Changing the value of IMAP_ULIMITD in /etc/courier/imapd to 131072 did the trick for me as well, and dpkg --configure -a could finish configuration. Some information: Kernel (custom): Linux 2.6.23.12 SMP x86_64 Architecture: amd64 (x86_64) courier-imap: 4.1.1.20060828-5 -- Richard Harb, cFlex IT Services GmbH, http://cflex.at/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]