Transparent Imap Referral Proxy

 - disper
 - tirp *

Valid HTML 4.0!
Valid CSS!
Viewable with ANY browser!

Some people use microsoft products for servers. So does the university I'm studying at, they use exchange for email servers. And some people even use the public folders for communication. So I need to access it. It's very good that web access works (in netscape at least). And it can even be configured to serve nntp (although it's not turned on at our university). But imap works!

But then referrals are used in the public folders. And most clients I use don't support it. This Transparent Imap Referral Proxy (TIRP) should solve it. Configure it and run it on a box. Then connect to that box instead of the real imap server. The proxy handles all referral requests so the client isn't bothered with them but thinks it's using just one server.

Important note: I wrote this program to serve my personal needs. It's not fool-proof because of the sloppy implementation; it violates the IMAP specs. E.g. when an EXAMINE command is issued which returns a redirection, but another command is send by the client before the server has responded, things go wrong. And the imap url parsing is really worhtless.

You can get the tirp source here. It was written on FreeBSD 4.3 but should also work on other systems, like Linux. Read the comments at the top of the file for instructions. Do make sure to edit main.c and change the SERVERNAME.

And here is some information I used when writing it.

  • IMAP information
    • rfc2060 - Internet Message Access Protocol - version 4rev1
    • rfc2193 - IMAP4 Mailbox Referrals
    • rfc2221 - IMAP4 Login Referrals
    • rfc2192 - IMAP URL Scheme
  • Programming information I used
    • Pthreads tutorial
    • "Internetworking with TCP/IP, Vol III", Douglas E. Comer and David L. Stevens, Prentice Hall, ISBN 0-13-262148-7.