X-Git-Url: https://git.distorted.org.uk/~mdw/misc/blobdiff_plain/02955332064a8b513cc6a6881eeb7bbbf8b02098..6365546c0d33c0842b4afd341314a5bfde173bff:/qmail-checkspam.c diff --git a/qmail-checkspam.c b/qmail-checkspam.c index 9f7411e..7847769 100644 --- a/qmail-checkspam.c +++ b/qmail-checkspam.c @@ -7,18 +7,18 @@ * (c) 2003 Mark Wooding */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -109,6 +110,7 @@ int main(int argc, char *argv[]) const char *qmq; int rc; + if (getenv("RELAYCLIENT")) goto exec; m.max_len = intenv("QMAIL_CHECKSPAM_MAXLEN", 2 * 1024 * 1024); m.timeout = intenv("QMAIL_CHECKSPAM_TIMEOUT", 300); rc = message_read(0, 0, &m); @@ -148,6 +150,7 @@ int main(int argc, char *argv[]) close(fd_e[0]); close(fd_m[1]); close(fd_e[1]); +exec: qmq = strenv("QMAIL_CHECKSPAM_QUEUE", "/var/qmail/bin/qmail-queue"); execlp(qmq, qmq, (char *)0); fprintf(stderr, "failed to exec: %s\n", strerror(errno));