I know there are several hints on using UW-IMAPD with Panther, but they all either talk about modifying NetInfo to reduce Panther's password security, or else have you compiling against custom PAM libraries. I found the following while searching for a better way, as I loathe any solution that requires a lot of modification of the system or package.
Please see this article by Michael Johnson. He has copyrighted it, so I won't cut/paste the whole thing here -- just go read the original. His article is well worth the read, and I suggest emailing him thanks if you find this helpful.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20040105113329263