diff -u orig/Makefile smtp-after-pop/Makefile --- orig/Makefile Thu Aug 2 16:30:02 2001 +++ smtp-after-pop/Makefile Fri Aug 3 15:04:34 2001 @@ -6,7 +6,7 @@ # -DQLDAP_CLUSTER for enabling cluster support # to use cleartext passwords (a bad idea on production systems) add # -DCLEARTEXTPASSWD to the LDAPFLAGS -#LDAPFLAGS=-DQLDAP_CLUSTER +LDAPFLAGS=-DQLDAP_CLUSTER -DSMTP_AFTER_POP # Perhaps you have different ldap libraries, change them here LDAPLIBS=-L/usr/local/lib -lldap -llber Only in smtp-after-pop/: Makefile~ diff -u orig/auth_pop.c smtp-after-pop/auth_pop.c --- orig/auth_pop.c Thu Aug 2 16:30:02 2001 +++ smtp-after-pop/auth_pop.c Fri Aug 3 15:03:09 2001 @@ -16,6 +16,14 @@ #ifdef AUTOHOMEDIRMAKE #include "qldap-mdm.h" #endif +#ifdef SMTP_AFTER_POP +#include +#include + +int child; +int wstat; +char *opensmtp = "/usr/local/bin/pop3-record"; +#endif unsigned int auth_port; @@ -126,8 +134,22 @@ qldap_errno = AUTH_ERROR; auth_error(); } - - /* first set the group id */ + +#ifdef SMTP_AFTER_POP + if (!env_put2("AUTHUSER",login)) { + qldap_errno = ERRNO; + auth_error(); + } + + switch(child = fork()) { + case -1: _exit(111); break; + case 0: execl(opensmtp, opensmtp, 0); _exit(111); break; + } + waitpid(child, &wstat, 0); + if (!WIFEXITED(wstat)) _exit(111); +#endif + + /* first set the group id */ if (prot_gid(gid) == -1) { qldap_errno = AUTH_ERROR; auth_error();