There has been two solutions posted on the Apple Discussion board (not in the 10.3 section but in 10.2 Jaguar section however).
PAM method works by:
Changing imap-2002e/src/osdep/unix/Makefile as below, adding CHECKPW=pam, and also adding -lpam:
osx: # Mac OS X
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
CHECKPW=pam CRXTYPE=nfs \
SPOOLDIR=/var/spool MAILSPOOL=/var/mail \
BASECFLAGS="-g -O" \
GCC will complain that security/pam_appl.h cannot
be found. You can modify and ifdef in the source for
MacOS X 10.3, but if you want a quick and dirty fix,
you can just copy /usr/include/pam directory to
This produced a imapd binary without any compile errors when SSL is not included.
Also copy existing /etc/pam.d/login into imap:
cp login imap
I initially had confusing situations of the above working and not working, but it has been working at least for one day after the change.
UW-IMAP people including Mr. Mark Crispin are aware of the IMAP on Panther situation, though he does not use Apple. The above changes were suggested by Mark.