I think this might be useful for few.

so I did a strace to hack the courier-imap authentication protocol.

I have tweaked a bit the module which i wrote for IndiMail to make it
work for vpopmail. The module is totally independent of courier-imap
(i.e. it will get installed in the vpopmail bin directory without the
presence of courier-imap). And you need not depend on courier-imap
mailing list for help. However, you need to copy the executable
'authvchkpw' manually to the courier-imap libexec/authlib directory.

To install it you need to apply patch to vpopmail-5.4.26d. It modifies
Makefile.am, configure.in, vpopmail.c,vpopmail.h and creates a new file
authvchkpw.c. I have tested it on my laptop and found it to work.

You need to set AUTHMODULES in courier-imap needs to have authvchkpw as
one of the authentication modules

The module does the following

reads 5 lines from imaplogin or pop3login. Authenticates the user and if
successful executes imapd or pop3d executable. If the authentication is
not successful, the data is passed to the next authmodule in chain.
On successful authentication the module adds entry to lastauth and a
entry in relay table.

Instructions are in INSTALL section below. If you need more help let me
know. If more modifications are needed let me know.

     * Courier-IMAP authmodules Protocol
     * imap\n
     * login\n
     * pass\n
     * newpass\n
     * argv[0]=/var/indimail/libexec/authlib/authvchkpw
     * argv[1]=/var/indimail/libexec/authlib/authpam
     * argv[2]=/var/indimail/bin/imapd
     * argv[3]=Maildir


1. Extract vpopmail Development tar.gz file vpopmail-5.4.26d.tar.gz
  wget http://downloads.sourceforge.net/vpopmail/vpopmail-5.4.26d.tar.gz
   cd /home/local/src
   gunzip -c vpopmail-5.4.26d.tar.gz |tar xf -

2. Apply patch (see the link at bottom)
   patch -p0 < authvchkpw-vpopmail-5.4.26d.patch

3. cd vpopmail-5.4.26
   make install-strip

I have submitted the patch here


Thank you for your patience

-- Manvendra
The coast was clear. -- Lope de Vega


Reply via email to