When I attempted to compile IMAPProxy on Linux 2.6.18 with GCC 4.1.1, I received this error:

src/imapcommon.c: In function 'Get_Server_conn':
src/imapcommon.c:380: error: 'MD5_DIGEST_LENGTH' undeclared (first use in this function)

The post by Jakob Hirsch on the IMAPProxy mailing list provided the answer:

Problem is that md5.h is not longer included by evp.h (which is included by src/imapcommon.c), so MD5_DIGEST_LENGTH is not defined. #include <openssl/md5.h> in src/imapcommon.c fixed it for me.