+#include <stdlib.h>
#include "substdio.h"
#include "readwrite.h"
#include "wait.h"
#include "stralloc.h"
#include "idx.h"
-static char *binqqargs[2] = { PROG_QMAIL_QUEUE, 0 } ;
+static char *binqqargs[2] = { 0, 0 } ;
+
+static void setup_qqargs()
+{
+ if(!binqqargs[0])
+ binqqargs[0] = getenv("QMAILQUEUE");
+ if(!binqqargs[0])
+ binqqargs[0] = "/usr/sbin/qmail-queue";
+}
int qmail_open(qq,sa)
struct qmail *qq;
unsigned i,j;
char **cpp;
+ setup_qqargs();
+
qq->msgbytes = 0L;
if (pipe(pim) == -1) return -1;
if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }