X-Git-Url: https://git.distorted.org.uk/~mdw/qmail/blobdiff_plain/bcb3f3eb8800267d6f324a1bf1a8fb972c00054a..fd24fd2c901418730f41fbacc47749204ef7bab4:/qmail.c diff --git a/qmail.c b/qmail.c index 4b7f3ef..9432b4b 100644 --- a/qmail.c +++ b/qmail.c @@ -6,8 +6,17 @@ #include "fd.h" #include "qmail.h" #include "auto_qmail.h" +#include "env.h" -static char *binqqargs[2] = { "/usr/sbin/qmail-queue", 0 } ; +static char *binqqargs[2] = { 0, 0 } ; + +static void setup_qqargs() +{ + if(!binqqargs[0]) + binqqargs[0] = env_get("QMAILQUEUE"); + if(!binqqargs[0]) + binqqargs[0] = "/usr/sbin/qmail-queue"; +} int qmail_open(qq) struct qmail *qq; @@ -15,6 +24,8 @@ struct qmail *qq; int pim[2]; int pie[2]; + setup_qqargs(); + if (pipe(pim) == -1) return -1; if (pipe(pie) == -1) { close(pim[0]); close(pim[1]); return -1; }