From: "Michael R. Gile" To: john@nlc.net.au Cc: nelson@qmail.org Subject: qmail newline patch Date: Wed, 10 Jun 1998 21:38:12 -0400 i have updated the patch you made for qmail-1.02. i believe it works as intended, since it solves the problem of rejecting some attachments created with eudora 3 & 4. *** qmail-smtpd.c.bak Wed Jun 10 07:04:16 1998 --- qmail-smtpd.c Wed Jun 10 07:14:34 1998 *************** *** 293,305 **** 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 */ state = 1; *hops = 0; flaginheader = 1; ! pos = 0; flagmaybex = flagmaybey = flagmaybez = 1; for (;;) { substdio_get(&ssin,&ch,1); if (flaginheader) { if (pos < 9) { if (ch != "delivered"[pos]) if (ch != "DELIVERED"[pos]) flagmaybez = 0; --- 293,316 ---- 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; 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; ====================================================== Michael Gile gilem@wsg.net President (518)435-0682 Web Services Group http://www.wsg.net/ .