Courier-imap 4.x no longer supports external authentication. With courier-imap 3.x we used auth_imap from qmail-ldap.
We can use binc imap instead and it will work with auth_pop.
aptitude install bincimap rsync -axvPS --delete /usr/share/doc/bincimap/etc/bincimap.daemontools/ /var/qmail/supervise/bincimap/ rsync -axvPS --delete /usr/share/doc/bincimap/etc/bincimaps.daemontools/ /var/qmail/supervise/bincimaps/ find /var/qmail/supervise/ -name run | xargs chmod 755 echo Maildir > /var/qmail/control/defaultdelivery
<strong>/var/qmail/supervise/bincimap/run</strong>:
export POP3_LOGLEVEL=2 exec tcpserver -c 100 -u vmail -g vmail \ -l $(hostname) -HDRP \ 0 143 \ /usr/sbin/bincimap-up \ --logtype=multilog \ --conf=/etc/bincimap/bincimap.conf -- \ /var/qmail/bin/auth_pop \ /usr/sbin/bincimapd `cat /var/qmail/control/defaultdelivery`
<strong>/etc/bincimap/bincimap.conf</strong>:
Authentication { allow plain auth in non ssl = "yes",
cd /service ln -s /var/qmail/supervise/bincimap . ln -s /var/qmail/supervise/bincimaps .