chiark / gitweb /
qmail-checkspam.c: Don't do anything if RELAYCLIENT is set.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 31 May 2010 17:00:28 +0000 (18:00 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 31 May 2010 17:00:28 +0000 (18:00 +0100)
This is an unpleasant hack to accept potentially malformed mail from
clients who have authenticated to the SMTP server.  I don't think it's
actually needed any more, because the specific client in question has
since been re-educated about how to construct mail properly.

qmail-checkspam.c

index 0d98fcb046f61b6b17e80f971117e1883b235708..7847769fd54c5a70b39da7fabb741d6612999e5d 100644 (file)
@@ -110,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);
@@ -149,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));