Hello,
We currently use qmail with vpopmail for e-mail and are looking to switch from courier-imap to dovecot for IMAP on our RedHat EL 5 systems. Our goal is to use the dovecot RPM supplied by RH (v1.0.7) if at all possible. We can do this if we are able to dynamically load the vpopmail auth module.
The wiki (http://wiki.dovecot.org/CompilingSource) notes that this should be possible:
Dovecot can also dynamically load authentication modules from the $prefix/lib/dovecot/auth/ directory. Binary packages builders should use them for authentication modules which require external libraries (e. g. LDAP and vpopmail). There is no standard way to build them as modules currently, but something like this should work:
gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_VPOPMAIL -DPASSDB_VPOPMAIL \-I../.. -I../lib userdb-vpopmail.c passdb-vpopmail.c -o vpopmail.so \-lvpopmail
I had to modify the command to build the module, but was able to successfully build it: gcc -shared -fPIC -DHAVE_CONFIG_H -DUSERDB_VPOPMAIL -DPASSDB_VPOPMAIL -I../.. -I../lib -I/home/vpopmail/include -I/home/vpopmail/lib userdb-vpopmail.c passdb-vpopmail.c -o vpopmail.so -L/home/vpopmail/lib/libvpopmail.a
I am unable to get the module to load properly. Dovecot built with --with-vpopmail works perfectly. When I start dovecot and it tries to load the module it reports: Aug 23 16:48:18 ctd-nix1 dovecot: Dovecot v1.0.7 starting up Aug 23 16:48:18 ctd-nix1 dovecot: auth(default): dlopen(/usr/lib64/dovecot/auth/vpopmail.so) failed: /usr/lib64/dovecot/auth/vpopmail.so: undefined symbol: vclose Aug 23 16:48:18 ctd-nix1 dovecot: auth(default): dlsym(passdb_vpopmail) failed: dovecot-auth: undefined symbol: passdb_vpopmail Aug 23 16:48:18 ctd-nix1 dovecot: auth(default): Unknown passdb driver 'vpopmail' (typo, or Dovecot was built without support for it? Check with dovecot --build-options) Aug 23 16:48:18 ctd-nix1 dovecot: Auth process died too early - shutting down
Sometimes instead the last line is replaced with: Aug 23 15:02:45 ctd-nix1 dovecot: child 5412 (auth) returned error 89
Thanks!
Eric