--- ../qmail-1.03-patch20010201-orig/auth_pop.c Wed Feb 14 18:07:28 2001 +++ auth_pop.c Wed Feb 14 18:42:32 2001 @@ -15,6 +15,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; @@ -125,8 +133,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();