Good day. Finally, problem was solved. Gold rule - if something goes wrong at the evening it will probably be solved tomorrow morning :-) I would like to share what I did - sorry if these are basic things, maybe it will be out of help for someone like me :) I'm not sure if it's correct, anyway it works for me. Personal thanks to Joe Modjeski and Tren Blackburn. Thank you a lot guys!
1. Copy preauthvchkpw.c from http://www.inter7.com/vpopmail/preauthvchkpw.c to courier-imap-1.3.11.xxx/authlib directory. 2. *Temporarily* change permissions on ~vpopmail/lib: chmod 755 ~vpopmail/lib chmod 644 ~vpopmail/lib/libvpopmail.a After compiling Courier-IMAP turn them back: chmod 711 ~vpopmail/lib chmod 600 ~vpopmail/lib/libvpopmail.a 3. Edit courier-imap-1.3.11.xxx/authlib/configure script (lines 2949-2955): # if test -f ${vpopmail_home}/etc/lib_deps # then CFLAGS="-I/your/path/to/vpopmail/include/directory $CFLAGS" VPOPMAILLIBS="-L/your/path/to/vpopmail/lib/directory -lvpopmail -lmysqlclient -lz" # else # { echo "configure: error: vpopmail too old - upgrade" 1>&2; exit 1; } # fi 4. Run ./configure --with-authvchkpw --etc, etc 5. Before making "make" edit courier-imap-1.3.11.xxx/authlib/Makefile (line 404): LDFLAGS = -L/your/path/to/mysql/lib/directory -lmysqlclient -lz 6. make ... Thank you. Regards, Roman