From: Bill Nugent <whn@topelo.lopi.com>
To: john@nlc.net.au
cc: nelson@qmail.org
Subject: Updated your \n patch for qmail 1.03
Date: Tue, 08 Sep 1998 10:11:13 -0400

Howdy John,

I've enjoyed your \n patch on qmail 1.00 and 1.01 and just upgraded to 
qmail 1.03 and discovered patch was failing so I've updated the location 
and the code format so it can succeed - it appears to be working so far!

	Thank you for the patch,
	Bill

Here is the updated patch:

diff -u qmail-smtpd.c.orig  qmail-smtpd.c
--- qmail-smtpd.c.orig  Mon Sep  7 20:22:31 1998
+++ qmail-smtpd.c       Mon Sep  7 20:25:50 1998
@@ -300,13 +300,21 @@
   int flagmaybex; /* 1 if this line might match RECEIVED, if fih */
   int flagmaybey; /* 1 if this line might match \r\n, if fih */
   int flagmaybez; /* 1 if this line might match DELIVERED, if fih */
+  int seencr;

   state = 1;
   *hops = 0;
   flaginheader = 1;
-  pos = 0; flagmaybex = flagmaybey = flagmaybez = 1;
+  pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; seencr = 0;
   for (;;) {
     substdio_get(&ssin,&ch,1);
+    if (ch == '\n') {
+      if (seencr == 0) {
+        substdio_seek(&ssin,-1);
+        ch = '\r';
+       }
+     }
+    if (ch == '\r') seencr = 1; else seencr = 0;
     if (flaginheader) {
       if (pos < 9) {
         if (ch != "delivered"[pos]) if (ch != "DELIVERED"[pos]) flagmaybez = 0;





