to fix three issues in vpopmail 5.4.13: 1. .qmail files starting with # arent processed correctly 2. solaris has no err.h 3. more respect for qmail-inject's exit code tar -zxvf vpopmail-5.4.13.tar.gz wget http://jeremy.kister.net/code/vpopmail-5.4.13-pound-and-err.patch patch -d vpopmail-5.4.13 < vpopmail-5.4.13-pound-and-err.patch ###### --- ../vpopmail-5.4.13.orig/vdelivermail.c 2005-09-02 14:47:29.000000000 -0400 +++ vdelivermail.c 2006-03-27 22:07:46.482571000 -0500 @@ -672,8 +672,9 @@ close(fdm); waitpid(inject_pid,&child,0); - if (wait_exitcode(child) == 0) return; - vexiterr (EXIT_DEFER, "system error"); + unsigned int xcode = wait_exitcode(child); + if (xcode == 0) return; + vexiterr (xcode, "system error"); } } @@ -709,7 +710,10 @@ /* read the file, line by line */ while ( fgets(qmail_line, sizeof(qmail_line), fs ) != NULL ) { - if (*qmail_line == '#') continue; + if (*qmail_line == '#') { + return_value = 1; + continue; + } /* remove the trailing new line */ for(i=0;qmail_line[i]!=0;++i) { --- ../vpopmail-5.4.13.orig/vpopmail.c 2005-07-19 20:10:22.000000000 -0400 +++ vpopmail.c 2006-03-27 22:06:59.172465000 -0500 @@ -32,7 +32,6 @@ #include #include #include -#include #include "config.h" #include "md5.h" #include "vpopmail.h" @@ -1819,7 +1818,7 @@ * next directory creation (ENOTDIR) or when we verify that the * directory exists and is a directory at the end of the function. */ - warn ("Unable to create directory %s: ", tmpbuf); + fprintf(stderr, "Unable to create directory %s: ", tmpbuf); return -1; } if (path[i] == '\0') break; @@ -1827,7 +1826,7 @@ tmpbuf[i] = path[i]; } if (stat (path, &sb) != 0) { - warn ("Couldn't stat %s: ", path); + fprintf (stderr, "Couldn't stat %s: ", path); return -1; } else if (! S_ISDIR(sb.st_mode)) { fprintf (stderr, "Error: %s is not a directory.\n", path);