This fix patch corrects the errors caused by patching 
netqmail-1.05 with Shupp's netqmail-1.05-tls-smtpauth-20041111.patch
then Russell Nelson's qmail-smtpd-viruscan-1.3 patch.
Get Shupp's patch from http://www.shupp.org
Get Russell's patch from http://www.qmail.org

I do not mean to say there is anything wrong with their patches.  I think
they are both great.  But, they were made separately, and just don't apply
cleanly together, no matter which order you apply them in.  This little patch
just makes netqmail-1.05 completely patched with both patches.

One gotcha.  Shupp's patch uses the syntax 'chown user.group' in the 
Makefile-cert script.  My system (FreeBSD) doesn't like the '.' separating
the user from the group.  If yours doesn't either, open Shupp's patch with
an editor, like vi.  Search for the 'chown' command, and you'll find
five lines.  Change the 'qmaild.qmail' parts to 'qmaild:qmail' BEFORE
applying his patch.

Usage (assuming you have downloaded all source files to /usr/local/src):
cd /usr/local/src
rm -rf ./netqmail-1.05
tar -zxf netqmail-1.05.tar.gz
cd netqmail-1.05
./collate.sh
cd netqmail-1.05
patch -p0 < ../../netqmail-1.05-tls-smtpauth-20041111.patch
patch < ../../qmail-smtpd-viruscan-1.3.patch
echo ---- 
echo  Do not worry about that \"Hunk \#6 FAILED at 569.\" line above.
echo  This next patch fixes that.
echo ---- 
patch < ../../fixshupp-nelson.patch

diff -i orig/qmail-smtpd.c qmail-smtpd.c
--- orig/qmail-smtpd.c  Tue Feb  1 20:49:39 2005
+++ qmail-smtpd.c       Tue Feb  1 20:45:24 2005
@@ -642,6 +642,7 @@
   if (!*qqx) { acceptmessage(qp); return; }
   if (hops) { out("554 too many hops, this message is looping (#5.4.6)\r\n"); return; }
   if (databytes) if (!bytestooverflow) { err_size(); return; }
+  if (flagexecutable) { out("552 we don't accept email with such content (#5.3.4)\r\n"); return; }
   if (*qqx == 'D') out("554 "); else out("451 ");
   out(qqx + 1);
   out("\r\n");

diff -u orig/case_startb.c case_startb.c
--- orig/case_startb.c  Tue Feb  1 20:53:59 2005
+++ case_startb.c       Tue Feb  1 20:54:18 2005
@@ -19,24 +19,3 @@
     if (x != y) return 0;
   }
 }
-#include "case.h"
-
-int case_startb(s,len,t)
-register char *s;
-unsigned int len;
-register char *t;
-{
-  register unsigned char x;
-  register unsigned char y;
-
-  for (;;) {
-    y = *t++ - 'A';
-    if (y <= 'Z' - 'A') y += 'a'; else y += 'A';
-    if (!y) return 1;
-    if (!len) return 0;
-    --len;
-    x = *s++ - 'A';
-    if (x <= 'Z' - 'A') x += 'a'; else x += 'A';
-    if (x != y) return 0;
-  }
-}

