[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: closed SMTP channel - response overrun on smtpwrite()



On 22-Jun-99 at 22:59, Eugene Crosser (crosser@online.ru) wrote:

> I am getting reproducible problems with a particular host.  They are
> getting from me the same message numerous times.  And this is what I see:

> 21650V0154746109#       (closed SMTP channel - response overrun on
smtpwrite())
> 21650V0154846109#       (closed SMTP channel - after delivery failure)

> 
> It *looks* like the Chekpoint FireWall-1 (that is known to be buggy in
> other aspects) start sending lots of junk instead of "221".  But to be
> sure - did anybody notice similar things and/or has ideas?

OK, I nailed this down.  Remote end is not 8 bit clean, (and honestly
confess it).  Message in the queue was produced with another Micro$oft
tool and contained this:

Content-Type: application/octet-stream; name="C_18_06.XLS"
Content-Transfer-Encoding: 8bit

The body itself was actuall binary file.  When 8bit data was sent to
the remote, at some moment it dropped data mode and tried to parse the
rest of the message as SMTP commands, producing a heap of
"500 Unknown command"'s.  This heap overran Zmailer's input buffer
when it at last tried to read responce to ".".

Zmailer's automatic conversion to QP did not work because of the
content-type.  I think that the piece of code below needs to be taken
off, we want to convert to 7 bit even (and especially!) non-texts:

--- transports/libta/mimeheaders.c.orig Mon Feb  8 14:10:27 1999
+++ transports/libta/mimeheaders.c      Wed Jun 23 14:15:25 1999
@@ -836,7 +836,7 @@
        }
 
        ct = parse_content_type(CT);
-
+#if 0
        if (ct->basetype == NULL ||
            ct->subtype  == NULL ||
            cistrcmp(ct->basetype,"text") != 0 ||
@@ -845,7 +845,7 @@
        if (ct->charset &&
            cistrncmp(ct->charset,"ISO-8859",8) != 0 &&
            cistrncmp(ct->charset,"KOI8",4)     != 0) return 0; /* Not ISO-* */
-
+#endif
        if (convertmode == _CONVERT_QP) {
 
          strcpy(*CTE, "Content-Transfer-Encoding: QUOTED-PRINTABLE");

What do you think, Matti?

Eugene