This is an updated version of pam_imap 0.3.8, taken from http://pam-imap.sourceforge.net/. See README.z_original for the original readme.
These files were mostly updated last in 2003, 2004 and imap.c in 2009. These edits might make it work in 2017 again.
See also: https://github.com/MrDroid/pam_imap
Build requirements: libpam0g-dev libssl-dev libgdbm-dev
$ ./bootstrap
$ ./configure CPPFLAGS=-DVERIFY_CERT
$ make
See build requirements from Building manually.
Utility requirements: git-buildpackage debhelper dh-autoreconf
$ git clean -xf
$ gbp buildpackage -us -uc -sa --git-debian-branch=master \
--git-upstream-tag='v%(version)s' --git-ignore-new